@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-normal.woff2') format('woff2');
}

:root {
  --green-deep: oklch(0.28 0.10 152);
  --green-mid: oklch(0.42 0.13 152);
  --green-fresh: oklch(0.56 0.16 148);
  --green-light: oklch(0.94 0.04 148);
  --green-xlight: oklch(0.97 0.02 148);
  --cream: oklch(0.97 0.012 90);
  --white: #fff;
  --ink: oklch(0.14 0.025 152);
  --ink-2: oklch(0.38 0.03 152);
  --ink-3: oklch(0.52 0.025 152);
  --border: oklch(0.90 0.02 148);
  --amber: oklch(0.45 0.1 75);
  --amber-bg: oklch(0.96 0.035 80);
  --font-head: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow: 0 10px 28px rgba(10, 38, 25, .10);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 15px; color: var(--ink); background: var(--cream); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--green-fresh); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--white); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 16px; }

/* Navegación */
.catalog-nav { background: var(--white); border-bottom: 1px solid var(--border); }
.nav-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-link img { display: block; height: 44px; width: auto; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.nav-link { font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.nav-link:hover { background: var(--green-xlight); color: var(--green-deep); }
.nav-list { display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--green-deep); color: var(--white); padding: 9px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; }
.count-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--white); color: var(--green-deep); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Encabezado */
.catalog-top { background: linear-gradient(180deg, var(--green-xlight), var(--cream)); padding-block: 26px 6px; }
.eyebrow { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green-mid); }
.catalog-top h1 { font-family: var(--font-head); font-weight: 600; font-size: clamp(34px, 6vw, 52px); line-height: 1.02; letter-spacing: -.01em; margin: 8px 0 10px; text-wrap: balance; }
.catalog-lede { margin: 0; max-width: 60ch; color: var(--ink-2); font-size: 15px; }
.catalog-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.catalog-meta li { font-size: 13px; color: var(--ink-2); background: var(--white); border: 1px solid var(--border); border-radius: 99px; padding: 5px 12px; }
.catalog-meta strong { color: var(--green-deep); }

/* Buscador fijo */
.search-bar { position: sticky; top: 0; z-index: 20; background: var(--cream); padding-block: 12px; }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--green-mid); stroke-width: 2.2; pointer-events: none; }
.search-field input { width: 100%; height: 54px; border: 2px solid var(--green-deep); border-radius: 16px; padding: 0 52px 0 48px; font-size: 17px; background: var(--white); outline: none; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field input:focus { box-shadow: 0 0 0 4px var(--green-light); }
.search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--green-xlight); color: var(--green-deep); font-size: 20px; line-height: 1; }

/* Vista principal */
.catalog-main { padding-block: 4px 40px; min-height: 50vh; }
.view-status { padding: 36px 16px; text-align: center; color: var(--ink-2); }
.view-status a { color: var(--green-deep); font-weight: 600; }
.section-block + .section-block { margin-top: 30px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 18px 0 12px; }
.section-head h2 { font-family: var(--font-head); font-size: 30px; font-weight: 600; line-height: 1.05; margin: 0; }
.section-head p { margin: 0; font-size: 13px; color: var(--ink-3); }
.group-label { margin: 18px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green-mid); }

/* Mosaico de categorías */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 132px; padding: 14px; text-align: left; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--green-light); }
.tile-icon { font-size: 34px; line-height: 1; }
.tile-name { margin-top: auto; font-weight: 600; font-size: 15px; line-height: 1.2; text-wrap: balance; }
.tile-meta { font-size: 12.5px; color: var(--ink-3); }

/* Vista de categoría */
.category-head { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; }
.back-button { flex: none; height: 44px; padding: 0 14px; border: 1px solid var(--border); background: var(--white); border-radius: 12px; font-weight: 600; font-size: 14px; }
.back-button:hover { border-color: var(--green-fresh); color: var(--green-deep); }
.category-head h2 { font-family: var(--font-head); font-size: clamp(26px, 5vw, 34px); font-weight: 600; line-height: 1.05; margin: 0; }
.category-head p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.pill-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: thin; }
.pill { flex: none; border: 1px solid var(--border); background: var(--white); border-radius: 99px; padding: 8px 13px; font-size: 13.5px; white-space: nowrap; }
.pill[aria-pressed="true"] { background: var(--green-deep); border-color: var(--green-deep); color: var(--white); }
.sibling-nav { margin-top: 26px; }

