:root {
    --ink: #100c0a;
    --ink-2: #1a1410;
    --paper: #f3ebe0;
    --paper-2: #e7d9c6;
    --wood: #c4a574;
    --muted: #b7a48c;
    --line: rgba(243, 235, 224, 0.14);
    --font-display: "Fraunces", Georgia, serif;
    --font-ui: "Outfit", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-ui);
    background: var(--ink);
    color: var(--paper);
    line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--line);
    background: rgba(16, 12, 10, 0.92);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 40;
}
.site-header:has(.user-menu-dropdown.show) {
    z-index: 250;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.brand img { height: 52px; width: auto; }
.brand span {
    font-family: var(--font-display);
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.nav {
    display: flex;
    gap: 1.6rem;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.nav a { color: var(--muted); }
.nav a:hover,
.nav a.is-active { color: var(--paper); }
.header-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.header-account {
    position: relative;
}
.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--paper);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.icon-btn svg { width: 18px; height: 18px; }
.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--wood);
    color: var(--ink);
    font-size: 0.7rem;
    font-weight: 600;
    display: none;
    align-items: center;
    justify-content: center;
}
.cart-count.show { display: flex; }

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    max-width: min(280px, calc(100vw - 1.5rem));
    background: var(--ink-2);
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 1;
    padding: 0.55rem;
}
.user-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-arrow {
    position: absolute;
    top: -6px;
    right: 12px;
    width: 10px;
    height: 10px;
    background: var(--ink-2);
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    transform: rotate(45deg);
}
.user-menu-dropdown .menu-header {
    display: flex;
    align-items: center;
    padding: 0.55rem 0.7rem 0.4rem;
}
.user-menu-dropdown .user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--paper);
}
.user-menu-dropdown .user-email {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.1rem;
    word-break: break-all;
}
.user-menu-dropdown .menu-divider {
    height: 1px;
    background: var(--line);
    margin: 0.35rem 0.2rem;
}
.user-menu-dropdown .menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.7rem 0.75rem;
    margin: 0.3rem 0;
    border: 1px solid transparent;
    background: transparent;
    color: var(--paper);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}
.user-menu-dropdown .user-menu .menu-item {
    justify-content: flex-start;
    color: var(--paper-2);
}
.user-menu-dropdown .user-menu .menu-item:hover {
    background: rgba(243, 235, 224, 0.06);
    color: var(--paper);
}
.user-menu-dropdown .btn-login-style {
    background: transparent;
    color: var(--paper);
    border-color: var(--paper);
}
.user-menu-dropdown .btn-login-style:hover {
    background: var(--paper);
    color: var(--ink);
}
.user-menu-dropdown .btn-register-style {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--paper);
}
.user-menu-dropdown .btn-register-style:hover {
    background: #fff;
}
.user-menu-dropdown .menu-logout {
    color: #e8b4a4;
    font-weight: 500;
}
.user-menu-dropdown .menu-logout:hover {
    background: rgba(232, 180, 164, 0.12);
    color: #f3c9bc;
}

.hero {
    min-height: calc(100vh - 90px);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    background:
        linear-gradient(90deg, rgba(16,12,10,0.88) 0%, rgba(16,12,10,0.45) 55%, rgba(16,12,10,0.2) 100%),
        url("/images/Legno2.jpg") center/cover no-repeat;
}
.hero-copy {
    padding: 5.5rem 4rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 720px;
}
.kicker {
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--wood);
    margin-bottom: 1.1rem;
}
h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 500;
    line-height: 1.08;
    margin-bottom: 1.25rem;
}
.lede {
    font-size: 1.12rem;
    color: var(--paper-2);
    max-width: 38rem;
    margin-bottom: 2rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.35rem;
    border: 1px solid transparent;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}
.btn-primary { background: var(--paper); color: var(--ink); }
.btn-primary:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-wood { background: var(--wood); color: var(--ink); }
.hero-mark {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 2rem 3rem 3rem;
}
.hero-mark img {
    width: min(340px, 38vw);
    filter: drop-shadow(0 18px 40px rgba(0,0,0,0.55));
}

