/* =============================================================
   ESTILOS DE MACAB
   -------------------------------------------------------------
   Los colores y medidas principales están en :root (abajo).
   Para cambiar la identidad visual de otro negocio, alcanza
   con modificar esos valores.
   ============================================================= */

:root {
  /* Colores */
  --cream: #fbf5e9;        /* fondo principal */
  --cream-2: #f3ead6;      /* fondo de secciones alternas */
  --paper: #ffffff;        /* tarjetas */
  --green: #1f3d2f;        /* marca: títulos y botones principales */
  --green-soft: #e3ece4;   /* fondos suaves verdes */
  --ink: #2b2a26;          /* texto principal */
  --muted: #6b6559;        /* texto secundario */
  --line: #e7ddc8;         /* bordes */
  --wa: #0f8040;           /* verde WhatsApp (con texto blanco: contraste 5:1) */
  --wa-dark: #0b6a35;
  --demo-bg: #fff1d0;
  --demo-ink: #5c4100;

  /* Tipografías */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Medidas */
  --radius-m: 16px;
  --radius-l: 24px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --shadow: 0 1px 2px rgba(60, 45, 20, 0.06), 0 12px 28px -14px rgba(60, 45, 20, 0.22);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--green);
  line-height: 1.15;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--fill {
  fill: currentColor;
  stroke: none;
}

/* ---------- Avisos de demostración ---------- */

.demo-banner {
  padding: 8px var(--gutter);
  background: var(--demo-bg);
  color: var(--demo-ink);
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
}

.demo-banner[hidden] {
  display: none;
}

.demo-note {
  display: none;
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--demo-ink);
}

.is-demo .demo-note {
  display: block;
}

.demo-line .demo-tag {
  margin-left: 0;
}

.demo-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--demo-bg);
  color: var(--demo-ink);
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 600 0.95rem/1.2 var(--font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s,
    transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--small {
  min-height: 44px;
  padding: 0 20px;
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--green);
  color: #fff;
}

.btn--primary:hover {
  background: #163026;
}

.btn--ghost {
  border-color: var(--green);
  color: var(--green);
}

.btn--ghost:hover {
  background: var(--green-soft);
}

.btn--whatsapp {
  background: var(--wa);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(15, 128, 64, 0.55);
}

.btn--whatsapp:hover {
  background: var(--wa-dark);
}

/* ---------- Encabezado ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 245, 233, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--green);
  text-decoration: none;
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--green);
  cursor: pointer;
}

.nav-toggle .icon--close,
.site-header.is-open .nav-toggle .icon--open {
  display: none;
}

.site-header.is-open .nav-toggle .icon--close {
  display: block;
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 8px var(--gutter) 20px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 24px -18px rgba(60, 45, 20, 0.3);
}

.site-header.is-open .site-nav {
  display: block;
}

.site-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 13px 14px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--green-soft);
}

.nav-cta {
  margin-top: 10px;
}

.nav-cta .btn {
  width: 100%;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }

  .nav-link {
    padding: 8px 16px;
    border-radius: 999px;
  }

  .nav-cta {
    margin: 0 0 0 10px;
  }

  .nav-cta .btn {
    width: auto;
  }
}

/* ---------- Portada ---------- */

.hero {
  padding-block: clamp(28px, 6vw, 72px) clamp(40px, 7vw, 88px);
}

.hero__grid {
  display: grid;
  gap: 36px;
  align-items: center;
}

.hero__tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.875rem;
  font-weight: 600;
}

.hero__title {
  margin-top: 18px;
  font-size: clamp(2.4rem, 6.4vw, 4.25rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero__text {
  max-width: 34em;
  margin-top: 18px;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero__actions .btn {
  flex: 1 1 200px;
}

.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero__points li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__points li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

/* La ventana en arco: el rasgo distintivo de la portada */
.hero__art {
  position: relative;
  order: -1; /* en celular la foto va arriba, para verla sin bajar */
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
}

.hero__art::before {
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  border: 2px solid var(--green);
  border-radius: 999px 999px 28px 28px;
  opacity: 0.3;
}

.hero__frame {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 999px 999px 28px 28px;
  background: var(--cream-2);
  box-shadow: var(--shadow);
}

.hero__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
  }

  .hero__actions .btn {
    flex: 0 0 auto;
  }

  .hero__art {
    order: 0;
  }

  .hero__frame {
    aspect-ratio: 4 / 5;
  }
}

/* ---------- Secciones ---------- */

.section {
  padding-block: clamp(48px, 8vw, 96px);
}

.section--tint {
  background: var(--cream-2);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 28px;
}

.section-head h2,
.about__copy h2,
.contact__info h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-head p:not(.demo-note) {
  margin-top: 10px;
  color: var(--muted);
}

/* ---------- Categorías ---------- */

.tiles {
  display: flex;
  gap: 14px;
  margin-inline: calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 34px;
  margin-bottom: -20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
}

.tile {
  flex: 0 0 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius-l);
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 0.2s, transform 0.2s;
}

.tile:hover {
  border-color: var(--green);
}

.tile[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green-soft);
}

.tile__thumb {
  width: 76px;
  height: 76px;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--cream-2);
}

