/* 
  Sinta by Marie - Celestial Romantic Aesthetic 
  "Ethereal Romanticism with Celestial Whimsy"
*/

@import url('https://fonts.googleapis.com/css2?family=Alice&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Lato:wght@300;400&family=Pinyon+Script&display=swap');

:root {
    /* Color Palette */
    --bg-cream: #F9F5F0;
    --bg-blush: #F3E5E5;
    --text-main: #4A403A;
    /* Warm dark grey/brown */
    --text-light: #6B5E55;
    --accent-gold: #D4AF37;
    --accent-lavender: #E6E6FA;
    --accent-blue: #B0C4DE;
    --shadow-warm: rgba(74, 64, 58, 0.1);
    --glow-gold: rgba(212, 175, 55, 0.4);

    /* Typography */
    --font-heading: 'Lavishly Yours', cursive;
    --font-body: 'Alice', serif;
    /* Using Alice for that "storybook" body text feel */
    --font-ui: 'Lato', sans-serif;
    /* For small UI elements if needed */
}

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

body {
    background-color: var(--bg-cream);
    background-image: url('../img/background-main.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.8;
    overflow-x: hidden;
    font-size: 18px;
    cursor: url('../img/quill.svg') 12 56, auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a,
button,
[role="button"] {
    cursor: url('../img/quill.svg') 12 56, pointer;
}

/* --- Header --- */
header {
    padding: 0.8rem 1rem;
    text-align: center;
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(to bottom, rgba(249, 245, 240, 0.8) 0%, rgba(249, 245, 240, 0) 90%);
    backdrop-filter: blur(2px);
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

header.header-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

header .logo,
header nav,
.mobile-menu-btn {
    pointer-events: auto;
}

header:hover {
    background: rgba(249, 245, 240, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
    padding-bottom: 2rem;
    -webkit-mask-image: none;
    mask-image: none;
}

.logo {
    margin-bottom: 0.5rem;
    display: inline-block;
    cursor: url('../img/quill.svg') 12 56, pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.text-logo {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    font-size: 2rem;
    line-height: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-shadow: 0 0 10px var(--glow-gold);
}

.text-logo span:first-child {
    font-size: 2.2rem;
    letter-spacing: 0.05em;
}

.text-logo span:last-child {
    font-size: 1.7rem;
    font-style: italic;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.logo-image {
    display: none;
}

header:hover .logo {
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

header:hover nav ul {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

nav a:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 5px var(--glow-gold);
}

/* Hide mobile menu button on desktop */
.mobile-menu-btn {
    display: none;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 2rem;
    margin-top: 0;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

.hero-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 50%, rgba(249, 245, 240, 0.8) 100%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    animation: fadeIn 2s ease-out;
    background: transparent;
    padding: 6rem 2rem;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    padding: 0.5rem 0;
    color: #3e3632;
    text-shadow: 0 0 20px rgba(249, 245, 240, 0.8), 0 0 40px rgba(249, 245, 240, 0.6);
}

.hero p {
    font-size: 1.6rem;
    font-style: italic;
    color: #4A403A;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

/* --- Parchment Background Effect --- */
.faded-parchment {
    position: relative;
    z-index: 1;
}

.faded-parchment::before {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    right: -5%;
    bottom: -5%;
    background-image: url('../img/parchment-smooth.png');
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 248, 225, 0.7);
    /* Warmer, slightly more opaque yellow */
    background-blend-mode: multiply;
    /* Better texture visibility */
    z-index: -1;
    /* Light feathering on borders: defined center, soft edge */
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

/* --- Collection Carousel --- */
.collection {
    padding: 6rem 0;
    /* increased padding for the paper effect */
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    text-align: center;
    font-size: 4.5rem;
    /* Increased slightly for script font legibility */
    margin-bottom: 4rem;
    font-style: normal;
    /* Lavishly Yours is naturally italic-like */
    font-weight: 700;
    position: relative;
    display: inline-block;
    width: 100%;
}

.carousel-track-container {
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2rem 0;
    max-width: 972px;
    margin: 0 auto;
    scroll-snap-type: x mandatory;
}

.carousel-track-container::-webkit-scrollbar {
    display: none;
}

.carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
}

.carousel-wrapper p {
    text-align: center;
    font-size: 2rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    width: max-content;
}

.product-card {
    background: transparent;
    padding: 1rem;
    border: none;
    text-align: center;
    position: relative;
    min-width: 300px;
    width: 300px;
    scroll-snap-align: center;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(249, 245, 240, 0.9);
    border: 1px solid var(--accent-gold);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: url('../img/quill.svg') 12 56, pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 0 2px var(--bg-cream), inset 0 0 0 3px var(--accent-gold);
}

.carousel-btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px var(--accent-gold), 0 0 15px var(--glow-gold);
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

/* --- Product Image Overlay --- */
.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.product-image-wrapper.black-circle {
    background: #000 !important;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.5s ease;
    filter: sepia(0);
    display: block;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(249, 245, 240, 0.2);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), backdrop-filter 0.6s ease;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
}

.keyhole-icon {
    width: 50px;
    height: 50px;
    fill: #ffd662;
    /* Aspen Gold */
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
}

.product-card:hover .product-image-wrapper {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.4);
    /* The Halo */
}

.product-card:hover .product-overlay {
    opacity: 1;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.product-card:hover .keyhole-icon {
    transform: scale(1.1);
}

.product-card:hover .product-image {
    filter: sepia(0.2);
}

.product-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
    font-style: italic;
}

/* --- Button Style --- */
.btn-primary {
    display: inline-block;
    padding: 1rem 3rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--text-light);
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 2px solid var(--accent-gold);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2), 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: var(--accent-gold);
    color: #fff;
    border-color: var(--accent-gold);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
    letter-spacing: 0.25em;
}

/* --- Book Layout (Half-Page Flip) --- */
.about-section {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 2000px;
}

.book {
    width: 100%;
    height: 700px;
    display: flex;
    position: relative;
}

.stack-container {
    flex: 1;
    position: relative;
    perspective: 2000px;
    height: 100%;
    z-index: 10;
}

.stack-container .right-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.book-page {
    flex: 1;
    height: 100%;
    position: relative;
    background: #fffcf0;
    background-image: url('../img/parchment-smooth.png');
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(74, 64, 58, 0.1);
    box-shadow: inset 0 0 80px rgba(74, 64, 58, 0.03);
    overflow: hidden;
}

.left-page {
    border-radius: 4px 0 0 4px;
    z-index: 1;
}

/* Container for the flipping page */
.right-page {
    border-radius: 0 4px 4px 0;
    z-index: 10;
    /* Always on top so it covers left page when flipped */
    transform-style: preserve-3d;
    transform-origin: left center;
    /* Flip around the spine */
    transition: transform 1.2s cubic-bezier(0.645, 0.045, 0.355, 1), z-index 0s;
    transition-delay: 0s, 0s;
}

.right-page.flipped {
    transform: rotateY(-180deg);
    transition-delay: 0s, 0.6s;
    /* Delay z-index change until halfway through flip */
}

/* Z-Index Logic for Book Stack */
#page-1 {
    z-index: 20;
}

#page-1.flipped {
    z-index: 1;
}

#page-2 {
    z-index: 10;
}

