/* ========================================
   Product Details Page Styles
======================================== */

.product-details-section {
    padding: 40px 0;
    margin-top: 140px;
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

/* Product Gallery */
.product-gallery {
    position: relative;
}

.main-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
}

.main-image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

.main-image .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.badge.featured {
    background: var(--primary-color, #f39c12);
    color: #fff;
}

.badge.out-of-stock {
    background: #dc3545;
    color: #fff;
}

.zoom-btn {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #333;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.zoom-btn:hover {
    background: var(--primary-color, #f39c12);
    color: #fff;
}

/* Gallery Thumbnails */
.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.gallery-thumbs .thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    opacity: 0.7;
}

.gallery-thumbs .thumb:hover,
.gallery-thumbs .thumb.active {
    border-color: var(--primary-color, #f39c12);
    opacity: 1;
}

.gallery-thumbs .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox */
.product-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.product-lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav.prev {
    right: 20px;
}

.lightbox-nav.next {
    left: 20px;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Product Info */
.product-info-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-title {
    font-size: 28px;
    color: #333;
    line-height: 1.4;
}

.product-category a {
    color: var(--primary-color, #f39c12);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.product-category a:hover {
    text-decoration: underline;
}

/* Price Box */
.product-price-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.current-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color, #f39c12);
}

.product-price-box .old-price {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
}

.discount {
    background: #dc3545;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Description */
.product-description h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.product-description p {
    color: #666;
    line-height: 1.8;
}

/* Meta Info */
.product-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meta-item {
    display: flex;
    gap: 10px;
    font-size: 15px;
}

.meta-item .label {
    color: #666;
}

.meta-item .value {
    font-weight: 500;
}

.meta-item .in-stock {
    color: #28a745;
}

.meta-item .out-stock {
    color: #dc3545;
}

/* Actions Box */
.product-actions-box {
    display: flex;
    gap: 15px;
    align-items: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: #f5f5f5;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #e9ecef;
}

.quantity-selector input {
    width: 60px;
    height: 45px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.quantity-selector input:focus {
    outline: none;
}

.btn-add-cart {
    flex: 1;
    padding: 14px 30px;
    font-size: 16px;
}

/* Out of Stock Notice */
.out-of-stock-notice {
    background: #fff3cd;
    color: #856404;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Features */
.product-features {
    display: flex;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.feature i {
    color: var(--primary-color, #f39c12);
    font-size: 18px;
}

/* Related Products */
.related-products-section {
    padding: 50px 0 80px;
}

.section-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Responsive */
@media (max-width: 992px) {
    .product-details {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .main-image img {
        height: 350px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 22px;
    }
    
    .current-price {
        font-size: 26px;
    }
    
    .product-actions-box {
        flex-direction: column;
    }
    
    .quantity-selector {
        width: 100%;
        justify-content: center;
    }
    
    .btn-add-cart {
        width: 100%;
    }
    
    .product-features {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-details {
        padding: 20px;
    }
}
