/* ==========================================================================
   css/commerce.css
   Tienda Online Intersoft Computación — Experiencia y Arquitectura TodoPCE
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Header E-Commerce: Búsqueda, Menú Desplegable & Toggle de IVA
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 9, 14, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  overflow: visible;
  transition: all 0.25s ease;
}
.navbar.ecommerce-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  position: relative;
  z-index: 1050;
  overflow: visible;
}

/* Buscador en Header */
.header-search-wrap {
  position: relative;
  flex: 1 1 360px;
  max-width: 520px;
  margin: 0 0.5rem;
}
.header-search-bar {
  display: flex;
  align-items: center;
  background: #0b1322;
  border: 1px solid #1e334a;
  border-radius: 30px;
  padding: 0.25rem 0.6rem 0.25rem 1rem;
  transition: all 0.25s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}
.header-search-bar:focus-within {
  border-color: #00f0ff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}
.header-search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.88rem;
  padding: 0.4rem 0.2rem;
}
.header-search-input::placeholder {
  color: #7b94ad;
}
.header-search-btn {
  background: transparent;
  border: none;
  color: #00f0ff;
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  border-radius: 50%;
  transition: background 0.2s;
}
.header-search-btn:hover {
  background: rgba(0, 240, 255, 0.15);
}

/* Sugerencias en tiempo real de búsqueda */
.header-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #0c1524;
  border: 1px solid #1e3a5a;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1100;
  display: none;
}
.header-search-dropdown.active {
  display: block;
}
.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  text-decoration: none;
  color: #e2e8f0;
  transition: background 0.15s;
}
.search-suggestion-item:hover {
  background: rgba(0, 240, 255, 0.08);
}
.search-suggestion-thumb {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 3px;
  flex-shrink: 0;
}
.search-suggestion-info {
  flex: 1;
  min-width: 0;
}
.search-suggestion-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.search-suggestion-meta {
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.15rem;
}
.search-suggestion-price {
  font-weight: 700;
  color: #00f0ff;
  font-size: 0.88rem;
  margin-left: auto;
  white-space: nowrap;
}

/* Menús Desplegables de Categorías y Marcas */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.active {
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.2);
}
.nav-dropdown-trigger svg {
  transition: transform 0.2s;
}
.nav-dropdown:hover .nav-dropdown-trigger svg,
.nav-dropdown.open .nav-dropdown-trigger svg {
  transform: rotate(180deg);
}

/* ==========================================================================
   Mega-Menús Dropdown (Categorías y Marcas) - Estrictamente ocultos por defecto
   ========================================================================== */
.mega-menu-dropdown,
.brands-menu-dropdown,
.dropdown-categorias,
.dropdown-marcas {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1200;
  max-height: 75vh;
  overflow-y: auto;
  background: #0b1324;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.75);
  padding: 0.75rem;
}

.mega-menu-dropdown,
.dropdown-categorias {
  width: 420px;
}

.brands-menu-dropdown,
.dropdown-marcas {
  width: 280px;
}

/* Solo se muestran con :hover (en desktop) o con la clase .open (en click/touch) */
@media (min-width: 769px) {
  .nav-dropdown:hover > .mega-menu-dropdown,
  .nav-dropdown.open > .mega-menu-dropdown,
  .nav-dropdown:hover > .dropdown-categorias,
  .nav-dropdown.open > .dropdown-categorias {
    display: block !important;
  }

  .nav-dropdown:hover > .brands-menu-dropdown,
  .nav-dropdown.open > .brands-menu-dropdown,
  .nav-dropdown:hover > .dropdown-marcas,
  .nav-dropdown.open > .dropdown-marcas {
    display: block !important;
  }
}

.nav-dropdown.open > .mega-menu-dropdown,
.nav-dropdown.open > .brands-menu-dropdown,
.nav-dropdown.open > .dropdown-categorias,
.nav-dropdown.open > .dropdown-marcas {
  display: block !important;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}
.mega-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  color: #cbd5e1;
  transition: all 0.15s;
}
.mega-menu-item:hover {
  background: rgba(0, 240, 255, 0.1);
  color: #00f0ff;
  transform: translateX(4px);
}
.mega-menu-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #112033;
  border-radius: 8px;
  color: #00f0ff;
  flex-shrink: 0;
}
.mega-menu-text strong {
  display: block;
  font-size: 0.88rem;
  color: #fff;
}
.mega-menu-text small {
  font-size: 0.72rem;
  color: #94a3b8;
}
.mega-menu-count {
  margin-left: auto;
  font-size: 0.75rem;
  background: rgba(0, 240, 255, 0.12);
  color: #00f0ff;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-weight: 600;
}