.paths { display: grid; grid-template-columns: 1fr 1fr; }
.path {
    min-height: 420px;
    position: relative;
    overflow: hidden;
    border: 0;
    color: var(--paper);
    text-align: left;
    background: var(--ink-2);
}
.path img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    opacity: 0.55;
}
.path-body {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 420px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(180deg, transparent 20%, rgba(16,12,10,0.92) 100%);
}
.path small {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--wood);
    font-size: 0.72rem;
}
.path h2 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 500;
    margin: 0.35rem 0 0.5rem;
}
.path p { color: var(--paper-2); max-width: 28rem; }
.path:hover img { opacity: 0.7; }
.path[data-filter="crystal"] img {
    opacity: 0.82;
    object-position: center 60%;
}
.path[data-filter="crystal"]:hover img { opacity: 0.95; }

#shop, #banco { scroll-margin-top: 88px; }
.section {
    padding: 4.5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.section-head h2 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 500;
}
.section-head p { color: var(--muted); max-width: 28rem; }
.filters { display: flex; gap: 0.5rem; }
.chip {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}
.chip.is-on,
.chip:hover { color: var(--ink); background: var(--paper); border-color: var(--paper); }

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.shop-status {
    color: var(--muted);
    grid-column: 1 / -1;
    padding: 2rem 0;
}
.catalog-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}
.catalog-link:hover { color: var(--paper); }
.card {
    background: var(--ink-2);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}
.card-visual {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 60% at 50% 48%, rgba(243, 235, 224, 0.16) 0%, transparent 72%),
        linear-gradient(180deg, #3a2e26 0%, #241c17 100%);
}
.card-visual--classico {
    background:
        radial-gradient(ellipse 70% 60% at 50% 48%, rgba(243, 235, 224, 0.18) 0%, transparent 72%),
        linear-gradient(180deg, #403328 0%, #2a211a 100%);
}
.card-visual--crystal {
    background:
        radial-gradient(ellipse 70% 60% at 50% 48%, rgba(220, 232, 236, 0.2) 0%, transparent 72%),
        linear-gradient(180deg, #2c3338 0%, #1a1f22 100%);
}
.card-visual img {
    max-height: 88%;
    max-width: 92%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}
.badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.38rem 0.62rem;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.badge--crystal {
    background: #dce8ec;
    color: #1a1f22;
}
.badge--recipe,
.card-recipe-btn {
    top: auto;
    bottom: 0.75rem;
    left: auto;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(243, 235, 224, 0.38);
    background:
        radial-gradient(
            ellipse 95% 120% at 50% 50%,
            rgba(243, 235, 224, 0.06) 0%,
            rgba(243, 235, 224, 0.14) 45%,
            rgba(243, 235, 224, 0.34) 100%
        );
    color: var(--paper);
    box-shadow:
        inset 0 0 0 1px rgba(243, 235, 224, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.16),
        0 2px 10px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    font-family: inherit;
}
.card-recipe-btn__icon {
    flex-shrink: 0;
    opacity: 0.95;
}
.card-recipe-btn:hover {
    background:
        radial-gradient(
            ellipse 95% 120% at 50% 50%,
            rgba(243, 235, 224, 0.12) 0%,
            rgba(243, 235, 224, 0.24) 45%,
            rgba(243, 235, 224, 0.46) 100%
        );
    border-color: rgba(243, 235, 224, 0.55);
    color: var(--paper);
}
.card-kind {
    margin: 0 0 0.35rem;
    color: var(--wood);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.card-body { padding: 1.1rem 1.15rem 1.25rem; }
.card-body h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.25;
}
.meta {
    color: var(--muted);
    font-size: 0.88rem;
    margin: 0.25rem 0 0.9rem;
}
.card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.price { font-size: 1.05rem; font-weight: 600; }
.add {
    border: 1px solid var(--paper);
    background: transparent;
    color: var(--paper);
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.add:hover { background: var(--paper); color: var(--ink); }
.add:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.banco {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    min-height: 520px;
    background: var(--ink-2);
}
.banco-photo {
    background:
        linear-gradient(180deg, rgba(16, 12, 10, 0.15), rgba(16, 12, 10, 0.55)),
        url("/images/Legno.jpg") center/cover no-repeat;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

.banco-photo span {
    font-family: var(--font-display);
    font-size: 1.6rem;
    line-height: 1.3;
}
.banco-copy {
    padding: 4rem 3.5rem;
    max-width: 640px;
}
.banco-copy h2 {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 500;
    margin: 0.4rem 0 1.2rem;
}
.banco-copy p { color: var(--paper-2); margin-bottom: 1rem; font-size: 1.05rem; }
.facts {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin: 1.8rem 0 2rem;
}
.facts div { border-top: 1px solid var(--line); padding-top: 0.8rem; }
.facts strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.facts span { color: var(--muted); font-size: 0.88rem; }

.reviews {
    background: var(--paper);
    color: var(--ink);
    padding: clamp(3rem, 7vw, 4.5rem) 1.5rem;
    border-top: 1px solid rgba(16, 12, 10, 0.08);
}

.reviews.is-empty { display: none; }

.reviews-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.reviews-head {
    max-width: 34rem;
    margin-bottom: 2rem;
}

.reviews-head .kicker {
    color: #8a7355;
    margin-bottom: 0.55rem;
}

.reviews-head h2 {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 4vw, 2.35rem);
    font-weight: 500;
    line-height: 1.12;
    margin-bottom: 0.55rem;
}

.reviews-lede {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.5;
    color: #6f5f4d;
}

.home-reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 1rem;
    align-items: stretch;
}

.home-review-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 100%;
    padding: 1.2rem 1.15rem 1rem;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(16, 12, 10, 0.1);
    box-shadow: 0 10px 28px rgba(16, 12, 10, 0.05);
}

.home-review-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.home-review-kicker {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a7355;
    line-height: 1.2;
}

.home-review-text {
    margin: 0;
    flex: 1 1 auto;
}

.home-review-text p {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.45;
    color: var(--ink);
}

.home-review-text p::before {
    content: "“";
    color: #8a7355;
}

.home-review-text p::after {
    content: "”";
    color: #8a7355;
}

.home-review-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-left: auto;
}

