﻿/* ============================================================
   TEMPLATE HYBRID — Main Stylesheet
   Typefaces: "DM Serif Display" (headings) + "DM Sans" (body)
   Palette: Pure white · Near-black · Warm stone accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-ink:      #0e0e0e;
  --color-ink-2:    #1c1c1c;
  --color-stone:    #8b7355;
  --color-muted:    #9a9590;
  --color-border:   #e6e4e0;
  --color-bg:       #ffffff;
  --color-bg-warm:  #faf9f7;
  --color-bg-card:  #f5f3ef;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --max-width:      860px;
  --max-width-wide: 1180px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.05rem);
  line-height: 1.85;
  color: var(--color-ink);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }

/* ── CONTAINER ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width-wide);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}
/* ── HEADER ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow .3s var(--ease-out);
}
.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 64px;
}

/* ── LOGO ───────────────────────────────────────────────────── */
.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -.01em;
  color: var(--color-ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo img { height: 36px; width: auto; }

/* ── NAV ────────────────────────────────────────────────────── */
.main-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  flex: 1;
}
.main-nav a {
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: .35rem .75rem;
  border-radius: 4px;
  color: var(--color-muted);
  transition: color .2s, background .2s;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--color-ink);
  background: var(--color-bg-card);
}
/* ── LANG SWITCHER ──────────────────────────────────────────── */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
}
.lang-dropdown {
  position: relative;
}
.lang-dropdown summary {
  list-style: none;
  cursor: pointer;
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-muted);
  padding: .28rem .5rem;
  border-radius: 5px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  letter-spacing: .04em;
  user-select: none;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.lang-dropdown summary::-webkit-details-marker { display: none; }
.lang-dropdown summary:hover {
  color: var(--color-ink);
  background: var(--color-bg-card);
}
.lang-dropdown[open] summary {
  color: var(--color-ink);
  background: var(--color-bg-card);
}
.lang-dropdown ul {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 7px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  list-style: none;
  margin: 0;
  padding: .3rem 0;
  min-width: 110px;
  z-index: 200;
}
.lang-dropdown ul li a {
  display: block;
  padding: .4rem .9rem;
  font-size: .78rem;
  color: var(--color-muted);
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.lang-dropdown ul li a:hover,
.lang-dropdown ul li a.lang-active {
  background: var(--color-bg-card);
  color: var(--color-ink);
  font-weight: 600;
}

/* ── CART ICON ──────────────────────────────────────────── */
.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 1.2rem;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background .2s;
}
.cart-link:hover { background: var(--color-bg-card); }
.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--color-stone);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.cart-badge.is-empty { opacity: .35; }

/* ── HAMBURGER BUTTON ───────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: auto;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-left: auto;
  transition: background .2s;
}
.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 22px;
}
.nav-toggle-text {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--color-ink);
  white-space: nowrap;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-text.is-closed,
.nav-toggle:not([aria-expanded="true"]) .nav-toggle-text.is-open { display: none; }
.nav-toggle:hover { background: var(--color-bg-card); }
.nav-toggle span.bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform .3s var(--ease-out), opacity .2s;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span.bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span.bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span.bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
/* ── MAIN CONTENT ───────────────────────────────────────────── */
.site-main {
  min-height: calc(100vh - 64px - 120px);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.content-body { max-width: var(--max-width-wide); }

.content-body h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}
.content-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-top: 2.5rem;
  margin-bottom: .75rem;
}
.content-body h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 2rem;
  margin-bottom: .5rem;
}
.content-body p  { margin-bottom: 1.25rem; }
.content-body ul,
.content-body ol { margin: 0 0 1.25rem 1.5rem; }
.content-body li { margin-bottom: .4rem; }
.content-body code {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: .88em;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  padding: .1em .4em;
  border-radius: 4px;
}
.content-body pre {
  background: var(--color-bg-warm);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.content-body pre code { background: none; border: none; padding: 0; font-size: .9rem; }
.content-body blockquote {
  border-left: 3px solid var(--color-stone);
  margin: 1.5rem 0;
  padding: .75rem 1.5rem;
  color: var(--color-muted);
  font-style: italic;
}
/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-warm);
  padding-block: 2rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.footer-copy {
  font-size: .85rem;
  color: var(--color-muted);
  flex: 1;
  min-width: 200px;
}
.footer-nav, .footer-social { display: flex; gap: 1.25rem; }
.footer-nav a, .footer-social a {
  font-size: .85rem;
  color: var(--color-muted);
  transition: color .2s;
}
.footer-nav a:hover, .footer-social a:hover { color: var(--color-ink); }