#page-2.flipped {
    z-index: 2;
    /* Must be higher than #page-1.flipped */
}

#page-base {
    z-index: 0;
}

/* Common styles for faces */
.page-side {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: #fffcf0;
    background-image: url('../img/parchment-smooth.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
}

/* --- Front Face --- */
.page-side.front {
    z-index: 2;
    transform: rotateY(0deg);
}

/* --- Back Face --- */
.page-side.back {
    z-index: 1;
    transform: rotateY(180deg);
}

/* 
   Fix Mirrored Text & Fade In:
   1. REMOVED scaleX(-1) because the net rotation is 0deg (readable).
   2. Start opacity 0 to hide the transition.
   3. Fade in after delay.
*/
.page-side.back .about-content-full {
    /* transform: scaleX(-1);  <-- REMOVED */
    opacity: 0;
    transition: opacity 0.5s ease 0.5s;
}

.right-page.flipped .page-side.back .about-content-full {
    opacity: 1;
}

/* 
   Fix Back Button:
   1. Position at 'right: 0' (which becomes visual left/outer corner when flipped).
   2. REMOVED scaleX(-1) because net rotation is 0deg.
*/
/* Back Face: Position Back Button on the visual outer corner (left side of book) */
.page-side.back .back-btn {
    left: 0;
    right: auto;
    clip-path: polygon(0 0, 0 100%, 100% 100%);
}

/* Ensure only visible sides capture clicks */
.page-side.front {
    pointer-events: auto;
}

.right-page.flipped .page-side.front {
    pointer-events: none;
}

.page-side.back {
    pointer-events: none;
}

.right-page.flipped .page-side.back {
    pointer-events: auto;
}

/* The Spine Shadow */
.book::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 60px;
    transform: translateX(-50%);
    background: linear-gradient(to right,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.1) 40%,
            rgba(0, 0, 0, 0.15) 50%,
            rgba(0, 0, 0, 0.1) 60%,
            rgba(0, 0, 0, 0) 100%);
    z-index: 10;
    pointer-events: none;
}

