/* =========================================================
   Pizzalonga Away — stile del sito
   ========================================================= */

:root {
  --cream: #f9f4e9;
  --cream-deep: #f2e7d2;
  --paper: #fffdf7;
  --ink: #211c18;
  --ink-soft: #453b32;
  --muted: #7a6f63;
  --line: #e6dac5;
  --red: #ae1c2b;
  --red-dark: #8b1220;
  --red-soft: #f7e4e5;
  --gold: #c39436;
  --green: #2f6b4f;
  --shadow-sm: 0 10px 24px -18px rgba(33, 28, 24, 0.45);
  --shadow: 0 24px 60px -30px rgba(33, 28, 24, 0.4);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --header-height: 78px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 30px);
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--cream);
  background-image: radial-gradient(rgba(174, 28, 43, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(1180px, calc(100% - 44px));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------ Tipografia ------------------------------ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

.eyebrow.is-light {
  color: var(--gold);
}

.title-xl {
  font-size: clamp(2.6rem, 6vw, 4.7rem);
  line-height: 0.98;
}

.title-lg {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.title-md {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.lead {
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.muted {
  color: var(--muted);
}

.text-center {
  text-align: center;
}

.text-center .lead {
  margin-inline: auto;
}

/* -------------------------------- Pulsanti ------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.2;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible,
.pill:focus-visible,
.cart-button:focus-visible,
.icon-button:focus-visible,
.qty-button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 14px 28px -16px rgba(174, 28, 43, 0.9);
}

.btn-primary:hover {
  background: var(--red-dark);
}

.btn-outline {
  border-color: rgba(33, 28, 24, 0.28);
  color: var(--ink);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--ink);
  background: rgba(33, 28, 24, 0.04);
}

.btn-dark {
  background: var(--ink);
  color: var(--cream);
}

.btn-dark:hover {
  background: #000;
}

.btn-ghost {
  min-height: auto;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  color: var(--red);
}

.btn-sm {
  min-height: 38px;
  padding: 9px 16px;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.link {
  color: var(--red);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link:hover {
  color: var(--red-dark);
}

/* --------------------------------- Header -------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(249, 244, 233, 0.92);
  border-bottom: 1px solid rgba(33, 28, 24, 0.09);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-slice {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cream-deep);
  display: grid;
  place-items: center;
}

.brand-slice svg {
  width: 26px;
  height: 26px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text strong {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.01em;
}

.brand-text span {
  margin-top: 5px;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--red);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: 22px;
  font-size: 0.88rem;
  font-weight: 600;
}

.main-nav a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-soft);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--red);
  transition: right 0.2s ease;
}

.main-nav a:hover::after,
.main-nav a.is-active::after {
  right: 0;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.cart-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.cart-button:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.cart-button svg {
  width: 19px;
  height: 19px;
}

.cart-count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
}

.cart-count.is-empty {
  display: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  place-items: center;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

/* ---------------------------------- Hero --------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 86px;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px;
  height: 520px;
  right: -160px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(195, 148, 54, 0.22), transparent 68%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 54px;
  align-items: center;
}

.hero-copy .lead {
  margin-top: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin-top: 34px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  flex-shrink: 0;
}

.check-icon svg {
  width: 11px;
  height: 11px;
}

.hero-art {
  position: relative;
  padding: 10px;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 4% 2% 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(174, 28, 43, 0.12), transparent 66%);
  filter: blur(6px);
}

.hero-pizza {
  position: relative;
  width: min(100%, 470px);
  margin-inline: auto;
  animation: float 7s ease-in-out infinite;
}

.hero-card {
  position: absolute;
  right: 0;
  bottom: 22px;
  width: 210px;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card small {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.hero-card strong {
  display: block;
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 1.05rem;
}

.hero-card span {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
}

/* -------------------------------- Ticker --------------------------------- */

.ticker {
  background: var(--red);
  color: #fdf6e6;
}

.ticker-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 26px;
  padding: 13px 22px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ticker-inner span {
  display: inline-flex;
  align-items: center;
  gap: 26px;
}

.ticker-inner span::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(253, 246, 230, 0.55);
}

.ticker-inner span:last-child::after {
  display: none;
}

/* -------------------------------- Sezioni -------------------------------- */

.section {
  padding: 82px 0;
}

.section-tight {
  padding: 58px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 42px;
}

.section-head .lead {
  margin-top: 14px;
}

.section-head-side {
  max-width: 380px;
  font-size: 0.92rem;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  padding: 32px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  border-radius: 16px;
  background: var(--cream-deep);
  color: var(--red);
}

.feature-icon svg {
  width: 26px;
  height: 26px;
}

.feature-card h3 {
  font-size: 1.35rem;
}

.feature-card p {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 18px;
  right: 0;
  font-family: var(--serif);
  font-size: 2.4rem;
  color: rgba(174, 28, 43, 0.18);
  line-height: 1;
}

.step h3 {
  margin-top: 12px;
  font-size: 1.35rem;
}

.step p {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 34ch;
}

/* -------------------------------- Locali --------------------------------- */

.locations {
  background: var(--cream-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.location-card {
  padding: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.location-card h3 {
  font-size: 1.24rem;
}

.location-card .city {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.location-card p {
  font-size: 0.88rem;
  color: var(--muted);
}

.location-card .hours {
  margin-top: 8px;
  font-size: 0.8rem;
}

.location-card .hours .delivery-label {
  display: inline-block;
  margin: 10px 0 4px;
  color: var(--red);
}

.location-card .location-offline {
  margin-top: 6px;
  color: var(--red);
  font-weight: 700;
}

.location-card .location-actions {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.location-card .phone {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.location-card .phone:hover {
  color: var(--red);
}

.location-card .map-link {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--red);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

.location-card .map-link:hover {
  opacity: 0.75;
}

.skeleton-card {
  height: 210px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, #efe4cf 30%, #f8f0e2 50%, #efe4cf 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

/* ---------------------------------- CTA ---------------------------------- */

.cta-section {
  padding: 0;
}

.cta-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 30px;
  padding: 58px 54px;
  background: var(--ink);
  border-radius: 30px;
  color: var(--cream);
}

.cta-panel::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -170px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(195, 148, 54, 0.32);
  border-radius: 50%;
}

.cta-panel::before {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -120px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(195, 148, 54, 0.18);
  border-radius: 50%;
}

.cta-panel h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
}

.cta-panel p {
  margin-top: 14px;
  max-width: 50ch;
  color: rgba(249, 244, 233, 0.72);
  font-size: 0.95rem;
}

.cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}

.btn-gold:hover {
  background: #d3a54a;
}

/* -------------------------------- Footer --------------------------------- */

.site-footer {
  margin-top: 88px;
  padding: 64px 0 28px;
  background: #191512;
  color: rgba(249, 244, 233, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 38px;
}

.footer-brand .brand-text strong {
  color: var(--cream);
}

.footer-brand p {
  margin-top: 18px;
  max-width: 30ch;
  font-size: 0.85rem;
}

.footer-title {
  margin-bottom: 16px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.86rem;
}

.footer-links a:hover {
  color: var(--cream);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(249, 244, 233, 0.12);
  font-size: 0.76rem;
  color: rgba(249, 244, 233, 0.5);
}

/* ------------------------------ Intestazioni ----------------------------- */

.page-head {
  padding: 58px 0 38px;
}

.page-head .lead {
  margin-top: 14px;
}

.page-head-inner {
  max-width: 760px;
}

.page-head-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

/* --------------------------------- Menù ---------------------------------- */

.menu-main {
  padding-bottom: 10px;
}

.menu-toolbar {
  position: sticky;
  top: var(--header-height);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  background: rgba(249, 244, 233, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  flex-shrink: 0;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.pill:hover {
  border-color: var(--ink);
}

.pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.menu-search {
  position: relative;
  margin-left: auto;
  width: 250px;
  flex-shrink: 0;
}

.menu-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.menu-search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.84rem;
}

.menu-search input:focus {
  outline: 2px solid rgba(174, 28, 43, 0.35);
  outline-offset: 1px;
  border-color: var(--red);
}

.menu-body {
  padding: 40px 0 20px;
}

.menu-category {
  margin-bottom: 52px;
}

.menu-category-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
}

.menu-category-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.menu-category-head span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.pizza-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pizza-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pizza-card:hover {
  transform: translateY(-4px);
  border-color: rgba(174, 28, 43, 0.3);
  box-shadow: var(--shadow-sm);
}

.pizza-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pizza-card h3 {
  font-size: 1.38rem;
  line-height: 1.15;
}

.pizza-card-side {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
}

.pizza-tag {
  flex-shrink: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.favorite-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease,
    transform 0.18s ease;
}

.favorite-toggle svg {
  width: 16px;
  height: 16px;
}

.favorite-toggle:hover {
  color: var(--red);
  border-color: rgba(174, 28, 43, 0.45);
  transform: scale(1.06);
}

.favorite-toggle.is-active {
  color: var(--red);
  border-color: rgba(174, 28, 43, 0.45);
  background: var(--red-soft);
}

.favorite-toggle:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.pizza-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

.pizza-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 8px;
}

.price-chip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  background: var(--cream-deep);
  line-height: 1.25;
}

.price-chip small {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.price-chip strong {
  font-size: 0.86rem;
}

.pizza-card .btn {
  margin-top: 4px;
}

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

.menu-note {
  display: flex;
  gap: 12px;
  margin: 8px 0 44px;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--muted);
  background: rgba(255, 253, 247, 0.6);
}

.menu-note svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gold);
}

/* --------------------------------- Modale -------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 21, 18, 0.58);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease;
}

.modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(710px, 100%);
  max-height: calc(100vh - 44px);
  background: var(--paper);
  border-radius: 26px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.5);
  animation: riseIn 0.26s ease;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px 0;
}

.modal-head h2 {
  font-size: 1.9rem;
  line-height: 1.1;
}

.modal-head p {
  margin-top: 6px;
  font-size: 0.84rem;
  color: var(--muted);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.icon-button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 28px;
  overflow-y: auto;
}

.modal-body fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.modal-body legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.modal-body legend span {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
  font-weight: 600;
}

.size-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.option-card {
  cursor: pointer;
}

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.83rem;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.option-card span em {
  font-style: normal;
  font-weight: 700;
}

.option-card input:checked + span {
  border-color: var(--red);
  background: var(--red-soft);
}

.option-card input:focus-visible + span {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 14px;
}

.check-grid.is-scroll {
  max-height: 188px;
  overflow-y: auto;
  padding-right: 6px;
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.check:hover {
  background: var(--cream);
}

.check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--red);
  flex-shrink: 0;
}

.check span {
  flex: 1;
}

.check em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.check:has(input:not(:checked)) span {
  text-decoration: line-through;
  opacity: 0.55;
}

.check.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.check.is-disabled:hover {
  background: transparent;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px 22px;
  border-top: 1px solid var(--line);
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.qty-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.qty-button:hover {
  background: var(--cream);
}

.qty-button[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}

.stepper-value {
  min-width: 30px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.modal-add {
  min-width: 210px;
}

/* ------------------------------- Carrello -------------------------------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 21, 18, 0.5);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  height: 100%;
  background: var(--paper);
  box-shadow: -30px 0 70px -40px rgba(0, 0, 0, 0.6);
  animation: slideIn 0.26s ease;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  font-size: 1.55rem;
}

.drawer-head span {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--muted);
}

.drawer-body {
  flex: 1;
  padding: 8px 24px 20px;
  overflow-y: auto;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 100%;
  min-height: 280px;
  text-align: center;
  color: var(--muted);
}

.cart-empty svg {
  width: 44px;
  height: 44px;
  color: var(--gold);
}

.cart-empty h3 {
  font-size: 1.3rem;
  color: var(--ink);
}

.cart-empty p {
  max-width: 28ch;
  font-size: 0.85rem;
}

.cart-line {
  padding: 18px 0;
  border-bottom: 1px dashed var(--line);
}

.cart-line:last-child {
  border-bottom: 0;
}

.cart-line-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.cart-line h3 {
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
}

.cart-line .cart-size {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  color: var(--muted);
}

.cart-line .line-total {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.cart-line .cart-custom {
  margin-top: 7px;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}

.cart-line .cart-custom b {
  color: var(--ink-soft);
  font-weight: 600;
}

.cart-line-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.cart-line-actions .stepper {
  transform: scale(0.9);
  transform-origin: left center;
}

.remove-line {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.remove-line:hover {
  color: var(--red);
}

.drawer-foot {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--line);
  background: var(--cream);
}

.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.88rem;
}

.summary-row + .summary-row {
  margin-top: 7px;
}

.summary-row.is-total {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}

.summary-row.is-total strong {
  font-family: var(--serif);
  font-size: 1.45rem;
}

.drawer-hint {
  margin-top: 9px;
  font-size: 0.72rem;
  color: var(--muted);
}

.drawer-foot .btn {
  margin-top: 16px;
}

.drawer-clear {
  width: 100%;
  margin-top: 9px;
  border: 0;
  background: transparent;
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.drawer-clear:hover {
  color: var(--red);
}

/* -------------------------------- Checkout ------------------------------- */

.checkout-main {
  padding-bottom: 30px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 30px;
  align-items: start;
}

.card {
  padding: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.card + .card {
  margin-top: 20px;
}

.card-title {
  margin-bottom: 22px;
  font-size: 1.45rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.is-wide {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.9rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
  resize: vertical;
  min-height: 88px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(174, 28, 43, 0.12);
}

.field .hint {
  font-size: 0.72rem;
  color: var(--muted);
}

.type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.type-option span strong {
  font-size: 0.88rem;
}

.type-option span small {
  font-size: 0.72rem;
  color: var(--muted);
}

.type-option input:checked + span {
  border-color: var(--red);
  background: var(--red-soft);
}

.type-option input:focus-visible + span {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.checkout-submit {
  margin-top: 24px;
}

.form-error {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--red-soft);
  color: var(--red-dark);
  font-size: 0.82rem;
}

.form-success {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: #e3efe7;
  color: var(--green);
  font-size: 0.82rem;
}

#forgotPasswordToggle {
  display: block;
  margin: 14px auto 0;
}

.reset-card {
  max-width: 440px;
  margin: 0 auto 64px;
}

.reset-footer {
  margin: 18px 0 0;
  text-align: center;
}

.account-verify {
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.summary-card {
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.summary-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.86rem;
}

.summary-item-info strong {
  display: block;
  font-size: 0.88rem;
}

.summary-item-info span {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--muted);
}

.summary-item-price {
  white-space: nowrap;
  font-weight: 700;
}

.summary-totals {
  padding-top: 16px;
}

.payment-note {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  font-size: 0.76rem;
  color: var(--muted);
}

.payment-note svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: var(--gold);
}

.empty-state {
  max-width: 560px;
  margin: 60px auto;
  padding: 48px 34px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.empty-state .feature-icon {
  margin-inline: auto;
}

.empty-state h2 {
  font-size: 1.7rem;
}

.empty-state p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state .btn {
  margin-top: 22px;
}

.confirmation {
  max-width: 680px;
  margin: 30px auto 0;
  padding: 48px 38px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.confirmation-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(47, 107, 79, 0.12);
  color: var(--green);
}

.confirmation-icon svg {
  width: 30px;
  height: 30px;
}

.confirmation h1 {
  font-size: 2rem;
}

.confirmation .order-code {
  display: inline-block;
  margin-top: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--cream-deep);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.confirmation p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.confirmation-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 26px 0;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--cream);
  text-align: left;
  font-size: 0.82rem;
}

.confirmation-details small {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.confirmation-details strong {
  display: block;
  margin-top: 3px;
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* --------------------------------- Account ------------------------------- */

.account-main {
  padding-bottom: 30px;
}

.account-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 34px;
}

.account-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.auth-aside {
  padding: 38px;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-lg);
}

.auth-aside h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.auth-aside p {
  margin-top: 16px;
  color: rgba(249, 244, 233, 0.72);
  font-size: 0.9rem;
}

.auth-perks {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 26px;
  font-size: 0.85rem;
}

.auth-perks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.auth-perks .check-icon {
  background: rgba(195, 148, 54, 0.16);
  color: var(--gold);
}

.auth-card {
  padding: 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 26px;
  border-radius: 999px;
  background: var(--cream);
}

.tab {
  flex: 1;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--muted);
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.tab.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 4px 10px -4px rgba(33, 28, 24, 0.25);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.auth-form .btn {
  margin-top: 6px;
}

.form-hint {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  font-size: 0.75rem;
  color: var(--muted);
}

.form-hint code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(33, 28, 24, 0.07);
  font-family: Consolas, monospace;
  font-size: 0.72rem;
  white-space: nowrap;
}

.profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 34px;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
}

.profile-main h2 {
  font-size: 1.5rem;
}

.profile-main p {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--muted);
}

