/* =========================================================
   VICTOR GRUGER CAR AUDIO — estilos principales
   ========================================================= */

:root {
  --bg-0: #050505;
  --bg-1: #111111;
  --bg-2: #1a1a1a;
  --line: #222222;
  --text: #ffffff;
  --text-dim: #a3a3a3;
  --accent: #f97316;
  --accent-2: #fb923c;
  --accent-glow: rgba(249, 115, 22, 0.25);
  --ok: #ffffff;
  --font-display: "DM Sans", sans-serif;
  --font-body: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

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

h1,
h2,
h3,
h4,
.logo,
.price-tag {
  font-family: var(--font-display);
  letter-spacing: 0.5px;
}

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

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.topbar {
  background: #080a0d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-weight: 500;
}

.topbar-item svg {
  color: var(--accent);
}

.link-wa {
  color: #25d366;
  font-weight: 600;
  transition: opacity 0.2s;
}

.link-wa:hover {
  opacity: 0.85;
}

.navbar-wrapper {
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 20px;
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
  white-space: nowrap;
}

.logo-icon {
  font-size: 1.3rem;
}

.logo-accent {
  color: var(--accent);
}

.logo-sub {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  color: var(--text-dim);
  padding: 6px 0;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
  border-radius: 2px;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-badge-link svg {
  color: var(--accent-2);
}

.nav-admin {
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-admin::after {
  display: none;
}

.nav-admin:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-label {
  display: none;
}

.logo-short {
  display: none;
}

.nav-icon {
  display: none;
}

@media (min-width: 768px) {
  .cart-label {
    display: inline;
  }
}

@media (max-width: 767px) {
  .cart-btn {
    gap: 4px;
    padding: 8px 10px;
  }
}

/* Cart Button */
.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}

.cart-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #ffffff;
  color: #000000;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
}

.cart-btn:hover .cart-badge {
  background: #cccccc;
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.burger span {
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 32px 20px;
  text-align: center;
  background: linear-gradient(180deg, #0f0f0f 0%, var(--bg-1) 100%);
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 6px;
  text-transform: uppercase;
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  color: var(--text-dim);
  font-size: .95rem;
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 1px;
  cursor: pointer;
  border: none;
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

.btn-whatsapp {
  border-color: #25d366 !important;
  color: #25d366 !important;
  transition: all 0.2s ease;
}

.btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.1);
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.2);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  text-align: center;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Marcas strip ---------- */
.marcas-strip {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 24px 20px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-dim);
}

.marcas-strip span:hover {
  color: var(--accent-2);
}

/* ---------- Filtros + catálogo ---------- */
.catalogo-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  padding: 24px 0 40px;
  margin: 0 auto 18px;
}

.filtros {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  align-self: start;
  position: sticky;
  top: 90px;
}

.filtros-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 8px;
}

.filtros-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}

.filtros-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.5px;
}

.btn-clear-filtros {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--bg-2);
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  transition: all 0.2s;
}

.btn-clear-filtros:hover {
  background: rgba(249, 115, 22, 0.1);
  color: var(--accent-2);
  border-color: var(--accent);
}

.filter-group {
  margin-bottom: 20px;
}

/* Custom select wrapper */
.custom-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.custom-select-wrapper .select-chevron {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--text-dim);
  transition: transform 0.2s;
}

.custom-select-wrapper:focus-within .select-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.filter-select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 34px 10px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.filter-select option {
  background: var(--bg-1);
  color: var(--text);
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label,
.filter-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--accent-2);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-label svg,
.filter-title svg {
  color: var(--accent);
  flex-shrink: 0;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper input {
  width: 100%;
  padding-right: 40px;
}

.search-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  padding: 0;
}

.search-btn svg {
  color: var(--accent);
}

.search-btn:hover {
  opacity: 1;
}

.filter-select-mobile {
  display: none;
}

.filter-select-mobile select {
  width: 100%;
}