.about-image {
    width: 100%;
    height: 100%;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 500px 500px 0 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    filter: sepia(0.15);
}

.about-content,
.about-content-full {
    padding: 4rem 3rem 4rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.about-content-full {
    padding: 4rem 5rem 4rem 3rem;
}

.about-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.about-text p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Page Curl Buttons */
.read-more-btn,
.back-btn {
    position: absolute;
    bottom: 0;
    width: 100px;
    height: 100px;
    background: var(--accent-gold);
    cursor: url('../img/quill.svg') 12 56, pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    z-index: 30;
}

/* Front button: Bottom Right */
.read-more-btn {
    right: 0;
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

/* Back button: Bottom Left (Standard positioning) */
.back-btn {
    position: absolute;
    bottom: 0;
    width: 100px;
    height: 100px;
    background: var(--accent-gold);
    cursor: url('../img/quill.svg') 12 56, pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    z-index: 30;
}

.read-more-btn:hover,
.back-btn:hover {
    width: 120px;
    height: 120px;
    background: var(--text-main);
}

/* --- Footer --- */
footer {
    padding: 6rem 2rem 2rem;
    position: relative;
    margin-top: 8rem;
    border-top: 1px solid rgba(74, 64, 58, 0.1);
    color: var(--text-main);
    overflow: hidden;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1.2fr 1fr;
    gap: 4rem;
    text-align: left;
    position: relative;
    z-index: 2;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-brand .text-logo {
    font-size: 2.2rem;
    align-items: flex-start;
}

.footer-brand .text-logo span:first-child {
    font-size: 2.4rem;
    font-weight: 700;
}

.footer-brand .text-logo span:last-child {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0.2rem;
}

.footer-signoff {
    font-size: 1rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--text-light);
    max-width: 300px;
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    font-size: 1rem;
    color: var(--text-light);
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-gold);
    transform: translateX(10px);
}

.footer-newsletter p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    position: relative;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-bottom: 1px solid var(--accent-gold);
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
}

.newsletter-form input:focus {
    outline: none;
    border-bottom-width: 2px;
}

.newsletter-form button {
    background: var(--accent-gold);
    color: white;
    border: none;
    padding: 0 1.5rem;
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    cursor: url('../img/quill.svg') 12 56, pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--text-main);
}

.social-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links-grid a {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.social-links-grid a:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 10px var(--glow-gold);
}

.footer-bottom {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(74, 64, 58, 0.05);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    position: relative;
    z-index: 2;
}

/* Mobile Adjustments for Footer */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 576px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-column {
        align-items: center;
    }

    .footer-signoff {
        max-width: 100%;
    }

    .newsletter-form {
        width: 100%;
    }

    .footer-links a:hover {
        transform: none;
        /* Disable translation on mobile center align */
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .about-section {
        padding: 4rem 1rem;
    }

    .book {
        height: auto;
        flex-direction: column;
    }

    .book::before {
        display: none;
    }

    .book-page,
    .stack-container {
        min-height: 400px;
    }

    .about-content,
    .about-content-full {
        padding: 2rem;
    }

    .about-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 3rem;
        margin-bottom: 2rem;
        /* Less margin on mobile */
    }

    .carousel-wrapper p {
        font-size: 1.2rem;
        padding: 0 1rem;
        margin-bottom: 1.5rem;
    }

    header {
        padding: 0.5rem;
    }

    .logo-image {
        width: 80px;
        /* Smaller logo for mobile to prevent overlapping content */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .btn-primary {
        width: auto;
        min-width: 200px;
        padding: 1.25rem 2rem;
    }

    /* Show arrows on mobile */
    .carousel-btn {
        display: flex;
        width: 35px;
        height: 35px;
        background: rgba(255, 255, 255, 0.85);
        transform: translateY(-50%);
    }

    .carousel-btn:hover {
        transform: translateY(-50%);
    }

    .carousel-track-container {
        padding: 3rem calc(50% - 130px);
        overflow-y: hidden;
    }

    .carousel-wrapper {
        padding: 0 1rem;
    }

    .carousel-track {
        gap: 5rem;
    }

    .product-card {
        min-width: 260px;
        width: 260px;
    }

    .mobile-menu-btn {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        z-index: 1002;
    }

    .about-section {
        padding: 4rem 1rem 3rem;
        /* Extra top padding for mobile */
        perspective: none;
    }

    main {
        padding-top: 60px;
        /* Space for fixed header logo */
    }

    .book {
        flex-direction: column;
        height: auto;
        gap: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        overflow: visible;
        background: #fffcf0;
    }

    .book-page,
    .stack-container {
        min-height: 450px;
        position: relative;
    }

    .left-page {
        border-radius: 8px 8px 0 0;
        border-bottom: none;
    }

    .stack-container {
        border-radius: 0 0 8px 8px;
        height: auto;
    }

    .stack-container .right-page {
        position: relative;
        /* Stack normally on mobile */
        top: auto;
        left: auto;
        min-height: 400px;
    }

    .right-page.flippable {
        position: absolute !important;
        /* Keep flippable pages absolute to allow overlap */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .about-image {
        padding: 1.5rem;
    }

    .about-content,
    .about-content-full {
        padding: 2.5rem 1.5rem;
    }

    .about-title {
        font-size: 2.5rem;
    }

    .mobile-menu-btn span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: var(--text-main);
        margin: 5px 0;
        transition: 0.3s;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(249, 245, 240, 0.98);
        padding: 2rem;
        opacity: 0;
        transform: translateY(-10px);
        transition: 0.3s;
    }

    nav ul.show {
        display: flex;
        opacity: 1;
        transform: translateY(0);
        pointer-events: all;
    }
}