.home-review-rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.08rem;
    line-height: 1;
}

.home-review-rating-stars .rating-star-svg {
    width: 0.82rem;
    height: 0.82rem;
}

.home-review-rating-num {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #6f5f4d;
    line-height: 1;
}

.home-review-footer {
    margin-top: auto;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(16, 12, 10, 0.08);
}

.home-review-author {
    font-style: normal;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #6f5f4d;
}

.site-footer {
    padding: 2.5rem 1.5rem 3rem;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
}
.site-footer a:hover { color: var(--paper); }
.footer-contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.15rem;
}
.footer-contacts a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: inherit;
    text-decoration: none;
}
.footer-contacts i {
    font-size: 0.95rem;
    line-height: 1;
}

.toast {
    position: fixed;
    bottom: 1.2rem;
    right: 1.2rem;
    background: var(--paper);
    color: var(--ink);
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    display: none;
    z-index: 90;
    max-width: 280px;
}
.toast.show { display: block; }

dialog {
    border: 0;
    padding: 0;
    background: var(--ink-2);
    color: var(--paper);
    width: min(420px, 92vw);
    max-height: min(92dvh, calc(100vh - 2rem));
    overflow-y: auto;
    overscroll-behavior: contain;
}
dialog::backdrop { background: rgba(0,0,0,0.62); }
.dialog-body { padding: 1.6rem; }
.dialog-body h3 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.dialog-body p { color: var(--muted); margin-bottom: 1.1rem; }
.dialog-note {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--paper-2);
    margin-bottom: 1rem;
    padding: 0.75rem 0.85rem;
    border-left: 2px solid var(--wood);
    background: rgba(243, 235, 224, 0.04);
}
label { display: block; font-size: 0.8rem; margin: 0.7rem 0 0.3rem; color: var(--muted); }
input, textarea {
    width: 100%;
    background: var(--ink);
    border: 1px solid var(--line);
    color: var(--paper);
    padding: 0.7rem 0.75rem;
    font: inherit;
}
.dialog-actions { display: flex; gap: 0.5rem; margin-top: 1.2rem; }

/* Carrello — stesso markup del catalogo, stile bottega */
.cart-panel {
    position: fixed;
    display: block;
    left: 170px;
    right: auto;
    top: 100px;
    width: 260px;
    max-width: calc(100% - 2rem);
    z-index: 200;
    background: var(--ink-2);
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    flex-direction: column;
    max-height: calc(100vh - 2rem);
    overflow: hidden;
    color: var(--paper);
    transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
}
.cart-panel.is-cart-entering {
    opacity: 0;
    transform: translate3d(0, -12px, 0) scale(0.97);
    pointer-events: none;
}
.cart-panel.is-cart-exiting {
    transition: opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.cart-panel.is-cart-exiting.is-cart-exiting-active {
    opacity: 0;
    transform: translate3d(0, -12px, 0) scale(0.97);
}

/* Morph panel ↔ sidebar (FLIP) */
.cart-panel.is-cart-morphing {
    overflow: hidden;
    will-change: transform;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
    border-radius: 0;
}
.cart-panel.is-cart-morphing .cart-panel-content {
    height: 100%;
    min-height: 0;
}
.cart-panel.is-cart-morphing .cart-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}