/* ── 404 ─────────────────────────────────────────────────────── */
.error-404 { text-align: center; padding: 4rem 0; }
.error-404 h1 {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8rem);
  color: var(--color-border);
  line-height: 1;
  margin-bottom: 1rem;
}
.error-404 p { color: var(--color-muted); }
.error-404 a { color: var(--color-stone); text-decoration: underline; text-underline-offset: 3px; }
/* ── RESPONSIVE MOBILE ──────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { gap: 0; }
  .logo { margin-right: auto; }
  .lang-switcher { order: 1; margin-right: auto; }
  .cart-link { order: 2; margin-left: 4px; }
  .nav-toggle { display: flex; order: 3; margin-left: 4px; }

  .main-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 99;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .75rem 1rem 1rem;
    /* nascosto di default */
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
    /* non occupa spazio quando chiuso */
    flex: unset;
  }
  .main-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav a {
    padding: .75rem 1rem;
    font-size: .95rem;
    border-radius: 6px;
    text-align: left;
  }
  .lang-switcher select { font-size: .9rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: .75rem; }
}

@media (max-width: 480px) {
  .header-inner { height: 56px; }
  .main-nav { top: 56px; }
}

/* ── 404 ─────────────────────────────────────────────────── */
.error-404 {
  padding: 5rem 0 4rem;
  text-align: center;
}
.error-404__code {
  font-family: var(--font-serif);
  font-size: 7rem;
  line-height: 1;
  color: var(--border);
  margin-bottom: .5rem;
}
.error-404__title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
}
.error-404__msg {
  color: var(--muted);
  margin-bottom: 2rem;
}
.error-404__cta {
  display: inline-block;
  padding: .65rem 1.75rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: opacity .2s;
}
.error-404__cta:hover { opacity: .8; }

/* ============================================================
   SHOP — Griglia categorie, prodotti, pagina prodotto
   ============================================================ */

/* ── Breadcrumb shop ─────────────────────────────────────────── */
.shop-breadcrumb {
  font-size: .82rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.shop-breadcrumb a { color: var(--color-stone); }
.shop-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.shop-breadcrumb span { color: var(--color-border); }

/* ── Titolo sezione shop ─────────────────────────────────────── */
.shop-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: .5rem;
}
.shop-subheading {
  color: var(--color-muted);
  font-size: .95rem;
  margin-bottom: 2.5rem;
}

/* ── Griglia categorie ───────────────────────────────────────── */
.shop-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.shop-cat-card {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg);
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
}
.shop-cat-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.shop-cat-card__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--color-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--color-border);
}
.shop-cat-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-cat-card__body {
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--color-border);
}
.shop-cat-card__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-ink);
  margin-bottom: .2rem;
}
.shop-cat-card__count {
  font-size: .78rem;
  color: var(--color-muted);
}

