/**
 * MIOLORA Identity System
 * High-Luxury CSS Definitions
 * Clean Logic Edition (Rebuilt Navigation)
 */

:root {
    --miolora-easing: cubic-bezier(0.4, 0, 0.2, 1);
    --miolora-transition: 0.6s var(--miolora-easing);
    --miolora-gutter: var(--wp--preset--spacing--40);
    --miolora-edge-pad: clamp(1rem, 4vw, 3rem);
    --miolora-mobile-bottom-nav-height: 65px;
    --miolora-mobile-bottom-nav-space: calc(var(--miolora-mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + var(--wp--preset--spacing--40));
    --miolora-brand-gold: #C09868;
    --miolora-gold-rgb: 192, 152, 104;

    /* Global Container Hierarchy */
    --miolora-max-content: 1180px;
    --miolora-max-wide: 1400px;

    /* Fluid Typography Scale (Mapping to theme.json presets) */
    --miolora-fs-base: var(--wp--preset--font-size--medium);
    --miolora-fs-h1: var(--wp--preset--font-size--xx-large);
    --miolora-fs-h2: var(--wp--preset--font-size--x-large);
    --miolora-fs-h3: var(--wp--preset--font-size--large);
    --miolora-fs-kicker: var(--wp--preset--font-size--x-small);
}

/* 1. Global Reset & Layout Authority */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    position: relative;
}

html {
    scroll-padding-bottom: var(--miolora-mobile-bottom-nav-space);
}

body {
    background-color: var(--wp--preset--color--ink) !important;
    color: var(--wp--preset--color--cream) !important;
    font-family: var(--wp--preset--font-family--body);
    font-size: var(--miolora-fs-base);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.7;
    transition: background-color var(--miolora-transition), color var(--miolora-transition-fast);
}

.miolora-site-header, .miolora-mobile-bottom-nav, #miolora-cart-drawer {
    transition: background-color var(--miolora-transition), border-color var(--miolora-transition), transform 0.6s var(--miolora-easing);
}

/* Global Container Constraints */
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.wp-block-group.has-inner-container > .wp-block-group__inner-container {
    max-width: var(--miolora-max-content);
    margin-left: auto !important;
    margin-right: auto !important;
}

.alignwide {
    max-width: var(--miolora-max-wide) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Enforce the Gutter on all top-level blocks */
.wp-site-blocks > *,
.entry-content > *,
section {
    padding-left: var(--miolora-gutter);
    padding-right: var(--miolora-gutter);
}

body > .wp-site-blocks,
.wp-site-blocks,
.entry-content,
.site-main,
.site-header,
.site-footer {
    min-width: 0;
    max-width: 100%;
}

body > .wp-site-blocks {
    padding-left: var(--miolora-edge-pad);
    padding-right: var(--miolora-edge-pad);
}

body.miolora-viewport-mobile > .wp-site-blocks {
    padding-bottom: var(--miolora-mobile-bottom-nav-space);
}

/* Runtime guard: ensure shells keep edge breathing room even when alignfull overrides fire. */
.miolora-product-template,
.miolora-shop-shell {
    padding-left: var(--miolora-edge-pad) !important;
    padding-right: var(--miolora-edge-pad) !important;
}

/* Break gutter only for alignfull */
.alignfull,
.miolora-shelf-slider-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 3. Global Input Refinement (No-Compromise) */
input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.2px solid var(--wp--preset--color--gold);
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s var(--miolora-easing);
    vertical-align: middle;
    margin-right: 8px;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: rgba(192, 152, 104, 0.15);
    border-color: var(--wp--preset--color--gold);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--wp--preset--color--gold);
    font-size: 11px;
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--wp--preset--color--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
textarea {
    appearance: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(192, 152, 104, 0.2);
    border-radius: 0;
    color: var(--wp--preset--color--cream);
    padding: 0.8rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
    transition: border-color 0.4s var(--miolora-easing), background-color 0.4s var(--miolora-easing);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--gold);
    background: rgba(255, 255, 255, 0.05);
}

select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23C09868' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 14px !important;
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: var(--wp--preset--color--cream) !important;
    border: 1px solid rgba(192, 152, 104, 0.2) !important;
    padding: 0.8rem 2.5rem 0.8rem 1rem !important;
    border-radius: 0 !important;
    transition: border-color 0.3s !important;
}

select:focus {
    border-color: var(--wp--preset--color--gold) !important;
    outline: none !important;
}

/* WooCommerce Button Authority Overrides */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.checkout-button,
.single_add_to_cart_button {
    background: var(--wp--preset--color--burgundy) !important;
    color: var(--wp--preset--color--gold) !important;
    border: 1px solid var(--wp--preset--color--gold) !important;
    border-radius: 0 !important;
    padding: 1rem 2.5rem !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2em !important;
    transition: all var(--miolora-transition) !important;
    text-decoration: none !important;
    display: inline-block !important;
    position: relative !important;
    overflow: hidden !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.checkout-button:hover,
.single_add_to_cart_button:hover {
    background: var(--wp--preset--color--gold) !important;
    color: var(--wp--preset--color--burgundy) !important;
}

/* 4. Editorial Typography & Layout Logic */
h1, .has-xx-large-font-size {
    font-size: var(--miolora-fs-h1) !important;
    line-height: 1.1;
    margin-bottom: 0.6em;
}

h2, .has-x-large-font-size {
    font-size: var(--miolora-fs-h2) !important;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h3, .has-large-font-size {
    font-size: var(--miolora-fs-h3) !important;
    line-height: 1.3;
    margin-bottom: 0.4em;
}

.kicker {
    font-size: var(--miolora-fs-kicker);
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-weight: 700;
    color: var(--wp--preset--color--gold);
    margin-bottom: 1.5rem;
    display: block;
}

/* Global Section Spacing */
section, .wp-block-group.has-background {
    padding-top: var(--wp--preset--spacing--50);
    padding-bottom: var(--wp--preset--spacing--50);
}

/* Boutique Shelf Carousel */
.miolora-shelf-slider-container {
    position: relative;
    padding: 0 var(--miolora-gutter);
    margin: var(--wp--preset--spacing--40) 0;
}

@media (min-width: 1200px) {
    .miolora-shelf-slider-container {
        width: min(100%, 1340px);
        margin-left: auto;
        margin-right: auto;
    }
}

.miolora-featured-set-shell {
    margin-top: var(--wp--preset--spacing--60);
    margin-bottom: var(--wp--preset--spacing--30);
}

.miolora-featured-set-card {
    max-width: min(860px, 100%);
    margin: 0 auto;
    padding: clamp(1.35rem, 2.8vw, 2rem);
    border: 1px solid rgba(192, 152, 104, 0.22);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(192, 152, 104, 0.12), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.02);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    display: grid;
    gap: 0.7rem;
    justify-items: start;
}

.miolora-featured-set-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.68rem;
    color: var(--wp--preset--color--gold);
    opacity: 0.88;
}

.miolora-featured-set-title {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.6rem);
    line-height: 1.05;
    letter-spacing: 0.03em;
    color: var(--wp--preset--color--ivory);
}

.miolora-featured-set-copy {
    margin: 0;
    max-width: 42ch;
    color: rgba(247, 241, 234, 0.84);
    font-size: clamp(1rem, 2vw, 1.05rem);
    line-height: 1.7;
}

.miolora-featured-set-link {
    margin-top: 0.35rem;
}

.miolora-featured-shelf-title {
    margin: 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: clamp(0.95rem, 1.25vw, 1.05rem);
    color: var(--wp--preset--color--gold);
}

.miolora-featured-shelf {
    display: flex !important;
    gap: var(--wp--preset--spacing--30);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-padding-inline: var(--miolora-gutter);
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar Firefox */
    -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
    padding: 0.8rem 0 1.6rem;
}

.miolora-featured-shelf::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

.miolora-featured-card {
    flex: 0 0 clamp(220px, 24vw, 280px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    text-align: center;
    background: linear-gradient(180deg, rgba(192, 152, 104, 0.12), rgba(255, 255, 255, 0.02)), rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(192, 152, 104, 0.1);
    border-radius: 18px;
    padding: clamp(0.7rem, 1vw, 1rem);
    transition:
        transform 0.35s var(--miolora-easing),
        border-color 0.35s var(--miolora-easing),
        background-color 0.35s var(--miolora-easing);
}

.miolora-featured-card:hover {
    border-color: var(--wp--preset--color--gold);
    transform: translateY(-5px);
}

.shelf-img-link {
    display: block;
    margin-bottom: 0.8rem;
}

.miolora-featured-card .shelf-img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    max-height: 280px;
}

