
:root {
  --bg: #f5f7f4;
  --surface: #ffffff;
  --text: #163126;
  --muted: #61746b;
  --brand: #0b3d2e;
  --brand-soft: #e8f0ec;
  --brand-ghost: rgba(11, 61, 46, 0.08);
  --line: #dfe8e3;
  --shadow: 0 10px 30px rgba(11, 61, 46, 0.08);
  --danger-soft: #fff3ee;
  --danger-line: #f2c5b3;
  --danger-text: #8c3b1f;
  --success-soft: #eef8f1;
  --success-line: #bfd8c5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.topbar {
  position: relative;
  overflow: hidden;
  color: white;
  padding: 56px 0 42px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(11, 61, 46, 0.58), rgba(11, 61, 46, 0.58)),
    url("/assets/images/sfondo-hero.jpg");
  background-size: cover;
  background-position: center;
  filter: blur(8px);
  transform: scale(1.08);
  z-index: 0;
}

.topbar-inner {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.82;
}
#heroEyebrow {
  display: block;
  width: min(640px, 92vw);
  height: auto;
  margin: 0 auto 18px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.28));
}
h1, h2 { margin: 0; }
h1 {
  font-size: clamp(20px, 2.2vw, 34px);
  line-height: 1.08;
  max-width: 1200px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 auto;
  color: white;
  white-space: nowrap;
}

@media (max-width: 768px) {
  h1 {
    white-space: normal;
    max-width: 320px;
    font-size: 32px;
  }
}
.subtext {
  margin: 14px auto 0;
  max-width: 820px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
  font-size: 17px;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.hero-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 22px;
  backdrop-filter: blur(8px);
}
.hero-card p { margin: 12px 0 0; line-height: 1.55; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}
.section { padding: 32px 0 22px; }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}
.section-head.compact { margin-bottom: 14px; }
.section-head h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-note, .muted, .small-note, .status-text { color: var(--muted); }
.catalog-tools {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.filters-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filters-label { font-size: 14px; color: var(--muted); font-weight: 600; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  border: 1px solid var(--line);
  background: white;
  color: var(--brand);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.filter-chip:hover { transform: translateY(-1px); }
.filter-chip.active { background: var(--brand); color: white; border-color: var(--brand); }
.search-wrap {
  width: min(100%, 340px);
  margin-left: auto;
}
.search-wrap input {
  width: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
  font: inherit;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.product-card, .panel { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); }
.product-card {
  overflow: hidden;
  border: 1px solid transparent;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(11, 61, 46, 0.13);
  border-color: #d5e2db;
}
.product-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #eef3f0;
  overflow: hidden;
}
.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-unavailable {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  border-radius: 999px;
  background: rgba(22, 49, 38, 0.88);
  color: white;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}
.product-body { padding: 16px 16px 18px; }
.product-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  min-height: 48px;
}
.product-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}
.price { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.caption { color: var(--muted); font-size: 13px; }
.ordine-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  padding: 10px 0 44px;
}
.panel { padding: 22px; }
.cart-box { display: grid; gap: 10px; }
.empty-state {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fbfcfb;
}
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-name { font-weight: 700; margin-bottom: 4px; }
.cart-item-detail { color: var(--muted); font-size: 14px; }
.qty-controls { display: inline-flex; align-items: center; gap: 8px; }
.qty-btn, .btn, .add-btn {
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}
.qty-btn:hover, .btn:hover, .add-btn:hover { transform: translateY(-1px); }
.qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 18px;
}
.summary-box { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.summary-row { display: flex; justify-content: space-between; align-items: center; font-size: 20px; }
.form-grid { display: grid; gap: 12px; }
input, textarea {
  width: 100%;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbfcfb;
  font: inherit;
  color: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
textarea { min-height: 108px; resize: vertical; }
input:focus, textarea:focus {
  outline: none;
  border-color: #9bb8ab;
  box-shadow: 0 0 0 4px rgba(11, 61, 46, 0.08);
  transform: translateY(-1px);
}
.field-error { border-color: #d38a6b !important; background: #fffaf7; }
.cta-stack { display: grid; gap: 10px; margin-top: 18px; }
.btn, .add-btn { border-radius: 14px; font-weight: 700; letter-spacing: -0.01em; }
.btn { width: 100%; padding: 15px 18px; font-size: 16px; }
.btn-primary, .add-btn { background: var(--brand); color: white; }
.btn-primary:hover, .add-btn:hover { background: #14533f; }
.btn-secondary { background: white; color: var(--brand); border: 1px solid var(--line); }
.btn-secondary:hover { background: #f6faf8; }
.add-btn { padding: 12px 14px; font-size: 15px; }
.add-btn:disabled {
  background: #cad6cf;
  color: #6c7d75;
  cursor: not-allowed;
}
.payment-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  background: #fbfcfb;
  border: 1px solid var(--line);
}
.payment-title { margin: 0 0 10px; font-weight: 700; }
.payment-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.payment-chips span {
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}
.status-text { min-height: 22px; margin: 14px 2px 0; transition: opacity 0.2s ease; }
.form-alert {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  color: var(--danger-text);
  font-weight: 600;
}
.hidden { display: none !important; }
.no-results {
  margin: 14px 0 0;
  padding: 18px;
  border-radius: 14px;
  background: white;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.site-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(18px);
  background: var(--brand);
  color: white;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(11, 61, 46, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 999;
  font-weight: 700;
}
.site-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.topbar, .panel, .payment-box { animation: fadeUp 0.45s ease both; }
.panel { animation-delay: 0.05s; }
.payment-box { animation-delay: 0.1s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 920px) {
  .topbar-inner, .ordine-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1120px); }
  .section-head { flex-direction: column; align-items: flex-start; }
  .catalog-tools { align-items: stretch; }
  .filters-wrap { align-items: flex-start; }
  .search-wrap { width: 100%; margin-left: 0; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-image-wrap { aspect-ratio: 1 / 1; }
  .product-body { padding: 12px; }
  .product-card h3 { font-size: 16px; min-height: 40px; margin-bottom: 8px; }
  .price { font-size: 18px; }
  .caption { font-size: 12px; }
  .add-btn { padding: 10px 12px; font-size: 14px; }
  .cart-item { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}


#cartLiveUpdate:empty {
  display: none;
}