/* ── Griglia prodotti ────────────────────────────────────────── */
.shop-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}
.shop-prod-card {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg);
  transition: box-shadow .2s, transform .2s;
  color: var(--color-ink);
}
.shop-prod-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.shop-prod-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.shop-prod-card__img {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--color-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--color-border);
  overflow: hidden;
  position: relative;
}
.shop-prod-card__type-badge {
  position: absolute;
  top: .5rem;
  right: .5rem;
  background: rgba(255,255,255,.92);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.shop-prod-card__add {
  display: block;
  width: 100%;
  border: none;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-warm);
  color: var(--color-ink);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .03em;
  padding: .6rem .5rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.shop-prod-card__add:hover { background: var(--color-ink); color: #fff; }
.shop-prod-card__add.is-added { background: var(--color-stone); color: #fff; }
.shop-prod-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-prod-card__body {
  padding: .85rem 1rem;
  border-top: 1px solid var(--color-border);
}
.shop-prod-card__title {
  font-size: .92rem;
  font-weight: 500;
  margin-bottom: .35rem;
  line-height: 1.3;
}
.shop-prod-card__price {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.shop-prod-card__price-now {
  font-size: .95rem;
  font-weight: 600;
  color: var(--color-ink);
}
.shop-prod-card__price-old {
  font-size: .8rem;
  color: var(--color-muted);
  text-decoration: line-through;
}
.shop-prod-card__badge {
  font-size: .68rem;
  font-weight: 600;
  background: #fdf4e8;
  color: #b07830;
  padding: .1rem .4rem;
  border-radius: 3px;
}
.shop-prod-card__status-off {
  font-size: .75rem;
  color: var(--color-muted);
  font-style: italic;
}

/* ── Pagina prodotto singolo ─────────────────────────────────── */
.shop-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}
.shop-product__gallery {
  position: sticky;
  top: 80px;
}
.shop-product__img {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--color-border);
}
.shop-product__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-product__info {}
.shop-product__cat-link {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-stone);
  margin-bottom: .5rem;
  display: block;
}
.shop-product__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.shop-product__price-wrap {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.shop-product__price-now {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-ink);
}
.shop-product__price-old {
  font-size: 1.1rem;
  color: var(--color-muted);
  text-decoration: line-through;
}
.shop-product__badge-sale {
  font-size: .75rem;
  font-weight: 600;
  background: #fdf4e8;
  color: #b07830;
  padding: .2rem .55rem;
  border-radius: 4px;
  align-self: center;
}
.shop-product__desc,
.shop-product__short-desc {
  color: var(--color-ink);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-size: .97rem;
}

/* ---------- TAB DESCRIZIONE COMPLETA ---------- */
.shop-product__tabs {
  margin-top: 3rem;
  border-top: 1px solid var(--color-border);
}
.shop-product__tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
}
.shop-product__tab-btn {
  padding: .85rem 1.75rem;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--color-muted);
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.shop-product__tab-btn.active {
  color: var(--color-ink);
  border-bottom-color: var(--color-ink);
}
.shop-product__tab-btn:hover { color: var(--color-ink); }
.shop-product__tab-panel {
  padding: 2rem 0;
}
.shop-product__full-desc {
  color: var(--color-ink);
  line-height: 1.85;
  font-size: .97rem;
  max-width: 720px;
}
.shop-product__full-desc h2,
.shop-product__full-desc h3 { font-family: var(--font-display); margin: 1.5rem 0 .75rem; }
.shop-product__full-desc p  { margin-bottom: 1rem; }
.shop-product__full-desc ul,
.shop-product__full-desc ol { margin: .75rem 0 1rem 1.5rem; }
.shop-product__full-desc li { margin-bottom: .35rem; }
.shop-product__meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
  margin-bottom: 1.75rem;
}
.shop-product__meta-table tr { border-bottom: 1px solid var(--color-border); }
.shop-product__meta-table tr:last-child { border-bottom: none; }
.shop-product__meta-table td { padding: .45rem 0; }
.shop-product__meta-table td:first-child { color: var(--color-muted); width: 35%; }
.shop-product__cta {
  display: inline-block;
  padding: .75rem 2rem;
  background: var(--color-ink);
  color: #fff;
  border-radius: 5px;
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: opacity .2s;
  text-decoration: none;
}
.shop-product__cta:hover { opacity: .8; }
.shop-product__unavailable {
  display: inline-block;
  padding: .65rem 1.5rem;
  background: var(--color-bg-card);
  color: var(--color-muted);
  border-radius: 5px;
  font-size: .85rem;
  border: 1px solid var(--color-border);
}