.shelf-title {
    font-size: clamp(0.85rem, 1vw, 1.02rem) !important;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.shelf-nav-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 0.5rem;
}

.shelf-nav-btn {
    background: transparent;
    border: 1px solid var(--wp--preset--color--gold);
    color: var(--wp--preset--color--gold);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.shelf-nav-btn:hover {
    background: var(--wp--preset--color--gold);
    color: var(--wp--preset--color--burgundy);
}

.shelf-nav-btn:disabled,
.shelf-nav-btn[aria-disabled="true"] {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 768px) {
    .miolora-featured-set-card {
        padding: 1.1rem;
        border-radius: 22px;
    }

    .miolora-featured-set-title {
        font-size: 1.45rem;
    }

    .miolora-featured-shelf {
        scroll-snap-type: x mandatory;
        scroll-padding-inline: clamp(0.8rem, 2.5vw, 1.1rem);
    }

    .miolora-featured-card {
        flex: 0 0 clamp(180px, 68vw, 240px);
        scroll-snap-stop: always;
    }
}

.wp-block-group,
.wp-block-columns,
.wp-block-column,
.miolora-featured-shelf,
.miolora-shop-shell {
    min-width: 0;
}

/* WooCommerce Shop Grid (Classic & FSE) */
.miolora-products ul.products,
.miolora-products-container ul.products,
.wc-block-grid__product-list,
.wc-block-product-newest ul.wc-block-grid__product-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: var(--wp--preset--spacing--40) !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 2rem 0 !important;
}

.miolora-product-card,
.wc-block-grid__product,
ul.products li.product {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(192, 152, 104, 0.1) !important;
    border-radius: 24px !important;
    padding: 0 !important;
    transition: all 0.4s var(--miolora-easing) !important;
    overflow: hidden;
    position: relative;
    list-style: none !important;
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Fix Filter Visibility */
.wc-block-product-filters {
    margin-bottom: var(--wp--preset--spacing--30) !important;
}

.wc-block-product-filters .wc-block-attribute-filter-list-item__label,
.wc-block-product-filters .wc-block-checkbox-list-item__label,
.wc-block-product-filters label {
    color: var(--wp--preset--color--cream) !important;
    font-size: 0.85rem !important;
    letter-spacing: 1px !important;
    opacity: 0.8;
}

.wc-block-product-filters .wc-block-attribute-filter-list-item__count {
    color: var(--wp--preset--color--gold) !important;
    font-size: 0.75rem !important;
    margin-left: 8px !important;
}

.miolora-shop-shell {
    max-width: 1600px !important;
    margin: 0 auto !important;
}

.miolora-product-card:hover {
    border-color: var(--wp--preset--color--gold) !important;
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.04) !important;
}

.miolora-card-link {
    text-decoration: none !important;
    display: block;
    height: 100%;
}

.miolora-card-image {
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--wp--preset--spacing--30);
}

.miolora-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    transition: transform 0.8s var(--miolora-easing) !important;
}

.miolora-product-card:hover .miolora-card-image img {
    transform: scale(1.08);
}

.miolora-card-content {
    padding: var(--wp--preset--spacing--30);
    text-align: center;
}

.woocommerce-loop-product__title {
    font-family: var(--wp--preset--font-family--heading) !important;
    font-size: 1.2rem !important;
    color: var(--wp--preset--color--ivory) !important;
    margin: 1rem 0 !important;
    line-height: 1.3 !important;
    min-height: 3.2em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.miolora-product-card .price {
    display: block !important;
    font-size: 1.1rem !important;
    color: var(--wp--preset--color--gold) !important;
    font-weight: 600 !important;
    margin-bottom: 1.5rem !important;
}

.woocommerce-products-header__title.page-title,
.woocommerce .page-title,
.archive.woocommerce .page-title {
    font-family: var(--wp--preset--font-family--body) !important;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem) !important;
    line-height: 1.15 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--wp--preset--color--cream) !important;
    margin-bottom: 1rem !important;
}

/* Personalization Tags in Card */
.miolora-card-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.miolora-card-tag {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(247,241,234,0.6);
    border: 1px solid rgba(192, 152, 104,0.25);
    padding: 4px 12px;
    border-radius: 99px;
}

.miolora-recommended-badge {
    background: var(--wp--preset--color--gold) !important;
    color: var(--wp--preset--color--burgundy) !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    padding: 4px 10px !important;
    letter-spacing: 0.1em !important;
    border-radius: 2px !important;
}

/* WooCommerce Buttons */
.miolora-card-actions .button {
    width: 100% !important;
    background: transparent !important;
    color: var(--wp--preset--color--gold) !important;
    border: 1px solid var(--wp--preset--color--gold) !important;
    border-radius: 99px !important;
    padding: 0.8rem 1.5rem !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.miolora-card-actions .button:hover {
    background: var(--wp--preset--color--gold) !important;
    color: var(--wp--preset--color--burgundy) !important;
}

/* Filter UI Fixes */
.wc-block-product-filters {
    background: rgba(255,255,255,0.02);
    padding: var(--wp--preset--spacing--30);
    border: 1px solid rgba(192, 152, 104, 0.1);
    border-radius: 12px;
}

.wc-block-product-filters .wc-block-attribute-filter-list-item__label {
    color: var(--wp--preset--color--cream) !important;
    font-size: 0.9rem !important;
}

.wp-block-woocommerce-product-filters h4 {
    margin-bottom: 1.5rem !important;
}

/* 4. Interactive Elements */
.wp-block-button__link, .luxury-button {
    background: var(--wp--preset--color--burgundy) !important;
    color: var(--wp--preset--color--gold) !important;
    border: 1px solid var(--wp--preset--color--gold) !important;
    border-radius: 0 !important;
    padding: 1rem 2.5rem !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2em !important;
    transition: all var(--miolora-transition) !important;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.wp-block-button__link::after, .luxury-button::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%) skewX(-25deg);
    transition: none;
}

.wp-block-button__link:hover::after, .luxury-button:hover::after {
    animation: mioloraGlowSweep 0.8s var(--miolora-easing);
}

/* 5. Clean Logic Site Header */
/* === SECTION A: HEADER SHELL === */
.miolora-site-header {
    position: sticky;
    top: 0;
    z-index: 10000;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(192, 152, 104, 0.12);
    transition: background-color var(--miolora-transition), border-color var(--miolora-transition);
}

html[data-miolora-theme="dark"] .miolora-site-header,
body[data-miolora-theme="dark"] .miolora-site-header {
    background: #3A0412;
}

html[data-miolora-theme="light"] .miolora-site-header,
body[data-miolora-theme="light"] .miolora-site-header {
    border-bottom: 2px solid rgba(74, 14, 14, 0.45);
}

/* === SECTION B: DESKTOP HEADER (.miolora-dh-*) === */

.miolora-dh-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(1.2rem, 2.5vw, 2.5rem);
    max-width: var(--miolora-max-wide);
    margin: 0 auto;
    padding: 0.5rem var(--miolora-gutter);
    min-height: 60px;
}

/* Logo */
.miolora-dh-logo-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex: 0 0 auto;
    gap: 0.25rem;
    line-height: 1;
}

.miolora-dh-logo-asset {
    display: none;
    line-height: 0;
}

html:not([data-miolora-theme]) .miolora-dh-logo-asset[data-logo-variant="dark"],
html[data-miolora-theme="dark"] .miolora-dh-logo-asset[data-logo-variant="dark"] {
    display: block;
}

html[data-miolora-theme="light"] .miolora-dh-logo-asset[data-logo-variant="light"] {
    display: block;
}

.miolora-dh-logo-asset svg {
    height: 62px;
    width: auto;
    display: block;
}

.miolora-dh-logo-asset img {
    height: 62px;
    width: auto;
    display: block;
}

.miolora-dh-logo-atelier {
    font-size: 1.1rem;
    letter-spacing: 0.28em;
    color: var(--miolora-brand-gold);
    text-transform: uppercase;
    font-weight: 600;
    text-align: center;
}

