/* Catalog filter bar docks under fixed navbar (h-24) while scrolling #catalogo */
.catalog-sticky-bar {
  position: sticky;
  top: 6rem; /* matches navbar h-24 */
  z-index: 40;
  width: 100%;
  margin: 0 0 1.25rem;
  padding: 0.25rem 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: 0.7rem;
  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: 0.55rem;
}

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

.catalog-filters {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  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;
    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;
  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;
}

.catalog-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 2.5rem;
}

.catalog-pager[hidden] {
  display: 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 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.75rem 1.75rem;
  scroll-margin-top: calc(6rem + 5.5rem);
}

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

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

/* IKEA-like card: big square photo, clear type hierarchy */
.product-card {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.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: var(--brand-mist, #E4E2DD);
}

.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.35s ease, transform 0.7s ease;
}

.product-card-media img.is-secondary {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover .product-card-media img.is-primary {
    transform: scale(1.03);
  }

  .product-card:hover .product-card-media img.is-secondary {
    opacity: 1;
  }
}

@media (hover: none), (pointer: coarse) {
  .product-card-media img.is-secondary {
    display: none;
  }
}

.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-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: var(--brand-mist, #E4E2DD);
  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: cover;
  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: cover;
  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: var(--brand-olive, #837869);
  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: var(--brand-charcoal, #343530);
}

.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);
}

.product-card-colors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.product-card-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 53, 48, 0.2);
  background: var(--brand-mist, #E4E2DD);
}

.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;
}
