/* Granos & Almíbar — colores tomados del logo */
:root {
  --crema: #faf3e6;
  --crema-oscuro: #efe3cf;
  --burdeos: #6b1f2a;
  --burdeos-oscuro: #531820;
  --dorado: #b98a3e;
  --oliva: #6b7a3a;
  --texto: #3a2a22;
  --texto-suave: #6e5d52;
  --blanco: #fffdf8;
  --error: #a3202f;
  --radio: 14px;
  --sombra: 0 4px 18px rgba(58, 42, 34, 0.1);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--crema); color: var(--texto);
  font-family: var(--sans); line-height: 1.55; font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--burdeos); }
h1, h2, h3 { font-family: var(--serif); color: var(--burdeos); line-height: 1.2; margin: 0 0 .5em; }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--dorado); outline-offset: 2px; }

/* Botones */
.btn {
  display: inline-block; border: 2px solid var(--burdeos); background: var(--burdeos); color: #fff;
  padding: .65em 1.3em; border-radius: 999px; font: 600 1rem var(--sans); cursor: pointer;
  text-decoration: none; text-align: center; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--burdeos-oscuro); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--burdeos); }
.btn-ghost:hover { background: var(--crema-oscuro); }
.btn-small { padding: .45em 1em; font-size: .92rem; }

/* Menú */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--blanco); border-bottom: 1px solid var(--crema-oscuro); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; padding: 8px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.15rem var(--serif); color: var(--burdeos); }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.main-nav { display: flex; gap: 4px 18px; flex: 1; flex-wrap: wrap; align-items: center; }
.main-nav a { text-decoration: none; font-weight: 600; color: var(--texto); padding: 6px 2px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--dorado); }
#nav-cats { display: contents; }
.cart-btn { margin-left: auto; position: relative; }
.cart-count {
  display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; margin-left: .4em; padding: 0 .35em;
  border-radius: 999px; background: var(--dorado); color: #fff; font-size: .85rem;
}

/* Banner con foto (o clip) de fondo */
.banner {
  position: relative; overflow: hidden; text-align: center; color: #fff; min-height: 420px; display: grid; place-items: center;
  background: #3a2a22 url("../img/banner.jpg") center 55% / cover no-repeat;
}
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40, 20, 15, .5), rgba(40, 20, 15, .62)); }
.banner-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-content { position: relative; padding: 36px 0; }
.banner h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.banner p { max-width: 36em; margin: 0 auto; font-size: 1.1rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.chip-a-pedido {
  display: inline-block; margin-bottom: 14px; padding: .3em 1em; border: 1px solid var(--dorado);
  border-radius: 999px; color: var(--burdeos); font-weight: 600; background: var(--blanco);
}

/* Botones de categorías bajo el banner */
.cat-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; padding: 26px 0 36px; }
.cat-buttons .btn { min-width: 150px; font-size: 1.1rem; padding: .8em 1.6em; }
.cat-buttons .btn[aria-pressed="true"] { background: var(--dorado); border-color: var(--dorado); }
.cat-section { padding-bottom: 28px; scroll-margin-top: 80px; }

/* Secciones */
section { padding: 28px 0; }
.page-title { padding: 32px 0 8px; }
.page-title p { color: var(--texto-suave); max-width: 40em; margin: 0; }
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 0; list-style: none; counter-reset: paso; }
.steps li {
  background: var(--blanco); border-radius: var(--radio); padding: 18px 18px 18px 56px; position: relative;
  box-shadow: var(--sombra); counter-increment: paso;
}
.steps li::before {
  content: counter(paso); position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--dorado); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.pedido-nota { text-align: center; background: var(--blanco); border: 1px dashed var(--dorado); border-radius: var(--radio); padding: 18px; }

/* Filtros */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; }
.filters button {
  border: 1px solid var(--dorado); background: var(--blanco); color: var(--texto); border-radius: 999px;
  padding: .4em 1.1em; font: 600 .95rem var(--sans); cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--burdeos); border-color: var(--burdeos); color: #fff; }

/* Tarjetas */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); padding-bottom: 40px; }
.card { background: var(--blanco); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--crema-oscuro); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 1.15rem; margin: 0; }
.card .tipo { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--oliva); font-weight: 700; }
.card p { margin: 0; color: var(--texto-suave); font-size: .95rem; flex: 1; }
.card .precio { font-weight: 700; color: var(--burdeos); }
.card .precio.cotizar { color: var(--oliva); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }

/* Avisos */
.notice { background: var(--blanco); border-radius: var(--radio); padding: 20px; text-align: center; box-shadow: var(--sombra); margin: 24px 0; }
.notice-error { border: 1px solid var(--error); }
.notice-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Carrito */
.overlay { position: fixed; inset: 0; background: rgba(40, 20, 15, .45); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--crema); z-index: 41;
  display: flex; flex-direction: column; box-shadow: -6px 0 24px rgba(0, 0, 0, .2);
}
[hidden] { display: none !important; }
.drawer[hidden], .overlay[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--crema-oscuro); background: var(--blanco); }
.drawer-head h2 { margin: 0; font-size: 1.3rem; }
.drawer-body { overflow-y: auto; padding: 16px 18px 28px; flex: 1; }
.close-btn { border: 0; background: transparent; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--texto); padding: 4px 10px; }
.cart-empty { text-align: center; color: var(--texto-suave); padding: 12px 0 20px; }
.cart-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.cart-item { background: var(--blanco); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.cart-item .nombre { font-weight: 600; }
.trash-btn { background: none; border: 0; color: var(--burdeos); cursor: pointer; padding: 6px; border-radius: 8px; display: inline-flex; line-height: 0; }
.trash-btn:hover { background: var(--crema-oscuro); }
.cart-item .linea { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--dorado); background: var(--crema); font-size: 1.1rem; cursor: pointer; }
.qty input { width: 52px; text-align: center; padding: 6px 2px; border: 1px solid var(--dorado); border-radius: 8px; font: inherit; }
.link-btn { background: none; border: 0; color: var(--error); text-decoration: underline; cursor: pointer; font: inherit; padding: 4px; }
.subtotal { background: var(--crema-oscuro); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: .95rem; }
.subtotal strong { color: var(--burdeos); }
.aviso-pedido { font-size: .9rem; color: var(--texto-suave); margin: 0 0 14px; }

form .field { display: grid; gap: 4px; margin-bottom: 12px; }
form label, form legend { font-weight: 600; font-size: .95rem; }
form input[type="text"], form input[type="tel"], form input[type="email"], form input[type="date"], form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cdb994; border-radius: 10px; font: inherit; background: var(--blanco); color: var(--texto);
}
form textarea { min-height: 80px; resize: vertical; }
form select { width: 100%; padding: 10px 12px; border: 1px solid #cdb994; border-radius: 10px; font: inherit; background: var(--blanco); color: var(--texto); }
form fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.radio-row label { font-weight: 400; display: flex; gap: 6px; align-items: center; }
.field-error { color: var(--error); font-size: .88rem; min-height: 1.2em; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
.help { font-size: .85rem; color: var(--texto-suave); }
.submit-wrap { display: grid; gap: 8px; margin-top: 8px; }
.submit-wrap .btn { width: 100%; background: #1f7a4d; border-color: #1f7a4d; }
.submit-wrap .btn:hover { background: #17603c; }
.submit-wrap .btn:disabled { background: #1f7a4d; }

/* Pie */
.site-footer { background: var(--burdeos); color: #f6e9d5; padding: 32px 0 28px; margin-top: 24px; font-size: .95rem; }
.site-footer a { color: #f6e9d5; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1.3fr 1fr; align-items: start; }
.footer-brand img { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 10px; }
.footer-brand p { margin: 0 0 8px; max-width: 32em; }
.slogan { font: italic 1.2rem var(--serif); color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.1rem; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 30; display: block; width: 64px; height: 64px; border-radius: 50%;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); transition: transform .15s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float img { display: block; width: 100%; height: 100%; }

@media (max-width: 560px) {
  .brand span { display: none; }
  .main-nav { gap: 2px 12px; }
  .banner { min-height: 420px; }
  .footer-grid { grid-template-columns: 1fr; }
  .wa-float { width: 56px; height: 56px; }
}

/* Contacto */
.contact-grid { display: grid; gap: 20px; grid-template-columns: 1fr 1.4fr; align-items: start; padding-bottom: 32px; }
.contact-card { background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra); padding: 20px 22px; }
.contact-card .contact-list a { color: var(--burdeos); }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* Animaciones suaves (se apagan si la persona prefiere menos movimiento) */
@keyframes subir { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .45); } 70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); } }
.banner-content > * { animation: subir .8s ease both; }
.banner-content > :nth-child(2) { animation-delay: .12s; }
.banner-content > :nth-child(3) { animation-delay: .24s; }
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.done { transition: transform .25s ease, box-shadow .25s ease; }
.js .card.reveal.in:hover { transform: translateY(-4px); }
.card { transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(58, 42, 34, .18); }
.card img { transition: transform .5s ease; }
.card:hover img { transform: scale(1.04); }
.btn:hover { transform: translateY(-1px); }
.wa-float { animation: pulso 2.6s ease-out infinite; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