@media (prefers-reduced-motion: reduce) {
    .cart-panel,
    .cart-sidebar .cart-sidebar-tab {
        transition: none !important;
    }
    .cart-panel.is-cart-entering {
        opacity: 1;
        transform: none;
    }
    .cart-panel.is-cart-exiting,
    .cart-panel.is-cart-exiting.is-cart-exiting-active {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .cart-panel.is-cart-morphing {
        transition: none !important;
    }
}
.cart-panel.dragging { transition: none; }
.cart-panel.is-panel-resizing {
    will-change: width, height, left;
    max-width: none;
}
.cart-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.cart-panel-header {
    padding: 0.6rem 0.5rem;
    display: grid;
    grid-template-columns: 2rem 1fr 2rem;
    align-items: center;
    gap: 0.25rem;
    background: var(--ink-2);
    flex-shrink: 0;
    position: relative;
    border-bottom: 1px solid var(--line);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.cart-panel-header:active {
    cursor: grabbing;
}
.cart-panel.dragging .cart-panel-header {
    cursor: grabbing;
}
.cart-panel-header h3.cart-panel-title {
    margin: 0;
    grid-column: 2;
    justify-self: center;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--paper);
    font-size: 0.95rem;
    line-height: 1;
}
.cart-panel-header h3.cart-panel-title .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.cart-sidebar-header h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--paper);
    letter-spacing: 0.04em;
    text-align: center;
    justify-self: center;
    grid-column: 2;
}
.cart-chrome-btn {
    background: none;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 4px;
    font-size: 0.82rem;
    position: relative;
    z-index: 2;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}
.cart-chrome-btn:hover {
    color: var(--paper);
    background: rgba(243, 235, 224, 0.08);
}
.cart-panel-toggle { grid-column: 1; justify-self: start; }
.cart-panel-expand { grid-column: 3; justify-self: end; }
.cart-sidebar-close { grid-column: 1; justify-self: start; }
.cart-sidebar-to-panel { grid-column: 3; justify-self: end; }
.cart-panel-body {
    padding: 0.85rem;
    overflow-y: auto;
    flex: 1;
    max-height: 350px;
    min-height: 0;
}
.cart-panel-body::-webkit-scrollbar { width: 6px; }
.cart-panel-body::-webkit-scrollbar-track { background: var(--ink); }
.cart-panel-body::-webkit-scrollbar-thumb { background: var(--wood); }

.cart-progress-container {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.cart-progress-bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(243, 235, 224, 0.12);
    border-radius: 5px;
    overflow: visible;
    margin-bottom: 0.5rem;
}
.cart-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--wood);
    border-radius: 6px;
    z-index: 1;
}
.cart-progress-checkpoint {
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    z-index: 3;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--ink-2);
    box-shadow: 0 0 0 2px var(--muted);
}
.cart-progress-checkpoint.reached {
    background: var(--paper);
    box-shadow: 0 0 0 2px var(--wood);
}
.cart-progress-text {
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.35;
}

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem;
    background: var(--ink);
    border: 1px solid var(--line);
    min-height: 44px;
    gap: 0.5rem;
}
.cart-item-image-container {
    width: 40px;
    height: 40px;
    min-width: 40px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-item-image-placeholder {
    color: var(--muted);
    font-size: 0.9rem;
}
.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    flex: 1;
    min-width: 0;
}
.cart-item-gusto {
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.2;
    color: var(--paper);
}
.cart-item-peso {
    font-size: 0.72rem;
    color: var(--muted);
}
.cart-item-prezzo {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--paper);
}
.cart-item-prezzo-base {
    text-decoration: line-through;
    color: var(--muted);
    margin-right: 0.4rem;
}
.cart-item-prezzo-sconto { color: var(--wood); }
.cart-item-actions { flex-shrink: 0; }
.cart-item-quantity-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cart-item-quantity {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--paper);
    user-select: none;
    cursor: pointer;
    position: relative;
    z-index: 3;
}
.cart-item-decrease,
.cart-item-increase {
    background: transparent;
    border: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    padding: 0;
    position: relative;
    z-index: 2;
}
.cart-item-increase { margin-bottom: -8px; padding-bottom: 8px; }
.cart-item-decrease { margin-top: -8px; padding-top: 8px; }
.cart-item-decrease:hover,
.cart-item-increase:hover { color: var(--paper); }