/* --- Product Detail Grid (e.g., Celestial Court) --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 1rem;
    margin-top: 2rem;
}

.grid-item {
    width: 100%;
    background: transparent;
    border-radius: 0;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(212, 175, 55, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
}

/* Remove gold border for specific grids */
.product-grid.no-border .grid-item {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}


.grid-item.hover-reveal {
    position: relative;
}

.grid-item.hover-reveal .secondary-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item.hover-reveal:hover .secondary-img {
    opacity: 1;
}

.grid-item.hover-reveal:hover .primary-img {
    opacity: 0;
    /* Optional: hide primary or keep underneath */
}

.grid-item.hover-reveal-multi {
    position: relative;
}

.grid-item.hover-reveal-multi img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.grid-item.hover-reveal-multi img:first-child {
    position: relative;
    opacity: 1;
}

.grid-item.hover-reveal-multi:hover img {
    animation: multi-cross-fade 3s infinite;
}

.grid-item.hover-reveal-multi:hover img:nth-child(1) {
    animation-delay: 0s;
}

.grid-item.hover-reveal-multi:hover img:nth-child(2) {
    animation-delay: -2s;
}

.grid-item.hover-reveal-multi:hover img:nth-child(3) {
    animation-delay: -1s;
}

/* 4-Image Crossfade */
.grid-item.hover-reveal-multi-4 {
    position: relative;
}

.grid-item.hover-reveal-multi-4 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.grid-item.hover-reveal-multi-4 img:first-child {
    position: relative;
    opacity: 1;
}

.grid-item.hover-reveal-multi-4:hover img {
    animation: multi-cross-fade-4 4s infinite;
}

.grid-item.hover-reveal-multi-4:hover img:nth-child(1) {
    animation-delay: 0s;
}

.grid-item.hover-reveal-multi-4:hover img:nth-child(2) {
    animation-delay: -3s;
}

.grid-item.hover-reveal-multi-4:hover img:nth-child(3) {
    animation-delay: -2s;
}

.grid-item.hover-reveal-multi-4:hover img:nth-child(4) {
    animation-delay: -1s;
}

@keyframes multi-cross-fade-4 {

    0%,
    20% {
        opacity: 1;
        z-index: 10;
    }

    25%,
    95% {
        opacity: 0;
        z-index: 1;
    }

    100% {
        opacity: 1;
        z-index: 10;
    }
}


/* 2-Image Crossfade */
.grid-item.hover-reveal-multi-2 {
    position: relative;
}

.grid-item.hover-reveal-multi-2 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.grid-item.hover-reveal-multi-2 img:first-child {
    position: relative;
    opacity: 1;
}

.grid-item.hover-reveal-multi-2:hover img {
    animation: multi-cross-fade-2 3s infinite;
}

.grid-item.hover-reveal-multi-2:hover img:nth-child(1) {
    animation-delay: 0s;
}

.grid-item.hover-reveal-multi-2:hover img:nth-child(2) {
    animation-delay: -1.5s;
}

