/* Delitalle — estilos */

:root {
  --teal: #007E8C;
  --teal-deep: #005F69;
  --teal-soft: #E1F2F3;
  --mustard: #F2A93B;
  --pink: #F9D3DA;
  --pink-soft: #FDEEF1;
  --berry: #C2405C;
  --ink: #17393A;
  --ink-soft: #4E6667;
  --line: #DCE7E6;
  --white: #FFFFFF;
  --wa: #1FA855;

  --f-display: 'Grandstander', 'Trebuchet MS', sans-serif;
  --f-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.6vw, 4rem);

  --r-photo: 22px;
  --r-pill: 999px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; margin: 0; font-weight: 800; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; border-radius: 6px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.4em;
  border: 0; border-radius: var(--r-pill);
  font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color .2s, transform .15s;
  white-space: nowrap;
}
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn:active { transform: scale(.97); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #178F47; }
.btn-light { background: #fff; color: var(--teal-deep); }
.btn-light:hover { background: var(--pink-soft); }
.btn-block { width: 100%; }
.btn-outline { background: #fff; color: var(--teal-deep); border: 2px solid var(--teal); }
.btn-outline:hover { background: var(--teal-soft); }
.more { display: flex; justify-content: center; margin-top: 44px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--teal-deep); }
.brand span { font-family: var(--f-display); font-weight: 800; font-size: 1.45rem; }
.main-nav { display: flex; gap: 26px; margin-left: auto; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.main-nav a:hover { color: var(--teal); }
.header-cta { padding: .6em 1.1em; font-size: .95rem; }
.menu-toggle { display: none; }

/* Hero */
.hero {
  background: var(--pink-soft);
  padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: var(--step-4); color: var(--teal-deep); max-width: 16ch; letter-spacing: -.01em; text-wrap: balance; }
.lead { font-size: 1.15rem; color: var(--ink-soft); margin-top: 20px; max-width: 46ch; }

.dedica { margin-top: 34px; max-width: 520px; }
.dedica label { display: block; font-weight: 700; margin-bottom: 10px; }
.dedica-row {
  display: flex; gap: 8px; padding: 6px;
  background: #fff; border-radius: var(--r-pill);
  border: 2px solid var(--pink);
}
.dedica-row:focus-within { border-color: var(--teal); }
.dedica input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  padding: 0 16px; font-family: var(--f-display); font-size: 1.15rem; font-weight: 700; color: var(--berry);
}
.hint { font-size: var(--step--1); color: var(--ink-soft); margin-top: 10px; padding-left: 18px; }

.hero-cake { position: relative; display: grid; justify-items: center; }
.cake-svg { width: min(100%, 460px); height: auto; filter: drop-shadow(0 24px 30px rgba(194, 64, 92, .16)); }
.cake-msg { font-family: var(--f-display); font-weight: 800; fill: var(--berry); font-size: 30px; }
.cake-msg.is-long { font-size: 23px; }
.cake-note {
  margin-top: 14px; font-size: var(--step--1); font-weight: 600; color: var(--teal-deep);
  background: #fff; padding: 6px 14px; border-radius: var(--r-pill);
}

/* Ocasiones */
.occasions { background: var(--teal); color: #fff; }
.occasions-inner { display: flex; align-items: center; gap: 20px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.occasions-inner > p { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; }
.occ-list { display: flex; gap: 10px; flex-wrap: wrap; }
.occ-list button {
  border: 1.5px solid rgba(255,255,255,.55); background: transparent; color: #fff;
  border-radius: var(--r-pill); padding: .45em 1.1em; font-weight: 600; cursor: pointer;
}
.occ-list button:hover { background: rgba(255,255,255,.12); }
.occ-list button[aria-pressed="true"] { background: var(--mustard); border-color: var(--mustard); color: var(--ink); }

/* Secciones */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: var(--step-3); color: var(--teal-deep); text-wrap: balance; }
.section-head p { color: var(--ink-soft); max-width: 46ch; }

/* Tarjeta de producto */
.card { display: flex; flex-direction: column; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.card-media {
  position: relative; aspect-ratio: 6 / 5; border-radius: var(--r-photo);
  overflow: hidden; background: var(--teal-soft);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-tag {
  position: absolute; left: 12px; top: 12px;
  background: #fff; color: var(--teal-deep);
  font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill);
}
.card-body { padding: 14px 4px 0; display: grid; gap: 4px; }
.card-name { font-weight: 600; line-height: 1.3; }
.card-price { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; color: var(--teal); }
.card-price small { font-family: var(--f-body); font-weight: 500; font-size: .8rem; color: var(--ink-soft); margin-right: 2px; }

/* Riel destacados */
.featured { padding-bottom: clamp(32px, 5vw, 56px); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr);
  gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: var(--pink) transparent;
}
.rail .card { scroll-snap-align: start; }
@media (min-width: 1100px) { .rail { grid-auto-columns: calc((100% - 66px) / 4); } }

/* Catálogo */
.catalog { padding-top: clamp(32px, 5vw, 56px); }
.toolbar { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 0 18px; background: #fff;
}
.search:focus-within { border-color: var(--teal); }
.search svg { width: 20px; height: 20px; color: var(--ink-soft); flex: none; }
.search input { border: 0; outline: 0; padding: 13px 0; width: 100%; background: transparent; }
.sort select {
  appearance: none; border: 1.5px solid var(--line); border-radius: var(--r-pill);
  padding: 13px 44px 13px 18px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%2317393A' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 16px center / 16px;
  cursor: pointer;
}

.cats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button {
  flex: none; border: 0; background: var(--teal-soft); color: var(--teal-deep);
  padding: .55em 1.1em; border-radius: var(--r-pill); font-weight: 600; cursor: pointer;
}
.cats button:hover { background: #CFE9EB; }
.cats button[aria-selected="true"] { background: var(--teal); color: #fff; }
.cats button .n { opacity: .65; font-weight: 500; margin-left: 4px; }
.cat-desc { color: var(--ink-soft); min-height: 1.6em; margin: 6px 0 26px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px 22px; }
.empty { text-align: center; padding: 56px 16px; background: var(--pink-soft); border-radius: var(--r-photo); }
.empty p:first-child { font-family: var(--f-display); font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }

/* Cómo pedir */
.how { background: var(--teal-soft); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-top: 64px; }
.steps li::before {
  content: counter(s);
  position: absolute; top: 0; left: 0;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--mustard); color: var(--ink);
  font-family: var(--f-display); font-weight: 800; font-size: 1.4rem;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 24px; left: 60px; right: -16px;
  border-top: 2px dashed rgba(0, 126, 140, .35);
}
.steps h3 { font-size: 1.25rem; color: var(--teal-deep); margin-bottom: 6px; }
.steps p { color: var(--ink-soft); }

/* Entregas */
.delivery-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); }
.delivery h2 { font-size: var(--step-3); color: var(--teal-deep); }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 2px solid var(--pink); }
.facts div { padding: 22px 20px 22px 0; border-bottom: 2px solid var(--pink); }
.facts div:nth-child(odd) { padding-right: 24px; }
.facts dt { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; color: var(--berry); margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--ink-soft); }