/* ── Add to cart row (product page) ───────────────────────────── */
.shop-product__add-row {
  display: flex;
  gap: .75rem;
  align-items: stretch;
  margin-top: .5rem;
}
.shop-product__qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  overflow: hidden;
}
.shop-product__qty-btn {
  width: 38px;
  height: 100%;
  border: none;
  background: var(--color-bg-warm);
  color: var(--color-ink);
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s;
}
.shop-product__qty-btn:hover { background: var(--color-bg-card); }
.shop-product__qty-input {
  width: 48px;
  height: 100%;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font-size: .9rem;
  font-family: inherit;
  color: var(--color-ink);
  -moz-appearance: textfield;
}
.shop-product__qty-input::-webkit-outer-spin-button,
.shop-product__qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.shop-product__add-row .shop-product__cta {
  flex: 1;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.shop-product__add-row .shop-product__cta.is-added { background: var(--color-stone); }
.shop-product__type-note {
  margin-top: .85rem;
  font-size: .82rem;
  color: var(--color-muted);
}

/* ── Empty state ─────────────────────────────────────────────── */
.shop-empty {
  text-align: center;
  padding: 4rem 0;
  color: var(--color-muted);
}
.shop-empty__icon { font-size: 2.5rem; margin-bottom: 1rem; }
.shop-empty__text { font-size: .95rem; }

/* ── Responsive shop ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .shop-product {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .shop-product__gallery { position: static; }
  .shop-cats-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .shop-products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ============================================================
   NAV DROPDOWN
   ============================================================ */
.nav-item { position: relative; }

.nav-item > a {
  display: flex;
  align-items: center;
  gap: .3rem;
  position: relative;
}
.nav-item > a::after {
  content: '▾';
  font-size: .65rem;
  opacity: .6;
  transition: transform .2s;
}
.nav-item.open > a::after { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 7px;
  box-shadow: 0 8px 28px rgba(0,0,0,.09);
  padding: .35rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .18s, transform .18s;
  z-index: 200;
  /* bridge invisibile sopra per non perdere hover */
  margin-top: 0;
  padding-top: .5rem;
}
/* pseudo-element che colma il gap tra link e dropdown */
.nav-item > a::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.nav-item.open .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: .45rem 1.1rem;
  font-size: .84rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-ink);
  border-radius: 0;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-dropdown a:hover { background: var(--color-bg-card); color: var(--color-stone); }
.nav-dropdown a.active { color: var(--color-stone); }

/* mobile dropdown */
@media (max-width: 768px) {
  .nav-dropdown {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--color-border);
    border-radius: 0;
    padding: .2rem 0 .2rem .75rem;
    margin: .15rem 0 .15rem 1rem;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    display: none;
  }
  .nav-item.open .nav-dropdown { display: block; }
  .nav-item > a::after { margin-left: auto; }
}


/* ============================================================
   CART / CHECKOUT / ORDER-PENDING  — minimal-luxury
   Palette: ink #0e0e0e, stone #8b7355, warm-bg #faf9f7,
            card #f5f3ef, border #e6e4e0
   Fonts: DM Serif Display (display) + DM Sans (body)
   ============================================================ */

/* ---------- Cart icon / badge in header ---------- */
.cart-link {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--color-ink);
  text-decoration: none;
  padding: .3rem .6rem;
  border-radius: 4px;
  transition: color .18s;
}
.cart-link:hover { color: var(--color-stone); }
.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--color-stone);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  border-radius: 99px;
  line-height: 1;
  transition: transform .2s;
}
.cart-badge.bump { transform: scale(1.4); }