.brands-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: #cbd5e1;
  font-size: 0.85rem;
  transition: all 0.15s;
}
.brands-menu-item:hover {
  background: rgba(0, 240, 255, 0.1);
  color: #00f0ff;
}

/* ==========================================================================
   Fila 2: Tira Horizontal de Pills de Categorías (Desktop y Móvil)
   ========================================================================== */
.categories-pills-bar {
  background: #070d1a;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  padding: 7px 0;
  width: 100%;
  position: relative;
  z-index: 1010;
}
.categories-pills-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.categories-pills-scroll::-webkit-scrollbar {
  display: none;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  text-decoration: none;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.cat-pill:hover,
.cat-pill.active {
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.35);
}

/* Selector Toggle de IVA en Header */
.iva-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: #0c1626;
  border: 1px solid #1e334a;
  border-radius: 20px;
  padding: 2px;
  font-size: 0.78rem;
  user-select: none;
}
.iva-toggle-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 0.3rem 0.65rem;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
.iva-toggle-btn.active {
  background: #00f0ff;
  color: #050d18;
  box-shadow: 0 2px 8px rgba(0, 240, 255, 0.35);
}

/* Botón de Carrito con Totalizador en Header */
.header-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #0d283e, #0e1d2e);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.header-cart-btn:hover {
  border-color: #00f0ff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 240, 255, 0.25);
}
.cart-icon-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00f0ff;
}
.cart-badge-count {
  position: absolute;
  top: -8px;
  right: -9px;
  background: #ff3366;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 10px;
  border: 1px solid #fff;
  min-width: 18px;
  text-align: center;
}
.cart-total-text {
  color: #00f0ff;
  font-weight: 700;
  font-family: monospace, monospace;
}

/* --------------------------------------------------------------------------
   3. Grilla y Tarjetas de Producto (Estilo TodoPCE)
   -------------------------------------------------------------------------- */
.catalog-toolbar {
  background: #0b1424;
  border: 1px solid #1a2f47;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.catalog-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #0d1a2d;
  border: 1px solid #1e334a;
  color: #cbd5e1;
  padding: 0.5rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.category-pill:hover,
.category-pill.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: #00f0ff;
  color: #00f0ff;
  transform: translateY(-1px);
}
.category-pill .pill-count {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 10px;
}
.category-pill.active .pill-count {
  background: #00f0ff;
  color: #050d18;
}

.product-grid-todopce {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.product-card-todopce {
  background: #0b1322;
  border: 1px solid #16263b;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.product-card-todopce:hover {
  border-color: #00f0ff;
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 240, 255, 0.15);
}

.product-card-img-wrap {
  background: #ffffff;
  padding: 1.25rem;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #142438;
}
.product-card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.product-card-todopce:hover .product-card-img {
  transform: scale(1.06);
}