/* Nav */
.miolora-dh-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}

.miolora-dh-nav-group {
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 1.4vw, 1.5rem);
}

.miolora-dh-nav-group-premium {
    padding-left: clamp(1rem, 2.5vw, 3rem);
    border-left: 1.5px solid rgba(192, 152, 104, 0.22);
    margin-left: clamp(0.5rem, 1.2vw, 1.5rem);
}

body.rtl .miolora-dh-nav-group-premium {
    padding-left: 0;
    padding-right: clamp(1rem, 2.5vw, 3rem);
    border-left: none;
    border-right: 1.5px solid rgba(192, 152, 104, 0.22);
    margin-left: 0;
    margin-right: clamp(0.5rem, 1.2vw, 1.5rem);
}

.miolora-dh-nav-item {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wp--preset--color--cream);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.miolora-dh-nav-item:hover {
    color: var(--miolora-brand-gold);
}

/* Controls */
.miolora-dh-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.miolora-dh-lang-toggle {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--miolora-brand-gold);
    text-decoration: none;
    padding: 0.3rem 0.5rem;
}

.miolora-dh-theme-toggle {
    background: #000;
    border: 1.5px solid var(--miolora-brand-gold);
    border-radius: 999px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--miolora-brand-gold);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.miolora-dh-search-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--wp--preset--color--cream);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: color 0.3s ease;
}

.miolora-dh-search-trigger:hover {
    color: var(--miolora-brand-gold);
}

/* Hide desktop on mobile */
@media (max-width: 1024px) {
    .miolora-dh-bar {
        display: none;
    }
}

/* === SECTION C: MOBILE HEADER (.miolora-mh-*) === */

/* Hidden on desktop */
.miolora-mh-bar,
.miolora-mh-panel {
    display: none;
}

@media (max-width: 1024px) {
    /* Bar — logo + hamburger row */
    .miolora-mh-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem var(--miolora-edge-pad);
        min-height: 60px;
    }

    .miolora-mh-logo-link {
        display: inline-flex;
        align-items: flex-start;
        flex-direction: column;
        text-decoration: none;
    }

    .miolora-mh-logo-asset {
        display: block;
    }

    .miolora-mh-logo-asset svg {
        height: 36px;
        width: auto;
        display: block;
    }

    .miolora-mh-logo-asset img {
        height: 36px;
        width: auto;
        display: block;
    }

    .miolora-mh-logo-atelier {
        font-size: 0.7rem;
        letter-spacing: 0.28em;
        color: var(--miolora-brand-gold);
        margin-top: 0.15rem;
        text-transform: uppercase;
        font-weight: 600;
    }

    /* Hamburger */
    .miolora-mh-hamburger {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        width: 44px;
        height: 44px;
        z-index: 10001;
        position: relative;
    }

    .miolora-mh-line {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--miolora-brand-gold);
        border-radius: 999px;
        transition: transform 0.4s var(--miolora-easing), opacity 0.3s ease;
    }

    .miolora-mh-hamburger.is-active .miolora-mh-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .miolora-mh-hamburger.is-active .miolora-mh-line:nth-child(2) {
        opacity: 0;
    }

    .miolora-mh-hamburger.is-active .miolora-mh-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Off-canvas panel */
    .miolora-mh-panel {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #3A0412;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.6s var(--miolora-easing), visibility 0.6s;
        z-index: 10000;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .miolora-mh-panel.is-active {
        transform: translateX(0);
        visibility: visible;
    }

    body.miolora-nav-open {
        overflow: hidden;
    }

    .miolora-mh-panel-inner {
        padding: 7rem 1.75rem 2.5rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
        min-height: 100%;
    }

    /* Controls strip */
    .miolora-mh-controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        width: 100%;
        padding-bottom: 1.65rem;
        border-bottom: 1px solid rgba(192, 152, 104, 0.14);
    }

    .miolora-mh-lang-toggle {
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--miolora-brand-gold);
        text-decoration: none;
    }

    .miolora-mh-theme-toggle {
        background: transparent;
        border: 1px solid var(--miolora-brand-gold);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--miolora-brand-gold);
    }

    /* Nav sections */
    .miolora-mh-nav {
        display: grid;
        row-gap: 2rem;
        width: 100%;
    }

    .miolora-mh-nav-section {
        display: grid;
        row-gap: 1.55rem;
        width: 100%;
        padding-bottom: 2rem;
        border-bottom: 1px solid rgba(192, 152, 104, 0.14);
    }

    .miolora-mh-nav-section:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    .miolora-mh-nav-label {
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: 0.3em;
        text-transform: uppercase;
        color: var(--miolora-brand-gold);
        margin: 0;
    }

    .miolora-mh-nav-children {
        display: grid;
        row-gap: 0;
    }

    .miolora-mh-boutique-menu,
    .miolora-mh-utility-menu {
        list-style: none;
        padding: 0;
        margin: 0;
        display: grid;
        row-gap: 1.7rem;
    }

    .miolora-mh-boutique-menu a,
    .miolora-mh-utility-menu a {
        font-size: clamp(0.94rem, 2.9vw, 1.12rem);
        letter-spacing: 0.14em;
        text-transform: uppercase;
        text-decoration: none;
        color: var(--wp--preset--color--cream);
        line-height: 1.35;
    }

    .miolora-mh-skin-consultation-link,
    .miolora-mh-membership-link,
    .miolora-mh-concierge-link {
        margin-bottom: 0;
    }

    .miolora-mh-utility-menu li {
        margin-bottom: 1.7rem;
    }

    .miolora-mh-utility-menu li:last-child {
        margin-bottom: 0;
    }

    /* White outline on Membership page */
    .miolora-mh-membership-link a {
        border: 1.5px solid rgba(247, 241, 234, 0.6);
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
        display: inline-block;
    }

    .miolora-mh-membership-link a:hover {
        border-color: rgba(247, 241, 234, 1);
    }

    /* The House section - clickable header with gold styling */
    .miolora-mh-house-section {
        padding-top: 2rem;
    }

    .miolora-mh-house-header {
        font-size: 1rem;
        font-weight: 700;
        letter-spacing: 0.3em;
        text-transform: uppercase;
        color: var(--miolora-brand-gold);
        text-decoration: none;
        border: 1.5px solid rgba(192, 152, 104, 0.3);
        padding: 0.5rem 0.75rem;
        border-radius: 8px;
        display: inline-block;
        transition: border-color 0.3s ease;
    }

    .miolora-mh-house-header:hover {
        border-color: rgba(192, 152, 104, 0.6);
    }

    /* RTL */
    body.rtl .miolora-mh-panel-inner {
        align-items: flex-end;
    }

    body.rtl .miolora-mh-nav-section {
        justify-items: end;
        text-align: right;
    }
}
/* 6. Clean Logic Site Footer */
.miolora-site-footer {
    background: #0A0505;
    border-top: 1px solid rgba(192, 152, 104, 0.1);
    padding: var(--wp--preset--spacing--50) var(--miolora-gutter);
}

.miolora-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    text-align: center;
    margin-bottom: var(--wp--preset--spacing--40);
}

.footer-brand .tagline {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: var(--miolora-brand-gold);
}

.footer-mini-rail-wrap {
    margin: 0 0 var(--wp--preset--spacing--30);
}

.miolora-footer-mini-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.miolora-footer-mini-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(192, 152, 104, 0.16);
    border-radius: 999px;
    text-decoration: none;
    color: var(--wp--preset--color--cream);
    background: rgba(255,255,255,0.02);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.72rem;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.miolora-footer-mini-item:hover,
.miolora-footer-mini-item:focus-visible {
    border-color: rgba(192, 152, 104, 0.5);
    color: var(--miolora-brand-gold);
    background: rgba(192, 152, 104, 0.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--wp--preset--spacing--30);
    align-items: start;
    margin-bottom: var(--wp--preset--spacing--40);
}

.footer-col {
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: start;
    row-gap: 0.9rem;
    min-width: 0;
    text-align: left;
}

