/* ── Variables ── */
:root {
  --bg:        #f5f5f7;
  --surface:   #ffffff;
  --surface2:  #f0f0f2;
  --border:    #d2d2d7;
  --accent:    #F0820F;
  --accent-dark: #C96A0C;
  --text:      #1d1d1f;
  --muted:     #6e6e73;
  --danger:    #ff3b30;
  --success:   #28a745;
  --warning:   #ff9500;
  --nav-bg:    rgba(255,255,255,.88);
  --nav-border:rgba(0,0,0,.1);
  --splash-bg: #ffffff;
  --card-shadow:       0 1px 2px rgba(0,0,0,.03), 0 4px 12px rgba(0,0,0,.05);
  --card-shadow-hover: 0 8px 30px rgba(0,0,0,.1), 0 20px 60px rgba(0,0,0,.07);
  --nav-h: 56px;
}

[data-theme="dark"] {
  --bg:        #000000;
  --surface:   #1c1c1e;
  --surface2:  #2c2c2e;
  --border:    #3a3a3c;
  --text:      #f5f5f7;
  --muted:     #86868b;
  --nav-bg:    rgba(0,0,0,.85);
  --nav-border:rgba(255,255,255,.08);
  --splash-bg: #000;
  --card-shadow:       0 2px 8px rgba(0,0,0,.5);
  --card-shadow-hover: 0 16px 48px rgba(0,0,0,.7);
  --success:   #30d158;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}

/* ── Splash ── */
#splash-screen {
  position: fixed; inset: 0; background: var(--splash-bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity .6s;
}
#splash-screen.fade-out { opacity: 0; pointer-events: none; }
#splash-logo { width: 80px; height: 80px; object-fit: contain; border-radius: 20px; }

/* ── Suspended overlay ── */
#suspended-overlay {
  display: none; position: fixed; inset: 0; background: var(--bg);
  z-index: 9998; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 24px; gap: 12px;
}
#suspended-overlay.active { display: flex; }
#suspended-overlay img { width: 72px; height: 72px; object-fit: contain; border-radius: 16px; margin-bottom: 8px; }
#suspended-overlay h2 { font-size: 22px; font-weight: 700; }
#suspended-overlay p { font-size: 14px; color: var(--muted); max-width: 320px; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,.8); backdrop-filter: blur(20px);
  color: #fff; padding: 10px 20px; border-radius: 20px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  opacity: 0; transition: opacity .25s, transform .25s;
  z-index: 500; pointer-events: none;
}
[data-theme="dark"] .toast { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.1); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Hero Banner ── */
#heroBannerWrap {
  overflow: hidden;
  line-height: 0;
  height: 0;            /* colapsa hasta que el banner carga — sin espacio en blanco */
  transition: height 0s; /* sin animación en el collapse */
}
#heroBannerWrap.banner-ready {
  height: 220px;        /* se expande solo cuando la imagen está lista */
}
.hero-banner-img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center center;
  /* Arranca invisible → fade-in al cargar (elimina el flash de tamaño natural) */
  opacity: 0;
  transition: opacity 0.35s ease;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}
.hero-banner-img.banner-visible {
  opacity: 1;
}

/* ── Closed banner ── */
.closed-banner {
  background: rgba(255,59,48,.08); border-bottom: 1px solid rgba(255,59,48,.2);
  text-align: center; padding: 10px 16px; font-size: 13px; color: #ff3b30; font-weight: 500;
}

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--nav-border);
  height: var(--nav-h);
  transition: background .25s, border-color .25s;
}
.navbar-inner {
  max-width: 1400px; margin: 0 auto; padding: 0 32px;
  height: 100%; display: flex; align-items: center; gap: 12px;
}
.nav-logo { width: 30px; height: 30px; object-fit: contain; border-radius: 7px; flex-shrink: 0; }
.nav-title {
  font-size: 15px; font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 180px;
  letter-spacing: -0.2px;
}
.nav-links {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
}
.nav-link {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 6px 14px; border-radius: 20px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--surface2); }
.nav-link.active { color: var(--text); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.cart-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 16px; border-radius: 20px; border: none;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background .15s, transform .1s; white-space: nowrap;
}
.cart-btn:hover { background: var(--accent-dark); }
.cart-btn:active { transform: scale(.97); }

.cart-count {
  background: rgba(255,255,255,.3); border-radius: 10px;
  padding: 0 6px; font-size: 11px; font-weight: 800;
  min-width: 18px; text-align: center; display: none;
}
.cart-count.visible { display: inline-block; }

