/* Color palette derived from the Salvina Flowers theme */
:root {
    --bg-main: #d8c397;
    /* Warm Gold/Beige */
    --text-dark: #2b261f;
    /* Dark Espresso */
    --text-muted: #6e614d;
    /* Subtle Secondary Text */
    --btn-bg: #2e2821;
    /* Dark Accent for Buttons */
    --btn-text: #d8c397;
    /* Gold Button Text */
    --dropdown-bg: #211c17;
    /* Dark Overlay Background */
    --border-subtle: rgba(43, 38, 31, 0.12);
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', sans-serif;
}

/* Global Reset & Unselectable Text Rule */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    background-color: var(--bg-main);
    color: var(--text-dark);
    font-family: var(--font-serif);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;
}

/* Navigation Header */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 5%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.brand-logo {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
}

.brand-logo:hover {
    opacity: 0.7;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 3rem;
}

/* Navigation Links */
.nav-center a,
.dropdown-btn {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.nav-center a:hover,
.dropdown-btn:hover {
    opacity: 0.6;
}

.mobile-cart-link {
    display: none;
}

/* Desktop Dropdown Styling */
.dropdown {
    position: relative;
    display: inline-block;
}

.arrow {
    font-size: 0.8rem;
    margin-left: 4px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.dropdown.open .arrow,
.dropdown:hover .arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dropdown-bg);
    min-width: 180px;
    padding: 0.8rem 0;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
    border-radius: 2px;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
}

.dropdown-content a {
    color: var(--bg-main);
    padding: 0.7rem 1.4rem;
    display: block;
    font-size: 1.1rem;
    transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #352d25;
    opacity: 1;
}

@media (min-width: 901px) {
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

/* Desktop Cart Icon */
.nav-right .cart-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dark);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-right .cart-btn:hover {
    opacity: 0.6;
}

.cart-icon {
    display: block;
}

.cart-count {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Mobile Hamburger Icon */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.mobile-toggle span {
    width: 26px;
    height: 2px;
    background-color: var(--text-dark);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation Background Dim Overlay */
.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
    z-index: 98;
}

.menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section Layout (Index Page) */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 0 1rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 500;
    color: var(--text-dark);
    letter-spacing: 2px;
    margin-bottom: 0.6rem;
    line-height: 1.1;
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 6px;
    color: var(--text-muted);
    margin-bottom: 3.5rem;
    text-transform: uppercase;
}

