/**
 * Product Page Styles for TOFE Perfume
 * High-end luxury product page styling
 */

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.product-detail-page {
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 300;
    color: #fff;
    background-color: rgb(0, 0, 26);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Product Section */
.product-section {
    display: flex;
    flex-direction: column;
    padding: 120px 0 60px; /* Increased top padding to prevent header overlap */
}

@media (min-width: 768px) {
    .product-section {
        flex-direction: row;
        gap: 60px;
    }
}

/* Product Gallery */
.product-gallery {
    flex: 1;
    position: relative;
}

.main-image-wrapper {
    position: relative;
    width: 100%;
    display: block;
}

.main-image {
    width: 100%;
    height: auto;
    border: 1px solid rgba(255, 191, 0, 0.2);
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

/* Navigation arrows for image gallery */
.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background-color: rgba(0, 0, 26, 0.6);
    border: 1px solid rgba(255, 191, 0, 0.5);
    color: rgb(255, 191, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.image-nav:hover {
    background-color: rgba(0, 0, 26, 0.8);
    border-color: rgb(255, 191, 0);
    opacity: 1;
    box-shadow: 0 0 15px rgba(255, 191, 0, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.image-nav:active {
    transform: translateY(-50%) scale(0.95);
    transition: transform 0.1s;
}

/* Fade in the arrows on hover for a cleaner look */
.main-image-wrapper .image-nav {
    opacity: 0.6;
    transition: all 0.3s ease;
}

.main-image-wrapper:hover .image-nav {
    opacity: 0.8;
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

/* Mobile-specific styles */
@media (max-width: 576px) {
    .image-nav {
        width: 36px;
        height: 36px;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
}

.thumbnail-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 1px solid rgba(255, 191, 0, 0.2);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.thumbnail:hover, .thumbnail.active {
    border-color: rgb(255, 191, 0);
}

/* Product Details */
.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
}

@media (min-width: 768px) {
    .product-details {
        padding-top: 0;
    }
}

.product-category {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

.product-title-container {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.product-title {
    font-size: 36px;
    font-weight: bold;
    color: rgb(255, 191, 0);
    line-height: 1.2;
    margin-right: 15px;
}

.star-rating {
    display: flex;
    align-items: center;
}

.star {
    color: rgb(255, 191, 0);
    font-size: 20px;
    margin-right: 2px;
}

.product-description {
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.8;
}

.product-price {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #fff;
}

.product-meta {
    margin-bottom: 30px;
}

.meta-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    color: rgb(255, 191, 0);
}

.product-features {
    margin-bottom: 30px;
}

.feature {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.feature-icon {
    color: rgb(255, 191, 0);
    margin-right: 10px;
}

.longevity-badge {
    display: inline-block;
    background-color: rgba(255, 191, 0, 0.2);
    border: 1px solid rgb(255, 191, 0);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

.longevity-icon {
    color: rgb(255, 191, 0);
    margin-right: 5px;
}

.add-to-cart {
    background-color: rgb(255, 191, 0);
    color: rgb(0, 0, 26);
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.add-to-cart:hover {
    background-color: #fff;
}

/* Tabs Section */
.tabs-section {
    margin: 60px 0;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid rgba(255, 191, 0, 0.3);
    flex-wrap: wrap;
}

.tab {
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    letter-spacing: 1px;
}

.tab.active {
    color: rgb(255, 191, 0);
    border-bottom: 2px solid rgb(255, 191, 0);
}

.tab-content {
    padding: 30px 0;
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content ul, 
.tab-content ol {
    padding-left: 20px;
    margin: 15px 0;
}

.tab-content li {
    margin-bottom: 10px;
}

/* Notes Pyramid */
.notes-pyramid {
    position: relative;
    height: 600px; /* Increased height for better spacing */
    margin: 60px 0;
}

.pyramid-level {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
    z-index: 2; /* Ensure pyramid levels are ABOVE the lines */
}

.top-notes {
    top: 0;
}

.middle-notes {
    top: 200px; /* Increased from 180px for more separation */
}

.base-notes {
    top: 400px; /* Increased from 360px for more separation */
}

.note-item {
    background-color: rgba(255, 191, 0, 0.1);
    border: 1px solid rgba(255, 191, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 0 10px;
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

.note-item:hover {
    transform: translateY(-10px);
    background-color: rgba(255, 191, 0, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.note-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid rgb(255, 191, 0);
}

.note-name {
    font-weight: bold;
    color: rgb(255, 191, 0);
    text-align: center;
}

.pyramid-label {
    position: absolute;
    left: 0;
    font-size: 18px;
    font-weight: bold;
    color: rgb(255, 191, 0);
    transform: translateY(-50%);
    background-color: rgb(0, 0, 26);
    padding: 5px 15px;
    border-radius: 0 20px 20px 0;
}

.top-label {
    top: 75px; /* Adjusted */
}

.middle-label {
    top: 275px; /* Adjusted to match new middle-notes position */
}

.base-label {
    top: 475px; /* Adjusted to match new base-notes position */
}

.pyramid-line {
    position: absolute;
    height: 1px;
    background-color: rgba(255, 191, 0, 0.3);
    width: 80%;
    left: 10%;
    z-index: 1; /* Ensure lines are BELOW pyramid levels and note items */
}

.top-line {
    top: 170px; /* Adjusted to be clearly below top notes */
}

.middle-line {
    top: 370px; /* Adjusted to be clearly below middle notes */
}

/* Story Section */
.story-section {
    padding: 60px 0;
    text-align: center;
    background-color: rgba(255, 191, 0, 0.05);
    margin: 60px 0;
}

.story-title {
    font-size: 28px;
    font-weight: bold;
    color: rgb(255, 191, 0);
    margin-bottom: 20px;
}

.story-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Video Section */
.video-section {
    margin: 60px 0;
    text-align: center;
}

.video-placeholder {
    width: 100%;
    max-width: 800px;
    height: 450px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 191, 0, 0.3);
}

.video-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
}

/* Reviews Section */
.reviews-section {
    margin: 60px 0;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: rgb(255, 191, 0);
    margin-bottom: 30px;
    text-align: center;
}

.reviews-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .reviews-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.review {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border: 1px solid rgba(255, 191, 0, 0.1);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.reviewer-name {
    font-weight: bold;
}

.review-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.review-rating {
    color: rgb(255, 191, 0);
    margin-bottom: 10px;
}

/* Related Products */
.related-products {
    margin: 60px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 191, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.product-card-image {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 191, 0, 0.2);
}

.product-card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: rgb(255, 191, 0);
}

.product-card-price {
    color: #fff;
    font-weight: bold;
    margin-bottom: 15px;
}

.product-card-category {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 15px;
}

.view-product {
    display: inline-block;
    background-color: rgba(255, 191, 0, 0.2);
    color: rgb(255, 191, 0);
    border: 1px solid rgb(255, 191, 0);
    padding: 8px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.view-product:hover {
    background-color: rgb(255, 191, 0);
    color: rgb(0, 0, 26);
}

/* FAQ Section */
.faq-section {
    margin: 60px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Target all Font Awesome plus/minus icons in FAQ section with high specificity */
.faq-icon .fas,
.faq-icon .fas.fa-plus,
.faq-icon .fas.fa-minus,
.faq-question .faq-icon .fas {
    color: rgb(255, 191, 0) !important; /* Gold color for visibility */
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid rgba(255, 191, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.02);
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(255, 191, 0, 0.1);
}

.faq-question.active {
    background-color: rgba(255, 191, 0, 0.1);
    color: rgb(255, 191, 0);
}

.faq-toggle {
    width: 20px;
    height: 20px;
    position: relative;
    transition: transform 0.3s ease;
}

.faq-toggle::before,
.faq-toggle::after {
    content: '';
    position: absolute;
    background-color: rgb(255, 191, 0);
    transition: all 0.3s ease;
}

.faq-toggle::before {
    width: 100%;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.faq-toggle::after {
    width: 2px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.faq-question.active .faq-toggle::after {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer.show {
    max-height: 500px;
    padding: 0 20px 20px;
}

.faq-answer-inner {
    padding-bottom: 20px;
}

.faq-question .faq-icon .fas {
    color: rgb(255, 191, 0) !important; /* Gold color for visibility, ensured with !important */
}

/* Zoom Modal */
.zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 26, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.zoom-image {
    max-width: 90%;
    max-height: 90%;
}

.close-zoom {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
}

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

.fade-in {
    animation: fadeIn 1s ease-in-out;
}

/* Mobile product header */
.mobile-product-header {
    display: none;
    width: 100%;
    margin-bottom: 20px;
}

/* Desktop/Mobile visibility helpers */
.desktop-only {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .mobile-product-header {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    /* Adjust spacing for mobile layout */
    .product-section {
        padding-top: 100px;
    }
    
    .product-gallery {
        margin-top: 0;
    }
    
    .product-section {
        padding-top: 100px;
    }
    
    /* Make tabs fit on one row on mobile */
    .tabs-header {
        flex-wrap: nowrap;
        justify-content: space-between;
        width: 100%;
        overflow-x: hidden;
    }
    
    .tab {
        padding: 12px 8px;
        font-size: 12px;
        text-align: center;
        flex: 1;
        white-space: nowrap;
        min-width: 0;
    }
    
    /* Slightly adjust tab width distribution for better fit */
    .tab[data-tab="description"] {
        flex: 0.9;
    }
    
    .tab[data-tab="how-to-use"] {
        flex: 0.9;
    }
    
    .tab[data-tab="shipping"] {
        flex: 1.2;
    }
    
    /* Notes Pyramid mobile improvements */
    .notes-pyramid {
        height: auto;
        padding: 20px 0;
        margin: 30px 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    
    .pyramid-level {
        position: static;
        transform: none;
        left: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 30px;
        width: 100%;
        order: 2;
    }
    
    .pyramid-label {
        position: static;
        transform: none;
        width: 100%;
        text-align: center;
        margin: 15px 0;
        padding: 10px;
        border-radius: 20px;
        order: 1;
        background-color: rgba(255, 191, 0, 0.1);
        border: 1px solid rgba(255, 191, 0, 0.3);
    }
    
    /* Create note level containers with proper order */
    .notes-pyramid .top-level-container,
    .notes-pyramid .middle-level-container,
    .notes-pyramid .base-level-container {
        display: flex;
        flex-direction: column;
        margin-bottom: 25px;
        width: 100%;
    }
    
    .pyramid-line {
        display: block;
        position: static;
        height: 1px;
        width: 80%;
        margin: 15px auto;
        background-color: rgba(255, 191, 0, 0.3);
        order: 3;
    }
    
    .top-notes, 
    .middle-notes, 
    .base-notes {
        top: auto;
    }
    
    .note-item {
        width: 110px;
        height: 110px;
        padding: 10px;
        margin-bottom: 10px;
    }
    
    /* Additional mobile optimizations */
    .mobile-product-header .product-title {
        font-size: 24px; /* Slightly smaller title on mobile */
        margin-right: 10px;
    }
    
    .mobile-product-header .product-title-container {
        margin-bottom: 10px; /* Reduced spacing */
    }
    
    .mobile-product-header .star-rating {
        transform: scale(0.8);
        transform-origin: left center;
    }
    
    /* Add some visual separation between header and image */
    .mobile-product-header:after {
        content: '';
        display: block;
        width: 100%;
        height: 1px;
        background: rgba(255, 191, 0, 0.2);
        margin: 5px 0 15px;
    }
}

/* Additional media query for very small screens */
@media (max-width: 400px) {
    .tab {
        padding: 10px 5px;
        font-size: 11px;
        letter-spacing: 0;
    }
    
    /* Slightly shorter label for "Shipping & Returns" on very small screens */
    .tab[data-tab="shipping"] {
        font-size: 10px;
    }
}
