/* ============================================
   Catálogo 3D — hoja de estilos
   Paleta: cama de impresión oscura + acentos de filamento
   ============================================ */

:root {
  --bed: #17191c;
  --bed-line: #24272b;
  --panel: #202327;
  --panel-raised: #2a2e33;
  --ink: #ecebe6;
  --ink-muted: #9a9da3;
  --filament: #ff6a3d;
  --filament-dim: #b84f2c;
  --teal: #2dd4bf;
  --yellow: #eab308;
  --line: #34383e;
  --danger: #e0524a;
  --radius: 10px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bed);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Textura de cama de impresión: rejilla punteada sutil */
body {
  background-image:
    radial-gradient(var(--bed-line) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
}

a { color: inherit; }

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(23, 25, 28, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
}

.brand span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-logo {
  height: 60px;
  width: auto;
  border-radius: 6px;
  flex-shrink: 0;
}

.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.icon-btn {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease;
}

.icon-btn:hover { border-color: var(--filament); }
.icon-btn .icon { width: 18px; height: 18px; }

.cart-toggle {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.cart-toggle:hover { border-color: var(--filament); }

.cart-toggle.bump {
  animation: cartBump 0.5s ease;
}

@keyframes cartBump {
  0% { transform: scale(1); border-color: var(--line); }
  30% { transform: scale(1.12); border-color: var(--filament); box-shadow: 0 0 0 4px rgba(255, 106, 61, 0.18); }
  100% { transform: scale(1); border-color: var(--line); }
}

.cart-count {
  background: var(--filament);
  color: #17191c;
  font-weight: 700;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  padding: 0 6px;
}

/* ---------- Categories ---------- */

.category-filters {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.subcategory-bar {
  display: none;
  gap: 6px;
  flex-wrap: wrap;
  padding-left: 4px;
}

.subcategory-bar.visible { display: flex; }

.subcategory-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--ink-muted);
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.subcategory-chip:hover { border-color: var(--teal); color: var(--ink); }

.subcategory-chip.active {
  background: var(--teal);
  border-color: var(--teal);
  border-style: solid;
  color: #17191c;
  font-weight: 600;
}

.category-chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.6;
}

.category-chip:hover { border-color: var(--ink-muted); color: var(--ink); }

.category-chip.active {
  background: var(--filament);
  border-color: var(--filament);
  color: #17191c;
  font-weight: 600;
}

.category-chip.active::before { background: #17191c; opacity: 1; }

/* ---------- Product grid ---------- */

.catalog {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--filament-dim);
}

.product-photos {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bed-line);
  overflow: hidden;
}

.product-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.product-photos img.active { display: block; }

.photo-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.photo-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
}

.photo-dots span.active { background: var(--filament); }

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
}

.product-sku {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
}

.product-desc {
  font-size: 0.87rem;
  color: var(--ink-muted);
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.desc-more {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--filament);
  margin-top: -4px;
}

.product-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.product-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--teal);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 4px;
  padding: 2px 6px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.product-price {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.add-btn {
  background: transparent;
  border: 1px solid var(--filament);
  color: var(--filament);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.add-btn:hover { background: var(--filament); color: #17191c; }

.add-btn.added {
  background: var(--teal);
  border-color: var(--teal);
  color: #17191c;
}

/* ---------- Empty / loading states ---------- */

.state-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.state-msg .bar {
  width: 160px;
  height: 3px;
  background: var(--line);
  margin: 16px auto 0;
  border-radius: 2px;
  overflow: hidden;
}

.state-msg .bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--filament);
  animation: printing 1.1s ease-in-out infinite;
}

@keyframes printing {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ---------- Cart drawer ---------- */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 12, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 30;
}

.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--panel);
  border-left: 1px solid var(--line);
  z-index: 31;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open { transform: translateX(0); }

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0;
}

.cart-close {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--bed-line);
}

.cart-item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bed-line);
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name { font-size: 0.88rem; font-weight: 600; }

.cart-item-sku {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.qty-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--panel-raised);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.cart-item-price {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  white-space: nowrap;
}

