/* Single Product Page Styles */

/* ============================================
   Breadcrumb Navigation
   ============================================ */
.breadcrumb-section {
    background-color: #f8f9fa;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    font-size: 14px;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-easing);
}

.breadcrumb-item a:hover {
    color: #e66a00;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-dark);
    font-weight: 600;
}

.breadcrumb-item:not(:last-child)::after {
    content: "/";
    margin-left: var(--spacing-sm);
    color: #ccc;
}

/* ============================================
   Product Detail Section
   ============================================ */
.product-detail-section {
    padding: var(--spacing-xl) 0;
    background-color: #fff;
}

.product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

/* ============================================
   Product Detail Image Gallery
   ============================================ */
.product-detail-image-gallery {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    position: sticky;
    top: 100px;
    align-self: flex-start;
    overflow: hidden;
}

.product-main-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative;
}

.product-main-image .main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* padding: var(--spacing-lg); */
    transition: opacity 0.3s ease;
}

/* Thumbnail Wrapper with Navigation */
.product-thumbnail-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
}

.product-thumbnail-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0;
    scroll-behavior: smooth;
    flex: 1;
    min-width: 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.product-thumbnail-gallery::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Navigation Buttons */
.thumbnail-nav-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e0e0e0;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.thumbnail-nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.thumbnail-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.thumbnail-nav-btn svg {
    width: 20px;
    height: 20px;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: #f0f0f0;
}

.thumbnail-item:hover {
    border-color: #ffa64d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.thumbnail-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(255, 116, 0, 0.3);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================
   Product Detail Image (Legacy - Keep for compatibility)
   ============================================ */
.product-detail-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--spacing-lg);
}

/* ============================================
   Product Detail Info
   ============================================ */
.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* ============================================
   Product Category
   ============================================ */
.product-category {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.category-tag {
    display: inline-block;
    background: #fff3e0;
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================
   Product Detail Title
   ============================================ */
.product-detail-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin: 0;
}

/* ============================================
   Product Rating
   ============================================ */
.product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stars {
    display: flex;
    gap: 4px;
}

.star {
    font-size: 20px;
    color: #ddd;
}

.star.filled {
    color: #ffc107;
}

.rating-count {
    font-size: 14px;
    color: #999;
}

/* ============================================
   Product Detail Price
   ============================================ */
.product-detail-price {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: #f8f9fa;
    border-radius: 8px;
}

.original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.current-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ============================================
   Product Detail Description
   ============================================ */
.product-detail-description {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
}

.product-detail-description p {
    margin-bottom: var(--spacing-md);
}

.product-detail-description h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: var(--spacing-lg) 0 var(--spacing-md);
}

.product-detail-description h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: var(--spacing-lg) 0 var(--spacing-md);
}

.product-detail-description ul,
.product-detail-description ol {
    margin-bottom: var(--spacing-md);
    margin-left: var(--spacing-lg);
}

.product-detail-description li {
    margin-bottom: var(--spacing-sm);
}

.product-detail-description a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-easing);
}

.product-detail-description a:hover {
    color: #e66a00;
    text-decoration: underline;
}

/* ============================================
   Product Detail Features
   ============================================ */
.product-detail-features {
    padding: var(--spacing-lg);
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.product-detail-features h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 var(--spacing-md) 0;
}

.product-detail-features ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-detail-features li {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.feature-icon {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

/* ============================================
   Product Detail Buttons
   ============================================ */
.product-detail-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.ask-button {
    flex: 1;
    background: #6366f1;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-easing);
    width: 100%;
}

.ask-button:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.ask-button:active {
    transform: translateY(0);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .product-detail-wrapper {
        grid-template-columns: 1fr;
    }

    .product-detail-image-gallery {
        position: static;
    }

    .product-main-image,
    .product-detail-image {
        min-height: 400px;
    }

    .product-detail-title {
        font-size: 28px;
    }

    .current-price {
        font-size: 28px;
    }
    
    .thumbnail-item {
        width: 80px;
        height: 80px;
    }
    
    .thumbnail-nav-btn {
        width: 32px;
        height: 32px;
    }
    
    .thumbnail-nav-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    .product-main-image,
    .product-detail-image {
        min-height: 300px;
    }

    .product-detail-title {
        font-size: 24px;
    }

    .current-price {
        font-size: 24px;
    }

    .product-detail-buttons {
        flex-direction: column;
    }

    .details-button,
    .ask-button {
        width: 100%;
    }

    .product-detail-description {
        font-size: 14px;
    }
    
    .thumbnail-item {
        width: 70px;
        height: 70px;
    }
    
    .thumbnail-nav-btn {
        width: 30px;
        height: 30px;
    }
    
    .thumbnail-nav-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .product-main-image,
    .product-detail-image {
        min-height: 250px;
    }

    .product-detail-title {
        font-size: 20px;
    }

    .current-price {
        font-size: 20px;
    }

    .product-detail-price {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-detail-buttons {
        flex-direction: column;
    }

    .details-button,
    .ask-button {
        width: 100%;
    }

    .breadcrumb-list {
        font-size: 12px;
    }
    
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }
    
    .product-thumbnail-gallery {
        gap: 8px;
    }
    
    .thumbnail-nav-btn {
        width: 28px;
        height: 28px;
    }
    
    .thumbnail-nav-btn svg {
        width: 14px;
        height: 14px;
    }
}