.hero-btn {
    display: inline-block;
    background-color: var(--btn-bg);
    color: var(--btn-text);
    text-decoration: none;
    padding: 1.1rem 3.2rem;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.hero-btn:hover {
    background-color: #423b32;
    transform: translateY(-2px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(35px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Header Navigation Override */
@media (max-width: 900px) {
    .navbar {
        padding: 1.6rem 6%;
    }

    .nav-right {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-center {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: #bfa87a;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 6.5rem 2.2rem 3.5rem;
        gap: 0;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 99;
    }

    .nav-center.active {
        right: 0;
    }

    .nav-center a,
    .dropdown-btn {
        width: 100%;
        text-align: left;
        padding: 1.1rem 0;
        font-size: 1.4rem;
        border-bottom: 1px solid var(--border-subtle);
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-btn {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dropdown-content {
        position: static;
        transform: none;
        background-color: transparent;
        box-shadow: none;
        min-width: 100%;
        margin-top: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, padding 0.3s ease;
    }

    .dropdown-content::before {
        display: none;
    }

    .dropdown.open .dropdown-content {
        display: block;
        max-height: 250px;
        padding: 0.4rem 0 0.8rem 1rem;
        border-bottom: 1px solid var(--border-subtle);
    }

    .dropdown-content a {
        padding: 0.6rem 0;
        font-size: 1.15rem;
        color: var(--text-dark);
        border-bottom: none;
        opacity: 0.85;
    }

    .mobile-cart-link {
        display: flex;
        align-items: center;
        gap: 10px;
        font-family: var(--font-serif);
        font-size: 1.4rem;
        font-weight: 500;
        color: var(--text-dark);
        text-decoration: none;
        width: 100%;
        padding: 1.1rem 0;
        border-bottom: 1px solid var(--border-subtle);
    }

    .hero-title {
        font-size: 2.8rem;
    }
}

/* ==========================================================================
   Full-Screen Editorial Shop Overlay Menu
   ========================================================================== */

.shop-overlay {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100vw;
    height: 100vh;
    background-color: #f7f3eb;
    z-index: 9999;
    transition: left 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}

.shop-overlay.active {
    left: 0;
}

.shop-close-btn {
    position: absolute;
    top: 2.2rem;
    left: 4.5rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text-dark);
    cursor: pointer;
    z-index: 10;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.shop-close-btn:hover {
    transform: rotate(90deg);
    opacity: 0.6;
}

.shop-overlay-grid {
    display: grid;
    grid-template-columns: 0.65fr 1fr;
    height: 100vh;
    width: 100%;
}

/* Column 1: Main Categories (Left-aligned) */
.shop-col-main {
    padding: 7.5rem 4.5rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    background-color: #f7f3eb;
}

.shop-categories-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.shop-cat-item {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--text-dark);
    text-decoration: none;
    position: relative;
    white-space: nowrap;
    transition: color 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    display: inline-block;
    width: fit-content;
}

.shop-cat-item::before {
    content: '— ';
    opacity: 0;
    margin-right: 0;
    transition: opacity 0.4s ease, margin-right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.shop-cat-item.active,
.shop-cat-item:hover {
    color: #a48248;
    transform: translateX(8px);
}

.shop-cat-item.active::before,
.shop-cat-item:hover::before {
    opacity: 1;
    margin-right: 8px;
}

.shop-cat-item.highlight {
    color: #8c6e3d;
}

.shop-col-footer {
    display: flex;
    gap: 2.2rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 2rem;
    margin-top: auto;
    width: 100%;
    justify-content: flex-start;
}

.shop-col-footer a {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.4s ease;
}

.shop-col-footer a:hover {
    color: var(--text-dark);
}

/* Column 2: Dark Sub-categories Panel */
.shop-col-sub {
    background-color: var(--dropdown-bg);
    color: var(--bg-main);
    padding: 7.5rem 3.5rem 3.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
}

.sub-panel {
    display: none;
}

.sub-panel.active {
    display: block;
    animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sub-panel-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--bg-main);
    margin-bottom: 2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(216, 195, 151, 0.2);
}

/* Sub-Panel Image Grid & Card Styling */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 210px));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.preview-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    min-width: 0; /* Prevents grid item from locking to text width */
}

.card-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 4px;
    background-color: #2b261f;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-card:hover .card-img-wrap img {
    transform: scale(1.06);
}

.card-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--bg-main);
    letter-spacing: 0.5px;
    white-space: normal; /* Allows title to wrap cleanly onto a second line */
    word-break: break-word;
    line-height: 1.25;
    transition: color 0.3s ease;
    text-decoration: none;
}

.preview-card:hover .card-title {
    color: #ffffff;
}

/* Panel CTA Button - Left-aligned to match image grid, centered relative to 600px width */
.panel-shop-btn {
    display: block;
    width: 100%;
    max-width: 600px;
    margin: 0;
    padding: 1.1rem 1.8rem;
    text-align: center;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--bg-main);
    background-color: transparent;
    border: 1px solid rgba(216, 195, 151, 0.35);
    border-radius: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.panel-shop-btn:hover {
    background-color: var(--bg-main);
    color: var(--text-dark);
    border-color: var(--bg-main);
    box-shadow: 0 4px 15px rgba(216, 195, 151, 0.2);
}

/* Column 3: High-end Editorial Image */
.shop-col-image {
    background-image: url('https://images.unsplash.com/photo-1526047932273-341f2a7631f9?q=80&w=1200&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    position: relative;
}

.shop-col-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(43, 38, 31, 0.15);
}

