/* Product Detail Page Specific Styles */

/* Product Detail Container */
.product-detail {
    max-width: 1200px;
    margin: 100px auto 60px;
    padding: 0 20px;
}

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* Product Images */
.product-images {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image-container {
    position: relative;
    margin-bottom: 20px;
}

.main-image {
    width: 100%;
    height: 400px;
    background: #f8f9fa;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Image Navigation Buttons */
.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
}

.main-image-container:hover .image-nav-btn {
    opacity: 1;
    visibility: visible;
}

.image-nav-btn:hover {
    background: rgba(0, 122, 255, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

/* Image Indicators */
.image-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.indicator-dot.active {
    background: #007aff;
    border-color: white;
}

.indicator-dot:hover {
    background: rgba(0, 122, 255, 0.8);
}

.image-thumbnails {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #007aff #f8f9fa;
    white-space: nowrap;
    padding-bottom: 8px;
    scrollbar-width: thin;
    flex-wrap: nowrap !important;
}

.thumbnail {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    overflow: hidden;
}

.thumbnail.active {
    border-color: #007aff;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-info {
    min-width: 360px;
    padding: 20px 0;
}

.product-title {
    flex: 0 0 auto;
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.product-series {
    display: inline-block;
    background: #007aff;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.product-price {
    font-size: 2rem;
    color: #007aff;
    font-weight: bold;
    margin-bottom: 30px;
}

/* Product Variants */
.product-variants {
    margin-bottom: 30px;
}

.variant-group {
    margin-bottom: 20px;
}

.variant-label {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    display: block;
}

.variant-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.variant-option {
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.variant-option.active {
    border-color: #007aff;
    background: #007aff;
    color: white;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.action-btn {
    flex: 1;
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007aff;
    color: white;
}

.btn-primary:hover {
    background: #0056cc;
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: #007aff;
    border: 2px solid #007aff;
}

.btn-secondary:hover {
    background: #007aff;
    color: white;
}

/* Product Details */
.product-details {
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.detail-section {
    margin-bottom: 40px;
}

.detail-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.detail-content {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.detail-content strong {
    color: #333;
    font-weight: 600;
}

detail-content em {
    color: #888;
    font-style: italic;
}

.detail-content br {
    line-height: 2;
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    display: flex;
    align-items: center;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li::before {
    content: "✅";
    margin-right: 12px;
    font-size: 1.2rem;
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    color: #333;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 30px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: #e9ecef;
}

/* Loading and Error States */
.loading-detail {
    text-align: center;
    padding: 100px 20px;
}

.error-detail {
    text-align: center;
    padding: 100px 20px;
    color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-images {
        position: static;
    }

    .product-title {
        font-size: 2rem;
    }

    .product-actions {
        flex-direction: column;
    }

    .main-image {
        height: 300px;
    }

    /* Mobile navigation buttons - always visible */
    .image-nav-btn {
        opacity: 1;
        visibility: visible;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }

    /* Larger indicators for touch */
    .indicator-dot {
        width: 14px;
        height: 14px;
    }

    .image-indicators {
        bottom: 10px;
        gap: 10px;
    }
}