/* Dos Más Expendio — fachada editorial
   Orden: fundaciones → encabezado → catálogo → ficha → responsive.
   El logotipo se presenta como archivo oficial, nunca se recompone con texto HTML.
*/

@font-face {
  font-family: "Newsreader";
  src: url("fonts/Newsreader-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Sequize";
  src: url("fonts/Sequize-Thin.otf") format("opentype");
  font-weight: 100;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Mono";
  src: url("fonts/RobotoMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
:root {
  --paper: #e1dbcb;
  --ink: #191716;
  --orange: #f43920;
  --yellow: #f6d497;
  --light: #f0ece3;
  --line: rgba(25, 23, 22, .45);
  --mono: "Roboto Mono", monospace;
  --accent: "Sequize", "Roboto Mono", monospace;
  --reading: "Newsreader", Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--orange); color: var(--paper); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -95px; left: 12px; z-index: 50; padding: 15px; background: var(--ink); color: white; }
.skip-link:focus { top: 12px; }

/* Navegación — sólo la firma oficial y los destinos útiles. */
.site-header {
  height: 112px;
  padding-inline: clamp(20px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--ink);
}
.site-header .brand {
  display: block;
  flex: 0 0 auto;
  line-height: 0;
}
.site-header .brand img { width: 154px; height: 102px; object-fit: contain; }
.head-center { margin-left: auto; font: 700 11px/1.5 var(--mono); letter-spacing: .02em; }
.head-center .separator { color: var(--orange); padding: 0 12px; }
.site-header nav { display: flex; align-items: center; gap: clamp(15px, 3vw, 40px); font: 700 11px/1.2 var(--mono); }
.site-header nav a { min-height: 44px; display: inline-flex; align-items: center; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* Colección: la segunda cabecera es el único título principal. */
.folio { font: 700 11px/1.4 var(--mono); letter-spacing: .03em; }
.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 35px;
  border-top: 1px solid var(--ink);
  padding-top: 24px;
  margin-bottom: 34px;
}
.catalog-header h1 { margin: 10px 0 0; font: 700 clamp(64px, 10.5vw, 150px)/.96 var(--mono); letter-spacing: -.075em; overflow-wrap: normal; }
.catalog-header > p { margin: 0 0 12px; max-width: 340px; font: 400 23px/1.25 var(--reading); }
.catalogue { padding: clamp(26px, 4vw, 58px) clamp(20px, 5vw, 80px) 110px; scroll-margin-top: 35px; }
.controls { border-block: 1px solid var(--ink); display: flex; gap: 25px; align-items: end; padding: 18px 0; margin-bottom: 32px; }
.controls label { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 8px; font: 700 10px var(--mono); }
.controls input, .controls select { width: 100%; min-height: 44px; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; font: 400 16px var(--reading); color: var(--ink); }
.controls .total { font: 700 11px var(--mono); white-space: nowrap; align-self: center; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 55px 30px; }
.product-grid.is-grouped { display: block; }
.catalog-category { margin-bottom: clamp(54px, 7vw, 104px); scroll-margin-top: 24px; }
.catalog-category:last-child { margin-bottom: 0; }
.category-header {
  display: flex;
  gap: 20px;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--ink);
  padding: 17px 0 22px;
}
.category-heading {
  margin: 0;
  font: 700 clamp(24px, 3vw, 43px)/1.15 var(--mono);
  letter-spacing: -.035em;
}
.category-heading:focus { outline: none; }
.category-heading:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.category-count { white-space: nowrap; font: 700 11px/1.3 var(--mono); }
.category-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 55px 30px; }