/* ---------- Shared page shell ---------- */
.lux-page {
  max-width: 820px;
  margin: 3rem auto 5rem;
  padding: 0 1.5rem;
}
.lux-page__eyebrow {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-bottom: .6rem;
}
.lux-page__title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 400;
  color: var(--color-ink);
  margin-bottom: 2rem;
}

/* ---------- CART PAGE ---------- */
.cart-empty {
  text-align: center;
  padding: 5rem 0;
  color: var(--color-muted);
}
.cart-empty svg { opacity: .18; margin-bottom: 1.25rem; display: block; margin-left: auto; margin-right: auto; }
.cart-empty p { font-size: 1rem; margin-bottom: 1.75rem; }

.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 2.5rem; }
.cart-table th {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-muted);
  border-bottom: 2px solid var(--color-border);
  padding: .6rem 1rem;
  text-align: left;
  font-weight: 500;
}
/* colonne proporzionate */
.cart-table th:nth-child(1),
.cart-table td:nth-child(1) { width: 45%; }
.cart-table th:nth-child(2),
.cart-table td:nth-child(2) { width: 15%; }
.cart-table th:nth-child(3),
.cart-table td:nth-child(3) { width: 20%; }
.cart-table th:nth-child(4),
.cart-table td:nth-child(4) { width: 15%; font-weight: 600; }
.cart-table th:nth-child(5),
.cart-table td:nth-child(5) { width: 5%; text-align: right; }

.cart-table td {
  padding: 1.1rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
  font-size: .9rem;
}
.cart-row__img-wrap { display: flex; align-items: center; gap: .85rem; }
.cart-row__thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--color-bg-card);
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}
.cart-row__name { font-weight: 500; font-size: .92rem; color: var(--color-ink); line-height: 1.3; }
.cart-row__type {
  display: inline-block;
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-stone);
  background: rgba(139,115,85,.08);
  border-radius: 3px;
  padding: .1rem .35rem;
  margin-top: .3rem;
}
.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}
.cart-qty button {
  width: 30px; height: 30px;
  border: none;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
  color: var(--color-ink);
  transition: background .15s;
  flex-shrink: 0;
}
.cart-qty button:hover { background: var(--color-bg-card); }
.cart-qty span {
  min-width: 32px;
  text-align: center;
  font-size: .88rem;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  line-height: 30px;
}
.cart-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-border);
  font-size: 1.2rem;
  line-height: 1;
  padding: .2rem;
  transition: color .15s;
  display: block;
  margin-left: auto;
}
.cart-remove:hover { color: #c0392b; }

.cart-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .4rem;
  padding: 1.25rem 1rem;
  background: var(--color-bg-card);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  margin-bottom: 2rem;
}
.cart-summary__row {
  display: flex;
  gap: 3rem;
  font-size: .85rem;
  color: var(--color-muted);
  width: 100%;
  justify-content: flex-end;
}
.cart-summary__total {
  font-family: 'DM Serif Display', serif;
  font-size: 1.6rem;
  color: var(--color-ink);
  display: flex;
  gap: 2rem;
  align-items: baseline;
  width: 100%;
  justify-content: flex-end;
  border-top: 1px solid var(--color-border);
  padding-top: .75rem;
  margin-top: .25rem;
}
/* ---------- CHECKOUT PAGE — tab sistema ---------- */
.checkout-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2.5rem;
}
.checkout-tab {
  position: relative;
  padding: .75rem 1.5rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--color-muted);
  cursor: pointer;
  background: none;
  border: none;
  transition: color .2s;
}
.checkout-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: var(--color-stone);
  transform: scaleX(0);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.checkout-tab.active { color: var(--color-ink); }
.checkout-tab.active::after { transform: scaleX(1); }
.checkout-tab:disabled { opacity: .35; cursor: not-allowed; }

.checkout-panel { display: none; }
.checkout-panel.active { display: block; }

