/* ROCCA Fatti in Casa — estilos del sitio público */

:root {
  --cream: #f8f1e4;
  --cream-2: #f1e6d2;
  --paper: #fffaf1;
  --blue: #2f5d9e;
  --blue-2: #4a7cc2;
  --blue-soft: #dfe8f5;
  --navy: #1d3557;
  --ink: #2a2a2a;
  --muted: #6b665e;
  --line: #e6dac4;
  --terra: #c4553a;
  --wa: #1fa855;
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(29, 53, 87, .25);
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Caveat", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--navy); line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
p { margin: 0 0 1em; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.kicker { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--terra); margin: 0 0 .6em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 999px; border: 2px solid transparent;
  font: 800 .95rem var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px var(--blue); }
.btn-primary:hover { background: var(--navy); }
.btn-ghost { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-ghost:hover { background: var(--blue); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #178b45; }
.btn-sm { padding: .55em 1.1em; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-text { background: none; border: 0; color: var(--muted); font: 600 .85rem var(--sans); cursor: pointer; text-decoration: underline; margin-top: .6rem; }

/* ---------- top bar + header ---------- */
.topbar { background: var(--navy); color: #fff; text-align: center; font-size: .85rem; font-weight: 600; padding: .5em 16px; }
.header { position: sticky; top: 0; z-index: 40; background: rgba(248, 241, 228, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--blue); color: var(--blue);
  font: 1.35rem var(--serif);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1; }
.brand-txt strong { font: 1.4rem var(--serif); color: var(--blue); letter-spacing: .06em; }
.brand-txt em { font: 600 1.05rem var(--script); color: var(--terra); font-style: normal; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 700; font-size: .95rem; color: var(--navy); position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--terra); transition: width .2s; }
.nav a:hover::after { width: 100%; }
.burger { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 64px 0 40px;
  background:
    radial-gradient(circle at 85% 20%, var(--blue-soft) 0, transparent 40%),
    radial-gradient(circle at 10% 90%, var(--cream-2) 0, transparent 45%);
}
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: .35em; }
.hero h1 span { color: var(--blue); font-style: italic; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-badge { position: relative; width: min(380px, 100%); aspect-ratio: 1; margin-inline: auto; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 40s linear infinite; }
.ring text { font: 800 15.5px var(--sans); letter-spacing: 3.4px; fill: var(--blue-2); }
@keyframes spin { to { transform: rotate(360deg); } }
.logo {
  position: absolute; inset: 15%; border-radius: 50%;
  background: var(--paper); box-shadow: var(--shadow), inset 0 0 0 6px var(--paper), inset 0 0 0 8px var(--blue-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  color: var(--blue-2);
}
.logo small { font-size: .8rem; font-weight: 700; letter-spacing: .08em; }
.logo strong { font: clamp(2.8rem, 7vw, 4rem) var(--serif); letter-spacing: .06em; line-height: 1; margin: .05em 0 .1em; color: var(--blue); }
.logo span { font-size: .85rem; font-weight: 600; }
.logo em { font: 600 1.7rem var(--script); font-style: normal; color: var(--blue-2); margin-top: .1em; }

.pillars {
  list-style: none; padding: 0; margin-top: 48px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.pillars li {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  font-weight: 700; font-size: .92rem; color: var(--navy);
}
.pillars b { font-size: 1.5rem; }
.flag { flex: none; width: 30px; height: 20px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.flag-it { background: linear-gradient(90deg, #1f9a50 33.3%, #fff 33.3% 66.6%, #d23b35 66.6%); }
.flag-ar { background: linear-gradient(#74acdf 33.3%, #fff 33.3% 66.6%, #74acdf 66.6%); position: relative; }
.flag-ar::after { content: ""; position: absolute; inset: 0; margin: auto; width: 5px; height: 5px; border-radius: 50%; background: #f6b40e; }

/* ---------- secciones ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--paper); }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }

.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 18px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.scroller .card { scroll-snap-align: start; }

/* ---------- tabs + grilla ---------- */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 36px; }
.tab {
  border: 1.5px solid var(--line); background: var(--paper); color: var(--navy);
  padding: .55em 1.15em; border-radius: 999px; font: 700 .9rem var(--sans); cursor: pointer;
}
.tab:hover { border-color: var(--blue); }
.tab.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.cat-block { margin-bottom: 44px; }
.cat-block[hidden] { display: none; }
.cat-title { font-size: 1.6rem; display: flex; align-items: center; gap: 14px; }
.cat-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }

/* ---------- tarjeta de producto ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--cream-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.is-empty { display: grid; place-items: center; color: var(--blue); }
.card-media.is-empty svg { width: 42%; height: auto; opacity: .85; }
.cat-panaderia  { background: linear-gradient(135deg, #f3e3c3, #ead3a8); }
.cat-facturas   { background: linear-gradient(135deg, #f6e1c0, #efcf98); }
.cat-pasteleria { background: linear-gradient(135deg, #f8dedd, #f0c8c4); }
.cat-comidas    { background: linear-gradient(135deg, #e3ecd8, #d2e0c2); }
.cat-sandwiches { background: linear-gradient(135deg, #dfe8f5, #c9d8ee); }
.tag {
  position: absolute; top: 12px; left: 12px; background: var(--terra); color: #fff;
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: .3em .7em; border-radius: 999px;
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.25rem; margin-bottom: .3em; }
.card-body p { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-weight: 800; color: var(--navy); display: flex; flex-direction: column; line-height: 1.2; }
.price small { font-weight: 600; color: var(--muted); font-size: .78rem; }
.btn-add {
  width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; display: grid; place-items: center; transition: background .15s, transform .15s;
}
.btn-add svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; fill: none; }
.btn-add:hover { background: var(--navy); transform: scale(1.08); }
.btn-add.ok { background: var(--wa); }

/* ---------- nosotros ---------- */
.section-blue { background: var(--blue); color: #eaf0fa; }
.section-blue h2 { color: #fff; }
.section-blue .kicker { color: #ffd9b8; }
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.about-year { text-align: center; color: #fff; }
.about-year span { font: 600 2rem var(--script); }
.about-year strong { display: block; font: clamp(5rem, 14vw, 9rem) var(--serif); line-height: .9; }
.about-year em { font: 600 2.2rem var(--script); font-style: normal; color: #ffd9b8; }
.about-txt p { font-size: 1.08rem; }

/* ---------- encargos ---------- */
.encargo { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.checks { list-style: none; padding: 0; margin: 20px 0 0; }
.checks li { padding-left: 32px; position: relative; margin-bottom: 10px; font-weight: 600; color: var(--navy); }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: .8rem; font-weight: 800;
}

/* ---------- formularios ---------- */
.form { display: grid; gap: 14px; }
.card-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld { display: grid; gap: 6px; }
.fld span { font-size: .82rem; font-weight: 700; color: var(--navy); }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: .75em .9em; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; font: 1rem var(--sans); color: var(--ink);
}
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.fld textarea { resize: vertical; }

/* ---------- locales ---------- */
.locales { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.local { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.local h3 { font-size: 1.35rem; }
.local p { color: var(--muted); }
.link { color: var(--blue); font-weight: 800; text-decoration: none; }
.link:hover { text-decoration: underline; }
.local-hours dl { margin: 0; }
.local-hours dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.local-hours dt { font-weight: 700; color: var(--navy); }
.local-hours dd { margin: 0; color: var(--muted); text-align: right; }

/* ---------- instagram ---------- */
.insta { background: linear-gradient(135deg, var(--cream-2), var(--blue-soft)); }
.insta-in { text-align: center; max-width: 620px; }
.insta-in p { color: var(--muted); margin-bottom: 24px; }

/* ---------- footer ---------- */
.footer { background: var(--navy); color: #c9d4e6; padding: 40px 0 90px; text-align: center; }
.footer-in { display: grid; justify-items: center; gap: 4px; }
.brand-foot .brand-mark { background: transparent; border-color: #fff; color: #fff; }
.brand-foot .brand-txt strong { color: #fff; }
.brand-foot .brand-txt em { color: #ffd9b8; }
.footer p { margin: .4em 0 0; }
.footer a { color: #fff; }

/* ---------- carrito ---------- */
.cart-fab {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 10px; padding: .85em 1.4em; border: 0; border-radius: 999px;
  background: var(--navy); color: #fff; font: 800 .95rem var(--sans); cursor: pointer; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5);
}
.cart-fab[hidden] { display: none; }
.cart-fab svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }
.cart-count { background: var(--terra); border-radius: 999px; min-width: 24px; padding: 0 7px; font-size: .82rem; line-height: 24px; }
.cart-fab.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: translateX(-50%) scale(1.1); } }

.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer-bg { position: absolute; inset: 0; background: rgba(29, 53, 87, .45); opacity: 0; transition: opacity .25s; }
.drawer.open .drawer-bg { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(430px, 100%);
  background: var(--paper); display: flex; flex-direction: column; overflow-y: auto;
  transform: translateX(100%); transition: transform .3s ease;
}
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 1; }
.drawer-head h2 { font-size: 1.6rem; margin: 0; }
.x { border: 0; background: var(--cream-2); width: 38px; height: 38px; border-radius: 50%; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--navy); }
.cart-list { list-style: none; margin: 0; padding: 8px 22px; }
.cart-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-list .ci-name { flex: 1; font-weight: 700; color: var(--navy); line-height: 1.3; }
.cart-list .ci-name small { display: block; font-weight: 600; color: var(--muted); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 800; color: var(--navy); }
.qty span { min-width: 22px; text-align: center; font-weight: 800; }
.cart-empty { padding: 30px 22px; color: var(--muted); text-align: center; }
.drawer-form { padding: 16px 22px 26px; margin-top: auto; border-top: 1px solid var(--line); }
.cart-total { margin: 0; font-weight: 800; color: var(--navy); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 20px; z-index: 45; width: 56px; height: 56px; border-radius: 50%;
  background: var(--wa); display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .45);
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-in, .about, .encargo { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .hero-badge { width: min(300px, 80%); order: -1; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .about { gap: 24px; text-align: center; }
}
@media (max-width: 760px) {
  .hide-sm { display: none; }
  .burger {
    display: grid; place-items: center; margin-left: auto; width: 44px; height: 44px;
    border: 0; background: transparent; cursor: pointer;
  }
  .burger span, .burger span::before, .burger span::after {
    content: ""; display: block; width: 24px; height: 2.5px; background: var(--navy); border-radius: 2px; position: relative; transition: .2s;
  }
  .burger span::before { position: absolute; top: -8px; }
  .burger span::after { position: absolute; top: 8px; }
  .burger[aria-expanded="true"] span { background: transparent; }
  .burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
  .burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 16px; border-top: 1px solid var(--line); }
  .nav a::after { display: none; }
  .section { padding: 56px 0; }
  .pillars li { padding: 12px; font-size: .82rem; }
  .row2 { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 12px; }
  .card-body h3 { font-size: 1.05rem; }
  .card-body p { display: none; }
  .btn-add { width: 36px; height: 36px; }
  .scroller { grid-auto-columns: 70%; }
}
@media (prefers-reduced-motion: reduce) {
  .ring { animation: none; }
  html { scroll-behavior: auto; }
}
