/* Spesa nel Borgo */
:root {
  --spesa-green: #2f6b3c;
  --spesa-green-deep: #1e4a2a;
  --spesa-ink: #1a2e22;
  --spesa-cream: #f3f7f0;
  --spesa-mist: #e4efe3;
  --spesa-accent: #c4783a;
  --spesa-line: rgba(47, 107, 60, 0.18);
}

.spesa-hero {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.25rem 1.25rem;
  overflow: hidden;
  color: var(--spesa-ink);
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(255, 255, 255, 0.85) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 15% 85%, rgba(47, 107, 60, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 45% at 90% 70%, rgba(196, 120, 58, 0.1) 0%, transparent 45%),
    linear-gradient(165deg, #f7faf5 0%, var(--spesa-mist) 45%, #d8e8d6 100%);
}

.spesa-hero--compact {
  min-height: 0;
  padding-bottom: 0.75rem;
}

.spesa-hero--compact .spesa-hero__logo {
  width: min(52vw, 220px);
}

.spesa-hero--compact .spesa-hero__lead {
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  max-width: 32rem;
}

.spesa-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(47, 107, 60, 0.08) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(47, 107, 60, 0.07) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 40% 80%, rgba(47, 107, 60, 0.06) 0 2px, transparent 3px);
  background-size: 48px 48px, 36px 36px, 56px 56px;
  animation: spesa-drift 28s linear infinite;
}

.spesa-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18%;
  width: 120%;
  height: 42%;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(47, 107, 60, 0.14) 0%, transparent 70%);
}

@keyframes spesa-drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 48px 36px, -36px 24px, 28px -40px; }
}

.spesa-hero__inner {
  position: relative;
  z-index: 1;
  width: min(100%, 36rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  animation: spesa-rise 0.85s ease-out both;
}

@keyframes spesa-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.spesa-hero__brand {
  margin: 0;
  line-height: 0;
}

.spesa-hero__logo {
  width: min(78vw, 340px);
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 28px rgba(30, 74, 42, 0.18));
  animation: spesa-logo-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes spesa-logo-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.spesa-hero__lead {
  margin: 0;
  max-width: 28rem;
  font-family: Lora, Georgia, serif;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--spesa-green-deep);
}

.spesa-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.spesa-btn {
  display: inline-block;
  background: var(--spesa-green);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 4px;
  padding: 0.7rem 1.2rem;
  font: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(30, 74, 42, 0.18);
}

.spesa-btn:hover {
  background: var(--spesa-green-deep);
  transform: translateY(-1px);
}

.spesa-btn--ghost {
  background: transparent;
  color: var(--spesa-green-deep);
  border: 1px solid rgba(47, 107, 60, 0.45);
  box-shadow: none;
}

.spesa-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--spesa-green-deep);
}

.spesa-section { padding: 1.75rem 1.25rem; max-width: 960px; margin: 0 auto; }
.spesa-section--catalog {
  padding-top: 1.25rem;
  max-width: 1040px;
}
.spesa-section--muted {
  background: rgba(228, 239, 227, 0.45);
  max-width: none;
  padding-left: max(1.25rem, calc((100% - 960px) / 2 + 1.25rem));
  padding-right: max(1.25rem, calc((100% - 960px) / 2 + 1.25rem));
}
.spesa-catalog-title {
  text-align: center;
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}
.spesa-catalog-sub {
  text-align: center;
  margin: 0 auto 1.35rem;
  max-width: 32rem;
  color: #456;
}
.spesa-section h2 { font-family: Lora, Georgia, serif; color: var(--spesa-green); }
.spesa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.spesa-grid--showcase {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}
@media (max-width: 820px) {
  .spesa-grid--showcase { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}
.spesa-card {
  border: 1px solid var(--spesa-line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(30, 74, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.spesa-card--product:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(30, 74, 42, 0.14);
}
.spesa-card__media {
  background: linear-gradient(160deg, #eef5ec, #dfeadf);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.spesa-card__media img,
.spesa-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--spesa-cream);
}
.spesa-card__body { padding: 1rem 1.05rem 1.15rem; flex: 1; display: flex; flex-direction: column; gap: 0.45rem; }
.spesa-card__body h3 {
  margin: 0;
  font-family: Lora, Georgia, serif;
  font-size: 1.2rem;
  color: var(--spesa-ink);
}
.spesa-card__price {
  margin-top: auto;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--spesa-green-deep);
}
.spesa-card__price-label {
  font-weight: 500;
  font-size: 0.85rem;
  color: #678;
  margin-right: 0.15rem;
}
.spesa-btn--block {
  width: 100%;
  text-align: center;
  margin-top: 0.35rem;
}
.spesa-btn--added {
  background: var(--spesa-green-deep) !important;
}
.spesa-cart {
  position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--spesa-line);
  padding: .75rem 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.spesa-note {
  border-left: 3px solid var(--spesa-accent);
  padding: .5rem 0 .5rem .85rem;
  background: var(--spesa-cream);
}
.spesa-form label { display: block; margin: .6rem 0 .25rem; font-weight: 600; }
.spesa-form input, .spesa-form textarea, .spesa-form select {
  width: 100%; max-width: 420px; padding: .5rem .65rem; border: 1px solid var(--spesa-line); border-radius: 4px; font: inherit;
}
.spesa-breakdown { list-style: none; padding: 0; margin: 1rem 0; }
.spesa-breakdown li { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px dashed var(--spesa-line); }
.spesa-status { padding: .75rem 1rem; border-radius: 4px; background: var(--spesa-cream); margin: 1rem 0; }
.spesa-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spesa-table th, .spesa-table td { border-bottom: 1px solid var(--spesa-line); padding: .5rem; text-align: left; }
.spesa-muted { color: #556; font-size: .92rem; }
body.spesa-ops { background: #f4f6f4; }
.spesa-ops main { max-width: 880px; margin: 1rem auto; padding: 0 1rem 2rem; }
.spesa-ops header { background: var(--spesa-green); color: #fff; padding: 1rem 1.25rem; }

@media (max-width: 520px) {
  .spesa-hero { padding-top: 1.25rem; }
  .spesa-hero--compact .spesa-hero__logo { width: min(58vw, 200px); }
}