/* Form fields */
.lux-field { margin-bottom: 1.4rem; }
.lux-field label {
  display: block;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: .4rem;
}
.lux-field input,
.lux-field select,
.lux-field textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  color: var(--color-ink);
  transition: border-color .18s, box-shadow .18s;
  box-sizing: border-box;
}
.lux-field input:focus,
.lux-field select:focus,
.lux-field textarea:focus {
  outline: none;
  border-color: var(--color-stone);
  box-shadow: 0 0 0 3px rgba(139,115,85,.12);
}
.lux-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Shipping section */
.shipping-section {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.shipping-section__title {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-bottom: 1.2rem;
}

/* Payment methods */
.payment-methods { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 2rem; }
.pay-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .18s, background .18s;
  background: #fff;
}
.pay-option:hover { border-color: var(--color-stone); background: var(--color-bg-card); }
.pay-option input[type=radio] { accent-color: var(--color-stone); width: 16px; height: 16px; }
.pay-option__label { font-weight: 500; font-size: .95rem; }
.pay-option__desc { font-size: .8rem; color: var(--color-muted); margin-top: .15rem; }
.pay-option.selected { border-color: var(--color-stone); background: var(--color-bg-card); }

/* Order summary sidebar inside checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 3rem; align-items: start; }
.checkout-aside {
  position: sticky;
  top: 90px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem;
}
.checkout-aside__title {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 1.2rem;
}
.aside-item { display: flex; justify-content: space-between; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--color-border); font-size: .88rem; }
.aside-item:last-of-type { border-bottom: none; }
.aside-item__name { color: var(--color-ink); }
.aside-item__qty { color: var(--color-muted); font-size: .78rem; }
.aside-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
}

/* CTA button luxury */
.lux-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 2rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
  text-decoration: none;
  border: 1.5px solid transparent;
}
/* Variante piena (default) */
.lux-btn:not(.lux-btn--outline) {
  background: var(--color-ink);
  color: #fff;
  border-color: var(--color-ink);
}
.lux-btn:not(.lux-btn--outline):hover { background: var(--color-stone); border-color: var(--color-stone); transform: translateY(-1px); }
.lux-btn:active { transform: translateY(0); }
/* Variante outline */
.lux-btn.lux-btn--outline {
  background: #ffffff;
  color: #0e0e0e;
  border-color: #0e0e0e;
}
.lux-btn.lux-btn--outline:hover { background: #f5f3ef; transform: translateY(-1px); }
.lux-btn--full { width: 100%; }
.lux-btn-row { display: flex; gap: 1rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 2rem; }

/* Bottoni carrello */
.cart-btn-primary,
.cart-btn-secondary {
  display: inline-block;
  padding: .85rem 2rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}
.cart-btn-primary {
  background: #0e0e0e;
  color: #ffffff;
  border: 2px solid #0e0e0e;
}
.cart-btn-primary:hover { background: #8b7355; border-color: #8b7355; }
.cart-btn-secondary {
  background: #ffffff;
  color: #0e0e0e;
  border: 2px solid #0e0e0e;
}
.cart-btn-secondary:hover { background: #f5f3ef; }

/* ---------- ORDER PENDING PAGE ---------- */
.order-pending {
  text-align: center;
  max-width: 560px;
  margin: 5rem auto;
  padding: 0 1.5rem;
}
.order-pending__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}
.order-pending__title {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--color-ink);
  margin-bottom: .75rem;
}
.order-pending__id {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-bottom: 1.5rem;
}
.order-pending__msg { font-size: 1rem; color: var(--color-muted); line-height: 1.7; margin-bottom: 2.5rem; }
.order-pending__steps {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  text-align: left;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}
.order-step { display: flex; gap: 1rem; align-items: flex-start; font-size: .9rem; }
.order-step__num {
  min-width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--color-stone);
  color: var(--color-stone);
  font-size: .72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-aside { position: static; }
}
@media (max-width: 600px) {
  .lux-field-row { grid-template-columns: 1fr; }
  .lux-btn-row { flex-direction: column; }
  .cart-table th:nth-child(3),
  .cart-table td:nth-child(3) { display: none; }
}