/* ── Dark mode toggle ── */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, transform .1s; flex-shrink: 0;
}
.theme-toggle:hover { background: var(--surface2); transform: scale(1.05); }
.theme-toggle svg { display: block; }

/* ── Screens ── */
.screen { display: none; }
.screen.active { display: block; }

/* ── Catalog page ── */
.catalog-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

.catalog-page-header {
  padding: 36px 0 24px;
}
.catalog-page-title {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.1;
}
.catalog-page-sub {
  font-size: 15px; color: var(--muted); max-width: 480px; line-height: 1.5;
}

/* ── Catalog toolbar ── */
.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.filter-toggle-btn {
  display: none;
  align-items: center; gap: 7px;
  padding: 7px 16px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 20px; color: var(--text);
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all .15s; white-space: nowrap;
  flex-shrink: 0;
}
.filter-toggle-btn:hover { background: var(--surface2); border-color: var(--text); }

.toolbar-spacer { flex: 1; }
.toolbar-results { font-size: 13px; color: var(--muted); white-space: nowrap; }

.sort-wrap {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--text); font-weight: 500;
  flex-shrink: 0;
}
.sort-wrap label {
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0;
}

.sort-select {
  background: transparent; border: none;
  color: var(--accent); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  padding: 2px 18px 2px 2px;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%230071e3' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0 center;
}

/* ── Catalog layout ── */
.catalog-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  align-items: start;
}

/* ── Filter sidebar ── */
.filter-sidebar {
  border-right: 1px solid var(--border);
  padding: 20px 28px 60px 0;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  scrollbar-width: none;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.filter-sidebar::-webkit-scrollbar { display: none; }

.sidebar-header-mobile {
  display: none;
  justify-content: space-between; align-items: center;
  padding-bottom: 16px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 16px; font-weight: 700;
}
.sidebar-close-btn {
  background: none; border: none; cursor: pointer; color: var(--text);
  padding: 6px; border-radius: 50%; transition: background .15s;
  display: flex; align-items: center;
}
.sidebar-close-btn:hover { background: var(--surface2); }

.sidebar-search {
  width: 100%;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px 9px 34px;
  color: var(--text); font-size: 13px; font-family: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 11px center;
  transition: border-color .15s; margin-bottom: 4px;
}
.sidebar-search:focus { outline: none; border-color: var(--accent); }

.filter-group { border-bottom: 1px solid var(--border); }

.filter-group-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; cursor: pointer; user-select: none;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.group-chevron { transition: transform .22s; flex-shrink: 0; }
.filter-group.collapsed .group-chevron { transform: rotate(-90deg); }
.filter-group.collapsed .filter-group-body { display: none; }
.filter-group-body { padding-bottom: 10px; }

.filter-list-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; text-align: left;
  padding: 6px 0; background: none; border: none;
  color: var(--muted); font-size: 14px; font-family: inherit;
  cursor: pointer; transition: color .15s; line-height: 1.4;
}
.filter-list-btn:hover { color: var(--text); }
.filter-list-btn.active {
  color: var(--text); font-weight: 600;
}
.filter-list-btn.active::after {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}

.reset-filters-btn {
  width: 100%; padding: 9px; margin-top: 20px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 20px; color: var(--muted);
  font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.reset-filters-btn:hover { border-color: var(--danger); color: var(--danger); }

/* ── Sidebar overlay (mobile) ── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
  z-index: 199;
}
.sidebar-overlay.visible { display: block; }

/* ── Catalog main ── */
.catalog-main {
  padding: 20px 0 80px 36px;
  min-height: 60vh;
}

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

/* ── Product card ── */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  box-shadow: var(--card-shadow);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
  animation: cardIn .35s ease both;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(0,113,227,.2);
}
[data-theme="dark"] .product-card:hover { border-color: rgba(255,255,255,.12); }
.product-card.out-of-stock { opacity: .4; pointer-events: none; }

.p-badge-wrap {
  position: absolute; top: 8px; left: 8px;
  display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px; z-index: 2;
  max-width: calc(100% - 48px); /* deja espacio para el botón de favorito */
}

.p-img {
  width: 100%; height: 210px; object-fit: contain;
  background: var(--surface); padding: 8px;
  transition: transform .4s ease;
}
.product-card:hover .p-img { transform: scale(1.06); }