.cart-panel-footer,
.cart-sidebar-footer {
    padding: 0.85rem;
    border-top: 1px solid var(--line);
    background: var(--ink-2);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    flex-shrink: 0;
    box-sizing: border-box;
}
.cart-panel-footer .cart-totals,
.cart-sidebar-footer .cart-totals {
    width: 100%;
    margin: 0;
}
.cart-totals {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.cart-total-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
}
.cart-total-label { color: var(--muted); }
.cart-total-value {
    color: var(--paper);
    font-weight: 600;
    display: flex;
    align-items: center;
}
.cart-total-proteine,
.cart-total-proteine .cart-total-label,
.cart-total-proteine .cart-total-value {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--muted);
}
.cart-panel-footer .cart-total-proteine {
    display: none;
}
.cart-shipping-cost,
.cart-shipping-free {
    font-size: 0.68rem;
    color: var(--muted);
    font-weight: 400;
    padding-left: 6px;
}
.cart-shipping-free { display: inline-block; line-height: 1.2; }
.icon-shipping { fill: var(--muted); }

.btn-checkout,
.btn-request {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
}
.cart-panel-footer .btn-checkout,
.cart-panel-footer .btn-request,
.cart-sidebar-footer .btn-checkout,
.cart-sidebar-footer .btn-request {
    width: 100%;
    max-width: 100%;
    margin: 0;
}
.btn-checkout {
    background: var(--paper);
    color: var(--ink);
}
.btn-checkout:hover { background: #fff; }
.btn-request {
    background: transparent;
    color: var(--paper);
    border-color: var(--wood);
}
.btn-request:hover {
    background: var(--wood);
    color: var(--ink);
}
.cart-panel.collapsed {
    width: fit-content;
    min-width: 0;
    max-width: none;
}
.cart-panel.collapsed .cart-panel-content {
    height: auto;
}
.cart-panel.collapsed .cart-panel-header {
    grid-template-columns: 2rem 2rem 2rem;
    gap: 0.15rem;
    padding: 0.35rem 0.4rem;
    border-bottom: none;
}
.cart-panel.collapsed .cart-panel-body,
.cart-panel.collapsed .cart-panel-footer { display: none; }

.cart-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    z-index: 198;
    display: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 85%;
    max-width: 400px;
    background: var(--ink-2);
    border-left: 1px solid var(--line);
    z-index: 199;
    display: none;
    flex-direction: row;
    will-change: transform;
    touch-action: none;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s ease;
    color: var(--paper);
    overflow: visible;
}
@media (min-width: 769px) {
    .cart-sidebar { width: 350px; max-width: 350px; }
}
.cart-sidebar.expanded { transform: translateX(0); }
.cart-sidebar.collapsed {
    transform: translateX(100%);
    width: 0 !important;
    overflow: visible;
}
.cart-sidebar-tab {
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 80px;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: 6px 0 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 201;
    color: var(--paper);
    font-size: 0.9rem;
    box-shadow: none;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    transition: background 0.25s ease, color 0.25s ease,
        opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.cart-sidebar.expanded .cart-sidebar-tab {
    left: -40px;
    right: auto;
    background:
        linear-gradient(
            90deg,
            rgba(196, 165, 116, 0.4) 0%,
            rgba(196, 165, 116, 0.18) 42%,
            transparent 100%
        ),
        var(--ink-2);
    color: var(--paper);
}
.cart-sidebar.expanded .cart-sidebar-tab:hover {
    background:
        linear-gradient(
            90deg,
            rgba(196, 165, 116, 0.52) 0%,
            rgba(196, 165, 116, 0.22) 42%,
            transparent 100%
        ),
        var(--ink-2);
    color: var(--wood);
}
.cart-sidebar.collapsed .cart-sidebar-tab {
    position: fixed;
    right: 0;
    left: auto;
    transform: translateY(-50%);
    background: var(--ink-2);
    color: var(--paper);
}
.cart-sidebar.collapsed .cart-sidebar-tab:hover {
    background: var(--ink);
    color: var(--wood);
}
.cart-sidebar-tab i {
    transition: transform 0.25s ease;
}
.cart-sidebar.expanded .cart-sidebar-tab i {
    transform: rotate(180deg);
}
.cart-sidebar-tab .cart-sidebar-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--wood);
    color: var(--ink);
    font-size: 0.68rem;
    font-weight: 700;
    display: none;
    transform: translate(-50%, -50%);
    z-index: 2;
    border-radius: 999px;
    line-height: 18px;
    text-align: center;
}
.cart-sidebar.expanded .cart-sidebar-tab .cart-sidebar-badge {
    display: none !important;
}
.cart-sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100vh;
    overflow: hidden;
}
.cart-sidebar-header {
    padding: 0.75rem 0.65rem 0.75rem 0.65rem;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 2rem 1fr 2rem;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}
