/* Catalog filter bar docks under fixed navbar (h-24) while scrolling #catalogo */
.catalog-sticky-bar {
  --catalog-filter-gap: 0.85rem;
  --catalog-filter-top: 1.25rem;
  position: sticky;
  top: 6rem; /* matches navbar h-24 */
  z-index: 40;
  width: 100%;
  margin: 0 0 2rem;
  padding: var(--catalog-filter-top) 0 0.85rem;
  background: #ffffff;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    padding 0.3s ease;
}

.catalog-sticky-bar.is-stuck {
  padding-top: var(--catalog-filter-top);
  padding-bottom: 0.7rem;
  background: rgba(255, 255, 255, 0.97);
  border-bottom-color: rgba(52, 53, 48, 0.08);
  box-shadow: 0 10px 28px rgba(52, 53, 48, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.catalog-sticky-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--catalog-filter-gap);
}

.catalog-sticky-sentinel {
  height: 1px;
  margin: 0;
  pointer-events: none;
  visibility: hidden;
}

.catalog-filters {
  display: flex;
  flex-wrap: nowrap;
  /* flex-start on mobile: center + overflow-x clips the first tabs
     and leaves scrollLeft mid-row so the bar doesn't start at the beginning. */
  justify-content: flex-start;
  align-items: center;
  gap: 0.85rem 1.5rem;
  width: 100%;
  margin: 0;
  padding: 0.1rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.catalog-filters::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .catalog-filters {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
  }
}

.catalog-filters--sub {
  margin: 0;
  padding: 0;
}

.catalog-filters--sub[hidden] {
  display: none;
}

.catalog-filters--sub .catalog-filter {
  font-size: 10px;
  letter-spacing: 0.18em;
  opacity: 0.45;
}

.catalog-filters--sub .catalog-filter.is-active,
.catalog-filters--sub .catalog-filter:hover {
  opacity: 0.9;
}

.catalog-sticky-bar .catalog-filter {
  flex: 0 0 auto;
  white-space: nowrap;
}

