/* =========================================================
   T'OH! Milano — Stylesheet
   Modern minimal e-commerce theme
   ========================================================= */

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --text: #171717;
  --text-muted: #757066;
  --border: #e7e3da;
  --accent: #9c7c4f;
  --accent-dark: #7c6340;
  --danger: #b5482f;
  --radius: 2px;
  --maxw: 1240px;
  --header-h: 78px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button {
  font-family: inherit; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: none; border: none; color: inherit;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* -------------------- Topbar -------------------- */
.topbar {
  background: var(--text);
  color: #fff;
  font-size: 12px;
  letter-spacing: .06em;
  text-align: center;
  padding: 8px 12px;
  text-transform: uppercase;
}

/* -------------------- Header -------------------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s var(--ease);
}
header.site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.05); }

.nav-wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo svg { height: 34px; width: auto; }

.main-nav { display: flex; gap: 36px; }
.main-nav a {
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
  color: var(--text);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--text);
  transition: width .3s var(--ease);
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

.nav-icons { display: flex; align-items: center; gap: 22px; }
.icon-btn {
  background: none; border: none; position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; color: var(--text);
}
.icon-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute; top: -6px; right: -8px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 600;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transform: scale(0); transition: transform .25s var(--ease);
}
.cart-count.show { transform: scale(1); }
.icon-btn.logged-in::after {
  content: ""; position: absolute; top: 1px; right: 1px; width: 8px; height: 8px;
  border-radius: 50%; background: #4f7a3c; border: 1.5px solid var(--bg);
}

.menu-toggle { display: none; background: none; border: none; }

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: 1px solid var(--text);
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  transition: all .3s var(--ease);
}
.btn:hover { background: transparent; color: var(--text); }
.btn.btn-outline { background: transparent; color: var(--text); }
.btn.btn-outline:hover { background: var(--text); color: #fff; }
.btn.btn-full { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.btn-sm { padding: 9px 18px; font-size: 11px; }

/* -------------------- Hero -------------------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(160deg, #f1ece0 0%, #faf9f6 60%);
}
.hero-content { position: relative; z-index: 2; max-width: 620px; padding: 0 24px; }
.hero-eyebrow {
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--accent-dark); margin-bottom: 18px;
  opacity: 0; animation: fadeUp .9s var(--ease) .1s forwards;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 0 0 20px;
  opacity: 0; animation: fadeUp .9s var(--ease) .25s forwards;
}
.hero p {
  font-size: 18px; color: var(--text-muted); margin: 0 0 34px;
  opacity: 0; animation: fadeUp .9s var(--ease) .4s forwards;
}
.hero .btn { opacity: 0; animation: fadeUp .9s var(--ease) .55s forwards; }

.hero-shapes span {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(156,124,79,.25), transparent 70%);
  filter: blur(2px);
  animation: float 12s ease-in-out infinite;
}
.hero-shapes span:nth-child(1) { width: 380px; height: 380px; top: -80px; left: -100px; }
.hero-shapes span:nth-child(2) { width: 260px; height: 260px; bottom: -60px; right: -60px; animation-delay: -4s; }
.hero-shapes span:nth-child(3) { width: 140px; height: 140px; top: 40%; right: 10%; animation-delay: -8s; }

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-24px) translateX(14px); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------------------- Reveal on scroll -------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-stagger.visible > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: .15s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: .25s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: .35s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: .45s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: .55s; }

/* -------------------- Section titles -------------------- */
.section { padding: 100px 0; }
.section-tight { padding: 60px 0; }
.section-head { text-align: center; max-width: 560px; margin: 0 auto 56px; }
.eyebrow {
  font-size: 12px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--accent-dark); margin-bottom: 12px; display: block;
}
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 14px; font-weight: 600; }
.section-head p { color: var(--text-muted); margin: 0; }

/* -------------------- Categories -------------------- */
.categories-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.category-card {
  display: block;
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--radius);
}
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.category-card:hover img { transform: scale(1.08); }
.category-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.55) 100%);
}
.category-card-label {
  position: absolute; left: 24px; bottom: 22px; z-index: 2; color: #fff;
}
.category-card-label span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.category-card-label h3 { margin: 6px 0 0; font-size: 22px; font-weight: 600; }