.p-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }

.p-marca { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 4px; font-weight: 600; }
.p-name  { font-size: 15px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; letter-spacing: -0.2px; }
.p-specs { font-size: 12px; color: var(--muted); margin-bottom: 12px; }

.p-price-wrap { margin-top: auto; }
.p-price { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.p-price-original { font-size: 13px; color: var(--muted); text-decoration: line-through; margin-bottom: 2px; }
.p-saving { font-size: 11px; color: var(--success); font-weight: 700; margin-top: 2px; }
.p-price-usd { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }

.p-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; gap: 8px;
}

.add-btn {
  padding: 8px 18px; background: var(--accent); color: #fff;
  border: none; border-radius: 20px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background .15s, transform .1s; white-space: nowrap;
}
.add-btn:hover { background: var(--accent-dark); }
.add-btn:active { transform: scale(.97); }
.no-stock-label { font-size: 12px; color: var(--muted); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; padding: 3px 9px;
  border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.badge-new      { background: rgba(40,167,69,.15); color: #1a7a38; }
.badge-grado-a  { background: rgba(0,113,227,.12); color: #0055b3; }
.badge-grado-b  { background: rgba(255,149,0,.12); color: #c47a00; }
.badge-grado-c  { background: rgba(255,59,48,.12); color: #cc2d24; }
.badge-oficial  { background: rgba(120,65,200,.12);color: #6230b8; }
.badge-saving   { background: rgba(40,167,69,.12); color: #1a7a38; }
.badge-featured { background: rgba(255,149,0,.12); color: #c47a00; }

[data-theme="dark"] .badge-new      { background: rgba(48,209,88,.2);  color: #30d158; }
[data-theme="dark"] .badge-grado-a  { background: rgba(0,113,227,.2);  color: #0a84ff; }
[data-theme="dark"] .badge-grado-b  { background: rgba(255,214,10,.2); color: #ffd60a; }
[data-theme="dark"] .badge-grado-c  { background: rgba(255,69,58,.2);  color: #ff453a; }
[data-theme="dark"] .badge-oficial  { background: rgba(191,90,242,.2); color: #bf5af2; }
[data-theme="dark"] .badge-saving   { background: rgba(48,209,88,.15); color: #30d158; }
[data-theme="dark"] .badge-featured { background: rgba(255,214,10,.15);color: #ffd60a; }

/* ── Section title (for cart/checkout screens) ── */
.section-title {
  font-size: 22px; font-weight: 700; margin-bottom: 18px;
  letter-spacing: -0.3px; padding-top: 28px;
  max-width: 1400px; margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px;
}

/* ── Cart screen ── */
.screen-inner {
  max-width: 680px; margin: 0 auto; padding: 0 24px 80px;
}

.cart-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 64px; height: 64px; object-fit: contain;
  background: var(--surface2); border-radius: 12px; padding: 6px; flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name  { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-specs { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cart-item-price { font-size: 14px; font-weight: 800; color: var(--accent); margin-top: 4px; }

.cart-qty {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2); border-radius: 20px; padding: 4px 12px; flex-shrink: 0;
}
.qty-btn { background: none; border: none; color: var(--accent); font-size: 18px; cursor: pointer; line-height: 1; padding: 2px 4px; font-weight: 700; }

.cart-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0 0; font-size: 16px; font-weight: 700;
}
.total-val { font-size: 22px; font-weight: 900; color: var(--accent); }

/* ── Checkout ── */
.checkout-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; margin-bottom: 14px;
  box-shadow: var(--card-shadow);
}
.checkout-section-title {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px;
}
.form-group { margin-bottom: 14px; }
label {
  display: block; font-size: 12px; font-weight: 600; color: var(--muted);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: .6px;
}
input[type=text], input[type=tel], input[type=email], textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 13px; color: var(--text);
  font-size: 15px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none;
}
input[type=text]:focus, input[type=tel]:focus, input[type=email]:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,.12);
}
.checkout-btn {
  width: 100%; padding: 16px; background: var(--accent); color: #fff;
  border: none; border-radius: 14px; font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background .15s, transform .1s;
  margin-top: 8px; letter-spacing: -0.2px;
}
.checkout-btn:hover { background: var(--accent-dark); }
.checkout-btn:active { transform: scale(.99); }
.checkout-btn.loading { opacity: .7; pointer-events: none; }

.wa-order-btn {
  width: 100%; padding: 16px; background: #25d366; color: #fff;
  border: none; border-radius: 14px; font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .15s; margin-top: 8px;
}
.wa-order-btn:hover { background: #1ebc5a; }

.envio-option {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 8px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.envio-option:hover { border-color: var(--accent); }
.envio-option.selected { border-color: var(--accent); background: rgba(0,113,227,.06); }
.envio-option input[type=radio] { accent-color: var(--accent); }
.envio-label { flex: 1; font-size: 14px; font-weight: 600; }
.envio-price { font-size: 14px; font-weight: 700; color: var(--accent); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state-icon { margin-bottom: 16px; color: var(--muted); line-height: 0; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* ── Status screen ── */
.status-card-success {
  text-align: center; padding: 48px 24px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; max-width: 440px; margin: 40px auto;
  box-shadow: var(--card-shadow);
}
.status-icon  { margin-bottom: 16px; color: var(--success); line-height: 0; }
.status-title { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; }
.status-sub   { font-size: 15px; color: var(--muted); margin-bottom: 28px; line-height: 1.5; }

/* ── Footer ── */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 28px 32px; transition: background .25s, border-color .25s;
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 20px; flex-wrap: wrap;
}
.admin-access-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-decoration: none; padding: 5px 12px;
  border: 1px solid var(--border); border-radius: 20px;
  transition: color .15s, border-color .15s, background .15s;
  letter-spacing: .2px;
}
.admin-access-btn:hover {
  color: var(--text); border-color: var(--text);
  background: var(--surface2);
}
.powered-by {
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 6px; font-weight: 500;
}
.powered-by a { color: var(--accent); text-decoration: none; font-weight: 700; transition: opacity .15s; }
.powered-by a:hover { opacity: .75; }
.powered-by-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border); display: inline-block; }

/* ── Repair / Servicio Técnico ── */
.repair-wrapper {
  max-width: 1040px; margin: 0 auto;
  padding: 40px 32px 80px;
}
.repair-page-header {
  text-align: center; padding: 48px 20px 40px;
}
.repair-page-title {
  font-size: clamp(28px, 5vw, 44px); font-weight: 800;
  letter-spacing: -1.2px; color: var(--text); margin-bottom: 10px;
}
.repair-page-sub {
  font-size: 15px; color: var(--muted); max-width: 560px; margin: 0 auto;
  line-height: 1.6;
}

.repair-section { margin-bottom: 56px; }
.repair-section-title {
  font-size: 20px; font-weight: 700; letter-spacing: -0.4px;
  color: var(--text); margin-bottom: 6px;
}
.repair-section-sub {
  font-size: 13px; color: var(--muted); margin-bottom: 24px;
}

/* Service cards */
.repair-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.repair-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--card-shadow);
  transition: box-shadow .2s, transform .2s;
}
.repair-card:hover {
  box-shadow: var(--card-shadow-hover); transform: translateY(-2px);
}
.repair-card-device {
  font-size: 11px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--accent);
}
.repair-card-service {
  font-size: 15px; font-weight: 700; color: var(--text);
  letter-spacing: -0.2px; line-height: 1.3;
}
.repair-card-desc {
  font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px;
}
.repair-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 14px;
}
.repair-price-label {
  font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -0.3px;
}
.repair-card-time {
  font-size: 11px; color: var(--muted); font-weight: 500;
  background: var(--surface2); padding: 3px 8px; border-radius: 6px;
}

/* Booking form */
.repair-form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 32px;
  box-shadow: var(--card-shadow);
}
.repair-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 24px;
}
.repair-form-full { grid-column: 1 / -1; }

.repair-select, .repair-input, .repair-textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 13px; color: var(--text);
  font-size: 14px; font-family: inherit; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.repair-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px; cursor: pointer;
}
.repair-select:focus, .repair-input:focus, .repair-textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,.12);
}
.repair-textarea { resize: vertical; min-height: 80px; }

.repair-form-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.repair-btn-primary {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 14px; border: none;
  background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: background .15s, transform .1s; letter-spacing: -0.2px;
}
.repair-btn-primary:hover { background: var(--accent-dark); }
.repair-btn-primary:active { transform: scale(.98); }

.repair-btn-secondary {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: 14px;
  border: 1.5px solid var(--border);
  background: transparent; color: var(--text);
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: border-color .15s, background .15s, transform .1s;
}
.repair-btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,113,227,.05); }
.repair-btn-secondary:active { transform: scale(.98); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .filter-toggle-btn { display: flex !important; }

  .filter-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: min(300px, 85vw);
    height: 100vh;
    background: var(--surface);
    padding: 20px;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    border-right: 1px solid var(--border);
    overflow-y: auto;
  }
  .filter-sidebar.open { transform: translateX(0); }
  .sidebar-header-mobile { display: flex; }
  .catalog-main { padding: 16px 0 80px; }
  #heroBannerWrap.banner-ready { height: 180px; }
  .hero-banner-img { height: 180px; }
}