.profile-actions {
  display: flex;
  gap: 10px;
}

.orders-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.orders-head h2 {
  font-size: 1.7rem;
}

.orders-head span {
  font-size: 0.75rem;
  color: var(--muted);
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-card {
  padding: 24px 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.order-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.order-code {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--muted);
}

.order-card-head h3 {
  margin-top: 3px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
}

.order-meta {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.order-side {
  text-align: right;
}

.order-side strong {
  display: block;
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: var(--cream-deep);
  color: var(--ink-soft);
}

.status-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-chip[data-status="pending"] {
  background: #f7ecd4;
  color: #8a6416;
}

.status-chip[data-status="confirmed"] {
  background: #e3efe7;
  color: var(--green);
}

.status-chip[data-status="preparing"] {
  background: #e6ecf7;
  color: #315a9a;
}

.status-chip[data-status="delivering"] {
  background: var(--red-soft);
  color: var(--red);
}

.status-chip[data-status="completed"] {
  background: #e3efe7;
  color: var(--green);
}

.status-chip[data-status="cancelled"] {
  background: #efe7e5;
  color: #8a3b34;
}

.order-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0;
}

.order-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.85rem;
}

.order-item strong {
  font-weight: 650;
}

.order-item small {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

.order-item .price {
  white-space: nowrap;
  font-weight: 700;
}

.order-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

.order-foot strong {
  color: var(--ink);
}

/* ------------------------------ Area personale ---------------------------- */

.btn-danger {
  background: var(--red-soft);
  border-color: rgba(174, 28, 43, 0.35);
  color: var(--red-dark);
}

.btn-danger:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.profile-location {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px !important;
}

.profile-security-link {
  margin-top: 6px !important;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:hover {
  color: var(--red-dark);
}

.link-button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 3px;
}

.account-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.account-badge.is-ok {
  background: #e3efe7;
  color: var(--green);
}

.account-badge.is-warn {
  background: #f7ecd4;
  color: #8a6416;
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.account-stat {
  padding: 20px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.account-stat span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.account-stat strong {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.account-section {
  margin-bottom: 34px;
}

.account-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.account-section-head h2 {
  font-size: 1.7rem;
}

.account-section-head span {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.account-panel {
  padding: 24px 26px;
  margin-top: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.account-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.account-panel-head h2 {
  font-size: 1.25rem;
}

.account-note {
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.account-note strong {
  color: var(--ink);
}

.account-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.account-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  cursor: pointer;
}

.account-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--red);
}

.active-order-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px 28px;
  margin-bottom: 34px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--cream);
}

.active-order-banner .eyebrow {
  margin-bottom: 8px;
  color: var(--gold);
}

.active-order-banner h2 {
  font-size: 1.8rem;
}

.active-order-banner p {
  margin-top: 6px;
  font-size: 0.85rem;
  color: rgba(249, 244, 233, 0.72);
}

.active-order-side {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.active-order-side strong {
  font-family: var(--serif);
  font-size: 1.4rem;
}

.active-order-side .btn-outline {
  border-color: rgba(249, 244, 233, 0.4);
  color: var(--cream);
}

.active-order-side .btn-outline:hover {
  border-color: var(--cream);
  background: rgba(249, 244, 233, 0.1);
}

.active-order-side .btn-danger {
  background: rgba(174, 28, 43, 0.2);
  border-color: rgba(249, 244, 233, 0.3);
  color: var(--cream);
}

.active-order-side .btn-danger:hover {
  background: var(--red);
  border-color: var(--red);
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.orders-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.orders-search input,
.orders-controls select {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.82rem;
}

.orders-search input {
  width: min(260px, 60vw);
}

.orders-search input:focus,
.orders-controls select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(174, 28, 43, 0.12);
}

.address-grid,
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.address-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.address-card.is-default {
  border-color: rgba(174, 28, 43, 0.45);
  box-shadow: inset 0 0 0 1px rgba(174, 28, 43, 0.18);
}

.address-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.address-card-head strong {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.address-card p {
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.address-card small {
  font-size: 0.75rem;
  color: var(--muted);
}

.address-card .account-inline-actions {
  margin-top: 10px;
}

.favorite-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.favorite-card h3 {
  margin-top: 4px;
  font-size: 1.15rem;
}

.favorite-card p {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.favorite-category {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--red);
}

.account-section .menu-empty {
  padding: 32px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.55);
  font-size: 0.85rem;
}

/* --------------------------------- Toast --------------------------------- */

.toast-container {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 44px));
}

.toast {
  padding: 13px 16px 13px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.82rem;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--gold);
  animation: toastIn 0.24s ease;
}

.toast-success {
  border-left-color: #57a37c;
}

.toast-error {
  border-left-color: var(--red);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

/* ---------------------------------- 404 ---------------------------------- */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  text-align: center;
}

.not-found h1 {
  margin-top: 16px;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
}

.not-found p {
  margin-top: 14px;
  max-width: 42ch;
  color: var(--muted);
}

.not-found .btn {
  margin-top: 26px;
}

/* -------------------------------- Animazioni ----------------------------- */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------- Responsive ------------------------------ */

@media (max-width: 1020px) {
  .main-nav {
    gap: 20px;
    margin-left: 10px;
    font-size: 0.82rem;
  }

  .hero-grid {
    gap: 34px;
  }

  .pizza-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .location-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }

  .footer-grid > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 70px;
  }

  .nav-toggle {
    display: grid;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 10px 22px 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
  }

  .site-header.nav-open .main-nav {
    display: flex;
  }

  .main-nav a {
    padding: 12px 4px;
    border-bottom: 1px solid rgba(33, 28, 24, 0.06);
    font-size: 0.95rem;
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .main-nav a::after {
    display: none;
  }

  .hero {
    padding: 54px 0 66px;
  }

  .hero-grid,
  .auth-layout,
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
    max-width: 470px;
    margin: 0 auto;
  }

  .hero-card {
    right: 8px;
    bottom: 4px;
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .section-head-side {
    max-width: 100%;
  }

  .feature-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    padding-top: 20px;
  }

  .cta-panel {
    grid-template-columns: 1fr;
    padding: 42px 34px;
  }

  .cta-actions {
    justify-content: flex-start;
  }

  .summary-card {
    position: static;
  }

  .menu-toolbar {
    flex-wrap: wrap;
  }

  .menu-search {
    width: 100%;
    margin-left: 0;
  }

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

  .checkout-grid {
    gap: 22px;
  }

  .auth-aside {
    padding: 30px;
  }

  .auth-layout {
    gap: 24px;
  }

  .active-order-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .account-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .orders-controls {
    width: 100%;
  }

  .orders-search {
    flex: 1 1 100%;
  }

  .orders-search input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 66px;
  }

  .container {
    width: calc(100% - 32px);
  }

  .brand-text strong {
    font-size: 1.18rem;
  }

  .brand-slice {
    width: 34px;
    height: 34px;
  }

  .header-inner {
    gap: 12px;
  }

  .header-actions {
    gap: 7px;
  }

  .cart-button,
  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .btn {
    padding: 12px 20px;
  }

  .title-xl {
    font-size: clamp(2.3rem, 11vw, 3.2rem);
  }

  .hero-points {
    gap: 10px 18px;
  }

  .hero-card {
    width: 180px;
    padding: 13px 15px;
  }

  .pizza-grid,
  .location-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .page-head {
    padding: 40px 0 26px;
  }

  .page-head-split {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-body {
    padding-top: 28px;
  }

  .menu-category {
    margin-bottom: 40px;
  }

  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-panel {
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
  }

  .modal-head {
    padding: 22px 20px 0;
  }

  .modal-body {
    padding: 20px 20px;
  }

  .modal-foot {
    padding: 16px 20px 20px;
    flex-wrap: wrap;
  }

  .modal-add {
    min-width: 0;
    flex: 1;
  }

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

  .form-grid,
  .type-options,
  .confirmation-details {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 22px;
  }

  .summary-card {
    padding: 22px;
  }

  .profile-card {
    padding: 22px;
  }

  .profile-actions {
    width: 100%;
  }

  .profile-actions .btn {
    flex: 1;
  }

  .account-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-card,
  .auth-aside {
    padding: 24px;
  }

  .cta-panel {
    padding: 34px 24px;
    border-radius: 22px;
  }

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

  .footer-bottom {
    flex-direction: column;
  }

  .order-card {
    padding: 20px;
  }

  .order-side {
    text-align: left;
  }

  .account-stats {
    grid-template-columns: 1fr;
  }

  .account-panel {
    padding: 20px;
  }

  .active-order-banner {
    padding: 22px;
  }

  .address-grid,
  .favorites-grid {
    grid-template-columns: 1fr;
  }

  .account-form-actions .btn {
    flex: 1;
  }

  .confirmation {
    padding: 34px 22px;
  }

  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}
