/* Product Detail Page Styles */

/* Breadcrumb Styles */
.product-detail-container nav[aria-label="Breadcrumb"] {
    margin-bottom: 24px;
}

.product-detail-container nav[aria-label="Breadcrumb"] ol {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-detail-container nav[aria-label="Breadcrumb"] li {
    display: flex;
    align-items: center;
}

.product-detail-container nav[aria-label="Breadcrumb"] svg {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    flex-shrink: 0;
    margin: 0 8px;
}

.product-detail-container nav[aria-label="Breadcrumb"] a {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-detail-container nav[aria-label="Breadcrumb"] a:hover {
    color: #374151;
}

.product-detail-container nav[aria-label="Breadcrumb"] span {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

/* General Layout */
.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Gallery Section */
.product-gallery {
    width: 100%;
    max-width: 500px;
}

.main-image-container {
    position: relative;
    aspect-ratio: 4/3;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    width: 100%;
    height: 0;
    padding-bottom: 75%; /* 3/4 = 75% for 4:3 aspect ratio fallback */
}

/* Modern browsers with aspect-ratio support */
@supports (aspect-ratio: 4/3) {
    .main-image-container {
        height: auto;
        padding-bottom: 0;
    }
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: zoom-in;
    transition: transform 0.2s ease;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.main-image:hover {
    transform: scale(1.02);
}

/* Lightbox Modal */
.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s ease;
    user-select: none;
}

.lightbox-image.zoomed {
    cursor: zoom-out;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 15px;
    border-radius: 25px;
    z-index: 10000;
}

.lightbox-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    font-size: 16px;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.zoom-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 12px;
    z-index: 10000;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile responsiveness for lightbox */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95vw;
        max-height: 85vh;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .lightbox-controls {
        bottom: 10px;
        padding: 8px 12px;
    }
    
    .lightbox-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .zoom-info {
        top: 10px;
        left: 10px;
        padding: 6px 10px;
        font-size: 11px;
    }
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.thumbnail-button {
    position: relative;
    aspect-ratio: 4/3;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.thumbnail-button:hover {
    border-color: #ddd;
}

.thumbnail-button.active {
    border-color: #007bff;
    box-shadow: 0 0 0 1px #007bff;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Product Info Section */
.product-info {
    flex: 1;
    padding-left: 40px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.product-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.product-title {
    font-size: 32px;
    font-weight: 600;
    color: #000;
    margin-bottom: 12px;
    line-height: 1.2;
}

.delivery-info {
    display: flex;
    align-items: center;
    color: #666;
    font-size: 13px;
    margin-bottom: 20px;
}

.delivery-info svg {
    margin-right: 6px;
    color: #28a745;
    width: 24px;
    height: 24px;
}

/* Pricing Section */
.pricing-section {
    margin-bottom: 24px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: end;
}

.price-block {
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.price-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-value {
    font-size: 28px;
    font-weight: 600;
    color: #000;
}

.member-price .price-value {
    color: #28a745;
}

.member-price .price-label {
    color: #28a745;
}

/* Action Section */
.action-section {
    margin-bottom: 24px;
}

.quantity-and-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-selector {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 20px;
    overflow: hidden;
    background: white;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.qty-btn:hover {
    background: #f8f9fa;
}

.qty-input {
    width: 48px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 14px;
    background: white;
}

.qty-input:focus {
    outline: none;
}

.btn-add-cart {
    flex: 1;
    height: 40px;
    background: #000;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-add-cart:hover {
    background: #333;
}

.btn-buy-now {
    height: 40px;
    padding: 0 20px;
    background: white;
    color: #000;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-buy-now:hover {
    border-color: #000;
}

.btn-wishlist {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-wishlist:hover {
    border-color: #000;
    color: #000;
}

/* Toggle Icon Animation */
.toggle-icon {
    transition: transform 0.3s ease;
    color: #666;
    flex-shrink: 0;
}

.description-toggle[open] .toggle-icon,
.detail-accordion[open] .toggle-icon {
    transform: rotate(180deg);
}

/* Description Toggle */
.description-toggle {
    border-top: 1px solid #e9ecef;
    padding: 16px 0;
    margin-bottom: 20px;
}

.description-toggle summary {
    font-weight: 600;
    font-size: 14px;
    color: #000;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    transition: color 0.2s ease;
}

.description-toggle summary:hover {
    color: #333;
}

.description-toggle summary::-webkit-details-marker {
    display: none;
}

.description-content {
    margin-top: 12px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    overflow: hidden;
}

/* Content Animation */
.description-toggle[open] .description-content,
.detail-accordion[open] .detail-content,
.detail-accordion[open] .detail-grid {
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        max-height: 300px;
        transform: translateY(0);
    }
}

/* Product Details Accordion */
.details-section {
    margin-top: 30px;
}

.detail-accordion {
    border-top: 1px solid #e9ecef;
    padding: 16px 0;
}

.detail-accordion summary {
    font-weight: 600;
    font-size: 14px;
    color: #000;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    transition: color 0.2s ease;
}

.detail-accordion summary:hover {
    color: #333;
}

.detail-accordion summary::-webkit-details-marker {
    display: none;
}

.detail-content {
    margin-top: 12px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    overflow: hidden;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 13px;
    color: #000;
    font-weight: 500;
}

/* Main Layout */
.product-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-info {
        padding-left: 30px;
    }
    
    .product-layout {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .product-layout {
        flex-direction: column;
        gap: 30px;
    }
    
    .product-info {
        padding-left: 0;
        position: static;
    }
    
    .product-title {
        font-size: 28px;
    }
    
    .price-value {
        font-size: 24px;
    }
    
    .quantity-and-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .btn-add-cart,
    .btn-buy-now {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .product-detail-container {
        padding: 15px;
    }
    
    .pricing-grid {
        gap: 15px;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .price-value {
        font-size: 22px;
    }
    
    .quantity-and-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Animation */
.thumbnail-button,
.qty-btn,
.btn-add-cart,
.btn-buy-now,
.btn-wishlist {
    transition: all 0.2s ease;
}

/* Focus States */
.thumbnail-button:focus,
.qty-btn:focus,
.btn-add-cart:focus,
.btn-buy-now:focus,
.btn-wishlist:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Loading State */
.main-image-container.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
} 