/* Keyframe Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Overrides for Shop Overlay */
@media (max-width: 1024px) {
    .shop-overlay-grid {
        grid-template-columns: 0.65fr 1fr;
    }

    .shop-col-image {
        display: none;
    }

    .shop-col-main {
        padding: 6.5rem 2.5rem 3rem;
    }

    .shop-col-sub {
        padding: 6.5rem 2.5rem 3rem;
    }

    .shop-close-btn {
        left: 2.5rem;
    }

    .shop-cat-item {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .shop-overlay {
        overflow-y: auto;
    }

    .shop-close-btn {
        top: 1.8rem;
        left: 2rem;
    }

    .shop-overlay-grid {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }

    /* Main Categories side menu stays strictly left-aligned */
    .shop-col-main {
        padding: 5.5rem 2rem 2.5rem;
        align-items: flex-start;
        text-align: left;
    }

    .shop-categories-list {
        align-items: flex-start;
    }

    .shop-cat-item {
        font-size: 1.8rem;
    }

    /* Sub-panel layout for tablet/mobile range (481px–768px) */
    .shop-col-sub {
        padding: 3rem 2rem 4rem;
        text-align: center;
    }

    .sub-panel-title {
        text-align: center;
    }

    .preview-grid {
        grid-template-columns: repeat(2, 1fr); /* Switch from 3 cramped columns to 2 generous columns */
        gap: 1.5rem 1.25rem;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }

    .preview-card {
        align-items: center;
    }

    .card-title {
        font-size: 1.05rem;
        text-align: center;
    }

    .panel-shop-btn {
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }

    .shop-col-footer {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 1.2rem;
        padding-top: 1.5rem;
    }
}

/* Mobile Screen Breakpoint (< 480px): Single Centered Image Grid */
@media (max-width: 480px) {
    .sub-panel-title {
        font-size: 1.8rem;
    }

    .preview-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
        gap: 1.5rem;
        margin-left: auto;
        margin-right: auto;
    }

    .preview-card {
        width: 100%;
        text-align: center;
        align-items: center;
    }

    .card-title {
        font-size: 1.1rem;
        white-space: normal;
    }

    .panel-shop-btn {
        max-width: 280px;
        font-size: 1rem;
        padding: 0.9rem 1.2rem;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==========================================================================
   About Page Layout & Typography
   ========================================================================== */

.about-page {
    flex: 1;
    padding-top: 9rem;
    padding-bottom: 5rem;
    max-width: 1250px;
    width: 90%;
    margin: 0 auto;
}

.about-hero-image {
    width: 100%;
    margin-bottom: 4.5rem;
}

.about-hero-image img {
    width: 100%;
    height: 300px;
    max-height: 680px;
    object-fit: cover;
    display: block;
}

.about-content-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 4rem;
    align-items: start;
}

.about-role {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-weight: 300;
    color: var(--text-dark);
    margin-bottom: 1.2rem;
    letter-spacing: 0.5px;
}

.about-address {
    font-family: var(--font-serif);
    font-style: normal;
    font-size: 2.4rem;
    font-weight: 300;
    line-height: 1.25;
    color: var(--text-dark);
    margin-bottom: 2.5rem;
    letter-spacing: 0.5px;
}

.about-contact-details p {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.7;
    color: var(--text-dark);
}

.about-contact-details a {
    color: var(--text-dark);
    font-weight: 800;
    font-size: 21px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.about-contact-details a:hover {
    opacity: 0.6;
}

/* Instagram Row Alignment */
.instagram-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.2rem;
}

.instagram-icon {
    display: block;
    flex-shrink: 0;
    color: var(--text-dark);
    /* Nudges the icon 1px up to center visually with the serif font baseline */
    transform: translateY(-1px);
}

/* Removes link styling so it renders as plain body text */
.text-link,
.text-link:hover,
.text-link:focus,
.text-link:active {
    color: inherit;
    text-decoration: none;
    cursor: default;
    opacity: 1;
    cursor: pointer;
    font-size: 21px;
    font-weight: 800;
}

.about-description-col p {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.75;
    color: var(--text-dark);
    margin-bottom: 1.8rem;
    opacity: 0.92;
}

@media (max-width: 900px) {
    .about-page {
        padding-top: 7rem;
        padding-bottom: 3.5rem;
    }

    .about-hero-image {
        margin-bottom: 2.8rem;
    }

    .about-content-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-role,
    .about-address {
        font-size: 1.9rem;
    }

    .about-description-col p {
        font-size: 1.15rem;
    }
}
/* Dynamic catalog preview panels */
.catalog-preview-empty{grid-column:1/-1;min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border:1px dashed rgba(255,255,255,.22);border-radius:16px;padding:1.4rem;color:rgba(255,255,255,.72)}
.catalog-preview-empty strong{font-family:'Cormorant Garamond',serif;font-size:1.55rem;font-weight:500;color:#fff}
.catalog-preview-empty span{max-width:440px;margin-top:.35rem;font:400 .64rem/1.55 'Montserrat',sans-serif}
.catalog-image-placeholder{width:100%;height:100%;min-height:140px;background:linear-gradient(145deg,rgba(255,255,255,.16),rgba(255,255,255,.05))}
