/* Product Detail Page Styles - Oraviare */

.product-detail-page {
    padding: 3rem 0 4rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.product-detail-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
    width: 100%;
}

/* Product Images Section */
.product-images {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 120px;
    height: fit-content;
}

.product-main-image {
    width: 100%;
    height: 600px;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.2s ease;
    will-change: transform;
}

/* Smooth image loading */
.product-main-image img[loading] {
    opacity: 0;
    animation: fadeInImage 0.4s ease-in forwards;
}

@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

.product-main-image:hover img {
    transform: scale(1.05);
}

.product-main-image .placeholder {
    font-size: 6rem;
    color: var(--text-light);
}

.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.product-thumbnail {
    width: 100%;
    height: 100px;
    background: var(--bg-light);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.product-thumbnail::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.2s ease;
    pointer-events: none;
}

.product-thumbnail:hover::before {
    background: rgba(0,0,0,0.05);
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
    will-change: transform;
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: var(--primary-color);
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info Section */
.product-info {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.product-info h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.product-category {
    margin-bottom: 1.5rem;
}

.product-category a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.product-category a:hover {
    color: var(--gold-color);
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.product-price .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-price .compare-price {
    font-size: 1.5rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.product-stock {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.product-stock.in-stock {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.product-stock.out-of-stock {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
}

.product-description {
    margin: 2.5rem 0;
    line-height: 1.9;
    color: var(--text-light);
    font-size: 1.05rem;
}

.product-description h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.product-description h3:first-child {
    margin-top: 0;
}

.product-description p {
    margin-bottom: 1.25rem;
}

.product-description ul,
.product-description ol {
    margin: 1.25rem 0;
    padding-left: 2rem;
}

.product-description li {
    margin-bottom: 0.75rem;
}

/* Product Features */
.product-features {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.product-features h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-features li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.product-features li:last-child {
    border-bottom: none;
}

.product-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Product Actions */
.product-actions {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quantity-selector label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.quantity-selector input {
    width: 100px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    transition: border-color 0.3s ease;
}

.quantity-selector input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.add-to-cart-form .btn {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Product Specifications */
.product-specifications {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 3rem;
}

.product-specifications h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gold-color);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr {
    border-bottom: 1px solid var(--border-color);
}

.spec-table tr:last-child {
    border-bottom: none;
}

.spec-table td {
    padding: 1rem 0;
    vertical-align: top;
}

.spec-table td:first-child {
    font-weight: 600;
    color: var(--text-dark);
    width: 40%;
}

.spec-table td:last-child {
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 968px) {
    .product-detail-page .container {
        padding: 0 1.5rem;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-images {
        position: static;
    }
    
    .product-main-image {
        height: 500px;
    }
    
    .product-info {
        padding: 2rem;
    }
    
    .product-info h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 768px) {
    .product-detail-page {
        padding: 2rem 0 3rem;
    }
    
    .product-detail-page .container {
        padding: 0 1rem;
    }
    
    .product-images {
        padding: 1.5rem;
    }
    
    .product-main-image {
        height: 400px;
    }
    
    .product-thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-thumbnail {
        height: 80px;
    }
    
    .product-info {
        padding: 1.5rem;
    }
    
    .product-info h1 {
        font-size: 2rem;
    }
    
    .product-price .price {
        font-size: 2rem;
    }
    
    .product-specifications {
        padding: 1.5rem;
    }
    
    .product-specifications h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .product-detail-page .container {
        padding: 0 0.75rem;
    }
    
    .product-main-image {
        height: 300px;
    }
    
    .product-thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-info h1 {
        font-size: 1.75rem;
    }
    
    .product-price {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .product-price .price {
        font-size: 1.75rem;
    }
    
    .product-description {
        font-size: 1rem;
    }
    
    .product-description h3 {
        font-size: 1.25rem;
    }
}