.tile__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile__name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  color: var(--green);
}

.tile__count {
  font-size: 0.8rem;
  color: var(--muted);
}

@media (min-width: 900px) {
  .tiles {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    margin-inline: 0;
    padding: 4px 0 34px;
    overflow: visible;
  }

  .tile {
    flex: initial;
  }
}

/* ---------- Filtros y catálogo ---------- */

.chips {
  display: flex;
  gap: 8px;
  margin-inline: calc(-1 * var(--gutter));
  padding: 2px var(--gutter) 10px;
  overflow-x: auto;
}

.chip {
  flex: none;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 600 0.9rem/1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.chip:hover {
  border-color: var(--green);
}

.chip[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

@media (min-width: 900px) {
  .chips {
    flex-wrap: wrap;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }
}

.catalog-status {
  margin: 8px 0 20px;
  font-size: 0.9rem;
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background: var(--cream-2);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card__media img {
  transform: scale(1.04);
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.badge--promo {
  background: var(--green);
  color: #fff;
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px 20px;
}

.card__category {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.card__title {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
}

.card__detail {
  font-size: 0.85rem;
  color: var(--muted);
}

.card__desc {
  margin-top: 2px;
  font-size: 0.95rem;
}

.card__foot {
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding-top: 16px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green);
}

.price__old {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.price--ask {
  font-size: 1.05rem;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.product-grid.is-updated .card {
  animation: card-in 0.3s ease both;
}

/* ---------- Promociones ---------- */

.promo-grid {
  display: grid;
  gap: 22px;
}

@media (min-width: 900px) {
  .promo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.promo {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.promo__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--cream-2);
}

.promo__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
}

.promo__title {
  font-size: 1.5rem;
  font-weight: 600;
}

.promo__body .price {
  margin-top: 6px;
}

.promo__body .btn {
  margin-top: 10px;
}

@media (min-width: 600px) {
  .promo {
    grid-template-columns: 42% 1fr;
  }

  .promo__media {
    aspect-ratio: auto;
    min-height: 260px;
  }

  .promo__body {
    justify-content: center;
  }

  .promo__body .btn {
    align-self: flex-start;
  }
}

@media (max-width: 599px) {
  .btn--block-mobile {
    width: 100%;
  }
}

/* ---------- Sobre Macab ---------- */

.about__grid {
  display: grid;
  gap: 32px;
}

.about__copy p {
  max-width: 34em;
  margin-top: 16px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.about__copy h2 + div p:first-child {
  margin-top: 20px;
}

.about__copy .demo-note {
  margin-top: 18px;
}

.about__panel {
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-l);
  background: var(--green);
  color: var(--cream);
}

.about__values {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about__values li {
  padding-block: 20px;
  border-top: 1px solid rgba(251, 245, 233, 0.22);
}

.about__values li:first-child {
  padding-top: 0;
  border-top: 0;
}

.about__values li:last-child {
  padding-bottom: 0;
}

.about__values h3 {
  margin-bottom: 4px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
}

.about__values p {
  color: rgba(251, 245, 233, 0.86);
}

@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 72px;
    align-items: center;
  }
}

/* ---------- Contacto ---------- */

.contact__grid {
  display: grid;
  gap: 28px;
}

.info-list {
  display: grid;
  gap: 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.info-item {
  display: flex;
  gap: 16px;
}

.info-item__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}

.info-item__title {
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--green);
}

.hours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 18px;
  margin: 6px 0 0;
}

.hours dt {
  font-weight: 600;
}

.hours dd {
  margin: 0;
  color: var(--muted);
}

.social-list {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact__cta {
  align-self: start;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.contact__cta h3 {
  font-size: 1.6rem;
  font-weight: 600;
}

.contact__cta p {
  margin: 10px 0 22px;
  color: var(--muted);
}

@media (min-width: 900px) {
  .contact__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 72px;
  }
}

/* ---------- Pie de página ---------- */

.site-footer {
  background: var(--green);
  color: var(--cream);
}

.footer__grid {
  display: grid;
  gap: 32px;
  padding-block: 48px 32px;
}

.footer__brand {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
}

.footer__text {
  margin-top: 6px;
  color: rgba(251, 245, 233, 0.82);
}

.footer__title {
  margin-bottom: 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.footer__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(251, 245, 233, 0.9);
}

.footer__list a:not(.btn) {
  text-decoration: none;
}

.footer__list a:not(.btn):hover {
  text-decoration: underline;
}

.site-footer :focus-visible {
  outline-color: var(--cream);
}

.btn--footer {
  min-height: 44px;
  padding: 0 20px;
  box-shadow: none;
}

.footer__bottom {
  padding-block: 20px 28px;
  border-top: 1px solid rgba(251, 245, 233, 0.2);
  font-size: 0.875rem;
  color: rgba(251, 245, 233, 0.8);
}

@media (min-width: 760px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1.2fr;
    gap: 48px;
  }
}

/* ---------- Aviso breve ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 100;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s, transform 0.25s;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  padding: 16px var(--gutter);
  background: var(--demo-bg);
  color: var(--demo-ink);
  text-align: center;
}

/* ---------- Accesibilidad: menos movimiento ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
