/* =========================================================
   Corte Delizie — static site stylesheet
   ========================================================= */

:root {
  --green-dark: #3e5c2e;
  --green: #5c8a41;
  --green-light: #8fb96a;
  --cream: #fbf6ec;
  --cream-2: #f3ead6;
  --brown: #4a3524;
  --accent: #c1652f;
  --accent-2: #e0964a;
  --text: #3a352e;
  --text-light: #6b6459;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(62, 92, 46, 0.12);
  --radius: 14px;
  --maxw: 1180px;
  --serif: "Crimson Text", Georgia, "Times New Roman", serif;
  --sans: "Roboto", Arial, Helvetica, sans-serif;
  --script: "Chelsea Market", var(--serif);
}

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--green-dark);
  margin: 0 0 .5em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--accent);
  margin-bottom: .8em;
}

.lead {
  font-size: 1.08rem;
  color: var(--text-light);
  max-width: 640px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .85em 1.8em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .03em;
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: all .2s ease;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); transform: translateY(-2px); }
.btn.btn-outline { background: transparent; color: var(--green-dark); border-color: var(--green-dark); }
.btn.btn-outline:hover { background: var(--green-dark); color: var(--white); }
.btn.btn-light { background: var(--white); color: var(--green-dark); border-color: var(--white); }
.btn.btn-light:hover { background: var(--cream); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 246, 236, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(62, 92, 46, 0.12);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand { display: flex; align-items: center; gap: .6em; }
.brand img { height: 52px; width: auto; }
.brand .brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--green-dark);
  line-height: 1.1;
}
.brand .brand-tag {
  display: block;
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.main-nav ul { display: flex; gap: 2.2em; align-items: center; }
.main-nav a {
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .02em;
  color: var(--text);
  padding: .4em 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.main-nav a:hover, .main-nav a.active { color: var(--green); border-color: var(--accent); }
.main-nav a.nav-shop { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  margin: 5px 0;
  background: var(--green-dark);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 90px 0 110px;
  background: radial-gradient(circle at 15% 20%, rgba(143,185,106,.35), transparent 55%),
              radial-gradient(circle at 90% 10%, rgba(193,101,47,.18), transparent 45%),
              linear-gradient(180deg, var(--cream-2), var(--cream));
  overflow: hidden;
  text-align: center;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: .5;
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: .3em;
}
.hero h1 .accent-word { color: var(--accent); }
.hero p.lead { margin: 0 auto 1.8em; }
.hero-actions { display: flex; gap: 1em; justify-content: center; flex-wrap: wrap; }

.page-hero {
  padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--cream-2), var(--cream));
  text-align: center;
}
.page-hero .eyebrow { display: block; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); }

/* ---------- Sections ---------- */
section { padding: 76px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3em; }
.section-head p.lead { margin-left: auto; margin-right: auto; }

.section-alt { background: var(--white); }

.welcome-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.welcome-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--green-dark);
  border-left: 4px solid var(--accent);
  padding-left: 1em;
  margin: 0 0 1em;
}
.signature { height: 44px; margin-top: 1.4em; opacity: .85; }

/* feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2em 1.6em;
  text-align: center;
  box-shadow: var(--shadow);
}
.feature-card .icon {
  width: 56px; height: 56px;
  margin: 0 auto 1em;
  border-radius: 50%;
  background: var(--cream-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: .4em; }
.feature-card p { color: var(--text-light); font-size: .92rem; margin: 0; }

/* product categories teaser (home) */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.cat-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-end;
}
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cat-card:hover img { transform: scale(1.06); }
.cat-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(62,92,46,0) 30%, rgba(37,26,15,.85) 100%);
}
.cat-card .cat-label {
  position: relative; z-index: 1;
  padding: 2em;
  color: var(--white);
}
.cat-card .cat-label span { color: var(--white); font-family: var(--sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.cat-card .cat-label h3 { color: var(--white); font-size: 1.7rem; margin: .2em 0 .5em; }

/* products grid */
.filter-bar {
  display: flex;
  gap: .8em;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.8em;
}
.filter-btn {
  padding: .6em 1.4em;
  border-radius: 999px;
  border: 2px solid var(--green-light);
  background: transparent;
  color: var(--green-dark);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  transition: all .15s;
}
.filter-btn.active, .filter-btn:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 30px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: none;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  transition: transform .2s ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-card .thumb { aspect-ratio: 1/1; overflow: hidden; background: var(--cream-2); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .info { padding: 1.1em 1.3em 1.4em; }
.product-card .tag {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}
.product-card h3 { font-size: 1.08rem; margin: .3em 0 0; }

/* gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.gallery-grid button {
  padding: 0; border: none; cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--cream-2);
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-grid button:hover img { transform: scale(1.08); }

/* ---------- Lightbox / Modal ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(24, 20, 14, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox .lb-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  background: var(--cream);
  border-radius: var(--radius);
}
.lightbox.lb-image .lb-content {
  background: transparent;
  overflow: visible;
  display: flex; flex-direction: column; align-items: center;
}
.lightbox.lb-image img { max-height: 82vh; width: auto; max-width: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-close {
  position: absolute; top: -18px; right: -18px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  z-index: 2;
}
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  color: var(--white);
  border: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
}
.lb-nav:hover { background: rgba(255,255,255,.3); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-caption { color: var(--cream); text-align: center; margin-top: 1em; font-size: .9rem; }

.product-modal-body { display: grid; grid-template-columns: 1fr 1.2fr; }
.product-modal-body .pm-img { background: var(--cream-2); }
.product-modal-body .pm-img img { width: 100%; height: 100%; object-fit: cover; }
.product-modal-body .pm-info { padding: 2.4em 2.2em; }
.product-modal-body .pm-info .tag { color: var(--accent); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.product-modal-body .pm-info h3 { font-size: 1.6rem; margin: .3em 0 .6em; }
.pm-desc { color: var(--text-light); margin-bottom: 1.4em; }
.pm-nutrition { background: var(--cream); border-radius: 10px; padding: 1.2em 1.4em; font-size: .88rem; }
.pm-nutrition h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--green-dark); margin-bottom: .6em; }
.pm-nutrition table { width: 100%; border-collapse: collapse; }
.pm-nutrition td { padding: .3em 0; border-bottom: 1px dashed rgba(62,92,46,.18); color: var(--text-light); }
.pm-nutrition td:last-child { text-align: right; font-weight: 700; color: var(--text); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 50px;
}
.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.2em;
  box-shadow: var(--shadow);
}
.info-row { display: flex; gap: 1em; align-items: flex-start; margin-bottom: 1.6em; }
.info-row:last-child { margin-bottom: 0; }
.info-row .ic {
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  background: var(--cream-2);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.info-row h4 { margin: 0 0 .15em; font-size: .95rem; font-family: var(--sans); color: var(--text); }
.info-row p, .info-row a { margin: 0; color: var(--text-light); font-size: .95rem; }
.info-row a:hover { color: var(--accent); }

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.4em;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1.3em; }
.field label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: .4em; color: var(--green-dark); }
.field input, .field textarea {
  width: 100%;
  padding: .8em 1em;
  border: 1.5px solid rgba(62,92,46,.2);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: .95rem;
  background: var(--cream);
  color: var(--text);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.form-note { font-size: .82rem; color: var(--text-light); margin-top: 1em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-dark); color: rgba(255,255,255,.85); padding: 60px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: var(--white); font-family: var(--sans); font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.1em; }
.footer-brand { display: flex; align-items: center; gap: .7em; margin-bottom: 1em; }
.footer-brand img { height: 40px; }
.footer-brand span { font-family: var(--serif); font-size: 1.15rem; color: var(--white); }
.site-footer p { font-size: .9rem; color: rgba(255,255,255,.7); }
.footer-grid li { margin-bottom: .7em; font-size: .92rem; }
.footer-grid a:hover { color: var(--accent-2); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
}

/* ---------- Utilities ---------- */
.mt-lg { margin-top: 3em; }
.text-center { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .welcome-grid, .contact-grid, .product-modal-body { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .main-nav { position: fixed; top: 84px; left: 0; right: 0; background: var(--cream); box-shadow: var(--shadow); max-height: 0; overflow: hidden; transition: max-height .25s ease; }
  .main-nav.open { max-height: 400px; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 24px 24px; }
  .main-nav li { width: 100%; }
  .main-nav a { display: block; padding: .8em 0; }
  .nav-toggle { display: block; }
  .cat-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 54px 0; }
  .lb-nav { width: 40px; height: 40px; font-size: 1.3rem; }
}