.filter-list-desktop {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-list-desktop a {
  display: block;
  color: var(--text-dim);
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
}

.filter-list-desktop a.active {
  color: #ffffff;
  background: var(--accent);
  font-weight: 600;
  border-left: 3px solid var(--accent-2);
}

.filter-list-desktop a:hover:not(.active) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

/* Filter chips */
.filtros-chips {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 12px;
  border-radius: 50px;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  font-size: 0.8rem;
  color: var(--accent-2);
  font-weight: 500;
}

.chip-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
  font-size: 0.75rem;
  padding: 1px 4px;
  border-radius: 50%;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chip-close:hover {
  background: rgba(249, 115, 22, 0.3);
}

/* ---------- Grid de productos ---------- */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

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

.product-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.product-img {
  aspect-ratio: 1 / 1;
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  overflow: hidden;
  position: relative;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.35s ease;
}

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

/* No-image icon (hidden by default, shown via JS when img fails) */
.no-image-icon {
  display: none;
}

.product-img.no-image .no-image-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
}

.product-img.no-image {
  background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
}

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

.product-brand {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-name {
  font-size: 1.05rem;
  font-weight: 600;
  min-height: 44px;
}

.price-tag {
  font-size: 1.5rem;
  color: var(--text);
  margin-top: auto;
}

.price-tag small {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-family: var(--font-body);
}

.stock-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.stock-ok {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.stock-low {
  color: #fb923c;
  background: rgba(249, 115, 22, 0.1);
}

.stock-out {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Stock overlay for catalog cards */
.stock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  z-index: 5;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: none;
}

/* ---------- Detalle de producto ---------- */
.producto-detalle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px 20px;
}

.producto-detalle .product-img {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
  max-height: 70vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-1);
  overflow: hidden;
}

.producto-detalle .product-img img {
  object-fit: contain;
}

.producto-detalle h1 {
  font-size: 2.3rem;
  margin-bottom: 4px;
}

.detalle-precio {
  font-size: 2.2rem;
  margin: 12px 0;
}

.qty-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.qty-selector button {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.qty-selector button:hover {
  background: var(--bg-1);
  border-color: var(--accent);
  color: var(--accent);
}

.qty-selector input {
  width: 64px;
  height: 40px;
  text-align: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  padding: 0;
  font-size: 1rem;
}

.qty-selector input::-webkit-inner-spin-button,
.qty-selector input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-selector input[type=number] {
  -moz-appearance: textfield;
}

/* ---------- Carrito ---------- */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.cart-table th,
.cart-table td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.95rem;
  vertical-align: middle;
}

.cart-product-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  background: var(--bg-2);
  border-radius: 8px;
  padding: 4px;
  border: 1px solid var(--line);
}

.cart-table th {
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.cart-item-name {
  font-weight: 600;
  color: var(--text);
}

.cart-remove {
  color: #f87171;
  cursor: pointer;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cart-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  transform: scale(1.1);
}

.cart-summary {
  max-width: 380px;
  margin-left: auto;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--text-dim);
}

.cart-summary-row.total {
  color: var(--text);
  font-size: 1.3rem;
  font-family: var(--font-display);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* ---------- Checkout ---------- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.checkout-section {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.checkout-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.checkout-section-title svg {
  color: var(--accent-2);
}

.checkout-sidebar {
  position: sticky;
  top: 100px;
}

.order-items-mini {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  max-height: 300px;
  overflow-y: auto;
}

.order-item-mini {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.order-item-mini:last-child {
  border-bottom: none;
}

.order-item-mini img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: var(--bg-2);
  border-radius: 6px;
  padding: 2px;
}

.order-item-mini-info {
  flex: 1;
  font-size: 0.85rem;
}

.order-item-mini-name {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.2;
}

.order-item-mini-meta {
  color: var(--text-dim);
}

@media (max-width: 992px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .checkout-sidebar {
    position: static;
  }
}

.payment-methods {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  flex-wrap: wrap;
}

.payment-icon {
  height: 24px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.payment-icon:hover {
  opacity: 1;
}

.ship-method-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: 8px;
  letter-spacing: 0.5px;
  display: inline-block;
  vertical-align: middle;
}

.ship-enviopack {
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.3);
  background: rgba(37, 211, 102, 0.05);
}

.ship-local {
  color: var(--text-dim);
  border: 1px solid var(--line);
  background: var(--bg-2);
}

/* ---------- Success Page ---------- */
.success-icon {
  width: 80px;
  height: 80px;
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border: 2px solid rgba(34, 197, 94, 0.2);
}

.order-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  margin: 32px 0;
  text-align: left;
}

.order-timeline {
  display: flex;
  justify-content: space-between;
  margin: 40px 0;
  position: relative;
}