/* Cierre */
.closing { background: var(--teal); color: #fff; text-align: center; padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.closing::before, .closing::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle, var(--mustard) 0 3px, transparent 4px),
    radial-gradient(circle, var(--pink) 0 3px, transparent 4px);
  background-size: 140px 120px, 180px 150px;
  background-position: 20px 30px, 90px 70px;
  opacity: .35;
}
.closing-inner { position: relative; z-index: 1; }
.closing h2 { font-size: var(--step-3); max-width: 22ch; margin: 0 auto 14px; text-wrap: balance; }
.closing p { opacity: .9; margin-bottom: 28px; }

/* Footer */
.site-footer { background: var(--teal-deep); color: #D5E7E6; padding-top: 56px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand strong { font-family: var(--f-display); font-size: 1.3rem; color: #fff; }
.site-footer h3 { font-family: var(--f-body); font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.site-footer a { color: #D5E7E6; }
.site-footer a:hover { color: #fff; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.14); padding-top: 18px; padding-bottom: 24px; font-size: var(--step--1); opacity: .75; }

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

/* Ficha de producto */
.product-dialog {
  width: min(960px, calc(100% - 24px)); max-height: calc(100% - 24px);
  padding: 0; border: 0; border-radius: 28px; color: var(--ink);
}
.product-dialog::backdrop { background: rgba(10, 45, 45, .55); backdrop-filter: blur(3px); }
.product-dialog[open] { animation: pop .28s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.pd { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.pd-media { background: var(--teal-soft); }
.pd-media { display: flex; align-items: center; }
.pd-media img { width: 100%; height: auto; aspect-ratio: 6 / 5; object-fit: cover; }
.pd-body { padding: 36px 34px 30px; overflow-y: auto; max-height: calc(100vh - 24px); }
.pd-cat { color: var(--teal); font-weight: 700; font-size: var(--step--1); }
.pd-body h2 { font-size: 1.7rem; margin: 6px 0 10px; color: var(--teal-deep); }
.pd-price { font-family: var(--f-display); font-weight: 800; font-size: 2rem; color: var(--berry); }
.pd-body h3 { font-family: var(--f-body); font-size: 1rem; margin: 22px 0 8px; }
.pd-body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.pd-body li { position: relative; padding-left: 22px; color: var(--ink-soft); }
.pd-body li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--mustard); }
.pd-form { display: grid; gap: 6px; margin-top: 24px; }
.pd-form label { font-weight: 600; font-size: .95rem; margin-top: 6px; }
.pd-form label span { font-weight: 400; color: var(--ink-soft); }
.pd-form input { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.pd-form input:focus { border-color: var(--teal); outline: 0; }
.pd-form .btn { margin-top: 12px; }
.pd-note { font-size: var(--step--1); color: var(--ink-soft); margin-top: 12px; text-align: center; }
.pd-close {
  position: absolute; right: 14px; top: 14px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.pd-close svg { width: 20px; height: 20px; }

/* Responsive */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 860px) {
  .main-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff;
    border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .header-cta { display: none; }
  .menu-toggle {
    display: grid; gap: 6px; margin-left: auto; width: 44px; height: 44px;
    place-content: center; border: 0; background: var(--teal-soft); border-radius: 12px; cursor: pointer;
  }
  .menu-toggle span { display: block; width: 20px; height: 2px; background: var(--teal-deep); border-radius: 2px; transition: transform .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 28px; }
  .cake-svg { width: min(80%, 340px); }
  .delivery-grid { grid-template-columns: 1fr; }
  .pd { grid-template-columns: 1fr; }
  .pd-media img { aspect-ratio: 6 / 5; }
  .pd-body { max-height: none; padding: 26px 22px 24px; }
  .product-dialog { overflow-y: auto; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 26px 14px; }
  .card-name { font-size: .92rem; }
  .card-price { font-size: 1.1rem; }
  .dedica-row { flex-direction: column; border-radius: 22px; }
  .dedica input { padding: 12px 14px; }
  .dedica .btn { width: 100%; }
  .hint { padding-left: 4px; }
  .steps { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
  .facts { grid-template-columns: 1fr; }
  .facts div:nth-child(odd) { padding-right: 0; }
  .rail { grid-auto-columns: 70%; }
}

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