/* ==========================================================
   La Rama · Panadería y Dulcería desde 1930
   ========================================================== */

/* Tipografías alojadas en la propia web (sin peticiones a Google) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../assets/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../assets/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/inter-tight-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 700; font-display: swap; src: url("../assets/fonts/inter-tight-latin-700-normal.woff2") format("woff2"); }

:root {
  /* Paleta del logo, usada como acento */
  --red: #E30613;
  --red-dark: #B8040F;
  --red-soft: #FDECEC;
  --sun: #FFE000;
  --green: #1E6B2E;

  /* Neutros */
  --bg: #FCFBF8;
  --white: #FFFFFF;
  --surface: #F3F1EC;
  --ink: #1D1D1F;
  --ink-2: #515154;
  --ink-3: #86868B;
  --line: #E8E8ED;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --pill: 999px;

  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .10);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --btn-radius: 12px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.005em; font-weight: 700; font-family: var(--display); }
h3 { font-size: 1.1rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 8px; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--pill); }
.skip-link:focus { left: 8px; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ---------- Botones ---------- */
.btn {
  --b-bg: var(--ink); --b-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.4em;
  border: 0; border-radius: var(--btn-radius);
  background: var(--b-bg); color: var(--b-fg);
  font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, transform .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn--primary { --b-bg: var(--red); }
.btn--primary:hover { --b-bg: var(--red-dark); }
.btn--dark:hover { --b-bg: #000; }
.btn--ghost { --b-bg: var(--surface); --b-fg: var(--ink); }
.btn--ghost:hover { --b-bg: #E9E6DF; }
.btn--whatsapp { --b-bg: #25D366; }
.btn--whatsapp:hover { --b-bg: #1EBE5A; }
.btn--whatsapp svg { width: 18px; height: 18px; fill: currentColor; }
.btn--sm { padding: .5em 1em; font-size: .88rem; }
.btn--block { width: 100%; }

.link { color: var(--red); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.link::after { content: "›"; font-size: 1.25em; line-height: 1; transition: transform .2s var(--ease); }
.link:hover::after { transform: translateX(3px); }

.cart-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--pill); background: #fff; color: var(--red); font-size: .74rem; font-weight: 800;
}
.cart-count[hidden] { display: none; }
.cart-count.bump { animation: bump .4s var(--ease); }
@keyframes bump { 50% { transform: scale(1.3); } }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(252, 251, 248, .85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav { border-bottom-color: var(--line); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 24px; width: min(1240px, 100% - 32px); margin-inline: auto; }
.nav__brand img { height: 38px; width: auto; }
.nav__links { display: flex; gap: 2px; margin-left: auto; }
.nav__links a {
  padding: 7px 12px; border-radius: var(--pill);
  font-size: .86rem; font-weight: 500; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a[aria-current="page"] { color: var(--ink); background: var(--surface); font-weight: 600; }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__toggle { display: none; width: 40px; height: 40px; border: 0; border-radius: var(--pill); background: var(--surface); cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; border-radius: 2px; background: var(--ink); transition: transform .3s var(--ease); }
.nav__toggle span:first-child { top: 16px; }
.nav__toggle span:last-child { top: 23px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 1140px) {
  .nav__toggle { display: inline-block; }
  .nav__actions { margin-left: auto; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; gap: 0; padding: 8px 20px 20px;
    background: rgba(255,255,255,.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-6px); pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 14px 4px; font-size: 1.1rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav__links a[aria-current="page"] { background: none; color: var(--red); }
}
@media (max-width: 480px) {
  .nav__brand img { height: 32px; }
}

/* ---------- Comunes ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--tight { padding-top: 0; }
.section--surface { background: var(--surface); }
.section__head { margin-bottom: 40px; }
.section__head--row { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.section__head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.eyebrow { display: block; margin-bottom: 10px; font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 58ch; }
.note, .hint { font-size: .85rem; color: var(--ink-3); }
.note { margin-top: 32px; text-align: center; }
.card { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--line); }

.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.page-head .lead { margin-top: 16px; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Portada ---------- */
.hero { padding: 28px 0 28px; }
.hero__card {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(520px, 72vh, 640px); border-radius: var(--radius-lg);
  display: flex; align-items: center;
  padding: clamp(32px, 6vw, 72px);
  color: #fff;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; transform: scale(1.04); animation: heroZoom 18s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero__card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(24, 16, 8, .86) 0%, rgba(24, 16, 8, .62) 45%, rgba(24, 16, 8, .12) 80%),
    linear-gradient(0deg, rgba(24, 16, 8, .35), transparent 40%);
}
.hero__content { max-width: 600px; }
.hero__eyebrow { display: block; margin-bottom: 18px; font-size: .82rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #FFE88A; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4rem); color: #fff; }
.hero__lead { margin: 20px 0 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.5; color: rgba(255,255,255,.9); max-width: 46ch; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn--light { --b-bg: #fff; --b-fg: var(--ink); }
.btn--light:hover { --b-bg: #F2F2F2; }
.btn--outline-light { --b-bg: transparent; --b-fg: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.75); }
.btn--outline-light:hover { --b-bg: rgba(255,255,255,.12); }
.btn--lg { padding: 1em 1.8em; font-size: 1.02rem; }
@media (max-width: 640px) {
  .hero { padding-top: 12px; }
  .hero .container { width: calc(100% - 24px); }
  .hero__card { align-items: flex-end; min-height: 560px; padding: 28px 24px; }
  .hero__bg { object-position: 50% center; }
  .hero__card::before { background: linear-gradient(0deg, rgba(24,16,8,.92) 0%, rgba(24,16,8,.78) 55%, rgba(24,16,8,.55) 100%); }
  .hero__ctas { flex-direction: column; }
  .hero__ctas .btn { width: 100%; }
}

.intro { display: grid; grid-template-columns: 1.7fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.intro > :first-child p { max-width: 62ch; }
.intro h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 18px; }
.intro p { color: var(--ink-2); font-size: 1.08rem; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.facts div { background: var(--white); padding: 18px 10px; text-align: center; }
.facts strong { display: block; font-family: var(--display); font-size: 1.35rem; line-height: 1.2; }
.facts span { font-size: .76rem; line-height: 1.3; display: block; color: var(--ink-3); }
/* Resumen de Nosotros en la portada: cifras a la altura del párrafo */
.intro--home { align-items: stretch; row-gap: 0; }
.intro--home .intro__head { grid-column: 1 / -1; }
.intro--home .intro__text p { text-align: justify; hyphens: auto; max-width: none; margin-bottom: 14px; }
.intro--home .facts { align-self: start; height: calc(100% - 38px); }
.intro--home .facts div { display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 820px) {
  .intro { grid-template-columns: 1fr; }
  .intro--home { row-gap: 24px; }
  .intro--home .facts { height: auto; }
}

/* Fondo difuminado bajo la portada (Torre del Conde) */
.backdrop { position: relative; isolation: isolate; clip-path: inset(0); }
.backdrop::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(252, 251, 248, .84) 0%, rgba(252, 251, 248, .72) 55%, rgba(252, 251, 248, .6) 100%),
    url("../assets/fotos/torre-del-conde-fondo.jpg") 70% 40% / cover no-repeat;
  filter: blur(3px);
  transform: scale(1.03);
}
@media (max-width: 760px) {
  .backdrop::before { background:
    linear-gradient(rgba(252, 251, 248, .78), rgba(252, 251, 248, .78)),
    url("../assets/fotos/torre-del-conde-fondo.jpg") 55% center / cover no-repeat; }
}
/* Textos en negro sobre el fondo claro */
.backdrop .section { color: #000; }
.backdrop .section p, .backdrop .rows span, .backdrop .product__cat, .backdrop .price small, .backdrop .section .eyebrow { color: #1D1D1F; }
.backdrop .rows, .backdrop .rows li { border-color: rgba(29, 29, 31, .18); }

/* ---------- Nosotros ---------- */
.story__text p { font-size: 1.12rem; color: var(--ink-2); max-width: 64ch; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.value { padding: 26px; border-radius: var(--radius-lg); background: var(--surface); }
.value h3 { margin-bottom: 6px; }
.value p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.value__num { display: block; font-size: .8rem; font-weight: 700; color: var(--red); margin-bottom: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 24px; }
.timeline li { padding-top: 18px; border-top: 2px solid var(--ink); }
.timeline li:last-child { border-top-color: var(--red); }
.timeline strong { font-family: var(--display); font-size: 1.35rem; }
.timeline p { margin: 6px 0 0; color: var(--ink-2); font-size: .95rem; }
@media (max-width: 820px) {
  .values { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Productos ---------- */
.search {
  display: flex; align-items: center; gap: 8px; padding: 0 16px; height: 44px; min-width: 260px;
  background: var(--surface); border-radius: var(--pill);
}
.search svg { width: 17px; height: 17px; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.search input { border: 0; outline: 0; background: none; width: 100%; height: 100%; }

.segmented {
  display: flex; gap: 2px; padding: 4px; margin-bottom: 32px;
  background: var(--surface); border-radius: var(--pill);
  overflow-x: auto; scrollbar-width: none; width: fit-content; max-width: 100%;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  flex: none; padding: 9px 18px; border: 0; border-radius: var(--pill); background: transparent;
  font-weight: 600; font-size: .9rem; color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: background .25s var(--ease), color .2s, box-shadow .25s;
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px 20px; }
.product { display: flex; flex-direction: column; animation: fade .4s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
.product__media {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface);
}
.product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.product__media .emoji { font-size: 4.2rem; transition: transform .5s var(--ease); }
.product:hover .product__media .emoji, .product:hover .product__media img { transform: scale(1.06); }
.product__body { padding: 14px 2px 0; display: flex; flex-direction: column; flex: 1; }
.product__cat { font-size: .75rem; color: var(--ink-3); font-weight: 600; }
.product__body h3 { font-size: 1.02rem; margin-top: 2px; }
.product__body p { font-size: .88rem; color: var(--ink-3); margin: 4px 0 12px; flex: 1; }
.product__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-weight: 700; }
.price small { font-size: .78rem; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.add-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); flex: none;
  background: var(--white); color: var(--ink); font-size: 1.2rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s, color .2s, border-color .2s, transform .15s var(--ease);
}
.add-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.add-btn:active { transform: scale(.9); }
.add-btn.is-added { background: var(--green); border-color: var(--green); color: #fff; }
.products__empty { grid-column: 1 / -1; text-align: center; color: var(--ink-3); padding: 40px 0; }

/* ---------- Ubicaciones (tiendas propias) ---------- */
.stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.store { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.store__photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); margin-bottom: 4px; }
.store__top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.store h3 { font-size: 1.2rem; }
.store__tag { font-size: .85rem; color: var(--ink-3); margin-top: 2px; }
.status { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.status--open { color: var(--green); }
.status.status--closed { color: var(--red); }
.store__line { color: var(--ink-2); font-size: .95rem; margin: 0; }
.store__hours { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 4px; }
.store__hours td { padding: 6px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.store__hours td:last-child { text-align: right; }
.store__hours tr.is-today td { color: var(--ink); font-weight: 700; }
.store__actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }

/* Lista de filas (portada y puntos de venta) */
.loc-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
@media (min-width: 900px) { .loc-cards { grid-template-columns: repeat(3, 1fr); } }
.loc-card { overflow: hidden; display: flex; flex-direction: column; }
.loc-card__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.loc-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.loc-card__top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.loc-card strong { font-size: 1.05rem; font-weight: 600; }
.loc-card__body > span { color: var(--ink-2); font-size: .92rem; }
.loc-card .link { margin-top: auto; padding-top: 4px; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: 1.2fr 1.6fr auto auto; gap: 20px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.rows strong { font-size: 1.05rem; font-weight: 600; }
.rows span { color: var(--ink-2); font-size: .95rem; }
.rows .muted { color: var(--ink-3); font-size: .85rem; }
@media (max-width: 760px) {
  .rows li { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .rows li > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .rows li > :nth-child(3) { grid-column: 2; grid-row: 1; justify-self: end; }
  .rows li > :nth-child(4) { grid-column: 2; grid-row: 2; justify-self: end; }
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chips button { padding: 8px 16px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--bg); font-size: .88rem; font-weight: 600; color: var(--ink-2); cursor: pointer; transition: all .2s; }
.chips button:hover { border-color: #C7C7CC; color: var(--ink); }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.callout { margin-top: 48px; padding: 32px; border-radius: var(--radius-lg); background: var(--surface); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.callout h3 { font-size: 1.25rem; margin-bottom: 4px; }
.callout p { margin: 0; color: var(--ink-2); }

/* ---------- Noticias ---------- */
.news { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px 24px; }
.news-card { text-align: left; padding: 0; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; }
.news-card__art { aspect-ratio: 16 / 10; display: grid; place-items: center; font-size: 3.6rem; border-radius: var(--radius-lg); background: var(--surface); transition: transform .4s var(--ease); }
.news-card:hover .news-card__art { transform: scale(.985); }
.news-card__body { padding: 16px 2px 0; }
.news-card__meta { font-size: .8rem; color: var(--ink-3); margin-bottom: 6px; }
.news-card__meta .tag { color: var(--red); font-weight: 700; margin-right: 8px; }
.news-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.news-card p { color: var(--ink-2); font-size: .93rem; margin: 0; }

/* ---------- Pedidos ---------- */
.steps { list-style: none; padding: 0; margin: 0 0 28px; display: flex; gap: 24px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 600; font-size: .9rem; transition: color .3s; }
.steps li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid currentColor; font-size: .75rem; }
.steps li.is-active { color: var(--ink); }
.steps li.is-done { color: var(--green); }
.steps li.is-done span { background: var(--green); border-color: var(--green); color: #fff; }

.order { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.order__main { display: grid; gap: 16px; }
.order__block { margin: 0; padding: 26px; min-width: 0; }
.order__block legend { float: left; width: 100%; padding: 0; margin-bottom: 18px; font-weight: 700; font-size: 1.1rem; }
.order__block legend + * { clear: both; }
.order__add { display: flex; gap: 10px; align-items: end; }
.order__summary { position: sticky; top: calc(var(--nav-h) + 20px); padding: 26px; display: grid; gap: 12px; background: var(--surface); border: 0; }
.order__summary h3 { font-size: 1.3rem; }
@media (max-width: 920px) {
  .order { grid-template-columns: 1fr; }
  .order__summary { position: static; }
}

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.field small { font-weight: 400; color: var(--ink-3); }
.field--grow { flex: 1; margin-bottom: 0; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2386868B' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29,29,31,.08); }
.field .is-invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.field select:disabled { opacity: .5; }
.field textarea { resize: vertical; min-height: 90px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

.cart { list-style: none; padding: 0; margin: 18px 0 0; }
.cart li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); animation: fade .3s var(--ease); }
.cart__thumb { width: 48px; height: 48px; flex: none; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 1.5rem; overflow: hidden; background: var(--surface); }
.cart__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart__info { flex: 1; min-width: 0; }
.cart__info strong { display: block; font-size: .95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart__info small { color: var(--ink-3); }
.stepper { display: inline-flex; align-items: center; background: var(--surface); border-radius: var(--pill); }
.stepper button { width: 32px; height: 32px; border: 0; background: none; border-radius: 50%; cursor: pointer; font-size: 1.05rem; }
.stepper button:hover { background: #E6E3DC; }
.stepper output { min-width: 22px; text-align: center; font-weight: 700; font-size: .92rem; }
.cart__line { width: 72px; text-align: right; font-weight: 700; font-size: .95rem; }
.cart__empty { margin: 18px 0 0; padding: 22px; text-align: center; border-radius: var(--radius); background: var(--surface); color: var(--ink-3); font-size: .92rem; }
.cart__empty a { color: var(--ink); font-weight: 600; }
@media (max-width: 520px) {
  .cart li { flex-wrap: wrap; }
  .cart__info { flex-basis: calc(100% - 62px); }
  .stepper { margin-left: 62px; }
  .cart__line { margin-left: auto; }
  .order__add { flex-wrap: wrap; }
  .order__add .field--grow { flex-basis: 100%; }
  .order__add .btn { width: 100%; }
}

.store-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 18px; }
.store-pick label {
  position: relative; display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s;
}
.store-pick input { position: absolute; opacity: 0; pointer-events: none; }
.store-pick strong { font-size: .95rem; font-weight: 600; }
.store-pick small { color: var(--ink-3); font-size: .8rem; }
.store-pick label:hover { border-color: #C7C7CC; }
.store-pick label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.store-pick label:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 3px; }

.summary { margin: 0; display: grid; gap: 10px; }
.summary div { display: flex; justify-content: space-between; gap: 16px; font-size: .92rem; }
.summary dt { color: var(--ink-3); }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 6px; border-top: 1px solid #DCDCE0; }
.summary__total strong { font-size: 1.6rem; letter-spacing: -.03em; }
.form-error { margin: 0; color: var(--red-dark); font-size: .88rem; font-weight: 600; }
.form-error:empty { display: none; }

/* ---------- Empleo ---------- */
.jobs-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.jobs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.job { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.job__meta { font-size: .82rem; color: var(--ink-3); }
.job p { margin: 4px 0 0; color: var(--ink-2); font-size: .93rem; }
.job button { justify-self: start; margin-top: 10px; }
.form { padding: 28px; }
.form h3 { font-size: 1.3rem; margin-bottom: 18px; }
@media (max-width: 820px) { .jobs-layout { grid-template-columns: 1fr; } }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.contact__info { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contact__info li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact__info small { display: block; color: var(--ink-3); font-size: .8rem; }
.contact__info a, .contact__info strong { font-weight: 600; text-decoration: none; }
.contact__info a:hover { color: var(--red); }
.social { display: flex; gap: 8px; margin-top: 20px; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--ink); transition: background .2s, color .2s; }
.social a:hover { background: var(--ink); color: #fff; }
.social svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { padding: 48px 0 36px; background: var(--surface); }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 20px 48px; align-items: center; }
.footer__brand img { height: 44px; width: auto; margin-bottom: 8px; }
.footer__brand p { margin: 0; color: var(--ink-3); font-size: .88rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer__links a { text-decoration: none; color: var(--ink-2); font-size: .88rem; }
.footer__links a:hover { color: var(--ink); }
.footer__legal { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 18px; border-top: 1px solid #DCDCE0; color: var(--ink-3); font-size: .8rem; }
.footer__legal a { color: inherit; }
@media (max-width: 720px) { .footer__inner { grid-template-columns: 1fr; } }

/* ---------- Carrito flotante ---------- */
.fab {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 40;
  translate: -50% 0; padding: 13px 22px; border-radius: var(--pill);
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; box-shadow: var(--shadow-lg);
  animation: rise .4s var(--ease); white-space: nowrap;
}
.fab[hidden] { display: none; }
@keyframes rise { from { translate: -50% 30px; opacity: 0; } }

/* ---------- Modal ---------- */
.modal { border: 0; padding: 0; border-radius: var(--radius-lg); width: min(600px, 100% - 32px); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal::backdrop { background: rgba(0,0,0,.3); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal[open] { animation: modalIn .3s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal article { position: relative; }
.modal__art { aspect-ratio: 16 / 7; display: grid; place-items: center; font-size: 4.4rem; background: var(--surface); }
.modal__body { padding: 26px 30px 32px; }
.modal__body small { color: var(--ink-3); }
.modal__body h3 { font-size: 1.6rem; margin: 6px 0 14px; letter-spacing: -.025em; }
.modal__body p { color: var(--ink-2); margin: 0; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 1.3rem; cursor: pointer; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: calc(var(--nav-h) + 12px); left: 50%; z-index: 60;
  translate: -50% -16px; opacity: 0; pointer-events: none;
  padding: 11px 20px; border-radius: var(--pill); background: rgba(29,29,31,.92); color: #fff;
  font-size: .9rem; font-weight: 500; box-shadow: var(--shadow-lg); backdrop-filter: blur(10px);
  transition: opacity .3s var(--ease), translate .3s var(--ease);
  max-width: calc(100% - 32px); text-align: center;
}
.toast.is-visible { opacity: 1; translate: -50% 0; }

/* ---------- Aviso de cookies ---------- */
.cookies {
  position: fixed; left: 50%; bottom: 16px; z-index: 70;
  width: min(720px, calc(100% - 32px)); translate: -50% 24px; opacity: 0;
  display: flex; align-items: center; gap: 20px;
  padding: 18px 20px; border-radius: var(--radius-lg); background: var(--white);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transition: opacity .3s var(--ease), translate .3s var(--ease);
}
.cookies.is-visible { opacity: 1; translate: -50% 0; }
.cookies p { margin: 0; flex: 1; font-size: .9rem; color: var(--ink-2); }
.cookies a { color: var(--ink); text-decoration: underline; }
.cookies__actions { display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 600px) {
  .cookies { flex-direction: column; align-items: stretch; gap: 14px; }
  .cookies__actions .btn { flex: 1; }
}

/* ---------- Móvil ---------- */
@media (max-width: 560px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .product__media { border-radius: var(--radius); }
  .product__media .emoji { font-size: 3rem; }
  .product__body h3 { font-size: .92rem; }
  .product__body p { font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .price small { display: block; margin: 0; }
  .search { min-width: 0; width: 100%; }
  .facts div { padding: 20px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Bolsa del pedido (cabecera) ---------- */
.bag { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--btn-radius); text-decoration: none; color: var(--ink); transition: background .2s; }
.bag:hover { background: var(--surface); }
.bag svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.bag .cart-count { background: var(--green); color: #fff; min-width: 22px; height: 22px; }
.btn[hidden] { display: none; }

/* Nosotros: textos justificados */
.page-about .story__text p, .page-about .timeline p, .page-about .value p, .page-about .callout p { text-align: justify; hyphens: auto; }

/* ---------- Legal ---------- */
.legal > * { max-width: 760px; }
.legal h2 { font-size: 1.25rem; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.65; text-align: justify; hyphens: auto; }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.legal code { font-size: .9em; background: var(--surface); padding: 1px 6px; border-radius: 6px; }
.legal__card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 8px 22px; margin: 0 0 8px; }
.legal__card div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.legal__card div:last-child { border-bottom: 0; }
.legal__card dt { font-weight: 600; font-size: .9rem; }
.legal__card dd { margin: 0; color: var(--ink-2); }
.legal__table { overflow-x: auto; margin: 8px 0 12px; }
.legal__table table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .92rem; }
.legal__table th, .legal__table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal__table th { font-weight: 600; background: var(--surface); }
@media (max-width: 560px) { .legal__card div { grid-template-columns: 1fr; gap: 2px; } }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 4px 0 8px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--ink); }
.consent input.is-invalid { outline: 2px solid var(--red); outline-offset: 2px; }
.consent a, .consent__info a { color: inherit; text-decoration: underline; }
.consent__info { font-size: .75rem; line-height: 1.5; color: var(--ink-3); margin: 0 0 12px; }
.note { margin-top: 28px; font-size: .82rem; line-height: 1.55; color: var(--ink-3); max-width: 760px; }
.note a { color: inherit; text-decoration: underline; }

/* ---------- Selector de idioma ---------- */
.lang { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--pill); background: var(--surface); }
.lang button { border: 0; background: transparent; font: 600 .72rem/1 var(--font); letter-spacing: .04em; color: var(--ink-2); padding: 7px 8px; border-radius: var(--pill); cursor: pointer; transition: background .2s, color .2s; }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
@media (max-width: 400px) { .lang button { padding: 7px 6px; } .nav__actions { gap: 6px; } }