.product { min-width: 0; position: relative; }
.product-photo { display: block; width: 100%; aspect-ratio: 4/5; border: 0; padding: 0; overflow: hidden; background: #c6baa6; position: relative; }
.product-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.product-photo:hover img { transform: scale(1.025); }
.product-photo.is-missing { background: #d8cfbe; border: 1px solid #b8ad9a; }
.product-photo .missing { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #6d635b; font: italic 400 13px var(--reading); }
.product-meta { margin: 14px 0 5px; padding-top: 12px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--ink); font: 700 11px var(--mono); }
.category-link {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 0;
  padding: 7px 0;
  min-height: 44px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-align: right;
}
.category-link:hover { color: #a62d1e; }
.category-link:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.product-info { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.product-title { margin: 0; max-width: 300px; font: 700 clamp(16px, 1.6vw, 24px)/1.2 var(--mono); letter-spacing: -.02em; overflow-wrap: anywhere; }
.product-price { color: #a62d1e; font: 700 clamp(17px, 1.6vw, 25px) var(--mono); white-space: nowrap; }
.product-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 9px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 0;
  font: 700 11px var(--mono);
}
.product-link-arrow {
  display: inline-block;
  font: 700 22px/1 var(--mono); /* 100% más grande que el texto */
}

.product-link:hover { color: #a62d1e; border-color: #a62d1e; }
.stock { margin: 5px 0 0; font: 400 13px var(--reading); color: #4b4239; }
.empty { padding: 60px 0; font: 400 21px var(--reading); }

/* Pie de página y detalle */
footer { padding: 48px clamp(20px, 5vw, 80px); background: var(--orange); display: flex; align-items: start; justify-content: space-between; gap: 30px; }
footer img { width: 150px; height: auto; }
footer p { margin: 4px 0 0; font: 700 12px/1.7 var(--mono); }
footer > a { font: 700 11px var(--mono); text-decoration: underline; text-underline-offset: 5px; }
.product-dialog { width: min(1050px, calc(100vw - clamp(36px, 5vw, 96px))); max-height: 92vh; padding: 0; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); }
.product-dialog::backdrop { background: rgba(20,18,18,.78); }
.product-dialog[open]::backdrop { animation: product-backdrop-reveal 320ms cubic-bezier(.22,1,.36,1) both; }
@keyframes product-backdrop-reveal {
  from { background: rgba(20,18,18,0); }
  to { background: rgba(20,18,18,.78); }
}
/* Un cambio de pieza conserva el marco; sólo se anima su contenido.
   La imagen ampliada usa el desplazamiento nativo de PhotoSwipe. */
.mobile-swipe-hint { display: none; }

.dialog-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.dialog-photo {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: var(--photo-ratio, 4 / 5);
  background: #c5b8a6;
  overflow: hidden;
  touch-action: pan-y;
}
.dialog-photo > .photo-trigger {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  touch-action: pan-y;
}
.dialog-photo .photo-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.dialog-photo .photo-trigger:focus-visible { outline: 3px solid var(--orange); outline-offset: -4px; }
.dialog-photo #modal-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
}
/* PhotoSwipe v5.4.4 (MIT): interacción táctil real sin barras propias. */
.product-dialog .pswp {
  --pswp-bg: #11100f;
  --pswp-icon-color: #f4eee1;
  --pswp-icon-color-secondary: #11100f;
  --pswp-root-z-index: 1000;
}
.product-dialog .pswp__top-bar { background: transparent; }
.product-dialog .pswp__button--close { opacity: .7; }
.product-dialog .pswp__button--close:hover,
.product-dialog .pswp__button--close:focus-visible { opacity: 1; }
/* Vista ampliada: nombre de la pieza, flechas y contador sin tapar la foto. */
.product-dialog .pswp__product-caption {
  position: absolute;
  z-index: 2;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  max-width: min(88vw, 580px);
  padding: 10px 16px;
  border-radius: 3px;
  background: rgba(17, 16, 15, .8);
  color: #f4eee1;
  font: 600 12px/1.4 var(--mono);
  text-align: center;
  pointer-events: none;
  overflow-wrap: anywhere;
}
.product-dialog .pswp__counter { color: #f4eee1; opacity: .92; }
.product-dialog .pswp__button--arrow--prev,
.product-dialog .pswp__button--arrow--next { color: #f4eee1; opacity: .85; }
.product-dialog .pswp__button--arrow--prev:hover,
.product-dialog .pswp__button--arrow--next:hover { opacity: 1; }
@media(max-width: 650px) {
  .product-dialog .pswp__product-caption { font-size: 11px; padding: 8px 12px; max-width: 84vw; }
}
/* Un guiño de navegación centrado en la ventana, no sobre la fotografía.
   Al desaparecer no bloquea gestos ni elementos de la ficha. */
.modal-arrow {
  position: fixed;
  z-index: 5;
  top: 56vh;
  top: 56dvh;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font: 700 29px/1 var(--mono);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: modal-arrow-hint 3.6s ease-out forwards;
}
@keyframes modal-arrow-hint {
  0%, 72% { opacity: .5; visibility: visible; pointer-events: auto; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}
.modal-arrow:disabled {
  animation: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.modal-prev { left: max(18px, calc((100vw - 1050px) / 2 + 18px)); }
.modal-next { right: max(18px, calc((100vw - 1050px) / 2 + 18px)); }
.modal-arrow:focus-visible {
  animation: none;
  opacity: .5;
  visibility: visible;
  pointer-events: auto;
}
/* Con mouse pueden reaparecer al señalar la foto; en móvil desaparecen. */
@media (hover: hover) and (pointer: fine) {
  .product-dialog:has(.dialog-photo:hover) .modal-arrow:not(:disabled) {
    animation: none;
    opacity: .5;
    visibility: visible;
    pointer-events: auto;
  }
}
.modal-position {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 12px;
  color: var(--ink);
  background: var(--paper);
  font: 700 11px/1.2 var(--mono);
  pointer-events: none;
  white-space: nowrap;
}

.dialog-copy { padding: 55px 38px; display: flex; flex-direction: column; min-width: 0; }
.modal-identity { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; font: 700 12px var(--mono); }
.modal-identity .category-link { color: #a62d1e; text-align: left; }
.modal-identity .category-link::before { content: "/"; margin-right: 10px; color: var(--ink); }
.dialog-copy small { font: 700 12px var(--mono); }
.dialog-copy h2 { font: 700 clamp(31px, 3.6vw, 57px)/1.03 var(--mono); margin: 15px 0; letter-spacing: -.025em; overflow-wrap: anywhere; }
.dialog-copy > p { font: 400 17px var(--reading); }
.dialog-copy dl { margin: 22px 0; }
.dialog-copy dl div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid #b1a597; font: 700 11px/1.4 var(--mono); }
.dialog-copy dl dt { color: #62564a; }
.dialog-copy dl dd { margin: 0; text-align: right; }
.dialog-copy strong { font: 700 32px var(--mono); color: #a62d1e; margin-top: auto; }
.dialog-copy .ask-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; background: var(--orange); padding: 13px 15px; margin-top: 18px; font: 700 13px var(--mono); }
.dialog-copy .ask-link[aria-disabled="true"] { background: #ded8cd; color: #6c655d; cursor: not-allowed; pointer-events: none; text-decoration: none; }
.dialog-copy .fineprint { font-size: 13px; color: #54483d; }
.close { position: absolute; top: 11px; right: 16px; border: 0; background: var(--paper); font: 700 34px var(--mono); z-index: 2; }
.dialog-photo p { font: 400 19px var(--reading); }

@media (max-width: 930px) {
  .site-header .brand img { width: 135px; height: 92px; }
  .catalogue { padding: 30px 32px 75px; }
  .catalog-header { align-items: start; gap: 18px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .site-header { height: 92px; padding-inline: 18px; gap: 10px; }
  .site-header .brand img { width: 112px; height: 85px; }
  .head-center { display: none; }
  .site-header nav { margin-left: auto; font-size: 10px; gap: 15px; }
  .catalogue { padding: 22px 18px 80px; }
  .catalog-header { flex-direction: column; align-items: start; gap: 14px; margin-bottom: 28px; }
  .catalog-header h1 { font-size: clamp(49px, 15.5vw, 75px); letter-spacing: -.075em; }
  .catalog-header > p { font-size: 19px; margin: 0; }
  .controls { flex-wrap: wrap; gap: 12px; }
  .controls label { min-width: calc(50% - 12px); }
  .controls .total { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 13px; }
  .category-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 13px; }
  .catalog-category { margin-bottom: 58px; }
  .category-header { align-items: flex-start; padding: 14px 0 18px; gap: 8px; }
  .category-heading { font-size: clamp(19px, 5.3vw, 29px); }
  .category-count { font-size: 9px; padding-top: 6px; }
  .product-photo { aspect-ratio: 3/4; }
  .product-meta { font-size: 9px; }
  .product-info { display: block; }
  .product-title { font-size: 14px; }
  .product-price { display: block; font-size: 17px; margin-top: 8px; }
  .product-link { font-size: 10px; }
  .stock { font-size: 12px; }
  footer { display: grid; grid-template-columns: 1fr 1fr; }
  footer img { width: 120px; }
  footer p { font-size: 10px; }
  footer > a { grid-column: 1/-1; }
  .dialog-inner { display: block; }
  .dialog-photo { min-height: 0; }
  .product-dialog { width: calc(100vw - 16px); }
  .mobile-swipe-hint {
    display: inline-block;
    position: absolute;
    z-index: 2;
    top: 13px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    border: 1px solid rgba(244,238,225,.25);
    border-radius: 999px;
    padding: 7px 11px;
    color: #f4eee1;
    background: rgba(17,16,15,.62);
    font: 600 9px/1.2 var(--mono);
    letter-spacing: .04em;
    white-space: nowrap;
  }

  .modal-arrow { width: 48px; height: 48px; font-size: 27px; }
  .modal-position { top: 10px; left: 10px; }
  .dialog-copy { padding: 25px; }
  .dialog-copy h2 { font-size: 31px; }
  .dialog-copy dl { margin: 12px 0; }
  .dialog-copy strong { font-size: 27px; }
  .product-dialog { max-height: 96vh; }
}
@media (max-width: 380px) {
  .site-header .brand img { width: 95px; height: 75px; }
  .product-grid { grid-template-columns: 1fr; }
  .category-products { grid-template-columns: 1fr; }
  .product-title { font-size: 20px; }
  .product-price { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  /* Reducir movimiento: mostrar el indicio 3.6 s y ocultarlo sin desvanecimiento. */
  .modal-arrow:not(:disabled) {
    animation: modal-arrow-hint 3.6s steps(1, end) forwards !important;
    animation-duration: 3.6s !important;
  }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.dialog-copy .share-piece { display:flex;justify-content:space-between;align-items:center;gap:14px;min-height:52px;width:100%;margin-top:9px;padding:12px 15px;border:1px solid #493f35;background:transparent;color:#2d2721;font:700 12px var(--mono);text-align:left;cursor:pointer; }
.dialog-copy .share-piece:hover,.dialog-copy .share-piece:focus-visible { background:#e7dece; }
.dialog-copy .share-status { font:500 12px var(--mono);color:#54483d;min-height:1.2em;margin:6px 0 0; }

/* Acciones distintas: comprar abre una conversación; compartir usa el enlace público. */
.dialog-copy .action-icon { display:block;flex:none;width:23px;height:23px; }
.dialog-copy .whatsapp-icon { fill:currentColor; }
.dialog-copy .share-icon { fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.dialog-copy .ask-link:focus-visible,.dialog-copy .share-piece:focus-visible { outline:3px solid var(--ink);outline-offset:3px; }
