/* ==================================================
   ===================== BASE =======================
================================================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f1f5f9;
  color: #111827;
}

.hidden {
  display: none !important;
}

/* ==================================================
   ===================== HEADER =====================
================================================== */

.top {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(248, 250, 252, 0.9) 100%
  );
  backdrop-filter: blur(6px);
  padding: 28px 32px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  position: relative;
  z-index: 30;
}
/* sombra suave para presencia */
.top::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.08), transparent);
  pointer-events: none;
}
/* Línea tipo AMG */
.top::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0ea5e9 0%, #06b6d4 40%, #0f172a 100%);
}
/* Logo */
.logo h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #0f172a;
}

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

.logo span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
}
/* Mobile */
@media (max-width: 768px) {
  .top {
    padding: 22px 18px;
    text-align: center;
  }

  .logo h1 {
    font-size: 26px;
  }
}

/* ==================================================
   ===================== NAVBAR =====================
================================================== */

.menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: #0f172a;
  border-bottom: 1px solid #e5e7eb;
}

/* Zona izquierda fija (carrito + buscador) */
.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Scroll categorías */
.menu-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.menu-scroll::-webkit-scrollbar {
  display: none;
}

.menu-scroll button {
  white-space: nowrap;
  flex-shrink: 0;
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.menu-scroll button:hover {
  background: #1d4ed8;
}

/* ================= BUSCADOR ================= */

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
}

#searchInput {
  width: 220px;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  outline: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

/* ================= CARRITO ================= */

.cart-icon {
  display: flex;
  align-items: center;
  font-size: 18px;
  color: white;
  cursor: pointer;
}

.cart-count {
  background: #ef4444;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 12px;
  margin-left: 5px;
  transition: transform 0.2s ease;
}

.cart-count.bump {
  transform: scale(1.2);
}

/* ================= NAV MOBILE ================= */

@media (max-width: 768px) {

  .menu {
    justify-content: space-between;
  }

  .menu-scroll {
    max-width: 60%;
  }

  #searchInput {
    width: 0;
    opacity: 0;
    padding: 8px 0;
    border: none;
  }

  .nav-search.active #searchInput {
    width: 160px;
    opacity: 1;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
  }
}

/* ==================================================
   ================== CONTENEDOR ====================
================================================== */

.contenedor {
  padding: 30px;
  max-width: 1300px;
  margin: auto;
}

/* ==================================================
   ================== GRID PRODUCTOS ===============
================================================== */

#productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 25px;
}
/* =========================================
   CARRITO NEON DARLEXPC V2
========================================= */

/* Contenedor lateral (MECÁNICA ORIGINAL INTACTA) */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 1000;

  display: flex;
  flex-direction: column;
}

/* Estado activo */
.cart-sidebar.active {
  right: 0;
}

/* Overlay */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Header */
.cart-header {
  padding: 18px;
  font-size: 18px;
  font-weight: 700;
  background: #0f172a;
  color: white;
}

/* Lista de productos */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Item individual */
.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 10px;
  background: #ffffff;
  margin-bottom: 14px;
  border: 1px solid #e5e7eb;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.cart-item:hover {
  border-color: #0b5cff;
  box-shadow: 0 0 0 2px rgba(11, 92, 255, 0.08);
}

/* Imagen miniatura */
.cart-item-img {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Información */
.cart-item-info {
  flex: 1;
  font-size: 14px;
}

.cart-item-info strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: #0f172a;
}

.cart-item-info p {
  margin: 2px 0;
  color: #64748b;
}

/* Precio */
.cart-item-price {
  font-weight: 700;
  font-size: 15px;
  color: #0b5cff;
}

/* Footer */
.cart-footer {
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

/* Total */
#cartTotal {
  font-size: 22px;
  font-weight: 800;
  color: #16a34a;
}

/* Botón checkout */
.cart-checkout-btn {
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  background: linear-gradient(90deg, #0b5cff, #2563eb);
  color: white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 20px rgba(11, 92, 255, 0.25);
}

.cart-checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(11, 92, 255, 0.35);
}
/* ==================================================
   ================== CARD PRODUCTO ================
================================================== */

.card {
  background: #ffffff;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.card .stock {
  font-size: 14px;
  color: #475569;
}

.btn-add {
  margin-top: 12px;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: #0b5cff;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.btn-add:hover {
  background: #0947c7;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.img-box {
  width: 100%;
  height: 180px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.card .precio {
  font-size: 20px;
  font-weight: bold;
  color: #0b5cff;
  margin-top: 8px;
}

.card .stock {
  font-size: 14px;
  color: #475569;
  margin-top: 4px;
}

/* ==================================================
   ================== PRODUCTO DETALLE =============
================================================== */

.producto-detalle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

@media (max-width: 900px) {
  .producto-detalle {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.galeria img {
  width: 100%;
  border-radius: 10px;
}

.img-principal {
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}

.thumbs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  overflow-x: auto;
}

.thumbs img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
}

.thumbs img:hover {
  border-color: #2563eb;
}

.info h2 {
  margin-top: 0;
  font-size: 24px;
}

.precio {
  font-size: 26px;
  color: #16a34a;
  font-weight: bold;
}

.tabla {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.tabla td {
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
}

.tabla td:first-child {
  font-weight: 600;
  color: #374151;
}

.btn-volver {
  display: inline-block;
  text-decoration: none;
  background: #2563eb;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 500;
}

/* ==================================================
   ===================== FOOTER =====================
================================================== */

.footer {
  margin-top: 40px;
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: #6b7280;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