.order-timeline::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--line);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  background: var(--bg-0);
  padding: 0 10px;
  text-align: center;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
}

.timeline-step.active .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 15px var(--accent-glow);
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
}

.timeline-step.active .step-label {
  color: var(--accent-2);
}

/* ---------- Formularios ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.9rem;
  color: var(--text-dim);
}

input,
select,
textarea {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 11px 12px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.alert {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.alert-error {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.alert-ok {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 20px 20px 20px;
}

.footer-brand .logo {
  font-size: 1.4rem;
  margin-bottom: 14px;
  display: inline-flex;
}

.footer-brand .logo-sub {
  display: inline-block;
  margin-left: 8px;
}

.footer-desc {
  color: var(--text-dim);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 12px 0 0;
  max-width: 300px;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin: 0 0 16px;
  font-weight: 600;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-contact svg {
  color: var(--accent);
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 16px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Footer responsive */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-desc {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .site-footer {
    margin-top: 60px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
  }

  .footer-brand .logo {
    justify-content: center;
    margin-bottom: 12px;
  }

  .footer-desc {
    margin: 0 auto;
  }
  .footer-contact{
  padding-bottom:20px;
}
  .footer-contact li {
    justify-content: center;
  }

  .footer-links {
    align-items: center;
  }
}

/* ---------- Admin ---------- */
.admin-body {
  background: var(--bg-0);
  min-height: 100vh;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  padding: 10px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-sidebar .logo {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 1rem;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.admin-sidebar a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.admin-sidebar a.active {
  color: var(--accent-2);
  background: rgba(249, 115, 22, 0.05);
  border-left-color: var(--accent);
}

.admin-sidebar a svg {
  opacity: 0.7;
}

.admin-sidebar a.active svg {
  opacity: 1;
}

.admin-content {
  padding: 40px;
  background: var(--bg-0);
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  transition: background 0.3s;
}

.stat-card:hover::before {
  background: var(--accent);
}

.stat-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stat-card .label {
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.stat-card .icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s;
}

.stat-card:hover .icon-box {
  background: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

.stat-card .value {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 10px 0 5px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.stat-card .meta {
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-card.urgent .icon-box {
  color: #f87171;
}
.stat-card.urgent:hover {
  border-color: #f87171;
}
.stat-card.urgent:hover::before {
  background: #f87171;
}
.stat-card.urgent:hover .icon-box {
  background: #f87171;
}

table.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

table.admin-table th {
  background: var(--bg-2);
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

table.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
}

table.admin-table tr:last-child td {
  border-bottom: none;
}

table.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pendiente {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-pagado, .badge-entregado {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-enviado {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-cancelado {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.action-link {
  margin-right: 10px;
  font-size: 0.85rem;
  color: var(--accent-2);
}

.login-box {
  max-width: 450px;
  margin: 100px auto;
  background: var(--bg-1);
  border: 1px solid var(--line);
  padding: 30px;
  border-radius: 12px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 992px) {
  .catalogo-layout {
    grid-template-columns: 1fr;
  }

  .filtros {
    position: static;
    margin-bottom: 0;
  }

  .filter-select-mobile {
    display: block;
  }

  .filter-list-desktop {
    display: none;
  }

  .filtros-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
  }

  .filtros-header {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .filter-group {
    margin-bottom: 0;
  }

  .producto-detalle {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 16px;
    margin-top: 12px;
  }

  .producto-detalle .product-img {
    aspect-ratio: 1 / 1;
    max-height: 50vh;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: none;
  }
}

@media (max-width: 900px) {
  .topbar-inner {
    justify-content: center;
    text-align: center;
    padding: 10px 16px;
    gap: 10px;
  }

  .topbar-info {
    justify-content: center;
  }

  .navbar-wrapper {
    position: relative;
  }

  .navbar {
    padding: 16px;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0a0d11;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0;
    gap: 0;
    border-bottom: 2px solid var(--accent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    z-index: 999;
    animation: menuSlideDown 0.3s ease-out;
  }

  @keyframes menuSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .main-nav.active,
  .main-nav.open {
    display: flex;
  }

  .main-nav .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 24px;
    color: var(--text);
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s;
    position: relative;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.8px;
  }

  .nav-icon {
    display: inline-block;
    color: var(--accent);
    flex-shrink: 0;
    opacity: 0.8;
  }

  .nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 8px 24px;
  }

  .main-nav .nav-admin {
    margin: 12px 24px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--text-dim);
    font-family: var(--font-body);
  }

  .main-nav .nav-admin:hover {
    background: var(--bg-2);
    border-color: var(--accent);
  }

  .burger {
    display: flex;
  }

  .logo-full {
    display: none;
  }

  .logo-short {
    display: inline;
  }

  .logo-sub {
    display: none;
  }
}

@media (max-width: 600px) {
.hero{
    margin-bottom: 24px;
  }
  .container {
    padding: 0 16px;
  }

  .navbar {
    padding: 14px 16px;
  }

  .logo {
    font-size: 1.35rem;
    gap: 6px;
  }

  .logo-sub {
    font-size: 0.55rem;
    padding: 1px 4px;
  }

  .cart-btn {
    padding: 8px 12px;
    font-size: 0.95rem;
  }

  .burger {
    width: 28px;
    height: 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .producto-detalle .product-img {
    aspect-ratio: 1 / 1;
    max-height: 50vh;
  }

  .producto-detalle h1 {
    font-size: 1.6rem;
  }

  .detalle-precio {
    font-size: 1.7rem;
  }

  .cart-table,
  .cart-table thead,
  .cart-table tbody,
  .cart-table th,
  .cart-table td,
  .cart-table tr {
    display: block;
  }

  .cart-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .cart-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 8px;
    background: var(--bg-1);
  }

  .cart-table td {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    padding-left: 45%;
    text-align: right;
  }

  .cart-table td:last-child {
    border-bottom: none;
  }

  .cart-table td:before {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 40%;
    padding-right: 10px;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
    color: var(--text-dim);
    content: attr(data-label);
  }

  .stat-cards {
    grid-template-columns: 1fr;
  }

  .admin-content {
    padding: 15px;
  }

  table.admin-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ---------- Sort bar ---------- */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px 18px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  flex-wrap: wrap;
}

.sort-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.sort-label svg {
  color: var(--accent);
}

.sort-select-wrapper {
  min-width: 200px;
}

.catalogo-main {
  min-width: 0;
}

.resultados-count {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0 0 16px;
}

/* ---------- Skeleton loader ---------- */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.skeleton-card {
  background: var(--bg-1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.skeleton-img {
  aspect-ratio: 1 / 1;
  background: var(--bg-2);
  animation: skeletonShimmer 1.5s infinite;
}

.skeleton-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: var(--bg-2);
  animation: skeletonShimmer 1.5s infinite;
}

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

@keyframes skeletonShimmer {
  0% { opacity: 0.4; }
  50% { opacity: 0.8; }
  100% { opacity: 0.4; }
}

/* ---------- Card entrance animation ---------- */
.card-enter {
  animation: cardFadeIn 0.4s ease both;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Pagination ---------- */
.pagination {
  margin-top: 40px;
  text-align: center;
}

.pagination-info {
  display: block;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.pagination-btns {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: var(--bg-2);
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-btn-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.page-btn-active:hover {
  background: var(--accent-2) !important;
  color: #fff !important;
}

/* ---------- No results ---------- */
.no-results {
  text-align: center;
  color: var(--text-dim);
  padding: 40px 0;
}

/* ---------- Responsive grid ---------- */
@media (max-width: 1100px) {
  .productos-grid,
  .skeleton-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .productos-grid,
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .productos-grid,
  .skeleton-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-card {
    flex-direction: row;
    align-items: stretch;
    min-height: 120px;
  }

  .product-card .product-img {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
  }

  .product-card .product-img img {
    padding: 8px;
  }

  .product-body {
    padding: 12px;
    gap: 2px;
    justify-content: center;
  }

  .product-name {
    font-size: 0.95rem;
    min-height: auto;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .price-tag {
    font-size: 1.25rem;
    margin-top: 4px;
  }

  .product-brand {
    font-size: 0.65rem;
    margin-bottom: 0;
  }

  .stock-badge {
    font-size: 0.65rem;
    padding: 1px 4px;
  }

  .skeleton-card {
    display: flex;
    flex-direction: row;
    height: 120px;
  }

  .skeleton-img {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
  }

  .skeleton-body {
    padding: 12px;
    gap: 8px;
    flex: 1;
    justify-content: center;
  }
}