/* ================================================================
   MÂINE GĂTIM — design system
   Mobile-first (320px+), o singură coloană, o idee pe ecran.
   Paletă: ivoire cald, text cărbune, accent verde pădure.
   ================================================================ */

:root {
  --bg: #F7F4EE;            /* ivoire cald */
  --bg-2: #F1ECE2;          /* ivoire ușor mai închis (banner, card hover) */
  --surface: #FFFFFF;       /* carduri */
  --text: #111111;          /* cărbune */
  --text-2: #4A463E;        /* cărbune atenuat */
  --muted: #8B8478;         /* gri cald */
  --accent: #1C4731;        /* verde pădure */
  --accent-2: #153425;      /* verde pădure închis (hover/active) */
  --accent-soft: #EDE5D4;   /* bej-gălbui (badge) */
  --border: #E8E2D6;        /* contur fin */
  --danger: #B3261E;        /* roșu pentru erori */
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(17, 17, 17, 0.06);
  --shadow-lg: 0 4px 24px rgba(17, 17, 17, 0.10);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --touch: 44px;            /* zonă de apăsare minimă */
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Accesibilitate: focus vizibil la tastatură */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

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

button, a, input, select { font-family: inherit; }

/* ---------- Layout container ---------- */
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Antet ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 12px;
}
.brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  padding: 10px 0;
}
.brand em { font-style: normal; color: var(--accent); }

.nav-desktop { display: none; }
.nav-desktop a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 10px;
}
.nav-desktop a:hover { background: var(--bg-2); color: var(--text); }
.nav-desktop a[aria-current="page"] { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  position: relative;
  text-decoration: none;
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn svg { width: 24px; height: 24px; }

.cart-count {
  position: absolute;
  top: 4px; right: 2px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Meniu mobil (hamburger) */
.menu-toggle { display: inline-flex; }
.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  padding: 8px 0 16px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 14px 4px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a[aria-current="page"] { color: var(--accent); }

/* ---------- Butoane ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch);
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent-soft); }
.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 54px; padding: 14px 28px; font-size: 1.05rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero { padding: 28px 0 8px; }
.hero h1 {
  font-size: 2.2rem;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.hero .sub {
  font-size: 1.1rem;
  color: var(--text-2);
  margin: 0 0 22px;
  font-weight: 500;
}
.hero .btn-primary { margin-bottom: 26px; }
.hero-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
}
.hero-figure img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ---------- Titluri de secțiune ---------- */
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
}
.section-sub { color: var(--text-2); margin: 0 0 18px; font-size: 0.98rem; }

/* ---------- Selector persoane (segmented) ---------- */
.seg {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}
.seg button {
  min-height: 40px;
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

/* ---------- Lista de rețete (mobil: verticală) ---------- */
.recipe-list { display: flex; flex-direction: column; gap: 12px; }
.recipe-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}
.recipe-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.recipe-card .thumb {
  flex: 0 0 84px;
  width: 84px; height: 84px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-2);
}
.recipe-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.recipe-card .body { flex: 1; min-width: 0; }
.recipe-card .title { font-weight: 700; font-size: 1.02rem; margin: 0 0 4px; }
.recipe-card .tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.recipe-card .chev { flex: 0 0 auto; color: var(--muted); }
.recipe-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.recipe-card .check {
  position: absolute; top: 8px; left: 8px;
  background: var(--accent); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800;
}