.footer-col h4 {
    color: var(--miolora-brand-gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.footer-content {
    width: 100%;
}

.miolora-footer-links {
    display: grid;
    row-gap: 0.75rem;
    justify-items: start;
}

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

.footer-col li {
    margin: 0;
}

.footer-col a {
    display: inline-flex;
    align-items: center;
    color: var(--wp--preset--color--cream);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.2;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-col a:hover {
    opacity: 1;
    color: var(--miolora-brand-gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.6;
    color: var(--miolora-brand-gold);
}

/* 7. Responsive Adaptations & Keyframes */
@keyframes mioloraFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mini Cart Drawer */
#miolora-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--miolora-easing);
}

#miolora-cart-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

#miolora-cart-drawer {
    position: fixed;
    top: 0;
    right: -500px;
    width: clamp(320px, 40vw, 450px);
    max-width: 90vw;
    height: 100%;
    background: #0A0505;
    z-index: 9001;
    box-shadow: -20px 0 60px rgba(0,0,0,0.5);
    transition: right 0.6s var(--miolora-easing);
    display: none;
    flex-direction: column;
    padding: var(--wp--preset--spacing--40);
    overflow-x: hidden;
}

#miolora-cart-drawer.is-active {
    display: flex;
    right: 0;
}

.miolora-mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(192, 152, 104,0.15);
    padding-bottom: 1.5rem;
}

.miolora-mini-cart-header h3 {
    margin: 0;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--wp--preset--color--gold);
}

.miolora-mini-cart-close {
    background: none;
    border: none;
    color: #FFF;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.widget_shopping_cart_content {
    flex-grow: 1;
    overflow-y: auto;
}

/* Mini Cart List */
.woocommerce-mini-cart {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-mini-cart-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
}

.woocommerce-mini-cart-item img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
}

.woocommerce-mini-cart-item a:not(.remove) {
    color: var(--wp--preset--color--ivory);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.woocommerce-mini-cart__total {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    color: var(--wp--preset--color--gold);
}

.woocommerce-mini-cart__buttons {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.woocommerce-mini-cart__buttons .button {
    width: 100% !important;
    text-align: center;
    padding: 1rem !important;
    border-radius: 99px !important;
}

.woocommerce-mini-cart__buttons .checkout {
    background: var(--wp--preset--color--gold) !important;
    color: var(--wp--preset--color--burgundy) !important;
}

body.miolora-cart-open {
    overflow: hidden;
}

/* Sticky Mobile Bottom Nav */
.miolora-mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(192, 152, 104, 0.2);
    z-index: 10002;
    padding: 0;
    justify-content: space-around;
    align-items: stretch;
    overflow: hidden;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
}

body.miolora-viewport-mobile .miolora-mobile-bottom-nav,
html.miolora-viewport-mobile .miolora-mobile-bottom-nav {
    display: flex;
}

body.miolora-viewport-desktop .miolora-mobile-bottom-nav,
html.miolora-viewport-desktop .miolora-mobile-bottom-nav {
    display: none;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    padding: 0 2px calc(env(safe-area-inset-bottom, 0px) / 2);
    color: var(--wp--preset--color--gold);
    text-decoration: none;
    font-size: 0.65rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    gap: 2px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.mobile-nav-item .dashicons {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    width: 24px;
    height: 24px;
    line-height: 1;
    margin: 0 auto;
}

.mobile-nav-item .label {
    display: block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .miolora-mobile-bottom-nav {
        display: flex;
    }
    .miolora-site-footer {
        display: none !important;
    }
}

body.miolora-viewport-mobile .miolora-site-footer,
html.miolora-viewport-mobile .miolora-site-footer {
    display: none !important;
}

body.miolora-viewport-desktop .miolora-site-footer,
html.miolora-viewport-desktop .miolora-site-footer {
    display: block;
}


/* 8. RTL Support */
body.rtl {
    direction: rtl;
}

body.rtl .footer-col {
    text-align: right;
}

html[data-miolora-theme="light"] .miolora-logo-asset-primary,
body[data-miolora-theme="light"] .miolora-logo-asset-primary {
    display: block;
}

html[data-miolora-theme="light"] .miolora-logo-asset-primary,
body[data-miolora-theme="light"] .miolora-logo-asset-primary,
html[data-miolora-theme="light"] .miolora-logo-asset-mobile,
body[data-miolora-theme="light"] .miolora-logo-asset-mobile {
    color: var(--miolora-burgundy);
}

html[data-miolora-theme="dark"] .miolora-logo-asset-sticky,
body[data-miolora-theme="dark"] .miolora-logo-asset-sticky {
    display: block;
}

html[data-miolora-theme="dark"] .miolora-logo-asset-sticky,
body[data-miolora-theme="dark"] .miolora-logo-asset-sticky,
html[data-miolora-theme="dark"] .miolora-logo-asset-mobile,
body[data-miolora-theme="dark"] .miolora-logo-asset-mobile {
    color: var(--miolora-gold);
}

.miolora-logo-asset-monogram {
    display: block;
    color: var(--miolora-gold);
    width: 40px;
}

.miolora-monogram-link .miolora-logo-asset-monogram svg {
    width: 40px;
    height: auto;
}

body.rtl .miolora-footer-links {
    justify-items: end;
}

/* 9. Clinical Sanctuary (Dashboard & Evolution) */
.miolora-tracker-container {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(192, 152, 104, 0.1);
    padding: var(--wp--preset--spacing--40);
    border-radius: 32px;
    position: relative;
    overflow: hidden;
}

.miolora-tracker-header {
    text-align: center;
    margin-bottom: 3rem;
}

.miolora-tracker-header h2 {
    font-size: var(--wp--preset--font-size--x-large);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.miolora-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    position: relative;
}

.miolora-timeline::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(192, 152, 104, 0.15);
    z-index: 1;
}

.miolora-timeline-node {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.miolora-node-dot {
    width: 32px;
    height: 32px;
    background: var(--wp--preset--color--ink);
    border: 1px solid rgba(192, 152, 104, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.6s var(--miolora-easing);
    color: transparent;
    font-size: 14px;
}

.miolora-timeline-node.active .miolora-node-dot {
    background: var(--wp--preset--color--gold);
    border-color: var(--wp--preset--color--gold);
    color: var(--wp--preset--color--burgundy);
    box-shadow: 0 0 20px rgba(192, 152, 104, 0.4);
}

.miolora-timeline-node.current .miolora-node-dot {
    animation: mioloraBreathe 3s infinite ease-in-out;
    border-color: var(--wp--preset--color--gold);
}

.miolora-timeline-node span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: rgba(247, 241, 234, 0.4);
}

.miolora-timeline-node.active span,
.miolora-timeline-node.current span {
    color: var(--wp--preset--color--gold);
}

.miolora-journal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--wp--preset--spacing--30);
}

.miolora-journal-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(192, 152, 104, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.5s var(--miolora-easing);
    position: relative;
    display: flex;
    flex-direction: column;
}

.miolora-journal-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(192, 152, 104, 0.2);
    transform: translateY(-10px);
}

.miolora-journal-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    background: #111;
}

.miolora-status-label {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--wp--preset--color--burgundy);
    color: var(--wp--preset--color--gold);
    z-index: 10;
}

.miolora-journal-meta {
    font-family: var(--wp--preset--font-family--heading);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.miolora-journal-stats {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.miolora-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.miolora-stat-row strong {
    color: var(--wp--preset--color--gold);
}

.miolora-doctor-note {
    margin-top: 1rem;
    font-size: 13px;
    line-height: 1.6;
    font-style: italic;
    color: var(--wp--preset--color--ivory);
    opacity: 0.8;
}

/* 10b. My Routine Dashboard */
.miolora-atelier-dashboard {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2.25rem);
}

.dashboard-intro {
    display: grid;
    gap: 0.8rem;
    text-align: center;
    justify-items: center;
    max-width: 58rem;
    margin: 0 auto;
}

.dashboard-intro .kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(192, 152, 104, 0.18);
    color: var(--wp--preset--color--gold);
    background: rgba(192, 152, 104, 0.08);
    font-size: 0.68rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.dashboard-intro-copy,
.dashboard-card-intro {
    margin: 0;
    color: rgba(247, 241, 234, 0.74);
    line-height: 1.7;
}

.dashboard-intro-copy {
    max-width: 48rem;
}

.dashboard-flow-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(192, 152, 104, 0.14);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(192, 152, 104, 0.06), rgba(255, 255, 255, 0.015));
}

.dashboard-flow-stage {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(192, 152, 104, 0.08);
    background: rgba(255, 255, 255, 0.015);
}