/* ============================================================
   SHOP — LIST VIEW (immagine sx, testo dx)
   ============================================================ */
.shop-products-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.shop-prod-row {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg);
  transition: box-shadow .2s, transform .2s;
  color: var(--color-ink);
}
.shop-prod-row:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  transform: translateY(-1px);
}
.shop-prod-row__link {
  display: flex;
  flex: 1;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.shop-prod-row__img {
  width: 140px;
  min-width: 140px;
  aspect-ratio: 1/1;
  background: var(--color-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--color-border);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.shop-prod-row__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-prod-row__type-badge {
  position: absolute;
  top: .4rem;
  right: .4rem;
  background: rgba(255,255,255,.92);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.shop-prod-row__body {
  flex: 1;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .35rem;
  min-width: 0;
  border-left: 1px solid var(--color-border);
}
.shop-prod-row__title {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-ink);
}
.shop-prod-row__price {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.shop-prod-row__price-now  { font-size: 1rem; font-weight: 600; color: var(--color-ink); }
.shop-prod-row__price-old  { font-size: .82rem; color: var(--color-muted); text-decoration: line-through; }
.shop-prod-row__badge      { font-size: .65rem; font-weight: 600; background: #fdf4e8; color: #b07830; padding: .1rem .4rem; border-radius: 3px; }
.shop-prod-row__status-off { font-size: .78rem; color: var(--color-muted); font-style: italic; }
.shop-prod-row__add {
  align-self: center;
  flex-shrink: 0;
  margin: .75rem 1rem .75rem 0;
  padding: .5rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background: var(--color-bg-warm);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .03em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.shop-prod-row__add:hover    { background: var(--color-ink); color: #fff; border-color: var(--color-ink); }
.shop-prod-row__add.is-added { background: var(--color-stone); color: #fff; border-color: var(--color-stone); }


/* descrizione breve nella list view */
.shop-prod-row__desc {
  font-size: .85rem;
  color: var(--color-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* colonna bottoni dx */
.shop-prod-row__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1rem;
  flex-shrink: 0;
  min-width: 140px;
  border-left: 1px solid var(--color-border);
}

/* link "Dettagli ›" */
.shop-prod-row__more {
  display: block;
  text-align: center;
  padding: .45rem .75rem;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .03em;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background: var(--color-bg);
  transition: color .2s, border-color .2s;
}
.shop-prod-row__more:hover { color: var(--color-stone); border-color: var(--color-stone); }

@media (max-width: 540px) {
  .shop-prod-row {
    flex-wrap: wrap;
  }
  .shop-prod-row__img {
    width: 90px;
    min-width: 90px;
  }
  .shop-prod-row__body {
    flex: 1;
    min-width: 0;
  }
  .shop-prod-row__actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--color-border);
    padding: .6rem 1rem;
    gap: .5rem;
    min-width: unset;
  }
  .shop-prod-row__add,
  .shop-prod-row__more {
    width: 100%;
    text-align: center;
    white-space: nowrap;
  }
}

/* ── Shop row: tutta la riga cliccabile via JS ── */
.shop-prod-row[data-href] { cursor: pointer; }
.shop-prod-row[data-href]:hover { background: #faf9f7; }

/* ── Torna su ── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  background: #0e0e0e;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 999;
  line-height: 1;
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
#back-to-top:hover {
  background: #8b7355;
  transform: translateY(-2px);
}


/* ===== ARTICLE BODY — isolamento HTML custom ===== */
.article-body {
  display: block;
}
.article-body input,
.article-body select,
.article-body textarea,
.article-body button {
  all: revert;
  box-sizing: border-box;
}
.article-body style {
  display: none !important;
}