/* Tarjetas de producto */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--white); border: 1px solid var(--border); border-radius: 16px; }
.card.in-list { border-color: var(--green-fresh); box-shadow: inset 0 0 0 1px var(--green-fresh); }
.card-cat { font-size: 11.5px; font-weight: 600; color: var(--green-mid); }
.card-name { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.25; }
.card-detail { font-size: 13px; color: var(--ink-3); line-height: 1.3; }
.tag-imported { display: inline-block; margin-left: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--amber); background: var(--amber-bg); border-radius: 99px; padding: 2px 7px; vertical-align: 2px; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.price { font-size: 22px; font-weight: 700; line-height: 1; color: var(--green-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.price.quote { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.quote-head { margin: 26px 0 10px; }
.quote-head .group-label { margin: 0 0 2px; }
.quote-head p { margin: 0; font-size: 13px; color: var(--ink-3); }
.option-row { padding-top: 8px; border-top: 1px dashed var(--border); }
.option-row + .option-row { margin-top: 0; }
.price-wrap { display: grid; gap: 2px; min-width: 0; }
.option-label { font-size: 12px; color: var(--ink-3); line-height: 1.2; }
.option-row .price { font-size: 19px; }
.add-button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--green-light); color: var(--green-deep); font-size: 24px; font-weight: 700; line-height: 1; }
.add-button:hover { background: var(--green-deep); color: var(--white); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--green-fresh); border-radius: 12px; overflow: hidden; background: var(--white); }
.stepper button { width: 34px; height: 40px; border: 0; background: var(--green-xlight); color: var(--green-deep); font-size: 18px; font-weight: 700; }
.stepper output { min-width: 30px; text-align: center; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.stepper input { width: 54px; height: 40px; border: 0; background: var(--white); text-align: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
body.drawer-open { overflow: hidden; }
.share-status { min-height: 18px; margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); }
.more-button { display: block; margin: 16px auto 0; border: 1px solid var(--border); background: var(--white); border-radius: 12px; padding: 12px 20px; font-weight: 600; }

/* Ayuda y pie */
.catalog-help { padding-block: 10px 110px; }
.help-card { display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: center; padding: 26px; border-radius: 22px; background: var(--green-deep); color: var(--white); }
.help-card h2 { font-family: var(--font-head); font-size: 30px; font-weight: 600; line-height: 1.05; margin: 0 0 8px; }
.help-card ul { margin: 0; padding-left: 18px; color: rgba(255, 255, 255, .78); font-size: 14px; display: grid; gap: 4px; }
.help-card .inline-link { color: var(--white); font-weight: 600; }
.help-actions { display: grid; gap: 8px; }
.help-actions a { background: var(--white); color: var(--green-deep); text-decoration: none; font-weight: 700; padding: 14px 18px; border-radius: var(--radius-md); white-space: nowrap; text-align: center; }
.share-button { border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: var(--white); font-weight: 600; padding: 12px 18px; border-radius: var(--radius-md); }
.help-card .share-status { color: rgba(255, 255, 255, .8); }
.catalog-footer { background: var(--ink); color: rgba(255, 255, 255, .6); padding-block: 26px calc(26px + env(safe-area-inset-bottom, 0px)); font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Barra de lista y panel */
.list-bar { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30; width: min(540px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border: 0; border-radius: 16px; background: var(--green-deep); color: var(--white); box-shadow: 0 12px 30px rgba(0, 0, 0, .25); text-align: left; }
.list-bar-text { display: grid; line-height: 1.25; font-size: 14px; }
.list-bar-text small { color: rgba(255, 255, 255, .75); font-size: 12.5px; }
.list-bar-cta { margin-left: auto; background: var(--white); color: var(--green-deep); font-weight: 700; padding: 10px 14px; border-radius: 11px; font-size: 14px; white-space: nowrap; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(8, 24, 16, .45); }
.list-drawer { position: fixed; z-index: 50; right: 0; top: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--white); box-shadow: -10px 0 40px rgba(0, 0, 0, .2); padding-bottom: env(safe-area-inset-bottom, 0px); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 10px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-family: var(--font-head); font-size: 30px; font-weight: 600; margin: 2px 0 0; line-height: 1; }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); font-size: 20px; line-height: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 18px; }
.drawer-empty { color: var(--ink-2); padding: 24px 0; }
.list-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-item-name { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.list-item-meta { grid-column: 1; font-size: 12.5px; color: var(--ink-3); }
.list-item-controls { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.list-item-subtotal { font-weight: 700; color: var(--green-deep); font-size: 14px; font-variant-numeric: tabular-nums; }
.drawer-foot { display: grid; gap: 10px; padding: 12px 18px 18px; border-top: 1px solid var(--border); }
.estimate { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.estimate strong { font-size: 22px; color: var(--green-deep); font-variant-numeric: tabular-nums; }
.estimate small { display: block; color: var(--ink-3); font-size: 12px; }
.notes-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.drawer-foot textarea { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 15px; resize: vertical; background: var(--cream); }
.whatsapp-button { display: block; text-align: center; text-decoration: none; background: var(--green-deep); color: var(--white); font-weight: 700; padding: 14px; border-radius: var(--radius-md); }
.whatsapp-button[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.text-button { border: 0; background: none; color: var(--ink-3); font-size: 13px; text-decoration: underline; padding: 6px; }

/* Listas de precios estáticas: páginas por categoría, lista de la semana e índice de categorías */
.breadcrumbs { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-3); }
.breadcrumbs a { color: var(--green-mid); }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 14px; }
.button-primary, .button-ghost { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: var(--radius-md); font-weight: 700; font-size: 14px; text-decoration: none; }
.button-primary { background: var(--green-deep); color: var(--white); }
.button-ghost { border: 1px solid var(--green-deep); color: var(--green-deep); background: var(--white); }
.table-title { font-family: var(--font-head); font-size: 24px; font-weight: 600; line-height: 1.1; margin: 26px 0 8px; }
.price-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; font-size: 14px; }
.price-table th, .price-table td { padding: 10px 14px; text-align: left; vertical-align: baseline; border-top: 1px solid var(--border); }
.price-table thead th { border-top: 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); background: var(--green-xlight); }
.price-table tbody th { font-weight: 600; }
.price-table td { color: var(--ink-2); }
.price-table .num, .price-table thead th:last-child { text-align: right; }
.price-table .num { white-space: nowrap; font-weight: 700; color: var(--green-deep); font-variant-numeric: tabular-nums; }
.price-table .num small { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.price-table .num.quote { font-weight: 600; color: var(--ink-2); }
.price-note { margin: 14px 0 0; font-size: 13px; color: var(--ink-2); }
.price-index { padding-block: 6px 34px; }
.price-index h2 { font-family: var(--font-head); font-size: 30px; font-weight: 600; line-height: 1.05; margin: 0 0 6px; }
.price-index h2 + p { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.price-index details { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0 14px; margin-top: 8px; }
.price-index details[open] { padding-bottom: 14px; }
.price-index summary { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none; }
.price-index summary::-webkit-details-marker { display: none; }
.price-index summary span { margin-left: auto; font-weight: 500; font-size: 13px; color: var(--ink-2); }
.price-index summary::after { content: '+'; font-weight: 700; color: var(--green-mid); }
.price-index details[open] summary::after { content: '−'; }
.price-index details .table-title { font-size: 20px; margin-top: 16px; }
.category-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.category-links a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 14px; background: var(--white); border: 1px solid var(--border); border-radius: 12px; font-weight: 600; font-size: 14px; text-decoration: none; }
.category-links a:hover { border-color: var(--green-fresh); color: var(--green-deep); }
.category-links span { flex: none; font-weight: 500; font-size: 12.5px; color: var(--ink-2); }

@media (min-width: 721px) {
  /* Mismas columnas en todas las tablas de una página. */
  .price-table { table-layout: fixed; }
  .price-table thead th:first-child:nth-last-child(3) { width: 46%; }
  .price-table thead th:last-child { width: 190px; }
}
@media (max-width: 720px) {
  .nav-link { display: none; }
  .nav-link.keep { display: inline-block; }
  .brand-link img { height: 38px; }
  .help-card { grid-template-columns: 1fr; padding: 22px; }
  .list-drawer { top: auto; left: 0; width: 100%; max-height: 88vh; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .22); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card { padding: 11px; }
  .price { font-size: 20px; }
}
@media (max-width: 360px) {
  .card-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile { transition: none; }
}
@media print {
  .catalog-nav, .search-bar, .list-bar, .catalog-help, .catalog-footer, .add-button, .stepper, .back-button, .page-actions, .sibling-nav { display: none !important; }
  .card { break-inside: avoid; }
}
