/* product-page.css - Premium Product Detail Styles */


:root {
    --p-bg: #fafaf9;
    --p-accent: #b5a48d;
    /* Muted gold/beige for premium feel */
    --p-text-main: #1e293b;
    --p-text-muted: #64748b;
    --p-white: #ffffff;
    --p-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.product-detail-page {
    background: var(--p-bg);
    min-height: 100vh;
    padding: calc(var(--header-height) + 3.5rem) 1rem 4rem;
    color: var(--p-text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

.product-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Sticky Breadcrumb Bar */
.sticky-breadcrumb-bar {
    position: fixed;
    top: 70px;
    /* Aligned with scrolled header height */
    left: 0;
    width: 100%;
    z-index: 800;
    /* Behind header (1000) */
    background: var(--p-bg);
    /* Solid Opaque */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 0;
    transition: top 0.3s ease;
    /* For mobile header resizing */
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    /* Align with .product-container */
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--p-text-muted);
    margin-bottom: 0;
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s;
}

.breadcrumb a:hover {
    color: var(--color-accent-1);
}

.breadcrumb i {
    font-size: 0.7rem;
}

/* Hero Section */
.product-hero {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 5rem;
    margin-bottom: 6rem;
    align-items: start;
}

.main-image-wrapper {
    position: relative;
    background: var(--p-white);
    border-radius: 40px;
    padding: 3rem;
    box-shadow: var(--p-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-product-img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.main-image-wrapper:hover .main-product-img {
    transform: scale(1.05);
}

.exceptional-seal-large {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 140px;
    height: 140px;
    z-index: 10;
    filter: drop-shadow(0 10px 20px rgba(181, 164, 141, 0.4));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(5deg);
    }

    50% {
        transform: translateY(-10px) rotate(8deg);
    }
}

.hero-content-side {
    padding-top: 1rem;
}

.product-brand-label {
    display: table;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent-1);
    margin-bottom: 1rem;
}

.product-main-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.product-tagline {
    font-size: 1.25rem;
    color: var(--p-text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-style: italic;
}

.product-rating-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.product-rating-box .stars {
    color: #f59e0b;
}

.rating-value {
    font-weight: 600;
    color: var(--p-text-muted);
}

.main-price-row {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.price-stack {
    display: flex;
    flex-direction: column;
}

.old-price {
    text-decoration: line-through;
    color: var(--p-text-muted);
    font-size: 1.1rem;
}

.current-price {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.discount-pill {
    background: #000;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.cta-actions {
    display: flex;
    align-items: stretch;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.btn-buy-now {
    flex-grow: 1;
    background: #000;
    color: #fff;
    text-decoration: none;
    padding: 1.25rem 2.5rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: 0.3s;
}

.btn-buy-now:hover {
    background: var(--color-accent-1);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.promo-box {
    background: rgba(181, 164, 141, 0.1);
    border: 1px dashed var(--color-accent-1);
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.btn-copy-code {
    background: none;
    border: none;
    color: var(--color-accent-1);
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.2s;
}

.btn-copy-code:hover {
    transform: scale(1.2);
}

.btn-add-routine {
    background: #fff;
    color: #000;
    border: 2px solid #000;
    padding: 1.25rem 2rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: 0.3s;
}

.btn-add-routine:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
}

.trust-checkmarks {
    display: flex;
    gap: 2rem;
    color: var(--p-text-muted);
    font-size: 0.9rem;
}

.trust-checkmarks i {
    color: #10b981;
}

/* Sensory & Routine Grid */
.sensory-routine-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.expert-opinion-card {
    background: var(--p-white);
    color: var(--p-text-main);
    padding: 3.5rem;
    border-radius: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--p-shadow);
    border: 1px solid rgba(181, 164, 141, 0.15);
    /* Light accent border */
}

.expert-opinion-card::after {
    content: '"';
    position: absolute;
    top: 0.5rem;
    right: 2.5rem;
    font-size: 12rem;
    font-family: 'Instrument Serif', serif;
    opacity: 0.05;
    color: var(--color-accent-1);
    pointer-events: none;
}

.expert-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.expert-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--p-bg);
    box-shadow: 0 4px 15px rgba(181, 164, 141, 0.2);
    object-fit: cover;
}

.expert-meta h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 2rem;
    margin: 0;
    color: var(--p-text-main);
    letter-spacing: -0.01em;
}

.expert-meta span {
    color: var(--color-accent-1);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.expert-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--p-text-main);
    opacity: 0.85;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
    font-style: italic;
}

/* Video Review Block in Detailed Page */
.video-review-block {
    margin-top: 1.5rem;
    position: relative;
    z-index: 5;
}

.video-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent-1);
    margin-bottom: 1rem;
}

.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.video-thumbnail-wrapper:hover {
    transform: scale(1.02);
}

.video-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.video-thumbnail-wrapper:hover img {
    opacity: 1;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%);
    transition: background 0.3s;
}

.video-thumbnail-wrapper:hover .video-overlay {
    background: radial-gradient(circle, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.play-button-outer {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.video-thumbnail-wrapper:hover .play-button-outer {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.2);
}

.play-button-inner {
    width: 50px;
    height: 50px;
    background: #ef4444;
    /* YouTube red */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

.video-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    gap: 1rem;
    background: #1a202c;
}

.video-placeholder i {
    font-size: 3rem;
    opacity: 0.7;
}

.video-placeholder span {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.sensory-routine-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.sensory-card,
.routine-step-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 40px;
    box-shadow: var(--p-shadow);
}

.sensory-card h4,
.routine-step-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

/* Sensory Scales */
.scale-item {
    margin-bottom: 1.5rem;
}

.scale-header {
    margin-bottom: 0.5rem;
}

.scale-title {
    font-size: 1rem;
}

.scale-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.scale-label-left,
.scale-label-right {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--p-text-muted);
}

.scale-bar {
    flex-grow: 1;
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    position: relative;
}

.scale-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--color-accent-1);
    border-radius: 10px;
    opacity: 0.3;
}