@media (max-width: 600px) {
  .navbar-inner { padding: 0 14px; gap: 8px; }
  .nav-links { gap: 2px; }
  .nav-link { font-size: 12px; padding: 5px 9px; }
  .catalog-wrapper { padding: 0 16px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .p-img { height: 150px; padding: 16px; }
  .p-name { font-size: 13px; }
  .p-price { font-size: 17px; }
  .p-body { padding: 12px; }
  .nav-title { max-width: 90px; }
  .site-footer { padding: 20px 16px; }
  .screen-inner { padding: 0 16px 80px; }
  .repair-wrapper { padding: 20px 16px 60px; }
  .repair-form-card { padding: 20px 16px; }
  .repair-form-grid { grid-template-columns: 1fr; }
  .repair-form-actions { flex-direction: column; }
  .repair-btn-primary, .repair-btn-secondary { justify-content: center; }
  .repair-grid { grid-template-columns: 1fr 1fr; }
  /* Banner compacto en mobile */
  #heroBannerWrap.banner-ready { height: 150px; }
  .hero-banner-img { height: 150px; }
  /* Cart: ocultar texto "Carrito", dejar solo ícono + número */
  .cart-btn-label { display: none; }
  .cart-btn { padding: 7px 11px; gap: 5px; }
}

/* ── Promo Banner ── */
.promo-banner {
  background: var(--accent); color: #fff;
  padding: 10px 48px 10px 20px;
  font-size: 13px; font-weight: 500; text-align: center;
  position: relative; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.promo-banner-close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: inherit; font-size: 18px; cursor: pointer; opacity: .7; line-height: 1;
}
.promo-banner-close:hover { opacity: 1; }

/* ── Trust section ── */
.trust-section { padding: 4px 0 28px; }
.trust-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.trust-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
}
.trust-icon { color: var(--accent); flex-shrink: 0; }
.trust-text { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }

/* ── Reviews ── */
.reviews-section { padding: 8px 0 32px; }
.reviews-title { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 16px; }
.reviews-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.review-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px;
}
.review-stars { display: flex; gap: 2px; margin-bottom: 8px; }
.review-text { font-size: 13px; color: var(--text); line-height: 1.6; margin-bottom: 10px; font-style: italic; }
.review-author { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

/* ── Product card — fav button & new badges ── */
.p-fav-btn {
  position: absolute; top: 10px; right: 10px;
  background: var(--surface); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.1);
  color: var(--muted); transition: color .15s, transform .15s; z-index: 2;
}
.p-fav-btn:hover, .p-fav-btn.active { color: #ff3b30; transform: scale(1.1); }
.product-card { position: relative; }

.badge-hot    { background: #ff3b30; color: #fff; }
.badge-new-in { background: #34c759; color: #fff; }
.badge-last   { background: var(--warning); color: #fff; }

.p-cuotas {
  font-size: 11px; color: var(--accent); font-weight: 600; margin-top: 4px;
}
.avisame-btn {
  background: transparent; border: 1.5px solid var(--border);
  border-radius: 20px; padding: 7px 14px; font-size: 12px; font-weight: 600;
  color: var(--text); cursor: pointer; font-family: inherit;
  transition: border-color .15s, color .15s;
}
.avisame-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Product Detail Modal ── */
.detail-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); backdrop-filter: blur(8px);
  z-index: 600; align-items: center; justify-content: center;
  padding: 20px;
}
.detail-overlay.active { display: flex; }
.detail-modal {
  background: var(--surface); border-radius: 24px;
  width: 100%; max-width: 860px; max-height: 90vh;
  overflow-y: auto; position: relative;
  box-shadow: 0 32px 100px rgba(0,0,0,.25);
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity:0; transform: scale(.96) translateY(10px); } to { opacity:1; transform:none; } }
.detail-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface2); border: none; border-radius: 50%;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text); z-index: 2; transition: background .15s;
}
.detail-close:hover { background: var(--border); }
.detail-inner {
  display: grid; grid-template-columns: 1fr 1fr;
}
.detail-img-wrap {
  background: var(--surface); border-radius: 24px 0 0 24px;
  display: flex; align-items: center; justify-content: center;
  padding: 12px; min-height: 300px; position: relative;
}
.detail-img { max-width: 100%; max-height: 340px; object-fit: contain; }
.detail-fav {
  position: absolute; top: 14px; left: 14px;
  background: var(--surface); border: none; border-radius: 50%;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted); transition: color .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.detail-fav:hover, .detail-fav.active { color: #ff3b30; }
.detail-info {
  padding: 40px 36px; display: flex; flex-direction: column; gap: 10px;
}
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-marca { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
.detail-name { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); line-height: 1.2; }
.detail-specs { font-size: 13px; color: var(--muted); }
.detail-price-block { padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.detail-price-original { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.detail-price { font-size: 28px; font-weight: 800; letter-spacing: -0.8px; color: var(--text); }
.detail-saving { font-size: 13px; color: var(--success); font-weight: 700; }
.detail-cuotas { font-size: 14px; color: var(--accent); font-weight: 600; }
.detail-garantia {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--success); font-weight: 600;
}
.detail-desc { font-size: 13px; color: var(--muted); line-height: 1.7; flex: 1; white-space: pre-wrap; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.detail-add-btn {
  flex: 1; padding: 14px 20px; background: var(--accent); color: #fff;
  border: none; border-radius: 14px; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: background .15s;
}
.detail-add-btn:hover { background: var(--accent-dark); }
.detail-wa-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 14px 18px; border: 1.5px solid var(--border);
  border-radius: 14px; font-size: 14px; font-weight: 600;
  color: var(--text); text-decoration: none; transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.detail-wa-btn:hover { border-color: #25d366; color: #25d366; }

/* ── WhatsApp floating button ── */
.wa-float {
  position: fixed; bottom: 24px; right: 24px;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  z-index: 400; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  animation: waFloat 2s ease-in-out infinite;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(37,211,102,.5); animation: none; }
@keyframes waFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }

/* ── Ticket tracker ── */
.ticket-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px; margin-top: 16px;
}
.ticket-header { margin-bottom: 16px; }
.ticket-num { font-size: 16px; font-weight: 800; color: var(--text); }
.ticket-equipo { font-size: 13px; color: var(--muted); margin-top: 2px; }
.ticket-steps { display: flex; gap: 0; margin-bottom: 16px; }
.ticket-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.ticket-step::before {
  content: ''; position: absolute; top: 8px; left: 50%; width: 100%;
  height: 2px; background: var(--border);
}
.ticket-step:last-child::before { display: none; }
.ticket-step.done::before { background: var(--accent); }
.ticket-step-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--border); border: 2px solid var(--surface); z-index: 1;
  position: relative;
}
.ticket-step.done .ticket-step-dot { background: var(--accent); }
.ticket-step.current .ticket-step-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(0,113,227,.2); }
.ticket-step-label { font-size: 10px; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.2; }
.ticket-step.done .ticket-step-label, .ticket-step.current .ticket-step-label { color: var(--text); }
.ticket-notes { font-size: 13px; color: var(--muted); background: var(--surface); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.ticket-cliente { font-size: 12px; color: var(--muted); }
.ticket-not-found { background: rgba(255,59,48,.08); border: 1px solid rgba(255,59,48,.2); border-radius: 12px; padding: 14px; color: #ff3b30; font-size: 13px; margin-top: 12px; }

/* Ticket historial timeline (frontend tracking) */
.ticket-historial { margin-top: 16px; }
.ticket-hist-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.ticket-h-entry { display: flex; gap: 10px; padding-bottom: 14px; }
.ticket-h-entry:last-child { padding-bottom: 0; }
.ticket-h-left { display: flex; flex-direction: column; align-items: center; width: 16px; flex-shrink: 0; }
.ticket-h-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 3px; }
.ticket-h-dot.listo, .ticket-h-dot.entregado { background: var(--success); }
.ticket-h-dot.cancelado { background: var(--danger); }
.ticket-h-dot.pendiente { background: var(--muted); }
.ticket-h-line { flex: 1; width: 2px; background: var(--border); margin-top: 3px; min-height: 6px; }
.ticket-h-right { flex: 1; }
.ticket-h-label { font-weight: 700; font-size: 13px; color: var(--text); }
.ticket-h-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.ticket-h-nota { font-size: 13px; color: var(--muted); margin-top: 5px; background: var(--surface); border-radius: 7px; padding: 7px 10px; }
.ticket-costo-total { margin-top: 14px; background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.25); border-radius: 10px; padding: 10px 14px; font-size: 14px; color: #15803d; }

@media (max-width: 700px) {
  .detail-inner { grid-template-columns: 1fr; }
  .detail-img-wrap { border-radius: 24px 24px 0 0; min-height: 200px; padding: 24px; }
  .detail-info { padding: 24px 20px; }
}

@media (max-width: 400px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ── Carousel ── */
.detail-carousel { position:relative; width:100%; }
.carousel-prev, .carousel-next {
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(0,0,0,.45); color:#fff; border:none;
  width:38px; height:38px; border-radius:50%;
  font-size:26px; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  z-index:3; transition:.18s; user-select:none;
}
.carousel-prev { left:10px; }
.carousel-next { right:10px; }
.carousel-prev:hover, .carousel-next:hover { background:rgba(0,0,0,.72); }
.carousel-dots { position:absolute; bottom:12px; left:0; right:0; display:flex; justify-content:center; gap:7px; pointer-events:none; }
.carousel-dot {
  width:8px; height:8px; border-radius:50%;
  background:rgba(255,255,255,.4); border:none; cursor:pointer;
  padding:0; pointer-events:all; transition:.15s;
}
.carousel-dot.active { background:#fff; transform:scale(1.2); }

/* ── Share button ── */
.detail-share-btn {
  display:flex; align-items:center; gap:6px;
  background:none; border:1px solid var(--border);
  color:var(--muted); padding:10px 16px; border-radius:12px;
  font-size:13px; font-weight:500; cursor:pointer; transition:.18s;
  white-space:nowrap;
}
.detail-share-btn:hover { border-color:var(--accent); color:var(--accent); }

/* ── Compare ── */
.compare-btn { background:var(--surface2); border:1px solid var(--border); color:var(--muted); width:32px; height:32px; border-radius:8px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:.15s; flex-shrink:0; }
.compare-btn.active,.compare-btn:hover { border-color:var(--accent); color:var(--accent); background:rgba(0,113,227,.08); }
.compare-bar { position:fixed; bottom:80px; left:50%; transform:translateX(-50%); background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:12px 16px; display:flex; align-items:center; gap:12px; z-index:900; box-shadow:0 8px 32px rgba(0,0,0,.3); max-width:90vw; }
.compare-bar-items { display:flex; gap:8px; }
.compare-bar-item { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:600; max-width:120px; }
.compare-bar-item img { width:32px; height:32px; object-fit:contain; border-radius:6px; flex-shrink:0; }
.compare-bar-item span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.compare-bar-item button { background:none; border:none; color:var(--muted); cursor:pointer; font-size:14px; flex-shrink:0; }
.compare-btn-action { background:var(--accent); color:#fff; border:none; padding:8px 16px; border-radius:10px; font-size:13px; font-weight:700; cursor:pointer; display:flex; align-items:center; gap:6px; white-space:nowrap; }
.compare-btn-clear { background:none; border:1px solid var(--border); color:var(--muted); width:34px; height:34px; border-radius:8px; cursor:pointer; font-size:16px; }
.compare-overlay { position:fixed; inset:0; background:rgba(0,0,0,.7); backdrop-filter:blur(6px); z-index:1000; display:flex; align-items:center; justify-content:center; padding:20px; }
.compare-modal { background:var(--surface); border-radius:20px; max-width:700px; width:100%; max-height:90vh; overflow-y:auto; }
.compare-header { display:flex; justify-content:space-between; align-items:center; padding:20px 24px; border-bottom:1px solid var(--border); }
.compare-header h2 { font-size:18px; font-weight:700; }
.compare-header button { background:none; border:none; color:var(--muted); cursor:pointer; }
.compare-table-wrap { overflow-x:auto; padding:20px; }
.compare-table { width:100%; border-collapse:collapse; font-size:13px; }
.compare-table th,.compare-table td { padding:12px 16px; text-align:center; border-bottom:1px solid var(--border); }
.compare-table .compare-row-label { text-align:left; color:var(--muted); font-weight:600; white-space:nowrap; }
.compare-table thead th { font-weight:700; }