.dashboard-flow-stage.is-current {
    border-color: rgba(192, 152, 104, 0.26);
    background: rgba(192, 152, 104, 0.1);
}

.dashboard-flow-index {
    font-family: var(--wp--preset--font-family--heading);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    color: rgba(192, 152, 104, 0.95);
}

.dashboard-flow-label {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(247, 241, 234, 0.82);
}

.atelier-header {
    margin: 0;
    font-family: var(--wp--preset--font-family--heading);
    font-size: clamp(2rem, 4.8vw, 3.6rem);
    line-height: 1;
    color: var(--wp--preset--color--gold);
}

.miolora-premium-membership-header {
    letter-spacing: 0.04em;
    text-shadow: 0 0 18px rgba(192, 152, 104, 0.12);
}

.atelier-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: clamp(1rem, 2.5vw, 1.75rem);
    align-items: start;
}

.atelier-column-main,
.atelier-column-sidebar {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.atelier-column-main {
    align-content: start;
}

.miolora-dashboard-container,
.miolora-wc-account-shell {
    width: min(100%, var(--miolora-max-content));
    margin-left: auto;
    margin-right: auto;
    min-width: 0;
}

.miolora-dashboard-container {
    display: grid;
    gap: clamp(1rem, 2.5vw, 1.5rem);
}

.miolora-wc-account-shell {
    display: grid;
    gap: clamp(1rem, 2.5vw, 1.5rem);
    padding: clamp(1rem, 3vw, 1.75rem);
    border: 1px solid rgba(192, 152, 104, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
}

.miolora-atelier-card {
    position: relative;
    display: grid;
    gap: 0.9rem;
    padding: clamp(1.1rem, 2.6vw, 1.75rem);
    border: 1px solid rgba(192, 152, 104, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.miolora-atelier-card .card-title {
    margin: 0;
    color: rgba(192, 152, 104, 0.9);
    font-family: var(--wp--preset--font-family--heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
}

.dashboard-survey-card {
    border-color: rgba(192, 152, 104, 0.18);
    background: linear-gradient(180deg, rgba(192, 152, 104, 0.08), rgba(255, 255, 255, 0.015));
}

.dashboard-survey-copy {
    margin: 0;
    color: rgba(247, 241, 234, 0.82);
    line-height: 1.7;
}

.dashboard-survey-actions {
    display: grid;
    gap: 0.6rem;
    justify-items: start;
}

.survey-status-note {
    font-size: 0.78rem;
    color: rgba(247, 241, 234, 0.58);
}

.active-protocol {
    font-family: var(--wp--preset--font-family--heading);
    font-size: clamp(1.25rem, 2.3vw, 1.9rem);
    line-height: 1.1;
    color: var(--wp--preset--color--cream);
}

.protocol-desc {
    margin: 0;
    color: rgba(247, 241, 234, 0.76);
    line-height: 1.75;
}

.miolora-status-badge,
.miolora-atelier-card .miolora-status-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(192, 152, 104, 0.18);
    background: rgba(192, 152, 104, 0.08);
    color: var(--wp--preset--color--gold);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.empty-dashboard-state,
.empty-dashboard-state.small-state,
.insight-content,
.active-protocol-wrap,
.order-queue {
    display: grid;
    gap: 0.8rem;
}

.order-item {
    display: grid;
    gap: 0.45rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(192, 152, 104, 0.1);
}

.signature {
    color: rgba(247, 241, 234, 0.7);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.68rem;
}

@media (max-width: 768px) {
    .miolora-dashboard-container,
    .miolora-wc-account-shell {
        width: 100%;
    }

    .miolora-wc-account-shell {
        padding: 1rem;
        border-radius: 20px;
    }

    .atelier-grid {
        grid-template-columns: 1fr;
    }

    .miolora-atelier-card {
        padding: 1rem;
    }

    .dashboard-intro {
        text-align: left;
        justify-items: start;
    }

    .dashboard-flow-rail {
        grid-template-columns: 1fr;
        padding: 0.6rem;
    }

    .dashboard-survey-actions {
        width: 100%;
    }

    .dashboard-survey-actions .luxury-button {
        width: 100%;
        text-align: center;
    }
}

@keyframes mioloraBreathe {
    0% { box-shadow: 0 0 0px rgba(192, 152, 104, 0); transform: scale(1); }
    50% { box-shadow: 0 0 20px rgba(192, 152, 104, 0.3); transform: scale(1.05); }
    100% { box-shadow: 0 0 0px rgba(192, 152, 104, 0); transform: scale(1); }
}

@media (max-width: 768px) {
    .miolora-timeline::after { display: none; }
    .miolora-timeline { flex-direction: column; gap: 2rem; align-items: flex-start; padding-left: 2rem; }
    .miolora-timeline-node { flex-direction: row; }
    .dashboard-flow-rail {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .dashboard-flow-stage {
        padding: 0.75rem 0.8rem;
    }

    .dashboard-flow-label {
        font-size: 0.7rem;
        letter-spacing: 0.14em;
    }

    .atelier-header {
        font-size: clamp(1.75rem, 10vw, 2.6rem);
        line-height: 1.02;
    }

    .atelier-grid {
        gap: 0.85rem;
    }

    .dashboard-intro {
        max-width: 100%;
    }

    .dashboard-intro-copy {
        max-width: 100%;
    }

    .miolora-atelier-card {
        border-radius: 20px;
    }

    .dashboard-survey-actions .luxury-button,
    .miolora-wc-account-shell .button,
    .miolora-wc-account-shell a.button {
        width: 100%;
        text-align: center;
    }
}

/* 10. 360x800 Mobile Polish: High-Density Luxury */
@media (max-width: 480px) {
    .miolora-product-info-panel .kicker { margin-bottom: 0.5rem !important; }
    .miolora-product-info-panel h1 { margin-bottom: 0.5rem !important; font-size: 1.8rem !important; }
    .miolora-product-size { margin-bottom: 0.4rem !important; font-size: 0.85rem !important; }
    .miolora-review-summary { margin-bottom: 0.6rem !important; }
    .miolora-clinical-badge { margin-bottom: 0.6rem !important; padding: 2px 8px !important; font-size: 0.6rem !important; }
    .miolora-product-concerns { margin-top: 0.6rem !important; }
}

    .wp-block-group.alignwide.miolora-featured-shelf-shell > .miolora-shelf-slider-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
    }

    .wp-block-group.alignwide.miolora-featured-shelf-shell > .miolora-shelf-slider-container > .wp-block-spacer {
        height: 0.45rem !important;
    }

    section, .wp-block-group.has-background {
        padding-top: var(--wp--preset--spacing--40);
        padding-bottom: var(--wp--preset--spacing--40);
    }

    .miolora-hero-section {
        padding-top: clamp(2.25rem, 10vw, 3rem) !important;
        padding-bottom: clamp(2rem, 8vw, 2.75rem) !important;
    }

    .miolora-hero-section .wp-block-columns {
        gap: 1.25rem;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(192, 152, 104, 0.1);
        border-radius: 22px;
        padding: clamp(0.9rem, 4vw, 1.25rem);
    }

    .miolora-hero-section .miolora-hero-title {
        font-size: clamp(2.15rem, 10vw, 3rem) !important;
        line-height: 0.98 !important;
    }

    .miolora-hero-section .miolora-hero-copy {
        max-width: 32ch;
        font-size: clamp(0.88rem, 2.9vw, 0.98rem);
        line-height: 1.55;
    }

    /* Hero logo variant switching */
    .miolora-hero-logo-wrapper {
        position: relative;
        display: block;
    }

    .miolora-hero-logo-asset {
        display: none;
    }

    html:not([data-miolora-theme]) .miolora-hero-logo-asset[data-logo-variant="dark"],
    html[data-miolora-theme="dark"] .miolora-hero-logo-asset[data-logo-variant="dark"] {
        display: block;
    }

    html[data-miolora-theme="light"] .miolora-hero-logo-asset[data-logo-variant="light"] {
        display: block;
    }

    .miolora-shelf-slider-container {
        margin: var(--wp--preset--spacing--20) 0;
    }

    .miolora-featured-shelf {
        gap: 0.55rem;
        padding: 0.45rem 0 0.85rem;
    }

    .miolora-featured-card {
        flex: 0 0 clamp(154px, 47vw, 178px);
        padding: 0.5rem;
        border-radius: 14px;
    }

    .shelf-img-link {
        margin-bottom: 0.45rem;
    }

    .miolora-featured-card .shelf-img {
        width: 100%;
        height: clamp(132px, 39vw, 152px);
        max-height: 152px;
        aspect-ratio: auto;
        object-fit: cover;
        border-radius: 10px;
    }

    .shelf-title {
        font-size: 0.82rem !important;
        line-height: 1.3 !important;
        min-height: 2.6em;
        margin-bottom: 0.25rem !important;
    }

    .miolora-featured-card .price {
        font-size: 0.78rem;
        margin-bottom: 0.35rem;
    }

    .miolora-featured-card .luxury-button {
        font-size: 0.56rem !important;
        letter-spacing: 0.08em !important;
        padding: 0.42rem 0.62rem !important;
    }

    .shelf-nav-controls {
        display: none;
    }

    .shelf-nav-btn {
        width: 40px;
        height: 40px;
    }

    /* PDP Polish */
    .miolora-product-shell { padding: 1rem; }
    body.miolora-viewport-mobile .miolora-product-template .miolora-product-main-shell,
    html.miolora-viewport-mobile .miolora-product-template .miolora-product-main-shell {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
    }
    body.miolora-viewport-mobile .miolora-product-template .miolora-product-hero,
    html.miolora-viewport-mobile .miolora-product-template .miolora-product-hero {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
        grid-template-columns: none !important;
    }
    .miolora-product-gallery-panel,
    .miolora-product-info-panel {
        width: 100% !important;
        max-width: 100% !important;
    }
    .miolora-product-gallery-panel {
        padding: 0.85rem;
        border-radius: 20px;
    }
    .miolora-product-info-panel {
        margin-top: 0.25rem;
    }
    .miolora-product-panel h1 { font-size: var(--wp--preset--font-size--x-large); }
    .miolora-price-row { font-size: var(--wp--preset--font-size--large); }
    .miolora-product-gallery-engine {
        gap: 0.8rem;
    }
    .miolora-product-main-image-wrap {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 1 / 1.1;
        border-radius: 18px;
    }
    .miolora-main-display {
        object-fit: contain;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.01);
    }
    .miolora-product-gallery-carousel {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.2rem 0 0.35rem;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0.2rem;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        touch-action: pan-y;
        user-select: none;
        -webkit-user-select: none;
        -webkit-user-drag: none;
    }
    .miolora-gallery-thumb {
        flex: 0 0 clamp(66px, 18vw, 86px);
        width: clamp(66px, 18vw, 86px);
        border-radius: 10px;
        min-width: 0;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        touch-action: pan-y;
        -webkit-user-drag: none;
    }

    /* Shop Grid Polish */
    .miolora-shop-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 0.75rem 0;
    }
    .miolora-shop-card { border-radius: 18px; }
    .miolora-card-image { aspect-ratio: 5 / 4; padding: 0.75rem; }
    .miolora-card-info { padding: 0.9rem; }
    .miolora-card-title { font-size: 1rem; }
    .miolora-card-title,
    .woocommerce-loop-product__title {
        margin: 0.85rem 0 !important;
        min-height: 2.6em;
    }
    .miolora-product-card .price { font-size: 0.95rem !important; margin-bottom: 1rem !important; }
    .miolora-card-meta { gap: 0.4rem; margin-bottom: 0.75rem; }
    .miolora-card-tag { padding: 3px 10px; letter-spacing: 0.16em; }
    .miolora-card-actions .button { padding: 0.75rem 1.2rem !important; font-size: 0.75rem !important; }
    .wc-block-product-filters {
        padding: 0.85rem;
        border-radius: 16px;
    }

    /* Cart Drawer Polish */
    #miolora-cart-drawer {
        display: none;
        width: 100%;
        right: -100%;
        padding: 2rem;
    }
    #miolora-cart-drawer.is-active {
        display: flex;
        right: 0;
    }
    .miolora-mini-cart-header { margin-bottom: 2rem; }
    .woocommerce-mini-cart-item { grid-template-columns: 60px 1fr; gap: 1rem; }
    .woocommerce-mini-cart-item img { width: 60px !important; height: 60px !important; }

    /* Dashboard High-Density */
    .miolora-tracker-container { padding: 1.5rem; border-radius: 20px; }
    .miolora-timeline { padding-left: 1rem; }
    .miolora-journal-grid { gap: 1.5rem; }

    /* Sticky Nav High-Fidelity */
    .miolora-mobile-bottom-nav {
        height: var(--miolora-mobile-bottom-nav-height);
        padding: 0;
        background: rgba(10, 5, 5, 0.95);
        align-items: stretch;
    }
    .mobile-nav-item {
        font-size: 0.65rem;
        letter-spacing: 0.05em;
        gap: 2px;
        padding: 0 2px calc(env(safe-area-inset-bottom, 0px) / 2);
        justify-content: center;
    }
    .mobile-nav-item .dashicons {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
}

/* Cart Count Badge */
.miolora-cart-toggle { position: relative; }
.miolora-cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--wp--preset--color--gold);
    color: var(--wp--preset--color--burgundy);
    font-size: 9px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

