@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;800&display=swap');

:root {
  --color-bg: #F9F0E7;
  --color-dark: #26221F;
  --color-text: #26221F;
  --color-accent: #D99A6F;
  --color-accent-100: color-mix(in srgb, #D99A6F 16%, white);
  --color-accent-600: #C17F52;
  --color-accent-700: #A8663D;
  --color-accent-800: #835030;
  --color-divider: color-mix(in srgb, #26221F 20%, transparent);
  --color-surface: #F1E6D8;
  --color-neutral-100: #F1E6D8;
  --color-neutral-200: #EADFCF;
  --color-neutral-600: #8A7A68;
  --color-neutral-700: #6E6152;
  --color-neutral-800: #453C31;
  --color-neutral-900: #26221F;

  --font-heading: "Archivo", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  --radius-md: 0px;
  --shadow-sm: 0 1px 2px color-mix(in srgb, #26221F 14%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* The browser's default [hidden]{display:none} is a normal-priority UA rule — any author
   rule that sets `display` (a class, or worse, an inline style) silently wins over it
   regardless of specificity. Force it so the hidden attribute is never fought again. */
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: 800;
  line-height: 1.15; letter-spacing: -0.015em; margin: 0;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent-700); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 35%, transparent); }

.container { padding-left: clamp(20px, 5vw, 64px); padding-right: clamp(20px, 5vw, 64px); }
.section { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px); }
.section-divider { border-bottom: 2px solid var(--color-divider); }
.eyebrow { font-size: 12px; letter-spacing: .12em; color: var(--color-accent-700); text-transform: uppercase; }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: 800;
  font-size: 14px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid transparent;
  padding: 13px 22px; min-height: 44px;
  transition: background .2s ease, border-color .2s ease;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 6%, transparent); }
.btn-block { width: 100%; justify-content: flex-start; text-align: left; }

/* — forms — */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; color: var(--color-neutral-700); }
.input {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent-700);
  background: var(--color-bg);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent-700); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }

/* — cards — */
.card { background: var(--color-surface); border-radius: var(--radius-md); }
.elev-sm { box-shadow: var(--shadow-sm); }

/* — tags (filters / variant selectors) — */
.tag {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 12px; letter-spacing: 0.02em; padding: 0 14px;
  border-radius: var(--radius-md); cursor: pointer; white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  background: transparent; border: 1px solid transparent; font: inherit; color: inherit;
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); border: 1px solid transparent; }
.tag-outline { border: 1px solid var(--color-divider); color: var(--color-text); }
.tag-outline:hover { border-color: var(--color-accent-700); color: var(--color-accent-700); }

/* — nav — */
.nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px 24px;
  padding: clamp(18px, 3vw, 30px) clamp(20px, 5vw, 64px);
  border-bottom: 2px solid var(--color-divider);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 800; font-size: 19px;
  letter-spacing: -0.01em; color: var(--color-text); text-decoration: none;
}
.nav-links {
  display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end;
  gap: 12px 28px;
  font-family: var(--font-heading); font-weight: 600; font-size: 12px;
  letter-spacing: .09em; text-transform: uppercase;
}
.nav-links a { color: var(--color-text); text-decoration: none; white-space: nowrap; padding: 4px 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-accent-700); }
.nav-links a.nav-cta { color: var(--color-accent-700); border-bottom: 1px solid transparent; }
.nav-links a.nav-cta:hover { border-color: var(--color-accent-700); }

/* — footer — */
.site-footer {
  position: relative; padding: 28px clamp(20px, 5vw, 64px);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 12px; color: var(--color-neutral-600);
  border-top: 2px solid var(--color-divider); overflow: hidden;
}
.site-footer .watermark {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  width: 80px; height: 80px; object-fit: cover; opacity: .08; pointer-events: none;
}
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: 16px 24px; }
.site-footer a { text-decoration: underline; color: var(--color-neutral-600); }

/* — image slot (placeholder-fallback pattern replacing <image-slot>) — */
.img-slot {
  position: relative; width: 100%; overflow: hidden;
  background: var(--color-neutral-200);
  display: flex; align-items: center; justify-content: center;
}
.img-slot img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.img-slot .img-slot-caption {
  font-size: 12px; line-height: 1.5; color: var(--color-neutral-600);
  text-align: center; padding: 20px; max-width: 30ch;
}
.img-slot.grayscale img { filter: grayscale(1) contrast(1.08); }

/* Producto's single hero photo must show the whole piece, never crop it — grid/carousel
   thumbnails keep object-fit:cover above for consistent card framing. Sized explicitly by
   producto.js (not filled via inset:0) so low-res sources can be capped below the
   container's full size instead of upscaling to fill it; .img-slot's flex centering
   (above) centers it, and this background shows through the remaining space. */
#product-image { background: var(--color-bg); }
#product-image img {
  position: static; inset: auto; object-fit: contain;
  width: auto; height: auto; max-width: 100%; max-height: 100%;
}

/* — grids — */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* — Colección: filters — */
.filter-row {
  padding: 20px clamp(20px, 5vw, 64px);
  display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 32px; align-items: flex-start;
  -webkit-overflow-scrolling: touch;
}
.filter-group { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.filter-label { font-size: 11px; letter-spacing: .1em; color: var(--color-neutral-600); white-space: nowrap; }
.filter-options { display: flex; gap: 8px; flex-wrap: nowrap; }

/* — Colección: featured carousel — */
.featured-scroll {
  display: flex; gap: 24px; overflow-x: auto; overflow-y: hidden; padding-bottom: 12px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; align-items: flex-start;
}
.featured-card { flex: none; align-self: flex-start; width: clamp(240px, 72vw, 340px); cursor: pointer; scroll-snap-align: start; display: block; color: inherit; text-decoration: none; }
.featured-card .img-slot { aspect-ratio: 4/5; }

/* — Colección: product card (each card = ONE bordered container) — */
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px 28px; }
.product-card {
  display: flex; flex-direction: column; cursor: pointer;
  background: var(--color-neutral-100); border: 2px solid var(--color-neutral-600);
  padding: 16px; margin-bottom: 4px; color: inherit; text-decoration: none;
}
.product-card .img-slot { aspect-ratio: 4/3; }
.product-card .product-name { padding-top: 16px; font-family: var(--font-heading); font-weight: 800; font-size: 15px; }
.product-card .product-meta { font-size: 13px; color: var(--color-neutral-600); margin-top: 4px; }
.product-card .product-meta-sub { font-size: 12px; color: var(--color-neutral-600); margin-top: 2px; }

@media (max-width: 640px) {
  .btn, .tag, .input { min-height: 44px; }
}
