/* ===== Tokens ===== */
:root {
  --bg: #0d0d0d;
  --surface: #161616;
  --surface-2: #1f1f1f;
  --text: #ffffff;
  --muted: #a1a1a1;
  --border: #2b2b2b;
  --brand: #0099ff;
  --brand-dark: #4db8ff;
  --logo: #e0392b;
  --footer-bg: #000000;
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;
  --radius-lg: 32px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --maxw: 1180px;
  --font-body: "Onest", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: "Onest", var(--font-body);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 13, 13, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 49px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  height: 26px;
  width: auto;
  display: block;
}

.brand-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--logo);
  line-height: 1;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav a {
  color: var(--muted);
  transition: color 0.18s ease;
}

.main-nav a:hover {
  color: var(--text);
}

.nav-cta {
  background: #ffffff;
  color: #0d0d0d !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease;
}

.nav-cta:hover {
  background: #e2e2e2;
  transform: translateY(-1px);
}

/* ===== Hero ===== */
.hero {
  padding: 44px 0;
  background: radial-gradient(
      900px 480px at 18% -10%,
      rgba(0, 153, 255, 0.14),
      transparent 60%
    ),
    var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-left {
  text-align: left;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 153, 255, 0.12);
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 600;
}

.hero h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}

.hero-sub {
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.12rem);
  margin: 0 0 28px;
  max-width: 520px;
}

/* ===== Search ===== */
.search {
  position: relative;
  max-width: 520px;
  margin: 0;
}

/* ===== Hero carousel (coverflow) ===== */
.hero-carousel {
  min-width: 0;
}

.carousel {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 380px;
  overflow: hidden;
}

/* Difuminado a negro en los bordes */
.carousel::before,
.carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 110px;
  z-index: 2;
  pointer-events: none;
}

.carousel::before {
  left: 0;
  width: 70px;
  background: linear-gradient(to right, var(--bg), transparent);
}

.carousel::after {
  right: 0;
  width: 70px;
  background: linear-gradient(to left, var(--bg), transparent);
}

.carousel-track {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  transition: transform 0.4s ease;
  will-change: transform;
}

.cslide {
  flex: 0 0 auto;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.85);
  opacity: 0.5;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.cslide.is-active {
  transform: scale(1);
  opacity: 1;
}

.cslide-card {
  position: relative;
  width: 322px;
  height: 322px;
  border-radius: 16px;
  overflow: hidden;
  background: #2b2b2b;
}

.cslide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cslide-name {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: 80%;
  background: #ffffff;
  color: rgb(102, 102, 102);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  padding: 5px 12px;
  font-size: 11px;
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(20, 20, 20, 0.7);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
  z-index: 3;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
}

.carousel-btn.prev {
  left: 6px;
}

.carousel-btn.next {
  right: 6px;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search input::placeholder {
  color: var(--muted);
}

.search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 153, 255, 0.15);
}

/* ===== Filters ===== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 36px 0 28px;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 9px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-btn:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.filter-btn.is-active {
  background: #ffffff;
  border-color: #ffffff;
  color: #0d0d0d;
}

/* ===== Section title ===== */
.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}

/* ===== Product grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 34px 24px;
  padding-bottom: 60px;
}

.card {
  display: flex;
  flex-direction: column;
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}

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

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

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--border);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 8px;
}

.badge.is-out {
  background: #3a1f1f;
  color: #ff8a8a;
}

.card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 0;
}

.card-info-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.card-title {
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
  color: var(--text);
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  background: var(--surface-2);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.wa-btn:hover {
  background: #2b2b2b;
  border-color: #3a3a3a;
}

.wa-btn svg {
  width: 15px;
  height: 15px;
  color: var(--whatsapp);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
}

.price-cc {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-media {
  display: block;
}

.card-title-link {
  color: inherit;
}

.card-title-link:hover .card-title {
  color: var(--brand-dark);
}

/* ===== Product detail page ===== */
.product {
  padding: 28px 0 64px;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 22px;
}

.back-link:hover {
  color: var(--text);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 568px) 1fr;
  gap: 48px;
  align-items: start;
}

/* ===== Galería ===== */
.product-gallery {
  min-width: 0;
  max-width: 568px;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
}

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

.gallery-thumbs-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.gallery-thumbs {
  display: flex;
  gap: 12px;
  flex: 1;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar {
  display: none;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 118px;
  height: 118px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

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

.gallery-thumb:hover {
  opacity: 1;
}

.gallery-thumb.is-active {
  opacity: 1;
  border-color: var(--text);
}

.gallery-arrow {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.gallery-arrow svg {
  width: 18px;
  height: 18px;
}

.gallery-arrow:hover {
  border-color: var(--text);
}

/* ===== Info ===== */
.product-detail h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.225; /* ≈ 39.2px */
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.product-sub {
  color: var(--muted);
  font-size: 16px;
  line-height: 24px;
  margin: 0 0 20px;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 22px;
}

.product-price .amount {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  line-height: 27px;
  color: var(--text);
}

.product-price .ref {
  color: var(--muted);
  font-size: 13px;
}

.btn-wa-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 47px;
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  font-size: 16px;
  padding: 0 20px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  transition: background 0.18s ease;
}

.btn-wa-detail:hover {
  background: #ededed;
}

.btn-wa-detail svg {
  width: 20px;
  height: 20px;
}

.product-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 26px 0;
}

.product-desc h2 {
  font-weight: 600;
  font-size: 22px;
  line-height: 27px;
  margin: 0 0 10px;
}

.product-desc p {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.related {
  margin-top: 64px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 0 80px;
  font-size: 1rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--footer-bg);
  color: #fff;
  padding: 48px 0 24px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand strong {
  font-family: var(--font-head);
  font-size: 1.1rem;
}

.footer-brand p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.footer-info {
  max-width: 420px;
}

.footer-note {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.18s ease;
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
}

.footer-bottom a:hover {
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero-sub,
  .search {
    max-width: none;
  }
  .product-layout {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

@media (max-width: 600px) {
  .header-inner {
    height: 60px;
  }
  .main-nav {
    gap: 14px;
    font-size: 0.9rem;
  }
  .hero {
    padding: 40px 0 28px;
  }
  .product-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
