/* Catálogo Eben Ezer · losas de piedra (complementa css/home.css) */
.cat-hero { padding-top: clamp(1.5rem, 5vh, 3.5rem); padding-bottom: clamp(1.5rem, 4vh, 3rem); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; }
.cat-hero h1 { grid-column: 1 / 7; font-size: var(--step-display); letter-spacing: -0.03em; line-height: 0.92; }
.cat-hero p { grid-column: 7 / 13; max-width: 34ch; padding-bottom: 0.3em; font-size: var(--step-lead); line-height: 1.3; }

/* buscador y filtros: bloques planos, un paso de tono */
.cat-tools { padding-block: 1rem 2rem; }
.cat-search input { width: 100%; min-height: 3.5rem; line-height: 1.5; padding: 0 1.25rem; background: var(--rosa-light); color: var(--tinta); border: 0; border-radius: var(--radius); font-size: var(--step-body); }
.cat-search input::placeholder { color: var(--tinta-soft); opacity: 1; }
.cat-search input:focus-visible { outline: 3px solid var(--frambuesa); outline-offset: 0; }
.filters { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.filter-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.filter-btn { min-height: 2.75rem; line-height: 1.3; padding: 0 1rem; background: var(--rosa-light); color: var(--tinta); font-weight: 500; font-size: var(--step-small); border-radius: var(--radius); transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.filter-btn:active { transform: scale(0.97); }
.filter-btn.active { background: var(--frambuesa); color: var(--blanco); }
@media (hover: hover) and (pointer: fine) { .filter-btn:not(.active):hover { background: var(--blanco); } }
.results-counter { color: var(--tinta-soft); font-size: var(--step-small); padding-block: 0.5rem 1.5rem; }
.results-counter strong { color: var(--tinta); font-weight: 600; }

/* la vitrina: las fotos se apoyan directamente sobre el rosado del estudio (la losa solo se ve mientras carga), una de cada siete doble */
.products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 8px; }
.product-card { display: flex; flex-direction: column; min-width: 0; }
.product-card:nth-child(7n+1) { grid-column: span 2; grid-row: span 2; }
.product-image-container { position: relative; cursor: zoom-in; background: var(--rosa-deep); aspect-ratio: 1 / 1; overflow: hidden; }
.product-image { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (pointer: fine) {
  .product-image { transition: transform 600ms var(--ease-soft); }
  .product-image-container:hover .product-image { transform: scale(1.04); }
}
.zoom-icon { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--tinta); color: var(--blanco); opacity: 0; transition: opacity var(--t-hover) ease; }
.zoom-icon svg { width: 20px; height: 20px; }
.product-image-container:hover .zoom-icon, .product-image-container:focus-within .zoom-icon { opacity: 1; }
@media (hover: none) { .zoom-icon { display: none; } }

.product-info { padding: 0.9rem 0 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.product-ref { font-size: var(--step-small); color: var(--tinta-soft); font-variant-numeric: tabular-nums; }
.product-name { font-size: var(--step-body); font-weight: 600; font-stretch: 100%; letter-spacing: 0; line-height: 1.3; text-wrap: pretty; }
.product-card:nth-child(7n+1) .product-footer { margin-top: 0; }
.product-card:nth-child(7n+1) .product-name { font-size: var(--step-lead); font-weight: 700; font-stretch: 110%; letter-spacing: -0.01em; line-height: 1.3; }
.product-description { font-size: var(--step-body); color: var(--tinta); line-height: 1.5; }
.product-footer { margin-top: auto; padding-top: 0.75rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.price-label { display: block; font-size: var(--step-small); color: var(--tinta-soft); }
.price-label-old { text-decoration: line-through; }
.product-price { font-size: var(--step-lead); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1; }
.product-offer-badge { display: none; }
.btn-order { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 1rem; background: var(--frambuesa); color: var(--blanco); font-weight: 600; font-size: var(--step-small); border-radius: var(--radius); transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out); white-space: nowrap; }
.btn-order svg { width: 18px; height: 18px; }
.btn-order:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn-order:hover { background: var(--frambuesa-light); } }

.empty-state { display: none; padding: 4rem 0; }
.empty-state.active { display: block; }
.empty-state h3 { font-size: var(--step-head); line-height: 1.3; }
.empty-state p { margin-top: 1rem; color: var(--tinta-soft); }

/* lightbox: lo único que flota */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(46, 18, 25, 0.92); display: none; align-items: center; justify-content: center; padding: var(--margin); }
.lightbox.active { display: flex; }
.lightbox-content { position: relative; max-width: min(92vw, 820px); width: 100%; background: var(--vino); color: var(--blanco); }
.lightbox-image { width: 100%; max-height: 70svh; object-fit: contain; background: var(--rosa-deep); }
.lightbox-close { position: absolute; top: 0; right: 0; width: 48px; height: 48px; background: var(--frambuesa); color: var(--blanco); font-size: 1.75rem; line-height: 1; }
.lightbox-info { padding: 1rem 1.25rem 1.25rem; }
.lightbox-info h3 { font-size: var(--step-lead); font-stretch: 100%; letter-spacing: 0; line-height: 1.3; }
.lightbox-info p { margin-top: 0.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.scroll-top { position: fixed; right: var(--margin); bottom: calc(var(--margin) + env(safe-area-inset-bottom)); width: 48px; height: 48px; background: var(--frambuesa); color: var(--blanco); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity var(--t-hover) ease; z-index: 45; }
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top svg { width: 22px; height: 22px; }

.cat-close { padding-block: var(--section) calc(var(--section) / 2); margin-top: calc(var(--section) / 3); }
.cat-close .cat-close-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; }
.cat-close .cat-close-text { grid-column: 1 / 7; }
.cat-close figure { grid-column: 8 / 13; margin: 0; }
.cat-close figure img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.cat-close h2 { font-size: var(--step-head); max-width: 20ch; line-height: 1.1; }
.cat-close p { margin-top: 1rem; max-width: 52ch; color: var(--tinta-soft); }
.cat-close .btn { margin-top: 1.5rem; }

@media (max-width: 64em) {
  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-card:nth-child(7n+1) { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 47.99em) {
  .cat-hero { display: block; }
  .cat-hero h1 { font-size: 9.5vw; }
  .cat-hero p { margin-top: 0.9rem; max-width: none; }
  .cat-close .cat-close-grid { display: block; }
  .cat-close figure { margin-top: 2rem; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .product-card:nth-child(7n+1) { grid-column: span 2; grid-row: auto; }
  .product-footer { flex-direction: column; align-items: stretch; }
  .btn-order { justify-content: center; min-height: 3rem; }
}