/* -------------------- Product grid -------------------- */
.product-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 34px; flex-wrap: wrap; gap: 16px;
}
.filter-group { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-btn {
  -webkit-appearance: none; appearance: none;
  padding: 9px 18px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none;
  border-radius: 30px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase;
  transition: all .25s var(--ease);
}
.filter-btn:hover { border-color: var(--text); }
.filter-btn.active { background: var(--text); color: #fff; border-color: var(--text); }

.products-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px;
}
@media (max-width: 1180px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
.product-card { position: relative; }
.product-media {
  display: block;
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #eee7d9;
  border-radius: var(--radius); margin-bottom: 16px;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; transition: transform .6s var(--ease); }
.product-card:hover .product-media img { transform: scale(1.06); }

/* Swap immagine al passaggio del mouse (stile grandi ecommerce: packshot -> indossato) */
.product-media { position: relative; }
.product-media .media-hover {
  position: absolute; inset: 0; opacity: 0; transition: opacity .4s var(--ease);
}
.product-card:hover .media-hover { opacity: 1; }

/* Barra di selezione rapida della taglia, sovrapposta al fondo dell'immagine */
.size-picker {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  background: linear-gradient(0deg, rgba(255,255,255,.97) 55%, rgba(255,255,255,0) 100%);
  padding: 26px 10px 10px;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.product-card:hover .size-picker { opacity: 1; transform: translateY(0); pointer-events: auto; }
.size-picker-label {
  display: block; text-align: center; font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}
.size-chip-row { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.size-chip {
  min-width: 34px; padding: 7px 9px; border: 1px solid var(--text); background: #fff; color: var(--text);
  font-size: 12px; font-weight: 600; border-radius: var(--radius); transition: background .2s, color .2s, transform .15s;
}
.size-chip:hover { background: var(--text); color: #fff; }
.size-chip.added { background: #4f7a3c; border-color: #4f7a3c; color: #fff; transform: scale(1.08); }
.size-chip.out-of-stock, .size-chip:disabled {
  color: var(--text-muted); border-color: var(--border); background: #f2efe8;
  text-decoration: line-through; cursor: not-allowed; opacity: .65;
}
.size-chip.out-of-stock:hover, .size-chip:disabled:hover { background: #f2efe8; color: var(--text-muted); }
.product-tag.out-of-stock-tag { background: var(--danger); top: auto; bottom: 12px; left: 12px; }
.quick-add button:disabled { background: #eee; color: var(--text-muted); cursor: not-allowed; }
.quick-add button:disabled:hover { background: #eee; color: var(--text-muted); }

.size-badge {
  display: inline-block; font-size: 11px; letter-spacing: .04em; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; margin-top: 4px;
}

@media (max-width: 900px) {
  .size-picker { opacity: 1; transform: none; pointer-events: auto; }
  .quick-add { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
  .size-picker { padding: 16px 6px 8px; }
  .size-picker-label { font-size: 9px; margin-bottom: 6px; white-space: nowrap; }
  .size-chip-row { gap: 4px; }
  .size-chip { min-width: 26px; padding: 5px 5px; font-size: 10px; }
}
.product-tag {
  position: absolute; top: 12px; left: 12px; background: var(--text); color: #fff;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px;
  border-radius: 20px;
}
.quick-add {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  transform: translateY(14px); opacity: 0;
  transition: all .3s var(--ease);
}
.product-card:hover .quick-add { transform: translateY(0); opacity: 1; }
.quick-add button {
  width: 100%; border: none; background: #fff; color: var(--text);
  padding: 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  border-radius: var(--radius); transition: background .25s;
}
.quick-add button:hover { background: var(--text); color: #fff; }

.product-info span.cat { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.product-info h3 { font-size: 16px; margin: 4px 0 6px; font-weight: 500; }
.product-price { font-size: 15px; font-weight: 600; color: var(--accent-dark); }

/* -------------------- About / split -------------------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.split img { border-radius: var(--radius); width: 100%; }
.split .eyebrow { margin-bottom: 14px; }
.split h2 { font-size: clamp(26px, 3.6vw, 38px); margin: 0 0 18px; font-weight: 600; }
.split p { color: var(--text-muted); margin: 0 0 16px; }

/* -------------------- Newsletter -------------------- */
.newsletter {
  background: var(--text); color: #fff; text-align: center; padding: 80px 24px; border-radius: var(--radius);
}
.newsletter h2 { font-size: 30px; margin: 0 0 10px; font-weight: 600; }
.newsletter p { color: #cfc9bc; margin: 0 0 28px; }
.newsletter-form { display: flex; max-width: 420px; margin: 0 auto; gap: 10px; }
.newsletter-form input {
  flex: 1; padding: 14px 16px; border: 1px solid #444; background: transparent; color: #fff;
  border-radius: var(--radius); font-size: 14px;
}
.newsletter-form input::placeholder { color: #a99; }
.newsletter-form button {
  background: var(--accent); border: none; color: #fff; padding: 0 22px;
  border-radius: var(--radius); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  transition: background .25s;
}
.newsletter-form button:hover { background: var(--accent-dark); }

/* -------------------- Footer -------------------- */
footer.site-footer { background: #16140f; color: #cfc9bc; padding: 70px 0 26px; margin-top: 40px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 50px;
}
.footer-grid h4 { color: #fff; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 18px; }
.footer-grid p, .footer-grid a { color: #a9a290; font-size: 14px; line-height: 2; }
.footer-grid a:hover { color: #fff; }
.footer-logo svg { height: 30px; margin-bottom: 16px; }
.footer-logo p { max-width: 260px; }
.footer-bottom {
  border-top: 1px solid #2c2a23; padding-top: 22px;
  display: flex; justify-content: space-between; font-size: 12px; color: #7d7768; flex-wrap: wrap; gap: 10px;
}

/* -------------------- Cart drawer -------------------- */
.overlay {
  position: fixed; inset: 0; background: rgba(15,14,11,.4);
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease);
  z-index: 200;
}
.overlay.show { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw;
  background: var(--surface); z-index: 201; transform: translateX(100%);
  transition: transform .4s var(--ease);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; border-bottom: 1px solid var(--border);
}
.cart-drawer-head h3 { margin: 0; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.cart-drawer-items { flex: 1; overflow-y: auto; padding: 18px 24px; }
.cart-drawer-empty { color: var(--text-muted); text-align: center; padding: 60px 10px; font-size: 14px; }

.cart-line { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cart-line img { width: 74px; height: 92px; object-fit: cover; object-position: center 18%; border-radius: var(--radius); }
.cart-line-info { flex: 1; }
.cart-line-info h4 { font-size: 14px; margin: 0 0 4px; font-weight: 500; }
.cart-line-info .cat { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.cart-line-qty {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
}
.qty-btn {
  width: 24px; height: 24px; border: 1px solid var(--border); background: none;
  display: flex; align-items: center; justify-content: center; font-size: 14px; border-radius: 50%;
}
.qty-btn:hover { border-color: var(--text); }
.cart-line-price { font-weight: 600; font-size: 14px; white-space: nowrap; }
.cart-line-remove { background: none; border: none; color: var(--text-muted); font-size: 12px; text-decoration: underline; margin-top: 8px; }
.cart-line-remove:hover { color: var(--danger); }

.cart-drawer-foot { padding: 20px 24px 28px; border-top: 1px solid var(--border); }
.cart-subtotal { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 16px; font-weight: 600; }

/* -------------------- Cart page -------------------- */
.cart-page-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 50px; align-items: start; }
.cart-table-head, .cart-row {
  display: grid; grid-template-columns: 3fr 1fr 1fr 1fr auto; gap: 16px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--border);
}
.cart-table-head { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.cart-row .product-cell { display: flex; gap: 16px; align-items: center; }
.cart-row .product-cell img { width: 84px; height: 100px; object-fit: cover; object-position: center 18%; border-radius: var(--radius); }
.cart-row h4 { font-size: 15px; margin: 0 0 4px; font-weight: 500; }
.cart-row .cat { font-size: 12px; color: var(--text-muted); }
.remove-x { background: none; border: none; color: var(--text-muted); font-size: 18px; }
.remove-x:hover { color: var(--danger); }

.summary-box { background: var(--surface); border: 1px solid var(--border); padding: 28px; border-radius: var(--radius); }
.summary-box h3 { margin: 0 0 20px; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; color: var(--text-muted); }
.summary-row.total { color: var(--text); font-size: 18px; font-weight: 700; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.promo-row { display: flex; gap: 8px; margin: 18px 0; }
.promo-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }

.empty-state { text-align: center; padding: 90px 20px; }
.empty-state h2 { margin: 0 0 12px; }
.empty-state p { color: var(--text-muted); margin: 0 0 26px; }

/* -------------------- Checkout -------------------- */
.checkout-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; align-items: start; }
.checkout-steps { display: flex; gap: 8px; align-items: center; margin-bottom: 40px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.checkout-steps .step.active { color: var(--text); font-weight: 700; }
.checkout-steps .sep { opacity: .4; }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-bottom: 26px; }
.form-card h3 { margin: 0 0 20px; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 10px; }
.form-card h3 .num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--text); color: #fff;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.single { grid-template-columns: 1fr; }
.form-row.three { grid-template-columns: 2fr 1fr 1fr; }
.field label { display: block; font-size: 12px; margin-bottom: 6px; color: var(--text-muted); letter-spacing: .03em; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; background: var(--surface); color: var(--text); transition: border-color .2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field input.invalid { border-color: var(--danger); }
.field .error-msg { color: var(--danger); font-size: 11px; margin-top: 4px; display: none; }
.field.has-error .error-msg { display: block; }
.field.has-error input { border-color: var(--danger); }

.pay-methods { display: flex; gap: 10px; margin-bottom: 20px; }
.pay-method {
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; text-align: center;
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; transition: all .2s;
}
.pay-method.active { border-color: var(--text); background: #f2efe8; font-weight: 700; }

.card-visual {
  height: 170px; border-radius: 14px; background: linear-gradient(135deg, #2a2620, #4a4030);
  color: #fff; padding: 22px; margin-bottom: 22px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  font-family: "Courier New", monospace;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  transition: transform .3s var(--ease);
}
.card-visual::after {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%);
  top: -80px; right: -60px;
}
.card-visual .chip { width: 38px; height: 28px; border-radius: 5px; background: linear-gradient(135deg,#d8c489,#a98a3f); }
.card-visual .num { font-size: 19px; letter-spacing: .12em; }
.card-visual .bottom-row { display: flex; justify-content: space-between; align-items: flex-end; font-size: 11px; letter-spacing: .05em; }
.card-visual .bottom-row span.label { display:block; opacity:.6; font-size: 9px; text-transform: uppercase; margin-bottom: 4px; font-family: -apple-system, sans-serif; }

.demo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-muted); background: #f2efe8;
  padding: 6px 12px; border-radius: 20px; margin-bottom: 20px;
}
.demo-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.order-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.order-item img { width: 52px; height: 64px; object-fit: cover; object-position: center 18%; border-radius: var(--radius); }
.order-item .qty-badge { color: var(--text-muted); }
.order-item .price { margin-left: auto; font-weight: 600; }

/* Processing / success */
.pay-overlay {
  position: fixed; inset: 0; background: rgba(250,249,246,.97); z-index: 500;
  display: none; align-items: center; justify-content: center; flex-direction: column; text-align: center;
}
.pay-overlay.show { display: flex; }
.spinner {
  width: 54px; height: 54px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin 1s linear infinite; margin-bottom: 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pay-overlay h3 { margin: 0 0 8px; font-size: 20px; }
.pay-overlay p { color: var(--text-muted); margin: 0; }

.success-check {
  width: 76px; height: 76px; border-radius: 50%; background: #eef3ea; color: #4f7a3c;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 24px;
  animation: pop .5s var(--ease);
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* -------------------- Auth pages -------------------- */
.auth-wrap {
  max-width: 440px; margin: 0 auto; padding: 70px 24px 100px;
}
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.auth-tab {
  flex: 1; text-align: center; padding: 14px; background: none; border: none;
  font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .2s;
}
.auth-tab.active { color: var(--text); border-bottom-color: var(--text); font-weight: 700; }
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.form-msg {
  padding: 12px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 18px; display: none;
}
.form-msg.show { display: block; }
.form-msg.error { background: #fbe9e5; color: var(--danger); }
.form-msg.success { background: #eef3ea; color: #4f7a3c; }
.field-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* -------------------- Account dashboard -------------------- */
.account-shell { display: grid; grid-template-columns: 240px 1fr; gap: 46px; align-items: start; }
.account-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.account-nav a {
  display: block; padding: 15px 20px; font-size: 14px; border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.account-nav a:last-child { border-bottom: none; }
.account-nav a:hover { background: #f2efe8; }
.account-nav a.active { background: var(--text); color: #fff; }
.account-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-bottom: 24px; }
.account-card h2 { font-size: 20px; margin: 0 0 6px; }
.account-card .sub { color: var(--text-muted); font-size: 13px; margin: 0 0 24px; }
.account-greet { margin-bottom: 30px; }
.account-greet h1 { font-size: 26px; margin: 0 0 6px; }
.account-greet p { color: var(--text-muted); margin: 0; }

.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.badge.status-inlavorazione { background: #f2efe8; color: #7c6340; }
.badge.status-spedito { background: #e4ecf5; color: #2f5faa; }
.badge.status-consegnato { background: #eef3ea; color: #4f7a3c; }
.badge.status-annullato { background: #fbe9e5; color: var(--danger); }

.order-list-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 14px; align-items: center;
  padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px;
  transition: border-color .2s;
}
.order-list-row:hover { border-color: var(--text); }
.order-list-row .num { font-weight: 700; }
.order-list-row .muted { color: var(--text-muted); font-size: 13px; }

.order-detail-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 30px; }
.order-track { display: flex; margin: 30px 0 40px; }
.track-step { flex: 1; text-align: center; position: relative; }
.track-step .dot {
  width: 30px; height: 30px; border-radius: 50%; background: var(--border); color: #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; font-size: 13px; font-weight: 700;
  transition: background .3s;
}
.track-step.done .dot { background: var(--accent); }
.track-step span.label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.track-step.done span.label { color: var(--text); font-weight: 700; }
.track-line { position: absolute; top: 15px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: -1; }
.track-step.done .track-line { background: var(--accent); }
.track-step:first-child .track-line { display: none; }

.empty-mini { text-align: center; padding: 50px 20px; color: var(--text-muted); }

/* -------------------- Admin -------------------- */
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-sidebar { background: #16140f; color: #cfc9bc; padding: 26px 0; }
.admin-sidebar .brand { padding: 0 24px 26px; border-bottom: 1px solid #2c2a23; margin-bottom: 20px; }
.admin-sidebar .brand span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #8d8672; }
.admin-sidebar a {
  display: flex; align-items: center; gap: 10px; padding: 13px 24px; font-size: 14px; color: #cfc9bc;
  border-left: 3px solid transparent;
}
.admin-sidebar a:hover { background: #201d16; }
.admin-sidebar a.active { background: #201d16; border-left-color: var(--accent); color: #fff; }
.admin-main { padding: 40px 44px; background: var(--bg); }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 34px; }
.admin-topbar h1 { font-size: 24px; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.stat-card .label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 10px; }
.stat-card .value { font-size: 28px; font-weight: 700; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted);
  padding: 14px 18px; border-bottom: 1px solid var(--border); background: #f7f4ee;
}
.admin-table td { padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.clickable { cursor: pointer; transition: background .15s; }
.admin-table tr.clickable:hover { background: #f7f4ee; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.admin-search { padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; min-width: 240px; }
.status-select { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }
.pill-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.pill-toggle button { border: none; background: var(--surface); padding: 7px 16px; font-size: 12px; }
.pill-toggle button.active { background: var(--text); color: #fff; }
.pill-toggle a {
  border: none; background: var(--surface); padding: 7px 16px; font-size: 12px; text-decoration: none;
  color: var(--text); display: inline-flex; align-items: center; gap: 6px;
}
.pill-toggle a.active { background: var(--text); color: #fff; }
.pill-toggle a .count-badge {
  background: rgba(255,255,255,.25); border-radius: 10px; padding: 1px 7px; font-size: 10px; font-weight: 700;
}
.pill-toggle a:not(.active) .count-badge { background: #eee; color: var(--text-muted); }
.link-btn { background: none; border: none; color: var(--accent-dark); font-size: 13px; text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.back-link:hover { color: var(--text); }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 30px; }
.kv-grid .kv-item .k { font-size: 11px; text-transform: uppercase; color: var(--text-muted); letter-spacing: .05em; margin-bottom: 4px; }
.kv-grid .kv-item .v { font-size: 15px; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; overflow-x: auto; padding: 12px; }
  .admin-sidebar .brand { display: none; }
  .admin-sidebar a { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .admin-sidebar a.active { border-left: none; border-bottom-color: var(--accent); }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .account-shell { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
}

/* -------------------- Responsive -------------------- */
@media (max-width: 900px) {
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--bg); flex-direction: column; align-items: center; justify-content: flex-start;
    padding: 40px 24px; gap: 26px; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: all .3s var(--ease); z-index: 150;
  }
  .main-nav a { font-size: 16px; }
  body.nav-open .main-nav { display: flex; transform: translateY(0); opacity: 1; pointer-events: auto; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; }
  .categories-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cart-page-grid, .checkout-grid { grid-template-columns: 1fr; }
  .cart-table-head { display: none; }
  .cart-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row, .form-row.three { grid-template-columns: 1fr; }
  .container { padding: 0 18px; }
  .nav-wrap { gap: 10px; }
  .logo svg { height: 26px; }
  .nav-icons { gap: 10px; }
}

/* -------------------- Mobile polish -------------------- */
@media (max-width: 900px) {
  /* Tables that would otherwise overflow become horizontally scrollable */
  .admin-table-wrap, .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-table { min-width: 640px; }

  .order-list-row {
    grid-template-columns: 1fr 1fr;
    row-gap: 8px;
  }
  .order-list-row .num { grid-column: 1 / -1; }

  .order-detail-head { flex-direction: column; align-items: stretch; }
  .order-track { flex-wrap: wrap; row-gap: 18px; }

  .hero { min-height: 70vh; padding: 40px 0; }
  .hero-content { padding: 0 18px; }

  /* Ensure comfortable tap targets on touch devices */
  .btn, .icon-btn, .filter-btn, .menu-toggle { min-height: 44px; }
  .icon-btn { min-width: 44px; }
  .qty-btn { width: 34px; height: 34px; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: clamp(30px, 9vw, 44px); }
  .section { padding: 60px 0; }
  .newsletter-form { flex-direction: column; }
  .newsletter { padding: 50px 20px; }
  .cart-drawer { width: 100%; max-width: 100vw; }
  .admin-main { padding: 24px 16px; }
  .stat-grid { grid-template-columns: 1fr; }
  .pay-methods { flex-direction: column; }
}

/* -------------------- Chat di supporto -------------------- */
.support-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 30px; border: 1px solid var(--border);
  background: var(--surface); font-size: 13px; letter-spacing: .02em; cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.support-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.support-btn svg { width: 17px; height: 17px; }
.support-btn .support-unread {
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 50%; display: none;
  align-items: center; justify-content: center; padding: 0 4px;
}
.support-btn .support-unread.show { display: inline-flex; }

.chat-panel {
  position: fixed; bottom: 0; right: 24px; width: 380px; max-width: 92vw; height: 540px; max-height: 78vh;
  background: var(--surface); z-index: 260; border-radius: 12px 12px 0 0;
  box-shadow: 0 10px 40px rgba(20,18,12,.22); border: 1px solid var(--border); border-bottom: none;
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(100%) scale(.96); opacity: 0; pointer-events: none;
  transition: transform .38s var(--ease), opacity .3s var(--ease);
  transform-origin: bottom right;
}
.chat-panel.open {
  transform: translateY(0) scale(1); opacity: 1; pointer-events: auto;
  animation: chatPop .38s var(--ease);
}
@keyframes chatPop {
  0% { transform: translateY(30%) scale(.92); opacity: 0; }
  60% { transform: translateY(-6px) scale(1.01); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.chat-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border); background: #16140f; color: #fff;
}
.chat-panel-head h3 { margin: 0; font-size: 14px; letter-spacing: .04em; }
.chat-panel-head p { margin: 2px 0 0; font-size: 11px; color: #a8a294; }
.chat-panel-head button { background: none; border: none; color: #cfc9bc; cursor: pointer; }
.chat-panel-body {
  flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px;
  background: #f7f4ee;
}
.chat-panel-empty { color: var(--text-muted); text-align: center; padding: 40px 10px; font-size: 13px; }
.chat-msg {
  max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.4;
  word-wrap: break-word; animation: chatMsgIn .25s var(--ease);
}
@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-msg.from-customer { align-self: flex-end; background: var(--text); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.from-admin { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-msg .chat-msg-time { display: block; font-size: 10px; opacity: .6; margin-top: 4px; }
.chat-msg .chat-msg-sender { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .65; margin-bottom: 3px; }
.chat-panel-foot { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-panel-foot input {
  flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 13px;
}
.chat-panel-foot button {
  width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--text); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  transition: background .2s;
}
.chat-panel-foot button:hover { background: var(--accent); }
.chat-panel-foot button:disabled { background: #ccc; cursor: not-allowed; }

.chat-panel-head-actions { display: flex; align-items: center; gap: 12px; }
.chat-close-link {
  background: none; border: none; color: #cfc9bc; font-size: 11px; text-decoration: underline;
  cursor: pointer; letter-spacing: .02em; padding: 0;
}
.chat-close-link:hover { color: #fff; }
.chat-close-link:disabled { opacity: .5; cursor: default; text-decoration: none; }

.chat-msg-system {
  align-self: center; text-align: center; max-width: 92%; font-size: 11.5px; color: var(--text-muted);
  background: #eee7d8; padding: 7px 14px; border-radius: 12px; margin: 2px auto;
  animation: chatMsgIn .25s var(--ease);
}
.chat-msg-system .chat-msg-time { display: inline; margin-left: 6px; opacity: .6; }

.chat-rate-form { padding: 14px 18px; width: 100%; }
.chat-rate-form p { margin: 0 0 10px; font-size: 13px; color: var(--text-muted); }
.chat-rate-stars { display: flex; gap: 6px; margin-bottom: 10px; }
.chat-rate-star {
  background: none !important; border: none !important; font-size: 24px !important; color: #ddd6c4 !important;
  cursor: pointer; line-height: 1; padding: 0 !important; width: auto !important; height: auto !important;
  border-radius: 0 !important;
}
.chat-rate-star.active { color: var(--accent) !important; }
.chat-rate-form textarea {
  width: 100%; min-height: 50px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 12.5px; resize: vertical; font-family: inherit; box-sizing: border-box;
}
.chat-rate-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.chat-rate-actions button {
  padding: 8px 16px !important; border-radius: 20px !important; font-size: 12px !important; cursor: pointer;
  width: auto !important; height: auto !important;
}
.chat-rate-cancel { background: none !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
.chat-rate-submit { background: var(--text) !important; color: #fff !important; border: none !important; }
.chat-rate-submit:hover { background: var(--accent) !important; }
.chat-rate-submit:disabled { background: #ccc !important; cursor: not-allowed; }

.t-closed-badge {
  font-size: 9px; text-transform: uppercase; letter-spacing: .04em; background: #eee; color: var(--text-muted);
  padding: 2px 7px; border-radius: 8px; margin-left: 6px; vertical-align: middle;
}

/* Pagina admin supporto */
.support-layout { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
.thread-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); max-height: 74vh; overflow-y: auto; }
.thread-section-head {
  position: sticky; top: 0; z-index: 1; padding: 10px 16px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; font-weight: 700; color: var(--text-muted); background: #f2efe8;
  border-bottom: 1px solid var(--border); border-top: 1px solid var(--border);
}
.thread-section-head:first-child { border-top: none; }
.thread-section-empty { padding: 16px; font-size: 12.5px; color: var(--text-muted); }
.thread-item { display: block; width: 100%; text-align: left; padding: 14px 16px; border: none; border-bottom: 1px solid var(--border); background: none; cursor: pointer; }
.thread-item:hover { background: #f7f4ee; }
.thread-item.active { background: #f2efe8; }
.thread-item .t-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.thread-item .t-order { font-size: 13px; font-weight: 600; }
.thread-item .t-time { font-size: 11px; color: var(--text-muted); }
.thread-item .t-preview { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .t-unread {
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; margin-left: 8px;
}
.support-chat-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); height: 74vh; display: flex; flex-direction: column; }
.support-chat-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.support-chat-head h3 { margin: 0 0 4px; font-size: 15px; }
.support-chat-head p { margin: 0; font-size: 12px; color: var(--text-muted); }
.support-close-btn {
  background: none; border: 1px solid var(--danger); color: var(--danger); font-size: 11px;
  padding: 6px 12px; border-radius: 16px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.support-close-btn:hover { background: var(--danger); color: #fff; }
.support-close-btn:disabled { opacity: .45; cursor: default; background: none; color: var(--text-muted); border-color: var(--border); }
.support-chat-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; background: #f7f4ee; }
.support-chat-foot { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); }
.support-chat-foot input { flex: 1; padding: 11px 16px; border: 1px solid var(--border); border-radius: 20px; font-size: 13.5px; }
.support-chat-foot button { padding: 0 22px; border-radius: 20px; border: none; background: var(--text); color: #fff; font-size: 13px; cursor: pointer; }
.support-chat-foot button:hover { background: var(--accent); }
.support-chat-foot button:disabled { background: #ccc; cursor: not-allowed; }

@media (max-width: 900px) {
  .support-layout { grid-template-columns: 1fr; }
  .chat-panel { right: 10px; left: 10px; width: auto; }
}

/* -------------------- Mobile: menu e dettagli (correzioni) -------------------- */
@media (max-width: 900px) {
  /* l'effetto sfocato chiudeva il menu dentro l'altezza dell'intestazione */
  header.site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .main-nav {
    top: var(--nav-top, 72px); bottom: auto; height: calc(100dvh - var(--nav-top, 72px));
    gap: 4px; padding: 28px 24px 40px; overflow-y: auto;
    box-shadow: 0 12px 24px rgba(0,0,0,.05);
  }
  .main-nav a {
    width: 100%; max-width: 420px; text-align: center;
    font-size: 17px; padding: 16px 0; border-bottom: 1px solid var(--border);
  }
  .main-nav a::after { display: none; }
  body.nav-open { overflow: hidden; }
  .menu-toggle { width: 44px; height: 44px; }
}
@media (max-width: 560px) {
  /* campi a 16px: iPhone non ingrandisce la pagina quando li tocchi */
  input, textarea, select { font-size: 16px !important; }
}

/* le sezioni raggiunte dal menu (#chi-siamo, #dove-siamo) non finiscono sotto l intestazione fissa */
section[id] { scroll-margin-top: 80px; }

/* iPhone (WebKit): icona del menu con dimensioni e colore espliciti, altrimenti risulta invisibile */
.menu-toggle{ -webkit-appearance:none; appearance:none; padding:0; color:#111; -webkit-tap-highlight-color:transparent; }
.menu-toggle svg{ width:24px; height:24px; min-width:24px; display:block; flex:none; }

/* -------------------- Dove siamo -------------------- */
.visit-section { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 100px; }
.visit-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: stretch; }
.visit-info h2 { font-size: clamp(26px, 3.6vw, 38px); margin: 0 0 16px; font-weight: 600; }
.visit-lead { color: var(--text-muted); margin: 0 0 30px; }
.visit-list { list-style: none; margin: 0 0 32px; padding: 0; }
.visit-list li { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--border); }
.visit-list li:last-child { border-bottom: 1px solid var(--border); }
.visit-ic { width: 40px; height: 40px; flex: none; border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--accent-dark); }
.visit-ic svg { width: 18px; height: 18px; display: block; }
.visit-list h4 { margin: 0 0 4px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.visit-list p { margin: 0; line-height: 1.6; }
.visit-list a { border-bottom: 1px solid var(--border); transition: border-color .25s var(--ease); }
.visit-list a:hover { border-color: var(--accent); }
.visit-hours { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; margin: 0; }
.visit-hours dt { font-weight: 500; }
.visit-hours dd { margin: 0; color: var(--text-muted); }
.visit-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.visit-map { position: relative; display: block; min-height: 420px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg); }
.visit-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; filter: grayscale(35%) sepia(12%); }
.visit-map::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0); transition: background .3s var(--ease); }
.visit-map:hover::after { background: rgba(23,23,23,.06); }
.visit-map-badge { position: absolute; left: 14px; top: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; background: var(--text); color: #fff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 11px 16px; border-radius: var(--radius); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.visit-map-badge svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 900px) {
  .visit-grid { grid-template-columns: 1fr; gap: 36px; }
  .visit-map { min-height: 300px; }
  .visit-section { margin-bottom: 60px; }
}
@media (max-width: 560px) {
  .visit-actions .btn { width: 100%; }
  .visit-hours { grid-template-columns: 1fr; gap: 0; }
  .visit-hours dd { margin-bottom: 6px; }
}

/* Ritocchi mobile/tablet */
@media (max-width: 900px) {
  .newsletter-form button { min-height: 48px; }
  .size-chip { min-width: 36px; height: 36px; font-size: 12px; }
  .size-picker-label { font-size: 11px; }
}

/* Categorie: su tablet restano 3 affiancate; su telefono una sotto l altra ma piu basse */
@media (max-width: 900px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .category-card-label h3 { font-size: 18px; }
}
@media (max-width: 600px) {
  .categories-grid { grid-template-columns: 1fr; gap: 12px; }
  .category-card { aspect-ratio: 16 / 10; }
}

/* -------------------- Hero con foto del negozio -------------------- */
.hero.hero-photo { background: #171717; min-height: 88vh; color: #fff; }
.hero-photo .hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: url("img/negozio/negozio-panoramica.jpg") center / cover no-repeat;
  transform: scale(1.04); animation: heroZoom 18s ease-out forwards;
}
.hero-photo .hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(17,17,17,.55) 0%, rgba(17,17,17,.38) 45%, rgba(17,17,17,.68) 100%);
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-photo .hero-content { max-width: 760px; }
.hero-photo .hero-eyebrow { color: #e9dcc3; }
.hero-photo .hero-brand {
  font-family: Georgia, "Times New Roman", serif; font-weight: 700;
  font-size: clamp(56px, 11vw, 132px); line-height: .95; letter-spacing: -.01em;
  color: #fff; margin: 0 0 18px; text-shadow: 0 4px 30px rgba(0,0,0,.35);
}
.hero-photo .hero-brand span { color: #e2c48f; font-style: italic; font-weight: 400; }
.hero-tagline {
  display: block; font-size: 15px; letter-spacing: .32em; text-transform: uppercase;
  color: #f3ece0; margin: 0 0 26px;
  opacity: 0; animation: fadeUp .9s var(--ease) .35s forwards;
}
.hero-photo p { color: rgba(255,255,255,.82); max-width: 540px; margin-left: auto; margin-right: auto; }
.btn.btn-light { background: #fff; color: var(--text); border-color: #fff; }
.btn.btn-light:hover { background: transparent; color: #fff; }
@media (max-width: 700px) {
  .hero-photo .hero-bg { background-image: url("img/negozio/negozio-ingresso.jpg"); background-position: center 35%; }
  .hero.hero-photo { min-height: 78vh; }
  .hero-tagline { font-size: 12px; letter-spacing: .26em; }
  .hero-photo p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .hero-photo .hero-bg { animation: none; transform: none; } }

/* -------------------- Galleria del negozio -------------------- */
.store-gallery-section { padding-top: 0; }
.store-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.store-gallery-item { display: block; position: relative; overflow: hidden; aspect-ratio: 1 / 1; border-radius: var(--radius); background: var(--border); }
.store-gallery-item:nth-child(1), .store-gallery-item:nth-child(8) { grid-row: span 2; aspect-ratio: auto; }
.store-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), filter .4s var(--ease); }
.store-gallery-item:hover img { transform: scale(1.06); }
@media (max-width: 900px) { .store-gallery { grid-template-columns: repeat(3, 1fr); gap: 10px; } .store-gallery-item:nth-child(8) { grid-row: auto; aspect-ratio: 1 / 1; } }
@media (max-width: 560px) { .store-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; } .store-gallery-item:nth-child(1) { grid-row: span 2; } }

/* Galleria: griglia senza buchi a ogni larghezza */
.store-gallery { grid-auto-flow: dense; }
.store-gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
@media (max-width: 560px) {
  .store-gallery-item:nth-child(1) { grid-column: span 1; grid-row: span 2; }
  .store-gallery-item:nth-child(12) { grid-row: span 2; aspect-ratio: auto; }
}
.store-gallery-item img { position: absolute; inset: 0; }
@media (max-width: 560px) { .store-gallery-item { min-height: 0; } }

/* -------------------- Banner fotografico pagina Shop -------------------- */
.page-banner { position: relative; min-height: 38vh; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff;
  background: linear-gradient(180deg, rgba(17,17,17,.45), rgba(17,17,17,.6)), url("img/negozio/parete-accessori.jpg") center 40% / cover no-repeat; }
.page-banner h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 7vw, 84px); font-weight: 700; color: #fff; margin: 6px 0 0; text-shadow: 0 4px 24px rgba(0,0,0,.35); }
.page-banner .hero-eyebrow { color: #e9dcc3; }
@media (max-width: 600px) { .page-banner { min-height: 30vh; } }

/* =====================================================================
   Live chat del sito (livechat.js)
   ===================================================================== */
.lc-root { position: fixed; right: 22px; bottom: 22px; z-index: 300; font-family: inherit; }
.lc-launcher {
  display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 22px 0 18px;
  border: none; border-radius: 30px; background: var(--text); color: #fff; cursor: pointer;
  box-shadow: 0 10px 30px rgba(20,18,12,.28); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.lc-launcher:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(20,18,12,.32); }
.lc-launcher .lc-ico { display: inline-flex; color: #e2c48f; }
.lc-launcher .lc-ico svg { width: 24px; height: 24px; }
.lc-badge {
  position: absolute; top: -4px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: #c0392b; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--bg);
}
.lc-badge[hidden] { display: none; }
.lc-launcher.has-unread { animation: lcPulse 2s ease-in-out infinite; }
@keyframes lcPulse { 0%,100% { box-shadow: 0 10px 30px rgba(20,18,12,.28); } 50% { box-shadow: 0 0 0 8px rgba(156,124,79,.25), 0 10px 30px rgba(20,18,12,.28); } }
.lc-root.is-open .lc-launcher { opacity: 0; pointer-events: none; transform: scale(.9); }

.lc-panel {
  position: absolute; right: 0; bottom: 0; width: 370px; height: 560px; max-height: calc(100vh - 44px);
  background: var(--surface); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(20,18,12,.28); border: 1px solid var(--border);
  opacity: 0; transform: translateY(16px) scale(.97); transform-origin: bottom right; pointer-events: none;
  transition: opacity .28s var(--ease), transform .32s var(--ease);
}
.lc-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.lc-head {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 20px 18px; color: #fff;
  background: linear-gradient(180deg, rgba(17,17,17,.55), rgba(17,17,17,.78)), url("img/negozio/negozio-panoramica.jpg") center 45% / cover;
}
.lc-brand { font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 700; line-height: 1; }
.lc-brand em { color: #e2c48f; font-weight: 400; }
.lc-head p { margin: 6px 0 0; font-size: 12px; color: rgba(255,255,255,.78); }
.lc-close { background: rgba(255,255,255,.12); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.lc-close:hover { background: rgba(255,255,255,.24); }
.lc-body { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; background: #f7f4ee; -webkit-overflow-scrolling: touch; }
.lc-welcome h3 { margin: 4px 0 8px; font-size: 20px; }
.lc-welcome p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-muted); }
.lc-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 30px 0; }
.lc-msg { max-width: 80%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45; word-wrap: break-word; animation: chatMsgIn .25s var(--ease); }
.lc-mine { align-self: flex-end; background: var(--text); color: #fff; border-bottom-right-radius: 4px; }
.lc-theirs { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.lc-who { display: block; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 3px; }
.lc-time { display: block; font-size: 10px; opacity: .55; margin-top: 4px; text-align: right; }
.lc-sys { align-self: center; text-align: center; max-width: 92%; font-size: 12px; color: var(--text-muted); background: #eee7d8; padding: 7px 14px; border-radius: 12px; }
.lc-sys span { margin-left: 6px; opacity: .6; }
.lc-foot { border-top: 1px solid var(--border); background: var(--surface); }
.lc-start { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 12px; }
.lc-start input, .lc-start textarea, .lc-send input {
  width: 100%; box-sizing: border-box; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 14px; background: #fff; color: var(--text);
}
.lc-start textarea { resize: none; }
.lc-start input:focus, .lc-start textarea:focus, .lc-send input:focus { outline: none; border-color: var(--accent); }
.lc-start-btn { height: 46px; border: none; border-radius: 10px; background: var(--text); color: #fff; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.lc-start-btn:hover { background: var(--accent-dark); }
.lc-start-btn:disabled { opacity: .6; cursor: default; }
.lc-note { margin: 0; font-size: 11px; color: var(--text-muted); text-align: center; }
.lc-error { margin: 0; font-size: 12.5px; color: #b03a2e; }
.lc-send { display: flex; gap: 8px; padding: 12px 14px 6px; }
.lc-send input { border-radius: 24px; }
.lc-send button { width: 44px; height: 44px; flex-shrink: 0; border: none; border-radius: 50%; background: var(--text); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.lc-send button:hover { background: var(--accent-dark); }
.lc-send button:disabled { opacity: .5; }
.lc-new { display: block; margin: 0 auto 10px; background: none; border: none; font-size: 11.5px; color: var(--text-muted); text-decoration: underline; cursor: pointer; }
@media (max-width: 560px) {
  .lc-root { right: 14px; bottom: 14px; }
  .lc-launcher { height: 52px; width: 52px; padding: 0; justify-content: center; }
  .lc-launcher .lc-label { display: none; }
  .lc-root.is-open { inset: 0; right: 0; bottom: 0; }
  .lc-panel { position: fixed; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; border: none; }
  .lc-head { padding-top: max(18px, env(safe-area-inset-top)); }
  .lc-foot { padding-bottom: env(safe-area-inset-bottom); }
}
html.lc-lock, html.lc-lock body { overflow: hidden; }
@media print { .lc-root { display: none; } }

/* =====================================================================
   Pannello admin — stile coordinato con la Home (v2)
   ===================================================================== */
.admin-body { background: var(--bg); }
.admin-shell { grid-template-columns: 250px 1fr; }
.admin-sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 0;
  background: linear-gradient(180deg, rgba(17,17,17,.92), rgba(17,17,17,.97) 40%), url("img/negozio/lampadario-camerini.jpg") center top / cover;
  color: #d9d2c4;
}
.admin-sidebar .brand { display: block; padding: 30px 26px 26px; margin: 0 0 10px; border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; }
.admin-sidebar .brand span.brand-logo { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: 0; text-transform: none; color: #fff; }
.admin-sidebar .brand-logo em { color: #e2c48f; font-weight: 400; }
.admin-sidebar .brand span.brand-sub { display: block; margin-top: 8px; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: #a79f8c; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 14px; }
.admin-nav-bottom { margin-top: auto; padding-bottom: 22px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.admin-sidebar .admin-nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; border-left: none;
  font-size: 13.5px; letter-spacing: .02em; color: #cfc8b8; transition: background .2s, color .2s;
}
.admin-sidebar .admin-nav a svg { flex-shrink: 0; opacity: .8; }
.admin-sidebar .admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-sidebar .admin-nav a.active { background: rgba(226,196,143,.14); color: #fff; border-left: none; }
.admin-sidebar .admin-nav a.active svg { color: #e2c48f; opacity: 1; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #c0392b; color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.nav-badge[hidden] { display: none; }

.admin-main { padding: 44px 48px 60px; min-width: 0; }
.admin-topbar { align-items: flex-end; padding-bottom: 22px; margin-bottom: 30px; border-bottom: 1px solid var(--border); }
.admin-topbar h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 3vw, 38px); font-weight: 700; letter-spacing: -.01em; }
.admin-eyebrow { display: block; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.admin-topbar > span, .admin-hello { font-size: 13px !important; color: var(--text-muted); }

.stat-card, .account-card, .admin-table, .thread-list, .support-chat-wrap { border-radius: 14px; border-color: var(--border); box-shadow: 0 1px 2px rgba(20,18,12,.04); }
.stat-card { position: relative; overflow: hidden; padding: 26px 24px 24px; }
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), #e2c48f); }
.stat-card .label { letter-spacing: .16em; font-size: 11px; }
.stat-card .value { font-family: Georgia, "Times New Roman", serif; font-size: 34px; font-weight: 700; }
.admin-table { overflow: hidden; }
.admin-table th { background: #f4efe5; letter-spacing: .12em; }
.admin-table tr.clickable:hover { background: #faf6ee; }
.admin-search, .status-select { border-radius: 10px; padding: 11px 14px; background: #fff; }
.pill-toggle { border-radius: 30px; background: #fff; }
.pill-toggle a, .pill-toggle button { padding: 9px 18px; letter-spacing: .04em; cursor: pointer; }
.account-card h2 { font-family: Georgia, "Times New Roman", serif; font-size: 24px; }

/* Banner di benvenuto in dashboard */
.admin-hero {
  position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 30px; padding: 44px 40px; color: #fff;
  background: linear-gradient(100deg, rgba(17,17,17,.78) 0%, rgba(17,17,17,.45) 60%, rgba(17,17,17,.2) 100%), url("img/negozio/negozio-panoramica.jpg") center 40% / cover;
}
.admin-hero .admin-eyebrow { color: #e9dcc3; }
.admin-hero h2 { margin: 0 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; color: #fff; }
.admin-hero h2 em { color: #e2c48f; font-weight: 400; }
.admin-hero p { margin: 0 0 22px; max-width: 520px; color: rgba(255,255,255,.85); }
.admin-hero .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.admin-hero .btn { background: #fff; color: var(--text); border-color: #fff; }
.admin-hero .btn:hover { background: transparent; color: #fff; }
.admin-hero .btn.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.admin-hero .btn.btn-ghost:hover { background: #fff; color: var(--text); }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.quick-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: #fff; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.quick-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 10px 24px rgba(20,18,12,.08); }
.quick-card svg { color: var(--accent); margin-bottom: 6px; }
.quick-card strong { font-size: 15px; }
.quick-card span { font-size: 12.5px; color: var(--text-muted); }

/* Supporto */
.support-chat-head h3 { font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
.support-chat-head a { color: var(--accent-dark); text-decoration: underline; }
.thread-item { padding: 15px 18px; }
.thread-item.active { background: #f4efe5; box-shadow: inset 3px 0 0 var(--accent); }
.thread-item .t-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.t-kind { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 8px; background: #ece6da; color: var(--text-muted); margin-right: 8px; vertical-align: 1px; }
.t-kind-live { background: rgba(156,124,79,.16); color: var(--accent-dark); }
.chat-msg.admin-mine { align-self: flex-end; background: var(--text); color: #fff; border: none; border-bottom-right-radius: 4px; }
.support-chat-body { background: #f7f4ee; }

/* Login admin con foto del negozio */
body.admin-login-page {
  background: linear-gradient(180deg, rgba(17,17,17,.55), rgba(17,17,17,.75)), url("img/negozio/negozio-ingresso.jpg") center / cover fixed !important;
}
.admin-login-page .admin-login-box { border-radius: 16px; box-shadow: 0 30px 70px rgba(0,0,0,.35); padding: 44px 40px; }
.admin-login-brand { text-align: center; font-family: Georgia, "Times New Roman", serif; font-size: 40px; font-weight: 700; line-height: 1; margin-bottom: 10px; }
.admin-login-brand em { color: var(--accent); font-weight: 400; }

@media (max-width: 1100px) { .quick-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: sticky; top: 0; z-index: 50; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 0; background: #171717; }
  .admin-sidebar .brand { display: block; padding: 12px 16px; margin: 0; border: none; flex-shrink: 0; }
  .admin-sidebar .brand span.brand-logo { font-size: 20px; }
  .admin-sidebar .brand span.brand-sub { display: none; }
  .admin-nav, .admin-nav-bottom { flex-direction: row; padding: 8px; margin: 0; border: none; gap: 4px; }
  .admin-sidebar .admin-nav a { white-space: nowrap; padding: 9px 12px; border-bottom: none; }
  .admin-sidebar .admin-nav a.active { border-bottom: none; }
  .admin-main { padding: 26px 16px 40px; }
  .admin-hero { padding: 30px 22px; }
  .support-layout { grid-template-columns: 1fr; }
  .support-chat-wrap { height: 70vh; }
  .thread-list { max-height: 40vh; }
}
@media (max-width: 560px) {
  .quick-grid { grid-template-columns: 1fr; }
  .admin-sidebar .admin-nav a span { display: none; }
  .admin-sidebar .admin-nav a { padding: 10px; }
  .admin-topbar { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* -------------------- Admin: pagina Statistiche -------------------- */
.quick-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important; }
.stats-note { font-size: 12px; color: var(--text-muted); }
.stat-sub { margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.chart-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 22px 22px 16px; min-width: 0; }
.chart-card.chart-wide { grid-column: 1 / -1; }
.chart-card header { margin-bottom: 12px; }
.chart-card h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 20px; }
.chart-card header p { margin: 4px 0 0; font-size: 12px; color: var(--text-muted); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.ch-grid { stroke: #ece6da; stroke-width: 1; }
.ch-base { stroke: #cfc6b4; stroke-width: 1; }
.ch-axis { font-size: 11px; fill: #8a8375; font-family: inherit; }
.ch-bar { fill: var(--accent); }
.ch-hit { fill: transparent; cursor: default; }
.ch-hit.on { fill: rgba(156,124,79,.08); }
.chart-empty { display: flex; align-items: center; justify-content: center; min-height: 160px; padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; background: repeating-linear-gradient(135deg, #faf8f3 0 10px, #f5f1e8 10px 20px); border-radius: 10px; }
.bar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.bl-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 6px; }
.bl-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-val { color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bl-track { height: 8px; background: #f1ece2; border-radius: 4px; overflow: hidden; }
.bl-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.chart-tip { position: fixed; z-index: 400; pointer-events: none; background: #171717; color: #fff; padding: 8px 12px; border-radius: 8px; font-size: 12px; box-shadow: 0 8px 20px rgba(0,0,0,.2); display: flex; flex-direction: column; gap: 2px; }
.chart-tip[hidden] { display: none; }
.chart-tip b { font-weight: 600; color: #e2c48f; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr; } }

/* -------------------- Foto variate + logo admin -------------------- */
.lc-head { background: linear-gradient(180deg, rgba(17,17,17,.5), rgba(17,17,17,.8)), url("img/negozio/guanti-pelle-maglia.jpg") center 60% / cover; }
.admin-hero { background: linear-gradient(100deg, rgba(17,17,17,.8) 0%, rgba(17,17,17,.5) 60%, rgba(17,17,17,.25) 100%), var(--hero-photo, url("img/negozio/borsa-bianca-maglie.jpg")) center 45% / cover; }
body.admin-login-page { background: linear-gradient(180deg, rgba(17,17,17,.5), rgba(17,17,17,.75)), url("img/negozio/vetrina-natale.jpg") center 30% / cover fixed !important; }
.admin-sidebar { background: linear-gradient(180deg, rgba(17,17,17,.9), rgba(17,17,17,.97) 45%), url("img/negozio/lampadario-camerini.jpg") center 15% / cover; }
.admin-sidebar a.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 46px; height: 46px; flex-shrink: 0; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.brand-text { display: block; min-width: 0; }
.admin-sidebar .brand span.brand-logo { font-size: 24px; }
.admin-sidebar .brand span.brand-sub { font-size: 9.5px; margin-top: 6px; }
.admin-login-mark { display: block; width: 64px; height: 64px; margin: 0 auto 14px; }
@media (max-width: 900px) {
  .brand-mark { width: 34px; height: 34px; }
  .admin-sidebar .brand span.brand-logo { font-size: 18px; }
}
@media (max-width: 560px) { .admin-sidebar .brand .brand-text { display: none; } }

/* Collegamento al pannello admin nell'header (solo per admin collegati) */
.admin-link img { width: 26px; height: 26px; display: block; border-radius: 7px; transition: transform .2s var(--ease); }
.admin-link:hover img { transform: scale(1.08); }
.admin-link-badge { position: absolute; top: -6px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #c0392b; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.admin-link-badge[hidden] { display: none; }

/* =====================================================================
   Ottimizzazione telefono e iPad (dicembre)
   ===================================================================== */
/* Sui dispositivi touch (iPhone e iPad) i campi a 16px evitano lo zoom automatico */
@media (hover: none) and (pointer: coarse) {
  input, textarea, select { font-size: 16px !important; }
  .lc-close { width: 44px; height: 44px; }
  .footer a, footer a { display: inline-block; padding: 6px 0; }
  .ch-hit.on { fill: transparent; }
}
/* Galleria: l'ultima foto alta non deve collassare sui telefoni */
@media (max-width: 560px) {
  .store-gallery-item:nth-child(12) { grid-row: span 1; aspect-ratio: 1 / 1; grid-column: span 2; aspect-ratio: 2 / 1; }
}
/* Live chat: tastiera iOS e notch */
@media (max-width: 560px) {
  .lc-root { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
  .lc-panel { height: 100dvh; }
  .lc-msg { max-width: 86%; }
}
/* iPad verticale: pannello chat un po' più grande e banner proporzionati */
@media (min-width: 561px) and (max-width: 1024px) {
  .lc-panel { width: 400px; height: min(620px, calc(100dvh - 44px)); }
  .hero.hero-photo { min-height: 70vh; }
  .page-banner { min-height: 30vh; }
}
/* Pannello admin su iPad orizzontale: menu più stretto */
@media (min-width: 901px) and (max-width: 1200px) {
  .admin-shell { grid-template-columns: 210px 1fr; }
  .admin-main { padding: 34px 28px 50px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .support-layout { grid-template-columns: 280px 1fr; }
}
/* Pannello admin su telefono */
@media (max-width: 560px) {
  .admin-hero { padding: 26px 20px; border-radius: 12px; }
  .admin-hero .btn { width: 100%; justify-content: center; text-align: center; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 18px 16px; }
  .stat-card .value { font-size: 24px; }
  .admin-toolbar { flex-direction: column; align-items: stretch; }
  .admin-toolbar .pill-toggle { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-toolbar .pill-toggle a, .admin-toolbar .pill-toggle button { flex: 1 0 auto; justify-content: center; min-height: 40px; }
  .admin-search { min-width: 0; width: 100%; }
  .chart-card { padding: 18px 14px 12px; }
  .support-chat-wrap { height: 75dvh; }
  .support-chat-foot input { font-size: 16px; }
  .admin-sidebar { justify-content: space-between; }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-rows: auto 1fr; align-content: start; }
  .admin-sidebar { align-self: start; }
  /* tabelle admin scorrevoli in orizzontale dentro la pagina */
  .admin-main { min-width: 0; }
  .admin-main .admin-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; max-width: 100%; }
  .admin-main .admin-table td { white-space: normal; min-width: 90px; }
}
@media (max-width: 900px) { .admin-main .admin-table { min-width: 0; width: 100%; } }
@media (max-width: 900px) { .admin-toolbar > * { min-width: 0; max-width: 100%; } .admin-toolbar .pill-toggle { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .admin-toolbar .pill-toggle > * { flex: 0 0 auto; white-space: nowrap; } }

/* =====================================================================
   Scheda prodotto: niente etichette, scelta taglia sobria sotto il prezzo
   ===================================================================== */
.product-tag, .size-picker, .quick-add { display: none !important; }
.size-line {
  position: relative; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.size-line-label { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-muted); }
.size-opts { display: flex; flex-wrap: wrap; gap: 2px; }
.size-opt {
  position: relative; min-width: 34px; height: 34px; padding: 0 6px; background: none; border: none; cursor: pointer;
  font: inherit; font-size: 13px; letter-spacing: .06em; color: var(--text); transition: color .2s var(--ease);
}
.size-opt::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 5px; height: 1px; background: var(--accent);
  transform: scaleX(0); transition: transform .25s var(--ease);
}
.size-opt:hover::after, .size-opt:focus-visible::after, .size-opt.is-picked::after { transform: scaleX(1); }
.size-opt:hover, .size-opt.is-picked { color: var(--accent-dark); }
.size-opt:focus-visible { outline: 1px dotted var(--accent); outline-offset: 2px; }
.size-opt.is-out { color: #c4bdae; text-decoration: line-through; cursor: default; }
.size-opt.is-out::after { display: none; }
.add-line {
  background: none; border: none; padding: 6px 0; cursor: pointer; font: inherit; font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text); border-bottom: 1px solid var(--accent); transition: color .2s, border-color .2s;
}
.add-line:hover { color: var(--accent-dark); }
.size-line-out { font-size: 12px; color: var(--text-muted); font-style: italic; }
.size-line-msg {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px); font-size: 11.5px; color: var(--accent-dark);
  opacity: 0; transform: translateY(-3px); transition: opacity .25s, transform .25s; pointer-events: none;
}
.size-line.show-msg .size-line-msg { opacity: 1; transform: none; }
.product-info { padding-bottom: 18px; }
@media (max-width: 600px) {
  .size-line { gap: 6px; margin-top: 10px; padding-top: 8px; }
  .size-line-label { width: 100%; font-size: 9.5px; }
  .size-opts { width: 100%; gap: 0; justify-content: space-between; }
  .size-opt { min-width: 0; flex: 1 1 0; height: 40px; padding: 0; font-size: 12.5px; }
  .size-opt::after { left: 25%; right: 25%; bottom: 7px; }
  .add-line { font-size: 10px; letter-spacing: .14em; padding: 10px 0 6px; }
}

/* Galleria "Il negozio": foto non cliccabili né scaricabili con un tocco */
.store-gallery-item { cursor: default; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.store-gallery-item img { pointer-events: none; -webkit-user-drag: none; }

/* Firma "Creato da Francesco Cameroni" con pulsante al sito personale */
.fc-credit { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; letter-spacing: .02em; color: inherit; text-decoration: none; opacity: .9; }
.fc-credit span { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 20px; border: 1px solid currentColor; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; transition: background .2s, color .2s, border-color .2s; }
.fc-credit:hover span { background: #2f5bff; border-color: #2f5bff; color: #fff; }

/* spazio sotto la firma, cosi il pulsante della chat non la copre */
footer.site-footer { padding-bottom: 96px; }
.footer-bottom { flex-wrap: wrap; align-items: center; }