.product-card-badge-verified {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(16, 185, 129, 0.95);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-card-badge-ref {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(100, 116, 139, 0.85);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.product-card-body {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
}
.product-brand-tag {
  color: #00f0ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-sku-tag {
  color: #94a3b8;
  font-family: monospace, monospace;
}

.product-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: #f1f5f9;
  margin: 0 0 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.product-stock-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #10b981;
  margin-bottom: 0.85rem;
}

.product-price-block {
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.product-price-main {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.product-tax-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #00f0ff;
  background: rgba(0, 240, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}
.product-price-usd {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.product-card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.btn-add-cart-todopce {
  background: #00f0ff;
  color: #050d18;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s;
}
.btn-add-cart-todopce:hover {
  background: #38f8ff;
  box-shadow: 0 4px 14px rgba(0, 240, 255, 0.4);
}
.btn-add-cart-todopce.added {
  background: #10b981;
  color: #fff;
}
.btn-wa-consult-todopce {
  background: #1e334a;
  color: #25d366;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-wa-consult-todopce:hover {
  background: #25d366;
  color: #050d18;
}

/* --------------------------------------------------------------------------
   4. Panel Lateral Deslizable del Carrito (Cart Drawer)
   -------------------------------------------------------------------------- */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 2500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.cart-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -520px;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  background: #0a111e;
  border-left: 1px solid #1a314b;
  z-index: 2600;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 36px rgba(0, 0, 0, 0.8);
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer.open {
  right: 0;
}

.cart-drawer-header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid #152538;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #080e18;
}
.cart-drawer-header h2 {
  font-size: 1.15rem;
  margin: 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cart-drawer-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.7rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.3rem;
  transition: color 0.2s;
}
.cart-drawer-close:hover {
  color: #ff3366;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Estado de Carrito Vacío */
.cart-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  margin: auto;
}
.cart-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  color: #334155;
}
.cart-empty-state h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.cart-empty-state p {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

/* Items del Carrito en Drawer */
.cart-drawer-items {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.cart-drawer-item {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 0.85rem;
  background: #0e1726;
  border: 1px solid #1a2c42;
  border-radius: 10px;
  padding: 0.75rem;
  align-items: center;
}
.cart-item-thumb {
  width: 68px;
  height: 68px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
}
.cart-item-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.25rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item-sku {
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: monospace, monospace;
}
.cart-item-price {
  font-size: 0.85rem;
  color: #00f0ff;
  font-weight: 700;
  margin-top: 0.25rem;
}
.cart-qty-controls {
  display: inline-flex;
  align-items: center;
  background: #080f1a;
  border: 1px solid #1a2c42;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 0.4rem;
}
.cart-qty-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: background 0.15s;
}
.cart-qty-btn:hover {
  background: rgba(0, 240, 255, 0.2);
}
.cart-qty-val {
  min-width: 28px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}
.cart-item-remove {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  transition: all 0.2s;
}
.cart-item-remove:hover {
  color: #ff3366;
  background: rgba(255, 51, 102, 0.1);
}

/* Formulario Rápido de Checkout en Drawer */
.cart-drawer-checkout {
  background: #080f1a;
  border: 1px solid #1a2c42;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.5rem;
}
.cart-drawer-checkout h3 {
  font-size: 0.95rem;
  color: #fff;
  margin: 0 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.cart-checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.cart-checkout-full {
  grid-column: 1 / -1;
}
.cart-form-input {
  width: 100%;
  background: #0e1726;
  border: 1px solid #1a2c42;
  border-radius: 7px;
  color: #fff;
  font-size: 0.82rem;
  padding: 0.45rem 0.65rem;
  outline: none;
}
.cart-form-input:focus {
  border-color: #00f0ff;
}
.cart-form-select {
  width: 100%;
  background: #0e1726;
  border: 1px solid #1a2c42;
  border-radius: 7px;
  color: #fff;
  font-size: 0.82rem;
  padding: 0.45rem 0.65rem;
  outline: none;
}

/* Footer / Totales del Drawer */
.cart-drawer-footer {
  padding: 1.1rem 1.25rem;
  background: #080d17;
  border-top: 1px solid #152538;
}
.cart-totals-table {
  width: 100%;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}
.cart-totals-table tr td:first-child {
  color: #94a3b8;
  padding: 0.25rem 0;
}
.cart-totals-table tr td:last-child {
  text-align: right;
  color: #fff;
  font-weight: 600;
  padding: 0.25rem 0;
}
.cart-totals-table tr.total-row td {
  font-size: 1.15rem;
  font-weight: 800;
  color: #00f0ff;
  border-top: 1px solid #1e334a;
  padding-top: 0.5rem;
}

.cart-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.btn-checkout-mp {
  background: linear-gradient(135deg, #009ee3 0%, #007eb5 100%);
  color: #ffffff;
  border: none;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 158, 227, 0.4);
  text-decoration: none;
  width: 100%;
}
.btn-checkout-mp:hover {
  background: linear-gradient(135deg, #00aefb 0%, #009ee3 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 158, 227, 0.55);
}
.btn-checkout-mp:active {
  transform: translateY(0);
}
.btn-checkout-mp:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none;
  box-shadow: none;
}
.mp-btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: mp-spin 0.8s linear infinite;
}
@keyframes mp-spin {
  to { transform: rotate(360deg); }
}
.btn-checkout-wa {
  background: #25d366;
  color: #050d18;
  border: none;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}
.btn-checkout-wa:hover {
  background: #2ee672;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}
.btn-quote-email {
  background: #142338;
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.3);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s;
}
.btn-quote-email:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: #00f0ff;
}
.btn-quote-print {
  background: transparent;
  color: #94a3b8;
  border: none;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.3rem;
  text-align: center;
}
.btn-quote-print:hover {
  color: #fff;
}

/* --------------------------------------------------------------------------
   5. Tira de Beneficios y Confianza (TodoPCE Style)
   -------------------------------------------------------------------------- */
.trust-strip-todopce {
  background: #09121f;
  border-top: 1px solid #152538;
  border-bottom: 1px solid #152538;
  padding: 2.25rem 0;
  margin-top: 3rem;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.trust-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00f0ff;
  flex-shrink: 0;
}
.trust-text h4 {
  font-size: 0.95rem;
  color: #fff;
  margin: 0 0 0.2rem;
  font-weight: 700;
}
.trust-text p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   6. Modal de Presupuesto Imprimible
   -------------------------------------------------------------------------- */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-quote-modal, #printable-quote-modal * {
    visibility: visible;
  }
  #printable-quote-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #fff !important;
    color: #000 !important;
  }
}