@keyframes multi-cross-fade-2 {

    0%,
    45% {
        opacity: 1;
        z-index: 10;
    }

    50%,
    95% {
        opacity: 0;
        z-index: 1;
    }

    100% {
        opacity: 1;
        z-index: 10;
    }
}


@keyframes multi-cross-fade {

    0%,
    28% {
        opacity: 1;
        z-index: 10;
    }

    33%,
    95% {
        opacity: 0;
        z-index: 1;
    }

    100% {
        opacity: 1;
        z-index: 10;
    }
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.grid-item:hover img {
    transform: scale(1.05);
    /* Slight zoom on hover */
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}



/* --- Pandora's Box Page Styles --- */
.pandoras-box-section {
    padding: 8rem 2rem;
    min-height: 100vh;
    max-width: 1000px;
    margin: 0 auto;
}

.pandora-header {
    text-align: center;
    margin-bottom: 5rem;
}

.pandora-header h1 {
    font-size: 5rem;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    font-weight: 400;
}

.pandora-header p {
    font-size: 1.4rem;
    font-style: italic;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

.chapter-list-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.chapter-row {
    width: 100%;
}

.chapter-frame {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(2px);
    border: 1px solid var(--accent-gold);
    /* Double border effect for 'frame' look */
    outline: 3px double var(--accent-gold);
    outline-offset: -6px;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
    gap: 2rem;
}

.chapter-frame:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.15);
}

.chapter-img-container {
    width: 180px;
    height: 120px;
    border-radius: 4px;
    /* Slight roundness */
    overflow: hidden;
    position: relative;
    border: 1px solid var(--accent-gold);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Ornate decoration on image */
.chapter-img-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin: 4px;
    pointer-events: none;
}

.chapter-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.chapter-frame:hover .chapter-img-container img {
    transform: scale(1.1);
}

.chapter-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Text alignments handled by utility classes or flex direction */

.chapter-subtitle {
    display: block;
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 0.2rem;
}

.chapter-title {
    font-family: var(--font-body);
    /* Serif title like screenshot */
    font-size: 2.2rem;
    font-weight: 400;
    line-height: 1.1;
    color: var(--text-main);
}

.visit-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #f5f0e6, #e6ded1);
    border: 1px solid var(--accent-gold);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1.1rem;
    text-transform: capitalize;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.visit-pill-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.visit-pill-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    border-color: #bfa030;
    color: #3e3632;
}

/* Alternating Layouts */
.chapter-row.right-image .chapter-content {
    text-align: left;
    /* Keep text left aligned for readability, or right? Screenshot looks left aligned even on right-image rows? Actually screenshot row 2: "Chapter II" is on left. */
}

/* Mobile Responsive for Pandora's Box */
@media (max-width: 768px) {
    .pandoras-box-section {
        padding: 5rem 1rem;
    }

    .pandora-header h1 {
        font-size: 3rem;
    }

    .pandora-header p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .chapter-frame {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
        padding: 1.5rem;
    }

    /* Reorder for mobile: Image top, then Content, then Button */
    .chapter-frame .chapter-img-container {
        order: -1;
        width: 100%;
        height: 180px;
    }

    .chapter-content {
        text-align: center !important;
        width: 100%;
    }

    .chapter-title {
        font-size: 1.8rem;
    }

    .visit-pill-btn {
        width: auto;
        min-width: 160px;
        padding: 0.8rem 2.5rem;
    }
}

/* --- Gold Text Reveal Effect --- */
.gold-text-reveal {
    /* Aspen Gold Gradient: Darkened base for better visibility */
    background: linear-gradient(90deg, #7A661F, #D4AF37, #FFF6D1, #D4AF37, #7A661F);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    /* Animations: Shimmer + Reveal (Slowed down) */
    animation: goldShine 6s linear infinite, revealLeftToRight 4s cubic-bezier(0.22, 1, 0.36, 1) forwards;

    /* Reveal mechanic (Negative vertical insets prevent descender clipping) */
    clip-path: inset(-20% 100% -20% 0);

    /* Ensure no double text-shadow ghosts with transparent text */
    text-shadow: none !important;
    /* Use drop-shadow for the glow effect instead */
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));

    /* Layout */
    display: inline-block;
    /* Required for clip-path to work nicely on text block */
    width: 100%;
    /* Ensure it takes full width if needed, or stick to auto */
}

@keyframes goldShine {
    from {
        background-position: 200% center;
    }

    to {
        background-position: 0% center;
    }
}

@keyframes revealLeftToRight {
    0% {
        clip-path: inset(-20% 100% -20% 0);
    }

    100% {
        clip-path: inset(-20% 0 -20% 0);
    }
}