.cart-remove {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.cart-empty {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  padding: 60px 10px;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 1rem;
}

.cart-total span:last-child { font-weight: 700; font-size: 1.15rem; }

.nombre-cliente-wrap {
  padding: 10px 0;
  border-top: 1px dashed var(--line);
}

.nombre-cliente-wrap input {
  width: 100%;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px; /* evita el zoom automático en iOS */
  padding: 8px 10px;
  border-radius: 6px;
}

.nombre-cliente-wrap input:focus { outline: none; border-color: var(--filament); }

.newsletter-ahora-no {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: none;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-decoration: underline;
  cursor: pointer;
}

.newsletter-ahora-no:hover { color: var(--ink); }

.order-btn {
  background: var(--filament);
  color: #17191c;
  border: none;
  padding: 14px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.order-btn:hover { filter: brightness(1.08); }
.order-btn:disabled { opacity: 0.5; cursor: wait; }

.order-hint {
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-align: center;
}

/* ---------- Hero / intro ---------- */

.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 24px 6px;
  text-align: center;
}

.hero-banner {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 4px;
}

.hero-desc {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.4;
}

.hero-extra {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.5;
}

.hero-extra strong { color: var(--filament); font-family: var(--font-mono); }

.howto-banner {
  text-align: center;
  font-size: 0.76rem;
  color: var(--ink-muted);
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  margin-top: 14px;
}

/* ---------- Barra de búsqueda ---------- */

.search-bar {
  display: none;
  position: sticky;
  top: 0; /* se ajusta en JS según la altura real del header */
  z-index: 19;
  align-items: center;
  gap: 10px;
  background: rgba(23, 25, 28, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
}

.search-bar.open { display: flex; }

.search-bar .icon { color: var(--ink-muted); }

.search-bar input {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px; /* evita el zoom automático en iOS al enfocar */
  padding: 10px 14px;
  border-radius: var(--radius);
}

.search-bar input:focus { outline: none; border-color: var(--filament); }

.search-close {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.search-close:hover { color: var(--ink); }

/* ---------- Botón flotante de WhatsApp ---------- */

.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #17191c;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  z-index: 25;
  transition: transform 0.15s ease;
}

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

/* ---------- Títulos de sección reutilizables ---------- */

.section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 4px;
}

.section-hint {
  color: var(--ink-muted);
  font-size: 0.85rem;
  margin: 0 0 16px;
}

/* ---------- Novedades (carrusel) ---------- */

.novedades-section {
  max-width: 1200px;
  margin: 26px auto 0;
  padding: 0 24px;
}

.novedades-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.novedades-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  flex: 1;
}

.novedades-track::-webkit-scrollbar { height: 6px; }
.novedades-track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.novedad-card {
  scroll-snap-align: start;
  flex: 0 0 190px;
  background: var(--panel);
  border: 1px solid var(--filament-dim);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.novedad-card:hover { transform: translateY(-3px); }

.novedad-photo {
  aspect-ratio: 1 / 1;
  background: var(--bed-line);
}

.novedad-photo img { width: 100%; height: 100%; object-fit: cover; }

.novedad-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.novedad-name {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
}

.novedad-price {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--filament);
}

.carousel-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.carousel-btn:hover { border-color: var(--filament); }

/* ---------- Toolbar (categorías + orden) ---------- */

.toolbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 24px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.toolbar .category-filters {
  padding: 0;
  margin: 0;
  flex: 1;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.sort-control label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sort-control select {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* ---------- Selector de color y cantidad por producto ---------- */

.color-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.color-select-wrap label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.color-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-select {
  background: var(--panel-raised);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.color-preview {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bed-line);
  border: 1px solid var(--line);
  flex-shrink: 0;
  display: none;
}

.color-preview.visible { display: block; }

.color-select:focus { outline: none; border-color: var(--filament); }

.color-select.color-select-error {
  border-color: var(--danger);
  animation: colorShake 0.3s ease;
}

@keyframes colorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.color-hint {
  font-size: 0.68rem;
  color: var(--ink-muted);
}

.product-quantity {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--teal);
}

/* ---------- Modal de producto ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 12, 0.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  width: min(880px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal-box { transform: scale(1); }

.modal-sticky-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  padding: 14px 14px 0;
  pointer-events: none;
  height: 0; /* no ocupa espacio propio, solo posiciona los botones */
}

.modal-close,
.modal-share-static {
  pointer-events: auto;
  background: rgba(23, 25, 28, 0.85);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close {
  font-size: 1.3rem;
  line-height: 1;
}

.modal-share-static:hover { border-color: var(--teal); color: var(--teal); }
.modal-share-static .icon { width: 16px; height: 16px; }

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

.modal-photos {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bed-line);
  cursor: pointer;
}

.modal-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.modal-photos img.active { display: block; }

.modal-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-info h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
}

.modal-desc {
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  flex: 1;
}

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


@media (max-width: 640px) {
  .modal-content { grid-template-columns: 1fr; }
  .modal-box { max-height: 78vh; }
  .modal-overlay { padding: 16px; }
}

/* ---------- Confirmación antes de WhatsApp ---------- */

.confirm-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  width: min(420px, 100%);
  padding: 32px 28px;
  text-align: center;
  transform: scale(0.96);
  transition: transform 0.2s ease;
  position: relative;
}