/* Card grid (desktop) */
.card-grid { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Banner CTA ---------- */
.banner {
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.banner h3 { margin: 0; font-size: 1.25rem; font-weight: 800; }
.banner p { margin: 0; color: var(--text-2); }

/* ---------- Secțiuni generice ---------- */
.section { padding: 30px 0; }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  box-shadow: var(--shadow);
}

/* ---------- Listă cumpărături ---------- */
.ing-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.ing-row:last-child { border-bottom: none; }
.ing-row .info { flex: 1; min-width: 0; }
.ing-row .name { font-weight: 600; font-size: 0.98rem; }
.ing-row .meta { color: var(--text-2); font-size: 0.85rem; }
.ing-row .price { font-weight: 700; white-space: nowrap; }
.ing-row .need { color: var(--accent); font-weight: 700; }
.ing-row .unavail { color: var(--danger); font-size: 0.82rem; font-weight: 600; }
.ing-check {
  flex: 0 0 var(--touch);
  width: var(--touch); height: var(--touch);
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.ing-check[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.ing-group-title {
  font-size: 0.8rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted);
  margin: 22px 0 4px;
}

/* ---------- Coș ---------- */
.cart-group { margin-bottom: 24px; }
.cart-group h4 {
  margin: 0 0 10px; font-size: 0.95rem; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
}
.ship-badge {
  font-size: 0.72rem; font-weight: 700; background: var(--accent-soft);
  color: var(--accent); padding: 2px 8px; border-radius: 999px;
}
.cart-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border); gap: 10px;
}
.cart-line:last-child { border-bottom: none; }
.cart-line .l { flex: 1; min-width: 0; }
.cart-line .l .n { font-weight: 600; font-size: 0.95rem; }
.cart-line .l .m { color: var(--muted); font-size: 0.82rem; }
.cart-line .r { font-weight: 700; white-space: nowrap; }
.qty-ctrl { display: inline-flex; align-items: center; gap: 8px; }
.qty-ctrl button {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 1.1rem; font-weight: 700; cursor: pointer; color: var(--text);
}
.qty-ctrl button:hover { border-color: var(--accent); color: var(--accent); }
.totals { border-top: 2px solid var(--border); margin-top: 16px; padding-top: 16px; }
.totals .row { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .row.grand { font-size: 1.2rem; font-weight: 800; padding-top: 10px; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input {
  min-height: var(--touch);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
}
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(28, 71, 49, 0.12); }

.msg { padding: 12px 16px; border-radius: 12px; font-size: 0.92rem; font-weight: 500; }
.msg.ok { background: #E4F2E8; color: #14532D; }
.msg.err { background: #FBE9E7; color: var(--danger); }
.msg.info { background: var(--accent-soft); color: var(--accent); }

/* ---------- Producători / cămară ---------- */
.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.cat-pills button {
  min-height: 40px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-weight: 600; font-size: 0.9rem; cursor: pointer;
}
.cat-pills button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.camara-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.camara-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.camara-card .im { aspect-ratio: 1/1; background: var(--bg-2); }
.camara-card .im img { width: 100%; height: 100%; object-fit: cover; }
.camara-card .bd { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.camara-card .nm { font-weight: 700; font-size: 1rem; }
.camara-card .pr { color: var(--text-2); font-size: 0.85rem; }
.camara-card .ft { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.camara-card .pr2 { font-weight: 800; font-size: 1.1rem; color: var(--accent); }

/* ---------- Utilitare ---------- */
.muted { color: var(--muted); }
.center { text-align: center; }
.mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 28px; }
.note { color: var(--text-2); font-size: 0.88rem; line-height: 1.5; }
.badge-demo {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 3px 8px; border-radius: 999px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 12px 20px;
  font-weight: 700; text-decoration: none; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

.footer {
  border-top: 1px solid var(--border);
  margin-top: 40px; padding: 24px 0 32px;
  color: var(--muted); font-size: 0.85rem; text-align: center;
}

/* ================================================================
   DESKTOP — extindem grila, nu întindem interfața de telefon
   ================================================================ */
@media (min-width: 768px) {
  .wrap { padding: 0 32px; }
  .nav-desktop { display: flex; gap: 4px; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }

  .hero {
    padding: 48px 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
  }
  .hero h1 { font-size: 3.4rem; }
  .hero .sub { font-size: 1.2rem; }
  .hero-figure { margin: 0; order: 2; }

  .card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .card-grid .recipe-card {
    flex-direction: column; align-items: stretch; text-align: left;
  }
  .card-grid .recipe-card .thumb {
    flex: none; width: 100%; height: 170px;
  }
  .card-grid .recipe-card .chev { display: none; }

  .banner {
    flex-direction: row; align-items: center; justify-content: space-between;
    padding: 26px 30px;
  }
  .camara-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 4rem; }
  .camara-grid { grid-template-columns: repeat(3, 1fr); }
}