/* --------------------------------------------------------------------------
   7. Adaptabilidad Responsiva (Mobile & Tablet)
   -------------------------------------------------------------------------- */
@media (min-width: 769px) {
  .site-header {
    background: #070d1a !important;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15) !important;
    overflow: visible !important;
  }
  .navbar.ecommerce-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.55rem !important;
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
    height: auto !important;
    min-height: 56px !important;
    position: relative !important;
    z-index: 1050 !important;
    overflow: visible !important;
  }
  .navbar.ecommerce-nav .brand-logo {
    margin-right: 0.25rem !important;
    gap: 0.6rem !important;
    flex-shrink: 0 !important;
  }
  .navbar.ecommerce-nav .logo-title {
    font-size: 1.1rem !important;
  }
  .navbar.ecommerce-nav .logo-subtitle {
    font-size: 0.62rem !important;
  }
  .header-search-wrap {
    flex: 1 1 200px !important;
    min-width: 170px !important;
    max-width: 310px !important;
    margin: 0 0.25rem !important;
  }
  .nav-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    margin-left: auto !important;
    position: relative !important;
    z-index: 1060 !important;
    overflow: visible !important;
  }
  .nav-dropdown {
    position: relative !important;
    z-index: 1060 !important;
    overflow: visible !important;
  }
  .nav-dropdown-trigger {
    padding: 0.4rem 0.5rem !important;
    font-size: 0.84rem !important;
    white-space: nowrap !important;
  }
  .header-cart-btn {
    padding: 0.4rem 0.65rem !important;
    font-size: 0.84rem !important;
    gap: 0.4rem !important;
    white-space: nowrap !important;
  }
  .iva-toggle-btn {
    padding: 0.28rem 0.5rem !important;
    font-size: 0.74rem !important;
    white-space: nowrap !important;
  }
  .desktop-only-nav .nav-menu {
    gap: 0.9rem !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .desktop-only-nav .nav-menu .nav-link {
    font-size: 0.84rem !important;
    padding: 0.4rem 0 !important;
  }
  .mobile-toggle {
    display: none !important;
  }
  .mobile-nav-header,
  .mobile-nav-item.mobile-nav-cat,
  .mobile-nav-divider {
    display: none !important;
  }
}

