:root {
  /* Paleta de marca extraída del kit global de cajasmas.cl (Elementor) */
  --bg: #ffffff; /* fondo blanco en toda la web; navbar, sidebar y cards quedan oscuros aparte */
  --surface: #ffffff;
  --border: #dddddd;
  --ink: #111111;
  --ink-soft: #55666a;

  --header-bg: #092d35; /* dark teal, fondo real del header/logo (barra fija) */
  --ink-heading: #092d35; /* texto de títulos/precios sobre superficies claras */
  --brand-teal: #28798b;
  --brand-cyan: #4db4cb; /* color de botón real del sitio */
  --brand-cyan-hover: #1cd1b2; /* hover real de botón */
  --brand-cyan-bright: #20b6d8;
  --brand-gold: #ffbc13; /* color "primary" del kit, usado para badges/acentos */
  --brand-green: #27ae60;

  --express-bg: #fff6e0;
  --express-ink: #8a6100;

  --font-display: "League Spartan", "Segoe UI", system-ui, sans-serif;
  --font-body: "Albert Sans", "Segoe UI", system-ui, sans-serif;

  --radius: 14px;
  --shadow: 0 6px 20px rgba(9, 45, 53, 0.1);
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

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

h1, h2, h3 { font-family: var(--font-display); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

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

.brand-logo {
  height: 34px;
  width: auto;
}

.brand-tag {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--header-bg);
  background: var(--brand-gold);
  padding: 3px 8px;
  border-radius: 999px;
}

.search-box { flex: 1; max-width: 420px; }

.search-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

.search-box input::placeholder { color: rgba(255, 255, 255, 0.65); }
.search-box input:focus { background: #fff; color: var(--ink); }
.search-box input:focus::placeholder { color: var(--ink-soft); }

.header-cta { margin-left: auto; display: flex; gap: 10px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--brand-cyan);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-cyan-hover); }

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.btn-ghost:hover { border-color: var(--brand-gold); color: var(--brand-gold); }

/* Ghost buttons on light sections need dark ink, not white */
.hero-actions .btn-ghost,
.quote-strip .btn-ghost,
.product-actions .btn-ghost,
.load-more.btn-ghost {
  border-color: var(--border);
  color: var(--ink);
}
.hero-actions .btn-ghost:hover,
.quote-strip .btn-ghost:hover,
.product-actions .btn-ghost:hover,
.load-more.btn-ghost:hover {
  border-color: var(--brand-cyan);
  color: var(--brand-teal);
}

.btn-lg { padding: 13px 26px; font-size: 1.05rem; }

/* Hero */
.hero {
  padding: 32px 0 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.hero-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.hero-banner-img {
  width: 100%;
  height: clamp(220px, 32vw, 420px);
  object-fit: cover;
}

.hero-pill {
  position: absolute;
  left: 20px;
  bottom: 20px;
  background: var(--brand-gold);
  color: var(--header-bg);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  border-radius: 999px;
}

.hero-copy { max-width: 760px; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
  color: var(--ink-heading);
}

.hero p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 60ch;
  margin: 0 0 24px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.hero-alt-link {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--brand-teal);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}

.hero-alt-link:hover { color: var(--brand-cyan-hover); border-color: var(--brand-cyan); }

/* How it works */
.how { padding: 40px 0; }

.how-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.how-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-teal);
  color: var(--brand-gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.how-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink-heading);
}
.how-card p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

.quote-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--express-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.quote-strip-text { display: flex; flex-direction: column; gap: 2px; }
.quote-strip-text strong { font-family: var(--font-display); color: var(--express-ink); font-size: 1.05rem; }
.quote-strip-text span { color: var(--ink-soft); font-size: 0.92rem; }

/* Catalogo */
.catalogo { padding: 20px 0 60px; }

.catalogo-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 84px;
  background: var(--header-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 20px;
}

.filters h2 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 10px;
}

.filters h2:not(:first-child) { margin-top: 20px; }

.category-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

.category-list button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 8px 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  cursor: pointer;
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.category-list button:hover { background: rgba(255, 255, 255, 0.08); }
.category-list button.active { background: var(--brand-cyan); color: var(--header-bg); font-weight: 600; }
.category-list .count { color: rgba(255, 255, 255, 0.5); font-size: 0.8rem; }
.category-list button.active .count { color: var(--header-bg); }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  color: #fff;
  accent-color: var(--brand-cyan);
}

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

#sort-select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  background: var(--header-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.card-media {
  aspect-ratio: 1 / 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-media .placeholder {
  color: var(--ink-soft);
  font-size: 0.8rem;
  text-align: center;
  padding: 10px;
}

.badge-express {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--brand-gold);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-cyan-bright);
}

.card-title {
  font-size: 0.94rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  min-height: 2.4em;
  color: #fff;
}

.card-dims { font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); }

.card-price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 8px;
}

.price-final { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; color: #fff; }

.card-footer {
  padding: 0 14px 14px;
}

.card-link {
  display: block;
  text-align: center;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
}

.card-link:hover { border-color: var(--brand-cyan); color: var(--brand-cyan); }

.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--ink-soft);
}

.load-more { display: block; margin: 28px auto 0; }

/* Product page */
.product-page { padding: 24px 0 60px; }

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

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

.product-loading {
  padding: 80px 0;
  text-align: center;
  color: var(--ink-soft);
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

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

.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media .badge-express { top: 16px; left: 16px; }

.product-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.product-thumbs button {
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
}

.product-thumbs button.active { border-color: var(--brand-cyan); }
.product-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.breadcrumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 10px; }
.breadcrumb a:hover { color: var(--brand-teal); }

.product-info h1 {
  font-weight: 800;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  color: var(--ink-heading);
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 18px;
}

.delivery-note {
  background: var(--express-bg);
  color: var(--express-ink);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.product-specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 0 0 24px;
  font-size: 0.92rem;
}

.product-specs dt { color: var(--ink-soft); }
.product-specs dd { margin: 0; font-weight: 600; }

.product-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.product-description {
  max-width: 720px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.product-description h2 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-heading);
  margin: 0 0 14px;
}

.product-description p {
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.6;
}

.product-description ul {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.6;
}

.product-description li { margin-bottom: 4px; }

/* Footer */
.site-footer {
  background: var(--header-bg);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
  .how-inner { grid-template-columns: 1fr; }
  .catalogo-inner { grid-template-columns: 1fr; }
  .filters { position: static; }
  .search-box { max-width: none; }
  .product-detail { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .header-inner { flex-wrap: wrap; }
  .header-cta { margin-left: 0; order: 3; width: 100%; }
  .header-cta .btn { width: 100%; }
}