.cart-sidebar-body {
    padding: 0.85rem;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}
.cart-sidebar-totals { margin-bottom: 0.25rem; }
.cart-sidebar.collapsed ~ .cart-sidebar-overlay { display: none !important; }
.cart-sidebar.collapsed .cart-sidebar-content {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
}
.cart-sidebar.is-cart-entering .cart-sidebar-tab {
    opacity: 0;
    transform: translate(14px, -50%);
}
.cart-sidebar.collapsed.is-cart-entering .cart-sidebar-tab {
    transform: translate(14px, -50%);
}

html.sidebar-open {
    overscroll-behavior: none;
}

body.sidebar-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.toast-message {
    position: fixed;
    bottom: 1.2rem;
    right: 1.2rem;
    background: var(--paper);
    color: var(--ink);
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    z-index: 220;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.toast-message.show { opacity: 1; }

@media (max-width: 900px) {
    .site-header { padding: 0.65rem 0.9rem; gap: 0.5rem; }
    .brand img { height: 40px; }
    .brand span { display: none; }
    .nav {
        gap: 0.85rem;
        font-size: 0.78rem;
    }
    .hero, .paths, .grid, .banco, .home-reviews-grid { grid-template-columns: 1fr; }
    .hero { min-height: auto; }
    .hero-copy { padding: 3rem 1.2rem 2.2rem; }
    .hero-mark { display: none; }
    .banco-copy { padding: 2.4rem 1.4rem; }
    .facts { grid-template-columns: 1fr; }
    .path, .path-body { min-height: 320px; }
    .icon-btn { width: 44px; height: 44px; }
    .user-menu-dropdown {
        min-width: 220px;
        right: -0.15rem;
    }
    dialog[open] {
        position: fixed;
        left: 50%;
        top: max(0.75rem, env(safe-area-inset-top));
        transform: translateX(-50%);
        z-index: 100;
        margin: 0;
        max-height: min(88dvh, calc(100dvh - 1.5rem));
        -webkit-overflow-scrolling: touch;
    }
    .cart-panel {
        width: calc(100% - 1rem);
        max-width: 240px;
        top: 0.5rem;
        right: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
    .cart-panel-body { max-height: 220px; }
    .cart-sidebar {
        height: 100vh;
        height: 100dvh;
    }
    .cart-sidebar-footer {
        padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
    }
}

.home-recipe-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding:
        max(0.75rem, env(safe-area-inset-top))
        max(0.75rem, env(safe-area-inset-right))
        max(0.75rem, env(safe-area-inset-bottom))
        max(0.75rem, env(safe-area-inset-left));
    box-sizing: border-box;
}

.home-recipe-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
}

.home-recipe-panel {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100dvh - 1.5rem);
    display: flex;
    flex-direction: column;
    background: var(--ink-2);
    border: 1px solid rgba(243, 235, 224, 0.16);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.home-recipe-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.15rem 0.65rem;
    border-bottom: 1px solid rgba(243, 235, 224, 0.12);
    flex-shrink: 0;
}

.home-recipe-kicker {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wood);
}

.home-recipe-head-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.home-recipe-open {
    color: var(--wood);
    font-size: 0.88rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-recipe-open:hover {
    color: var(--paper);
}

.home-recipe-close {
    width: 2rem;
    height: 2rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.home-recipe-close:hover {
    color: var(--paper);
}

.home-recipe-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.home-recipe-loading,
.home-recipe-error {
    margin: 0;
    padding: 1.25rem;
    color: var(--muted);
}

.home-recipe-error {
    color: #e8a090;
}

.home-recipe-body #recipe-preview-iframe {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: 0;
    background: var(--ink);
}

@media (max-width: 640px) {
    .home-recipe-modal {
        padding:
            max(0.5rem, env(safe-area-inset-top))
            max(0.5rem, env(safe-area-inset-right))
            max(0.5rem, env(safe-area-inset-bottom))
            max(0.5rem, env(safe-area-inset-left));
    }

    .home-recipe-panel {
        max-height: none;
        width: 100%;
    }
}