.modal-close-static {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

#statusOverlay .confirm-box { text-align: left; }
#statusOverlay .confirm-box h2 { margin-bottom: 4px; }
#statusOverlay .section-hint { margin-bottom: 0; }

.modal-overlay.open .confirm-box { transform: scale(1); }

.confirm-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--teal);
  color: #17191c;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.confirm-box h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.confirm-box p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0 0 10px;
}

.confirm-box .confirm-warning {
  background: var(--panel-raised);
  border: 1px solid var(--filament-dim);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: var(--ink);
}

.confirm-box .confirm-warning strong { color: var(--filament); }

.confirm-box .order-btn {
  width: 100%;
  margin-top: 16px;
}

/* ---------- Consultar status de pedido ---------- */

.status-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.status-form input {
  flex: 1;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px; /* en iOS, menos de 16px hace zoom automático al enfocar */
  padding: 10px 14px;
  border-radius: var(--radius);
}

.status-form input:focus {
  outline: none;
  border-color: var(--filament);
}

.status-form button {
  background: var(--filament);
  color: #17191c;
  border: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}

.status-form button:hover { filter: brightness(1.08); }
.status-form button:disabled { opacity: 0.5; cursor: wait; }

.status-result {
  margin-top: 16px;
  text-align: left;
}

.status-result:empty { display: none; }

.status-card {
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.status-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.status-order-id {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.status-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.status-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Status de producción */
.status-badge.por-imprimir { background: rgba(255, 106, 61, 0.15); color: var(--filament); border: 1px solid var(--filament-dim); }
.status-badge.imprimiendo { background: rgba(234, 179, 8, 0.15); color: var(--yellow); border: 1px solid rgba(234, 179, 8, 0.4); }
.status-badge.listo-para-entregar,
.status-badge.entregado { background: rgba(45, 212, 191, 0.15); color: var(--teal); border: 1px solid rgba(45, 212, 191, 0.4); }
.status-badge.cancelado { background: rgba(224, 82, 74, 0.15); color: var(--danger); border: 1px solid rgba(224, 82, 74, 0.4); }

/* Status de pago */
.status-badge.pendiente-de-anticipo { background: rgba(255, 106, 61, 0.15); color: var(--filament); border: 1px solid var(--filament-dim); }
.status-badge.anticipo-pagado { background: rgba(234, 179, 8, 0.15); color: var(--yellow); border: 1px solid rgba(234, 179, 8, 0.4); }
.status-badge.pagado { background: rgba(45, 212, 191, 0.15); color: var(--teal); border: 1px solid rgba(45, 212, 191, 0.4); }

.status-badge.default { background: var(--panel); color: var(--ink-muted); border: 1px solid var(--line); }

.status-detail {
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.status-detail strong { color: var(--ink); font-weight: 600; }

.status-pago-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.status-pago-box .saldo { color: var(--filament); font-weight: 700; }

.status-not-found {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--danger);
}

/* ---------- Paginación ---------- */

.pagination {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.pagination.visible { display: flex; }

.pagination button {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 9px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.pagination button:hover:not(:disabled) { border-color: var(--filament); }
.pagination button:disabled { opacity: 0.35; cursor: default; }

.pagination-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 30px 20px 40px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.site-footer a {
  color: var(--filament);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .site-header { padding: 14px 16px; gap: 8px; }
  .brand-logo { height: 46px; }
  .brand { font-size: 1.05rem; gap: 8px; }
  .header-actions { gap: 6px; }
  .icon-btn { width: 36px; height: 36px; }
  .cart-toggle { padding: 9px 11px; }
  .search-bar { padding: 10px 16px; }
  .hero { padding: 18px 16px 4px; }
  .whatsapp-float { width: 50px; height: 50px; bottom: 16px; right: 16px; }
  .cart-drawer { width: calc(100% - 56px); }
  .toolbar {
    padding: 16px 16px 4px;
    flex-direction: column;
    align-items: stretch;
  }
  .sort-control { justify-content: space-between; }
  .sort-control select { flex: 1; }
  .novedades-section { padding: 0 16px; }
  .novedad-card { flex: 0 0 150px; }
  .catalog { padding: 16px 16px 60px; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .product-body { padding: 12px; gap: 6px; }

  /* Botones más grandes para tocar cómodo con el dedo */
  .qty-btn { width: 34px; height: 34px; font-size: 1rem; }
  .carousel-btn { width: 38px; height: 38px; font-size: 1.3rem; }
  .add-btn { padding: 10px 16px; }
  .cart-remove { padding: 6px 0; display: inline-block; }
  .modal-close { width: 40px; height: 40px; }
}