@media (min-width: 1500px) {
  .header-search-wrap {
    max-width: 420px !important;
  }
  .desktop-only-nav .nav-menu {
    gap: 1.25rem !important;
  }
  .desktop-only-nav .nav-menu .nav-link {
    font-size: 0.9rem !important;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .header-search-wrap {
    max-width: 220px !important;
    min-width: 140px !important;
  }
  .desktop-only-nav .nav-menu {
    gap: 0.6rem !important;
  }
  .desktop-only-nav .nav-menu .nav-link {
    font-size: 0.78rem !important;
  }
}

@media (max-width: 1024px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* 1. Header en 3 filas limpias en flex-column, sticky al tope (top: 0), sin superposición */
  .site-header {
    display: flex !important;
    flex-direction: column !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: #070d1a !important;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.85) !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .site-header .navbar,
  .navbar.ecommerce-nav {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
      "logo actions iva"
      "search search search" !important;
    align-items: center !important;
    gap: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
  }

  /* Fila 1 - Izquierda: Logo INTERCOMPUTACIÓN compacto */
  .brand-logo {
    grid-area: logo !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 8px 4px 6px 12px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .brand-logo .logo-icon-wrap {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
  }
  .brand-logo .logo-icon-wrap svg {
    width: 15px !important;
    height: 15px !important;
  }
  .brand-logo .logo-text {
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .brand-logo .logo-title {
    font-size: 0.86rem !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.1 !important;
  }
  .brand-logo .logo-subtitle {
    display: none !important;
  }

  /* Fila 1 - Centro/Derecha: Carrito + Hamburguesa */
  .nav-actions {
    grid-area: actions !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 8px 4px 6px 0 !important;
    flex-shrink: 0 !important;
  }
  .header-cart-btn {
    padding: 0 7px !important;
    font-size: 11.5px !important;
    gap: 4px !important;
    height: 30px !important;
    border-radius: 7px !important;
    flex-shrink: 0 !important;
    background: rgba(0, 240, 255, 0.08) !important;
    border: 1px solid rgba(0, 240, 255, 0.25) !important;
    white-space: nowrap !important;
  }
  .header-cart-btn .cart-icon-box svg {
    width: 15px !important;
    height: 15px !important;
  }
  .header-cart-btn .cart-total-text {
    font-size: 11.5px !important;
    white-space: nowrap !important;
  }
  .mobile-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    border-radius: 7px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(0, 240, 255, 0.25) !important;
    color: #00f0ff !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }
  .mobile-toggle svg {
    width: 17px !important;
    height: 17px !important;
  }

  /* Fila 1 - Derecha: Switch compacto + IVA / IVA inc. */
  .iva-mode-toggle {
    grid-area: iva !important;
    flex-shrink: 0 !important;
    height: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    margin: 8px 12px 6px 2px !important;
    background: #0b1322 !important;
    border: 1px solid #1e334a !important;
    border-radius: 16px !important;
    padding: 2px !important;
    white-space: nowrap !important;
  }
  .iva-toggle-btn {
    font-size: 10px !important;
    padding: 4px 6px !important;
    border-radius: 14px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  /* Ocultar en móvil los dropdowns redundantes de texto Categorías y Marcas */
  .nav-dropdown,
  .nav-dropdown-cats,
  .nav-dropdown-brands {
    display: none !important;
  }

  /* Fila 2: Buscador al 100% de ancho con padding 6px 12px */
  .header-search-wrap {
    grid-area: search !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 6px 12px !important;
    box-sizing: border-box !important;
    position: relative !important;
  }
  .header-search-bar {
    width: 100% !important;
    height: 36px !important;
    padding: 0 6px 0 12px !important;
    border-radius: 20px !important;
    background: #0b1322 !important;
    border: 1px solid #1e334a !important;
    box-sizing: border-box !important;
  }
  .header-search-input {
    font-size: 13px !important;
    padding: 4px 0 !important;
  }
  .header-search-btn {
    padding: 4px !important;
  }
  .header-search-dropdown {
    position: fixed !important;
    top: auto !important;
    left: 12px !important;
    right: 12px !important;
    max-height: 55vh !important;
    z-index: 1100 !important;
  }

  /* Fila 3: Tira de Categorías en UNA sola línea con scroll horizontal táctil */
  .categories-pills-bar {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #070d1a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15) !important;
    z-index: 1 !important;
    overflow: hidden !important;
  }
  .categories-pills-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    gap: 8px !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }
  .categories-pills-scroll::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .cat-pill {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    padding: 5px 11px !important;
    font-size: 11.5px !important;
    line-height: 1.2 !important;
  }

  /* 3. Hero y Ajuste de Separación: nunca tapado por el header */
  .hero-carousel-container,
  #hero-carousel {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  .hero-carousel-container .carousel-content {
    padding-top: 1.5rem !important;
    padding-bottom: 1.75rem !important;
  }

  /* Drawer de Navegación Móvil Hamburguesa */
  .nav-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    width: 320px !important;
    max-width: 88vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #080f1d !important;
    border-left: 1px solid rgba(0, 240, 255, 0.2) !important;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.85) !important;
    transform: translateX(105%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 1200 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 1.5rem 1.25rem 2.5rem !important;
    overflow-y: auto !important;
    margin: 0 !important;
  }
  .nav-menu.open {
    transform: translateX(0) !important;
  }
  .mobile-nav-header {
    display: block !important;
    padding: 0.5rem 0 0.35rem !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #00f0ff !important;
  }
  .mobile-nav-item.mobile-nav-cat .nav-link {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 0.88rem !important;
    padding: 0.5rem 0 !important;
    color: #cbd5e1 !important;
  }
  .mobile-cat-count {
    font-size: 0.72rem !important;
    background: rgba(0, 240, 255, 0.12) !important;
    color: #00f0ff !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
  }
  .mobile-nav-divider {
    display: block !important;
    height: 1px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    margin: 0.85rem 0 !important;
  }
}

/* ==========================================================================
   Widget Flotante Antigravity Bot e Integración WhatsApp
   ========================================================================== */
.antigravity-widget-toggle {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  left: auto !important;
  z-index: 1100 !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #00f0ff, #8b5cf6) !important;
  border: 2px solid rgba(255, 255, 255, 0.35) !important;
  color: #fff !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.45) !important;
  transition: all 0.25s ease !important;
}
.antigravity-widget-toggle:hover {
  transform: scale(1.08) rotate(5deg) !important;
  box-shadow: 0 10px 40px rgba(0, 240, 255, 0.7) !important;
}

.floating-whatsapp-btn {
  position: fixed !important;
  bottom: 20px !important;
  left: 20px !important;
  right: auto !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  background: #25d366 !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45) !important;
  z-index: 950 !important;
  transition: all 0.25s ease !important;
}
.floating-whatsapp-btn:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.65) !important;
}

