/* Public catalog — index.html */

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  min-width: 0;
}

.brand-mark img {
  height: 40px;
  width: auto;
}

.brand-mark .brand-fallback {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  white-space: nowrap;
}

.main-nav {
  display: none;
  align-items: center;
  gap: var(--sp-6);
}

.main-nav a {
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  position: relative;
  padding-block: 4px;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: var(--flame-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.15s ease;
  border-radius: var(--radius-pill);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

@media (min-width: 900px) {
  .main-nav {
    display: flex;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.ig-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  flex: none;
}

.ig-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  background: var(--hero-bg) url('../brand/hero-kombi.jpg') center/cover no-repeat;
  color: var(--paper);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(14, 14, 16, 0.92) 0%,
    rgba(14, 14, 16, 0.72) 38%,
    rgba(14, 14, 16, 0.35) 68%,
    rgba(14, 14, 16, 0.15) 100%
  ),
    linear-gradient(0deg, rgba(14, 14, 16, 0.6) 0%, rgba(14, 14, 16, 0) 40%);
}

.hero-content {
  position: relative;
  padding-block: var(--sp-8) var(--sp-7);
  max-width: 720px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-heading);
  font-size: var(--small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--flame-yellow);
  margin-bottom: var(--sp-3);
}

.hero-kicker::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--flame-gradient);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--h1);
  text-transform: uppercase;
  font-style: italic;
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin-bottom: var(--sp-4);
  text-wrap: balance;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--chrome-hi);
  max-width: 52ch;
  margin-bottom: var(--sp-6);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--small);
  color: var(--steel);
}

.hero-trust .icon {
  color: var(--flame-orange);
}

/* ---------- Filter bar ---------- */
.filter-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-block: var(--sp-4);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

.search-field {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
}

.search-field input {
  width: 100%;
  padding: 0.65em 1em 0.65em 2.5em;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--bg-alt);
}

.search-field input:focus-visible {
  border-color: var(--kombi-blue);
  background: var(--paper);
}

.search-field .icon {
  position: absolute;
  left: 0.9em;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-select {
  padding: 0.6em 2.2em 0.6em 1em;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background-color: var(--bg-alt);
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 1.1em) center, calc(100% - 0.8em) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  appearance: none;
  color: var(--text);
  font-size: 0.92rem;
  max-width: 100%;
}

.filter-select:focus-visible {
  border-color: var(--kombi-blue);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.chip {
  padding: 0.4em 1em;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.chip:hover {
  border-color: var(--accent);
}

.chip[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.filter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}

.result-count {
  font-size: var(--small);
  color: var(--text-muted);
}

.result-count strong {
  color: var(--text);
}

.clear-filters {
  font-size: var(--small);
  color: var(--accent-strong);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2em 0.4em;
  text-decoration: underline;
}

/* ---------- Product grid ---------- */
.catalog-section {
  padding-block: var(--sp-6) var(--sp-9);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-5);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-align: left;
  cursor: pointer;
  padding: 0;
  width: 100%;
}

.product-card:hover,
.product-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--chrome-lo);
}

.product-card.is-featured {
  border-color: var(--flame-orange);
  box-shadow: 0 0 0 1px var(--flame-orange), var(--shadow-card);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .card-media img {
  transform: scale(1.05);
}

.badge {
  position: absolute;
  top: var(--sp-2);
  padding: 0.28em 0.7em;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--paper);
}

.badge-rarity {
  left: var(--sp-2);
}

.badge-status {
  right: var(--sp-2);
}

.rarity-comun {
  background: var(--chrome-lo);
}

.rarity-destacado {
  background: var(--kombi-blue);
}

.rarity-exclusivo {
  background: var(--flame-gradient);
}

.rarity-edicion_limitada {
  background: linear-gradient(90deg, var(--kombi-navy), var(--kombi-blue));
}

.status-available {
  background: var(--success);
}

.status-reserved {
  background: var(--warn);
}

.status-sold {
  background: var(--sold);
}

.status-coming_soon {
  background: var(--kombi-blue);
}

.card-media.is-sold img {
  filter: grayscale(0.85);
  opacity: 0.6;
}

.sold-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 14, 16, 0.25);
}

.sold-overlay span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  text-transform: uppercase;
  font-style: italic;
  color: var(--paper);
  background: rgba(20, 20, 22, 0.75);
  padding: 0.3em 0.9em;
  border-radius: var(--radius-sm);
  transform: rotate(-6deg);
  letter-spacing: 0.04em;
}