/* Mobile Nav Cart Badge */
.miolora-mobile-bottom-nav .mobile-nav-item { position: relative; }
.miolora-mobile-bottom-nav .miolora-cart-count {
    position: absolute;
    top: 5px;
    right: 25%;
    background: var(--wp--preset--color--gold);
    color: var(--wp--preset--color--burgundy);
    font-size: 8px;
    font-weight: 800;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* 11. Component Delegates: Commerce & Clinical UI */

/* Product Shell Structure */
.miolora-product-template .miolora-product-main-shell {
    width: min(100%, var(--miolora-max-wide));
    margin-left: auto;
    margin-right: auto;
}

.miolora-product-template .miolora-product-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr) !important;
    align-items: start;
    gap: clamp(1.25rem, 3vw, 3.2rem);
}

.miolora-product-gallery-panel,
.miolora-product-info-panel {
    min-width: 0;
}

/* Product Gallery */
.miolora-product-gallery-engine {
    display: grid;
    gap: 0.95rem;
}

.miolora-product-main-image-wrap {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(192, 152, 104, 0.14);
    background: rgba(255, 255, 255, 0.02);
    aspect-ratio: 4 / 5;
    max-width: 100%;
}

.miolora-main-display {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.25s var(--miolora-easing);
}

.miolora-product-gallery-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 0.6rem;
    overflow: hidden;
    padding-bottom: 0;
    scrollbar-width: none;
    max-width: 100%;
}

@media (min-width: 901px) {
    .miolora-product-main-image-wrap {
        width: 75%;
        max-width: 75%;
        margin-inline: auto;
    }
}

.miolora-product-gallery-carousel::-webkit-scrollbar {
    display: none;
}

.miolora-gallery-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(192, 152, 104, 0.18);
    opacity: 0.72;
    cursor: pointer;
    transition: all 0.25s var(--miolora-easing);
}

.miolora-gallery-thumb:hover,
.miolora-gallery-thumb.active {
    opacity: 1;
    border-color: var(--wp--preset--color--gold);
    transform: translateY(-1px);
}

/* Product Actions (Price & Add to Cart) */
.miolora-product-actions-panel { margin-top: 2rem; }
.miolora-price-row {
    font-size: var(--wp--preset--font-size--x-large);
    color: var(--wp--preset--color--gold);
    margin-bottom: 1.5rem;
    font-family: var(--wp--preset--font-family--heading);
}
.miolora-trust-footer {
    margin-top: 2rem;
    border-top: 1px solid rgba(192, 152, 104,0.1);
    padding-top: 1.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Clinical Dossier */
.miolora-dossier-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.6rem);
}
.miolora-dossier-column {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(192, 152, 104, 0.12);
    border-radius: 18px;
    padding: clamp(1rem, 2vw, 1.4rem);
    min-width: 0;
}
.miolora-dossier-column span {
    color: var(--wp--preset--color--gold);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 2px;
}
.miolora-dossier-column h4 {
    margin: 0.5rem 0 1.5rem;
    font-family: var(--wp--preset--font-family--heading);
}
.miolora-dossier-column .ingredients-text {
    opacity: 0.8;
    font-size: 0.95rem;
    line-height: 1.8;
}