.scale-knob {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    background: #000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.aroma-info {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    color: var(--p-text-muted);
}

.aroma-info i {
    color: var(--color-accent-1);
}

/* Visual Step Indicator */
.step-indicator-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 0;
}

.step-dot {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--p-text-muted);
    transition: 0.3s;
}

.step-dot.active {
    background: #000;
    color: #fff;
    transform: scale(1.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.step-dot.passed {
    background: var(--color-accent-1);
    color: #fff;
}

.dot-label {
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 800;
    white-space: nowrap;
    opacity: 0;
    transition: 0.3s;
}

.step-dot.active .dot-label {
    opacity: 1;
    color: #000;
}

/* Tooltip Premium Styles */
.step-tooltip {
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 220px;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 1.25rem;
    border-radius: 20px;
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.step-tooltip strong {
    display: block;
    color: var(--color-accent-1);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    font-weight: 800;
}

.step-tooltip p {
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
}

.step-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: rgba(30, 41, 59, 0.98) transparent transparent transparent;
}

.step-dot:hover .step-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.step-line {
    flex-grow: 1;
    height: 3px;
    background: #f1f5f9;
}

.step-line.passed {
    background: var(--color-accent-1);
}

.step-hint {
    text-align: center;
    font-size: 0.9rem;
    color: var(--p-text-muted);
    margin-top: 1.5rem;
}

/* Detail Grid */
.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2.5rem;
}

.details-section {
    background: #fff;
    padding: 3rem;
    border-radius: 40px;
    box-shadow: var(--p-shadow);
}

.details-section h4 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f8fafc;
    padding-bottom: 1rem;
}

.ingredient-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.ingredient-badge i {
    color: #10b981;
}

.clashes-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff1f2;
    border-radius: 20px;
    border: 1px solid #fecaca;
}

.clashes-box h5 {
    color: #e11d48;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.benefit-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.benefit-item i {
    color: #10b981;
    margin-top: 0.2rem;
}

.how-to-use-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f0f9ff;
    border-radius: 20px;
}

.how-to-use-box h5 {
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #0369a1;
}

/* Specs */
.specs-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.spec-label {
    font-size: 0.9rem;
    color: var(--p-text-muted);
}

.spec-value {
    font-weight: 700;
    color: #000;
}

.spec-item.active .spec-value {
    color: #10b981;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .product-brand-label,
    .product-rating-box,
    .main-price-row,
    .trust-checkmarks {
        justify-content: center;
    }

    .product-details-grid {
        grid-template-columns: 1fr;
    }

    .sensory-routine-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sticky-breadcrumb-bar {
        top: 60px;
        /* Tighter fit for mobile (70px header - 10px overlap) */
    }

    .product-detail-page {
        padding-top: calc(var(--header-height-mobile) + 3.5rem) !important;
    }

    .main-image-wrapper {
        padding: 2rem;
    }

    .current-price {
        font-size: 2.5rem;
    }

    .cta-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        padding: 0.75rem 1rem;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12);
        z-index: 1000;
        display: flex;
        flex-direction: column !important;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }

    .footer-actions-row {
        width: 100% !important;
        gap: 0.6rem !important;
    }

    .btn-buy-now {
        flex: 1;
        padding: 0.75rem 1rem !important;
        font-size: 0.85rem !important;
        border-radius: 50px !important;
    }

    .btn-add-routine {
        flex: 1;
        padding: 0.75rem 0.8rem !important;
        font-size: 0.85rem !important;
        border-radius: 50px !important;
        justify-content: center;
        border-width: 1.5px !important;
        white-space: normal !important;
        text-align: center;
        line-height: 1.2;
    }

    .promo-box {
        width: 100%;
        justify-content: center;
        padding: 0.35rem 1rem !important;
        font-size: 0.8rem !important;
        order: -1;
        /* Promo on top */
        background: rgba(181, 164, 141, 0.08) !important;
    }

    .product-detail-page {
        padding-bottom: 8.5rem !important;
    }

    .expert-opinion-card {
        padding: 2rem;
    }

    .dot-label {
        display: none;
    }
}

/* Taxonomy Badges */
.taxonomy-badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.tax-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #f8fafc;
}

.tax-badge i {
    font-size: 0.8rem;
    opacity: 0.7;
}

.tax-badge.need-badge {
    background: #fdf2f8;
    /* Light pink */
    color: #9d174d;
    border-color: #fce7f3;
}

.tax-badge.need-badge:hover {
    background: #fce7f3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(157, 23, 77, 0.1);
}

.tax-badge.type-badge {
    background: #f0f9ff;
    /* Light blue */
    color: #075985;
    border-color: #e0f2fe;
}

.tax-badge.type-badge:hover {
    background: #e0f2fe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 89, 133, 0.1);
}

/* Linked Ingredient Badges */
a.ingredient-badge {
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

a.ingredient-badge:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

a.ingredient-badge:hover i {
    transform: scale(1.1);
}

@media (max-width: 900px) {
    .product-details-grid {
        grid-template-columns: 1fr;
    }
}