.card-body {
  padding: var(--sp-3) var(--sp-3) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}

.card-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
}

.card-sub {
  font-size: var(--small);
  color: var(--text-muted);
}

.card-tags {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.scale-chip {
  font-size: 0.72rem;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 0.2em 0.6em;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding-top: var(--sp-2);
}

.card-price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.card-price.is-consult {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.card-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #25d366;
  color: #06210f;
  flex: none;
  transition: transform 0.12s ease;
}

.card-wa-btn:hover {
  transform: scale(1.08);
}

/* ---------- Empty / loading / error states ---------- */
.state-block {
  text-align: center;
  padding: var(--sp-9) var(--sp-4);
  color: var(--text-muted);
}

.state-block .icon-lg {
  width: 56px;
  height: 56px;
  color: var(--chrome-lo);
  margin-inline: auto;
  margin-bottom: var(--sp-4);
}

.state-block h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: var(--sp-2);
}

.skeleton-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--paper);
}

.skeleton-media,
.skeleton-line {
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--line) 37%, var(--bg-alt) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

.skeleton-media {
  aspect-ratio: 4 / 3;
}

.skeleton-body {
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.skeleton-line {
  height: 12px;
  border-radius: var(--radius-sm);
}

.skeleton-line.w-70 {
  width: 70%;
}

.skeleton-line.w-40 {
  width: 40%;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-media,
  .skeleton-line {
    animation: none;
  }
}

/* ---------- Product modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 16, 0.68);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  padding: 0;
}

@media (min-width: 720px) {
  .modal-backdrop {
    align-items: center;
    padding: var(--sp-5);
  }
}

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

.product-modal {
  background: var(--paper);
  width: 100%;
  max-width: 920px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  box-shadow: var(--shadow-hover);
}

@media (min-width: 720px) {
  .product-modal {
    border-radius: var(--radius-lg);
  }
}

.modal-close {
  position: sticky;
  top: var(--sp-3);
  float: right;
  margin-right: var(--sp-3);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 20, 22, 0.75);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.modal-close:hover {
  background: var(--ink);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 720px) {
  .modal-grid {
    grid-template-columns: 1.1fr 1fr;
  }
}

.modal-gallery {
  background: var(--bg-alt);
}

.gallery-main {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3);
  overflow-x: auto;
}

.gallery-thumbs button {
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: 64px;
  height: 48px;
  flex: none;
  padding: 0;
  cursor: pointer;
  background: none;
}

.gallery-thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs button[aria-current='true'] {
  border-color: var(--accent);
}

.modal-info {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.modal-badges {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.modal-badges .badge {
  position: static;
}

.modal-info h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
}

.modal-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.modal-price {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
}

.modal-price.is-consult {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.modal-desc {
  color: var(--text);
  line-height: 1.6;
}

.spec-table {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-2) var(--sp-4);
  font-size: 0.92rem;
  border-top: 1px solid var(--border);
  padding-top: var(--sp-3);
}

.spec-table dt {
  color: var(--text-muted);
  font-weight: 600;
}

.spec-table dd {
  margin: 0;
}

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  position: fixed;
  right: var(--sp-4);
  bottom: var(--sp-4);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #06210f;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hover);
  z-index: 90;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.wa-float:hover {
  transform: scale(1.08);
}

.wa-float .icon {
  width: 28px;
  height: 28px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--carbon);
  color: var(--steel);
  padding-block: var(--sp-8) var(--sp-6);
}

.footer-grid {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

.footer-brand img {
  height: 36px;
  margin-bottom: var(--sp-3);
}

.footer-brand p {
  color: var(--chrome-lo);
  font-size: 0.92rem;
  max-width: 42ch;
  line-height: 1.55;
}

.footer-col h4 {
  font-family: var(--font-heading);
  color: var(--paper);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-3);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-col a {
  color: var(--steel);
  text-decoration: none;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.footer-col a:hover {
  color: var(--flame-yellow);
}

.footer-bottom {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: var(--chrome-lo);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

/* ---------- API-down banner ---------- */
.api-down-banner {
  background: var(--flame-red);
  color: var(--paper);
  text-align: center;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--small);
  font-weight: 600;
}

.api-down-banner[hidden] {
  display: none;
}