.miolora-ingredient-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.miolora-ingredient-core {
    color: var(--wp--preset--color--cream);
}

.miolora-ingredient-highlight {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(192, 152, 104, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.miolora-ingredient-highlight-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--wp--preset--color--gold);
}

.miolora-ingredient-highlight-copy {
    color: var(--wp--preset--color--ivory);
}

.miolora-product-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.miolora-product-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(192, 152, 104, 0.32);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wp--preset--color--gold);
    background: rgba(192, 152, 104, 0.08);
}

/* Premium Access Tree */
.miolora-premium-access-tree {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.miolora-premium-access-intro {
    max-width: min(44rem, 100%);
    margin: 0 auto clamp(0.5rem, 1.5vw, 1rem);
    text-align: center;
    display: grid;
    gap: 0.6rem;
}

.miolora-premium-access-intro-kicker {
    display: inline-flex;
    justify-self: center;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.68rem;
    color: var(--wp--preset--color--gold);
    opacity: 0.88;
}

.miolora-premium-access-intro p {
    margin: 0;
    color: var(--wp--preset--color--gold);
    line-height: 1.7;
    font-size: 0.98rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.miolora-premium-access-tree-rail {
    position: relative;
    display: grid;
    gap: clamp(1.35rem, 2.5vw, 2rem);
    padding-left: clamp(1rem, 2vw, 1.5rem);
    max-width: min(56rem, 100%);
    margin: 0 auto;
}

.miolora-premium-access-tree-rail::before {
    content: "";
    position: absolute;
    left: 0.35rem;
    top: 1.3rem;
    bottom: 1.25rem;
    width: 1px;
    background: linear-gradient(to bottom, rgba(192, 152, 104, 0.5), rgba(192, 152, 104, 0.08));
}

.miolora-premium-access-root {
    position: relative;
    display: grid;
    gap: 0.6rem;
    padding: 1.15rem 1.2rem 1.25rem 1.35rem;
    margin-left: 0.65rem;
    max-width: min(58rem, 100%);
    border: 1px solid rgba(192, 152, 104, 0.2);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.025);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
}

.miolora-premium-access-root::before {
    content: "";
    position: absolute;
    left: -0.95rem;
    top: 1.45rem;
    width: 0.9rem;
    height: 1px;
    background: rgba(192, 152, 104, 0.55);
}

.miolora-premium-access-root-label,
.miolora-premium-discovery-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.68rem;
    color: var(--wp--preset--color--gold);
}

.miolora-premium-access-root h3,
.miolora-premium-discovery-card h3 {
    margin: 0;
    font-family: var(--wp--preset--font-family--heading);
    line-height: 1.15;
    color: var(--wp--preset--color--cream);
}

.miolora-premium-access-root h3 {
    font-size: clamp(1.65rem, 2.7vw, 2.3rem);
}

.miolora-premium-access-root p,
.miolora-premium-discovery-card p {
    margin: 0;
    color: rgba(247, 241, 234, 0.82);
    line-height: 1.7;
    max-width: 58ch;
}

.miolora-premium-access-branches {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 1rem 0 0;
    display: grid;
    gap: clamp(0.9rem, 1.8vw, 1.2rem);
    grid-template-columns: 1fr;
}

.miolora-premium-access-branch {
  position: relative;
    padding: 0;
}

.miolora-premium-discovery-card {
    position: relative;
    height: 100%;
    display: grid;
    gap: 0.65rem;
    padding: 1rem 1rem 1.05rem 1.1rem;
    border: 1px solid rgba(192, 152, 104, 0.12);
    border-left-width: 3px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(192, 152, 104, 0.12), rgba(255, 255, 255, 0.02)), rgba(255, 255, 255, 0.02);
}

.miolora-premium-discovery-card h3 {
    font-size: clamp(1.1rem, 1.7vw, 1.35rem);
}

.miolora-premium-access-link {
    justify-self: start;
}

@media (max-width: 768px) {
    .miolora-premium-access-tree-rail {
        padding-left: 0.95rem;
    }

    .miolora-premium-access-tree-rail::before {
        left: 0.22rem;
    }

    .miolora-premium-access-branches {
        grid-template-columns: 1fr;
    }

    .miolora-premium-access-branch {
        padding: 0;
    }
}

.miolora-product-template .wp-block-post-excerpt {
    max-width: 62ch;
}

.miolora-product-template .wp-block-post-excerpt__excerpt {
    margin: 0;
}

.miolora-product-template .wp-block-post-excerpt__more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.6rem;
    color: var(--wp--preset--color--gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
}

.miolora-product-template .wp-block-post-excerpt__more-link:hover,
.miolora-product-template .wp-block-post-excerpt__more-link:focus-visible {
    text-decoration: underline;
}

/* Product Ritual */
.miolora-product-ritual .miolora-ritual-steps {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.miolora-product-ritual .miolora-ritual-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding: 1rem 0;
    border-top: 1px solid rgba(192, 152, 104, 0.14);
}

.miolora-product-ritual .miolora-ritual-step:first-child {
    border-top: 0;
    padding-top: 0;
}

.miolora-product-ritual .miolora-ritual-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(192, 152, 104, 0.28);
    color: #C09868 !important;
    background: rgba(192, 152, 104, 0.08);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    white-space: nowrap;
}

.miolora-product-ritual .miolora-ritual-step-body {
    min-width: 0;
}

.miolora-product-ritual .miolora-ritual-step-body strong {
    display: block;
    margin-bottom: 0.35rem;
}

/* Shop Grid Delegates */
.miolora-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--wp--preset--spacing--30);
    padding: 2rem 0;
}
.miolora-shop-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(192, 152, 104,0.1);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.6s var(--miolora-easing);
}
.miolora-shop-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--wp--preset--color--gold);
    transform: translateY(-10px);
}
.miolora-card-inner { text-decoration: none; color: inherit; display: block; }
.miolora-card-media { position: relative; aspect-ratio: 1; overflow: hidden; background: #000; }
.miolora-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--miolora-easing); }
.miolora-shop-card:hover .miolora-card-media img { transform: scale(1.1); }
.miolora-card-badge {
    position: absolute; top: 1rem; right: 1rem;
    background: var(--wp--preset--color--gold); color: #000;
    padding: 4px 10px; border-radius: 4px; font-size: 0.6rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.miolora-card-info { padding: 1.5rem; text-align: center; }
.miolora-card-brand { color: var(--wp--preset--color--gold); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 0.5rem; display: block; opacity: 0.8; }
.miolora-card-title { font-size: 1.25rem; margin: 0 0 0.75rem; font-family: var(--wp--preset--font-family--heading); line-height: 1.2; }
.miolora-card-price { font-weight: 600; color: var(--wp--preset--color--ivory); }

.miolora-site-trust-badge {
    max-height: 200px;
    overflow: hidden;
    margin-bottom: 0;
}

.miolora-site-trust-badge iframe {
    max-height: 200px !important;
}

/* Clinical Badge */
.miolora-clinical-badge {
    color: var(--wp--preset--color--gold);
    border: 1px solid var(--wp--preset--color--gold);
    padding: 3px 10px;
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .miolora-dossier-grid { grid-template-columns: 1fr; }
}

/* Product Article Context */
.miolora-product-articles { margin-top: var(--wp--preset--spacing--40); }
.miolora-carousel-shell { margin-top: var(--wp--preset--spacing--40); }
.miolora-carousel-header {
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}
.miolora-carousel-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}
.miolora-carousel-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(192, 152, 104, 0.28);
    background: rgba(192, 152, 104, 0.08);
    color: var(--wp--preset--color--gold);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}