.catalog-filter {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0 0 0.4rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brand-charcoal, #343530);
  opacity: 0.55;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.catalog-filter.is-active {
  opacity: 1;
  border-bottom-color: var(--brand-charcoal, #343530);
}

.catalog-filter:hover {
  opacity: 1;
}

/* Promoción filter — amber/orange accent */
.catalog-filter.is-promo-cat {
  color: #ea580c;
  font-weight: 700;
  opacity: 0.75;
}

.catalog-filter.is-promo-cat:hover,
.catalog-filter.is-promo-cat.is-active {
  opacity: 1;
  color: #ea580c;
  font-weight: 700;
  border-bottom-color: #ea580c;
}

.catalog-filter.is-novedades-cat {
  color: #a8b86a;
  font-weight: 700;
  opacity: 0.75;
}

.catalog-filter.is-novedades-cat:hover,
.catalog-filter.is-novedades-cat.is-active {
  opacity: 1;
  color: #a8b86a;
  font-weight: 700;
  border-bottom-color: #a8b86a;
}

.catalog-pager {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 2.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.catalog-pager::-webkit-scrollbar {
  display: none;
}

.catalog-pager[hidden] {
  display: none;
}

.catalog-pager-ellipsis {
  flex: 0 0 auto;
  min-width: 1.5rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--brand-charcoal, #343530);
  opacity: 0.4;
  user-select: none;
}

.catalog-pager-btn {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.55rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-charcoal, #343530);
  opacity: 0.55;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.catalog-pager-btn:hover:not(:disabled) {
  opacity: 1;
}

.catalog-pager-btn.is-active {
  opacity: 1;
  border-bottom-color: var(--brand-charcoal, #343530);
}

.catalog-pager-btn:disabled {
  opacity: 0.28;
  cursor: default;
}

.catalog-pager-btn.is-nav {
  letter-spacing: 0.12em;
}

.catalog-grid {
  --catalog-line: rgba(52, 53, 48, 0.12);
  /* Same empty corner gap where hairlines would meet */
  --catalog-line-inset: 0.85rem;
  --catalog-col-gap: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  /* navbar + sticky filters + breathing room under the bar */
  scroll-margin-top: calc(6rem + 6.25rem);
}

@media (min-width: 640px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    --catalog-col-gap: 2rem;
    column-gap: var(--catalog-col-gap);
  }

  .product-card:not(:nth-child(2n))::after {
    content: '';
    position: absolute;
    top: var(--catalog-line-inset);
    bottom: var(--catalog-line-inset);
    right: calc(var(--catalog-col-gap) / -2);
    width: 1px;
    background: var(--catalog-line);
    pointer-events: none;
  }

  /* Pull horizontals toward the vertical, leaving the same inset gap */
  .product-card:not(:nth-child(2n))::before {
    right: calc(var(--catalog-col-gap) / -2 + var(--catalog-line-inset));
  }

  .product-card:not(:nth-child(2n + 1))::before {
    left: calc(var(--catalog-col-gap) / -2 + var(--catalog-line-inset));
  }
}

@media (min-width: 1024px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    --catalog-col-gap: 2.25rem;
    column-gap: var(--catalog-col-gap);
  }

  .product-card:not(:nth-child(2n))::after {
    content: none;
  }

  .product-card:not(:nth-child(2n))::before,
  .product-card:not(:nth-child(2n + 1))::before {
    left: var(--catalog-line-inset);
    right: var(--catalog-line-inset);
  }

  .product-card:not(:nth-child(3n))::after {
    content: '';
    position: absolute;
    top: var(--catalog-line-inset);
    bottom: var(--catalog-line-inset);
    right: calc(var(--catalog-col-gap) / -2);
    width: 1px;
    background: var(--catalog-line);
    pointer-events: none;
  }

  .product-card:not(:nth-child(3n))::before {
    right: calc(var(--catalog-col-gap) / -2 + var(--catalog-line-inset));
  }

  .product-card:nth-child(3n + 2)::before,
  .product-card:nth-child(3n)::before {
    left: calc(var(--catalog-col-gap) / -2 + var(--catalog-line-inset));
  }

  .product-card:nth-child(3n + 2)::before {
    right: calc(var(--catalog-col-gap) / -2 + var(--catalog-line-inset));
  }

  .product-card:nth-child(3n)::before {
    right: var(--catalog-line-inset);
  }

  .product-card:nth-child(3n + 1)::before {
    left: var(--catalog-line-inset);
  }
}

/* Horizontal (::before) + vertical (::after) share the same inset gap */
.product-card {
  appearance: none;
  position: relative;
  border: 0;
  background: #fff;
  padding: 1.35rem 0 1.5rem;
  font: inherit;
  color: inherit;
  text-align: left;
  text-decoration: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.product-card::before {
  content: '';
  position: absolute;
  left: var(--catalog-line-inset, 0.85rem);
  right: var(--catalog-line-inset, 0.85rem);
  bottom: 0;
  height: 1px;
  background: var(--catalog-line, rgba(52, 53, 48, 0.12));
  pointer-events: none;
}

.product-card:focus-visible {
  outline: 2px solid var(--brand-olive, #837869);
  outline-offset: 4px;
}

.product-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.product-card-promo {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 1;
  padding: 0.28rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: #b45309;
  border-radius: 4px;
}

.product-card-body {
  padding-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.product-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.product-card-type {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-muted, #5C584F);
  min-width: 0;
}

.product-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand-charcoal, #343530);
  line-height: 1.3;
}

.product-card-priceline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.35rem 0 0;
}

.product-card-price {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-charcoal, #343530);
}

.product-card-price.is-consult,
.product-modal-price.is-consult {
  color: #3b82c4;
  font-weight: 700;
}

.product-card-price.is-consult {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.product-card-price.is-consult .product-wa-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  color: #25d366;
}

.product-card-price.is-promo-price,
.product-modal-price.is-promo-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.55rem;
}

.product-price-was {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  font-weight: 500;
  font-size: 0.88em;
  color: var(--brand-muted, #5c584f);
  opacity: 0.85;
}

.product-price-now {
  font-weight: 700;
  color: var(--brand-charcoal, #343530);
}

.product-modal-price.is-promo-price .product-price-now {
  font-size: 1.05em;
}

.product-card-spec {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--brand-muted, #5C584F);
  text-align: right;
  white-space: nowrap;
}

/* —— Retail quick-view modal (gallery | info) —— */
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 105;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}

@media (min-width: 768px) {
  .product-modal {
    align-items: center;
    padding: 1.25rem;
  }
}

.product-modal[hidden] {
  display: none;
}

.product-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(52, 53, 48, 0.55);
  backdrop-filter: blur(3px);
}

.product-modal-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-height: 100%;
}

@media (min-width: 768px) {
  .product-modal-shell {
    width: min(100%, 58rem);
    height: auto;
    max-height: min(92vh, 860px);
  }
}

.product-modal-panel {
  position: relative;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

@media (min-width: 768px) {
  .product-modal-panel {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    grid-template-rows: auto 1fr;
    max-height: min(92vh, 860px);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(52, 53, 48, 0.22);
  }
}

.product-modal-close {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  z-index: 5;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-charcoal, #343530);
  cursor: pointer;
}

.product-modal-gallery {
  background: var(--brand-mist, #E4E2DD);
  padding: 0 0 0.85rem;
}

@media (min-width: 768px) {
  .product-modal-gallery {
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
    padding: 1rem;
    overflow: hidden;
  }
}

.product-modal-main-wrap {
  position: relative;
  flex: 0 0 auto;
  min-height: 0;
}

@media (min-width: 768px) {
  .product-modal-main-wrap {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
  }
}

.product-modal-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  overflow: hidden;
  border: 0;
  padding: 0;
  display: block;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

@media (min-width: 768px) {
  .product-modal-main {
    aspect-ratio: auto;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
  }
}

.product-modal-main img,
.product-modal-main-placeholder {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
}

.product-modal-main-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-olive, #837869);
}

.product-modal-main-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-charcoal, #343530);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal-main-nav.prev { left: 0.55rem; }
.product-modal-main-nav.next { right: 0.55rem; }
.product-modal-main-nav[hidden] { display: none; }

.product-modal-counter {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 2;
  padding: 0.28rem 0.5rem;
  background: rgba(52, 53, 48, 0.72);
  color: #fff;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.product-modal-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-top: 0.65rem;
  padding: 0 0.85rem;
  scrollbar-width: none;
  flex: 0 0 auto;
}

@media (min-width: 768px) {
  .product-modal-thumbs {
    margin-top: 0;
    padding: 0;
    gap: 0.55rem;
  }
}

.product-modal-thumbs::-webkit-scrollbar { display: none; }
.product-modal-thumbs[hidden] { display: none; }

.product-modal-thumb {
  flex: 0 0 auto;
  width: 4.75rem;
  aspect-ratio: 1;
  border: 1px solid transparent;
  padding: 0;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.7;
}

@media (min-width: 768px) {
  .product-modal-thumb {
    width: 6.25rem;
  }
}

.product-modal-thumb.is-active {
  opacity: 1;
  border-color: var(--brand-charcoal, #343530);
}

.product-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
}

.product-modal-info {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 1.75rem;
  gap: 0;
}

@media (min-width: 768px) {
  .product-modal-info {
    grid-column: 2;
    overflow-y: auto;
    padding: 2rem 1.75rem 2rem;
    min-height: 0;
  }
}

.product-modal-badge {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-olive, #837869);
  margin: 0 0 0.5rem;
}

.product-modal-title {
  margin: 0 0 1rem;
  font-family: 'Larken', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--brand-charcoal, #343530);
}

@media (min-width: 768px) {
  .product-modal-title {
    font-size: 2rem;
  }
}

.product-modal-price {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand-charcoal, #343530);
}

.product-modal-price-note {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--brand-muted, #5C584F);
  line-height: 1.4;
}

.product-modal-price-note[hidden] {
  display: none;
}

.product-modal-divider {
  height: 1px;
  flex-shrink: 0;
  background: rgba(52, 53, 48, 0.12);
  margin: 1.35rem 0;
}

.product-modal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3rem;
  margin: 0 0 1.6rem;
  padding: 0.75rem 1rem;
  background: #25d366;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease;
}

.product-modal-cta:hover {
  background: #1ebe57;
}

.product-modal-cta svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

/* Color options — info del mueble (no selector) */
.product-color-options {
  margin: 0 0 1.5rem;
}

.product-color-options[hidden] {
  display: none;
}

.product-color-label {
  margin: 0 0 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-charcoal, #343530);
}

.product-color-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.product-color-swatch {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 53, 48, 0.18);
  background-color: var(--brand-mist, #E4E2DD);
  flex-shrink: 0;
}

.product-color-hint {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.4;
  color: var(--brand-muted, #5C584F);
}

/* Genoud / provider specs (medidas, madera, lustres, tapizados) */
.product-modal-specs {
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.product-modal-specs[hidden] {
  display: none;
}

.product-specs-block {
  margin: 0;
}

.product-specs-medidas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-specs-medidas li {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--brand-charcoal, #343530);
}

.product-spec-medida-label,
.product-spec-medida-value {
  font-weight: 500;
}

.product-spec-medida-sep {
  color: var(--brand-muted, #5C584F);
  font-weight: 400;
}

.product-specs-madera {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--brand-charcoal, #343530);
}

.product-specs-swatches {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-specs-swatches.is-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}

.product-specs-swatches.is-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.25rem, 1fr));
  gap: 0.85rem 0.65rem;
}

.product-spec-swatch {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.product-spec-swatch.is-grid {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
}

.product-spec-swatch-chip {
  display: block;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(52, 53, 48, 0.16);
}

.product-spec-swatch.is-inline .product-spec-swatch-chip {
  width: 1.15rem;
  height: 1.15rem;
}

.product-spec-swatch.is-grid .product-spec-swatch-chip {
  width: 3.35rem;
  height: 3.35rem;
}

.product-spec-swatch-name {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--brand-charcoal, #343530);
}

.product-specs-tapizado-group {
  margin: 0.75rem 0 0;
}

.product-specs-tapizado-group + .product-specs-tapizado-group {
  margin-top: 1rem;
}

.product-specs-tapizado-title {
  margin: 0 0 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(52, 53, 48, 0.12);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brand-muted, #5C584F);
}

.product-specs-swatches.is-text-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.product-spec-swatch.is-text .product-spec-swatch-name {
  font-size: 0.92rem;
  font-weight: 500;
}

.product-modal-section-title {
  margin: 0 0 0.85rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-charcoal, #343530);
}

.product-modal-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  margin: 0;
}

.product-modal-feature dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--brand-muted, #5C584F);
}

.product-modal-feature dd {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-charcoal, #343530);
  line-height: 1.3;
}

.product-modal-notes {
  margin: 1.25rem 0 0;
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--brand-charcoal, #343530);
}

.product-modal-notes[hidden] {
  display: none;
}