.antigravity-chat-window {
  position: fixed !important;
  bottom: 86px !important;
  right: 20px !important;
  width: 380px !important;
  max-width: calc(100vw - 2.5rem) !important;
  height: 520px !important;
  max-height: calc(100vh - 7rem) !important;
  max-height: calc(100dvh - 7rem) !important;
  background: rgba(11, 16, 28, 0.96) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(0, 240, 255, 0.35) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 240, 255, 0.15) !important;
  z-index: 1200 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  transition: all 0.25s ease !important;
}
.antigravity-chat-window[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  .antigravity-widget-toggle {
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    width: 50px !important;
    height: 50px !important;
  }
  .floating-whatsapp-btn {
    bottom: 16px !important;
    left: 16px !important;
    right: auto !important;
    width: 48px !important;
    height: 48px !important;
    z-index: 950 !important;
  }
  .antigravity-chat-window {
    bottom: 10px !important;
    right: 10px !important;
    left: 10px !important;
    width: calc(100vw - 20px) !important;
    max-width: none !important;
    height: calc(100dvh - 20px) !important;
    max-height: 560px !important;
    z-index: 1300 !important;
  }
}

@media (max-width: 640px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .product-grid-todopce {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .product-card-img-wrap {
    height: 160px;
    padding: 0.75rem;
  }
  .product-card-title {
    font-size: 0.85rem;
    height: 2.6em;
  }
  .product-price-main {
    font-size: 1.15rem;
  }
  .product-card-actions {
    grid-template-columns: 1fr;
  }
  .cart-drawer {
    max-width: 100%;
  }
  .cart-checkout-grid {
    grid-template-columns: 1fr;
  }
}

/* Modal y Banner de Estado de Pago (Mercado Pago Feedback) */
.payment-status-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 13, 24, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.payment-status-overlay.active {
  opacity: 1;
  visibility: visible;
}
.payment-status-card {
  background: #0b1324;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  max-width: 480px;
  width: 100%;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.payment-status-overlay.active .payment-status-card {
  transform: scale(1);
}
.payment-status-card.status-success {
  border-color: rgba(37, 211, 102, 0.6);
  box-shadow: 0 20px 50px rgba(37, 211, 102, 0.25);
}
.payment-status-card.status-warning {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.25);
}
.payment-status-card.status-error {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 20px 50px rgba(239, 68, 68, 0.25);
}
.payment-status-icon-wrapper {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 32px;
}
.status-success .payment-status-icon-wrapper {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  border: 2px solid #25d366;
}
.status-warning .payment-status-icon-wrapper {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 2px solid #f59e0b;
}
.status-error .payment-status-icon-wrapper {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 2px solid #ef4444;
}
.payment-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.status-success .payment-status-badge {
  background: rgba(37, 211, 102, 0.2);
  color: #2ee672;
  border: 1px solid rgba(37, 211, 102, 0.4);
}
.status-warning .payment-status-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.status-error .payment-status-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.payment-status-title {
  color: #ffffff;
  font-size: 1.35rem;
  margin: 0 0 10px;
  font-weight: 700;
}
.payment-status-desc {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 24px;
}
.payment-status-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.payment-status-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.payment-status-btn-primary {
  background: #00f0ff;
  color: #050d18;
  border: none;
}
.payment-status-btn-primary:hover {
  background: #38bdf8;
  transform: translateY(-1px);
}
.payment-status-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.payment-status-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}