.miolora-carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.miolora-carousel-viewport {
    overflow: hidden;
    margin-top: 1.5rem;
}
.miolora-carousel-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding-bottom: 0.4rem;
    scrollbar-width: none;
}
.miolora-carousel-track::-webkit-scrollbar {
    display: none;
}
.miolora-carousel-card {
    flex: 0 0 clamp(280px, 34vw, 360px);
    scroll-snap-align: start;
    min-width: 0;
}
.miolora-articles-carousel .miolora-carousel-card {
    align-self: stretch;
}
.miolora-articles-grid { display: none; }
.miolora-article-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(192, 152, 104,0.1); padding: 20px; border-radius: 24px; transition: all 0.5s var(--miolora-easing); }
.miolora-article-card:hover { background: rgba(255,255,255,0.04); border-color: var(--wp--preset--color--gold); transform: translateY(-8px); }
.miolora-article-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.miolora-article-image-wrap { width: 100%; height: 250px; border-radius: 16px; overflow: hidden; margin-bottom: 15px; border: 1px solid rgba(192, 152, 104,0.1); }
.miolora-article-image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--miolora-easing); }
.miolora-article-card:hover .miolora-article-image-wrap img { transform: scale(1.1); }
.miolora-article-title {
    font-family: var(--wp--preset--font-family--heading);
    color: var(--wp--preset--color--gold);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.25rem;
}
.miolora-article-excerpt { font-size: 0.9rem; opacity: 0.8; line-height: 1.6; margin-bottom: 15px; }
.miolora-read-more { color: var(--wp--preset--color--gold); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* Clinical Headers */
.miolora-clinical-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(192, 152, 104, 0.15);
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
}

.miolora-clinical-title {
    font-family: var(--wp--preset--font-family--heading);
    font-size: 1.4rem;
    color: var(--wp--preset--color--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 11. Product Editorial: The Story Container */
.miolora-product-story-wrapper {
    position: relative;
    padding-bottom: 2rem;
}

.miolora-product-story-container {
    max-height: 450px;
    overflow: hidden;
    position: relative;
    transition: max-height 1.2s var(--miolora-easing);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.miolora-product-story-wrapper.is-expanded .miolora-product-story-container {
    max-height: 8000px;
    mask-image: none;
    -webkit-mask-image: none;
}

/* Luxury Monogram Finish: Only visible when expanded */
.miolora-product-story-container::after {
    content: "M";
    display: block;
    font-family: var(--wp--preset--font-family--heading);
    font-size: 2.5rem;
    color: var(--wp--preset--color--gold);
    text-align: center;
    margin-top: 4rem;
    opacity: 0;
    transition: opacity 0.6s ease 0.4s;
    border-top: 1px solid rgba(192, 152, 104, 0.1);
    padding-top: 2rem;
}

.miolora-product-story-wrapper.is-expanded .miolora-product-story-container::after {
    opacity: 0.4;
}

/* The Trigger: Luxury Button */
.miolora-story-expand-btn {
    display: block;
    margin: -40px auto 0;
    background: var(--wp--preset--color--ink);
    border: 1px solid var(--wp--preset--color--gold);
    color: var(--wp--preset--color--gold);
    padding: 0.8rem 2rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    z-index: 10;
    transition: all 0.4s var(--miolora-easing);
}

.miolora-story-expand-btn:hover {
    background: var(--wp--preset--color--gold);
    color: var(--wp--preset--color--burgundy);
    transform: translateY(-2px);
}

.miolora-product-story-wrapper.is-expanded .miolora-story-expand-btn {
    display: none; /* Hide once expanded to keep the flow clean */
}

/* Article Grid Audit: Higher-Fidelity Cards */
.miolora-article-card {
    background: rgba(255, 255, 255, 0.01) !important;
    border: 1px solid rgba(192, 152, 104, 0.08) !important;
    backdrop-filter: blur(5px);
    transition: all 0.8s var(--miolora-easing) !important;
}

.miolora-article-card:hover {
    border-color: var(--wp--preset--color--gold) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    transform: translateY(-12px) scale(1.01);
}

.miolora-article-image-wrap {
    filter: sepia(0.2) contrast(1.1);
    transition: filter 0.8s ease;
}

.miolora-article-card:hover .miolora-article-image-wrap {
    filter: sepia(0) contrast(1);
}

/* Related Product Carousel */
.miolora-product-related-products { margin-top: var(--wp--preset--spacing--40); }
.miolora-related-products-carousel .miolora-carousel-card {
    flex-basis: clamp(220px, 28vw, 300px);
}
.miolora-related-product-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(192, 152, 104, 0.1);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.5s var(--miolora-easing);
}
.miolora-related-product-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--wp--preset--color--gold);
    transform: translateY(-6px);
}
.miolora-related-product-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
.miolora-related-product-media {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: rgba(0,0,0,0.12);
}
.miolora-related-product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.miolora-related-product-body {
    padding: 1rem 1rem 1.15rem;
}
.miolora-related-product-title {
    margin: 0 0 0.4rem;
    font-family: var(--wp--preset--font-family--heading);
    font-size: 1rem;
    line-height: 1.25;
}
.miolora-related-product-price {
    color: var(--wp--preset--color--gold);
    font-weight: 700;
}

/* House of Authority */
.miolora-house-engine {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.miolora-house-section {
    display: grid;
    gap: clamp(1rem, 2vw, 1.5rem);
}

.miolora-house-section .wp-block-heading {
    margin-bottom: 0;
}

.miolora-council-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(1.35rem, 2.5vw, 2.25rem);
    align-items: start;
}

.miolora-council-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(192, 152, 104, 0.1);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

.council-card-portrait {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.16);
}

.council-card-portrait img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover;
}

.council-card-identity {
    display: grid;
    gap: 0.8rem;
    padding: 1.25rem 1.25rem 1.4rem;
}

.council-card-title {
    color: var(--wp--preset--color--gold);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 700;
}

.council-card-identity h3 {
    margin: 0;
    font-family: var(--wp--preset--font-family--heading);
    font-size: clamp(1.25rem, 1.8vw, 1.55rem);
    line-height: 1.15;
}

.council-card-scrutiny {
    color: rgba(247, 241, 234, 0.74);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.council-card-philosophy {
    color: rgba(247, 241, 234, 0.86);
    line-height: 1.65;
}

.council-card-socials {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.council-card-socials a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(192, 152, 104, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--wp--preset--color--gold);
    text-decoration: none;
    text-transform: none;
}

.council-card-socials a:hover {
    background: rgba(192, 152, 104, 0.1);
}

.council-card-social-platform {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: var(--wp--preset--color--gold);
}

.council-card-social-handle {
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    color: rgba(247, 241, 234, 0.86);
    word-break: break-word;
}

@media (max-width: 768px) {
    .miolora-house-engine {
        gap: 1.25rem;
    }

    .miolora-house-section {
        gap: 0.9rem;
    }

    .miolora-council-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .miolora-council-card {
        border-radius: 20px;
    }

    .council-card-portrait {
        aspect-ratio: 1 / 1;
    }

    .council-card-identity {
        padding: 1rem;
        gap: 0.7rem;
    }

    .council-card-socials a {
        padding: 0.7rem 0.8rem;
    }

    .miolora-council-grid {
        grid-template-columns: 1fr;
    }

    .council-card-identity {
        padding: 1rem 1rem 1.15rem;
    }

    .miolora-premium-access-tree-rail {
        padding-left: 0;
        gap: 1rem;
    }

    .miolora-premium-access-tree-rail::before {
        display: none;
    }

    .miolora-premium-access-branches {
        padding-top: 0.35rem;
    }

    .miolora-premium-discovery-card {
        padding: 1rem;
        border-left-width: 1px;
        gap: 0.55rem;
    }
}

/* 12. Curation Console & Navigation Authority */
.miolora-controls { display: flex !important; align-items: center; gap: 1.5rem; }
.miolora-atmosphere-btn { display: inline-flex !important; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--miolora-gold); background: transparent; color: var(--miolora-gold); cursor: pointer; transition: all 0.3s ease; }
.miolora-theme-icon-sun, .miolora-theme-icon-moon { display: none !important; line-height: 0; }
html[data-miolora-theme='dark'] .miolora-theme-icon-sun { display: inline-flex !important; }
html[data-miolora-theme='light'] .miolora-theme-icon-moon { display: inline-flex !important; }
.miolora-nav-icon { display: inline-flex; line-height: 0; }
.miolora-product-main-image-wrap { aspect-ratio: 1 / 1 !important; overflow: hidden; }
.miolora-product-main-image-wrap img { width: 100%; height: 100%; object-fit: cover !important; }
.miolora-mobile-menu-controls { padding-top: 0.75rem !important; margin-bottom: 2.6rem !important; }

@media (max-width: 768px) {
    .miolora-carousel-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .miolora-carousel-controls {
        margin-left: 0;
    }
    .miolora-carousel-card {
        flex-basis: min(84vw, 320px);
    }
    .miolora-article-image-wrap {
        height: 220px;
    }
}

