:root {
    --max-black: #050505;
    --max-blue: #0078d4;
    --max-red: #e81123;
    --max-yellow: #ffb900;
    --max-white: #ffffff;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #65676b;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    overflow-x: hidden;
    overflow-y: auto;
}

#app {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    width: 100%;
    margin: 0 auto;
    position: relative;
    background: var(--bg);
    overflow: visible;
}

.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--max-white);
    border-bottom: 1px solid #e8e8e8;
    padding: 0.75rem 1.5rem;
    gap: 0.75rem;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-height: auto;
    order: -2;
}

.main-container {
    display: flex;
    /* Base (mobile-first): do NOT stretch to fill the viewport.
       This avoids the big empty gap before the map section on mobile. */
    flex: 0 0 auto;
    overflow: visible;
    gap: 0;
    order: -1;
}

/* Desktop/tablet: restore the original “fill the remaining height” behavior */
@media (min-width: 769px){
  .main-container{ flex: 1; overflow: hidden; }
}

header {
    padding: 0.75rem 1.5rem;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    background: var(--max-black);
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    flex-shrink: 0;
    order: -3;
    align-items: center;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
    position: relative;
}

.logo {
    flex-shrink: 0;
    position: absolute;
    left: 0;
}

.search-bar {
    flex: 0 1 500px;
    max-width: 500px;
}

.header-bottom {
    display: none;
}

#admin-toggle-btn,
#cart-btn {
    position: absolute;
    right: 0;
    flex-shrink: 0;
}

#admin-toggle-btn {
    right: 50px;
}


.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.logo img {
    height: 40px;
    width: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text .main {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.logo-text .sub {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--max-yellow);
    letter-spacing: 2px;
}

.icon-btn {
    color: white;
    background: rgba(255,255,255,0.1);
    border: none;
    cursor: pointer;
    position: relative;
    padding: 10px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background 0.2s;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

#admin-toggle-btn {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.2);
}

#cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--max-red);
    color: white;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid var(--max-black);
}

.filters {
    padding: 0 1rem 0.75rem 1rem;
    background: var(--amz-navy);
}

.search-bar {
    display: flex;
    align-items: center;
    background: #222;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
    flex: 1;
    min-width: 200px;
    max-width: 500px;
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    color: white;
}

.search-bar input::placeholder {
    color: #888;
}

.search-btn {
    background: var(--max-blue);
    border: none;
    padding: 0.6rem 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.category-pills {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 0;
    scrollbar-width: none;
    flex: 1;
    -ms-overflow-style: none;
}
.category-pills::-webkit-scrollbar { display: none; }

.sort-control {
    flex-shrink: 0;
}

#sort-select{
  -webkit-appearance:none;
  appearance:none;
  width:100%;
  padding:12px 44px 12px 14px;
  border-radius:14px;
  border:1px solid #e6e6e6;
  background:#f6f7f9;
  font-size:15px;
  font-weight:600;
  line-height:1.2;
  color:#1f2937;
  box-shadow:0 1px 2px rgba(15,23,42,.06);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:18px 18px;
}
#sort-select:focus{
  outline:none;
  border-color:#c7d2fe;
  box-shadow:0 0 0 4px rgba(99,102,241,.14), 0 1px 2px rgba(15,23,42,.06);
}

#sort-select:hover {
    border-color: var(--max-blue);
    background: white;
}
.category-pills::-webkit-scrollbar { display: none; }

.pill {
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    border: 1px solid #d8d8d8;
    background: white;
    color: var(--text-main);
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pill.active {
    background: var(--max-blue);
    border-color: var(--max-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

.product-grid {
    flex: 1;
    overflow-y: visible;
    padding: 1rem;
    display: grid;
    /*
      Layout base (responsive): en pantallas medianas se adapta automáticamente.
      En pantallas grandes forzaremos 5 columnas (ver media query de "Large desktop").
    */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    /*
      Mantener simetría cuando hay pocos productos (incluso 1):
      centramos las tarjetas dentro de su celda del grid.
    */
    justify-items: center;
}


/* ✅ Mobile: 2 columnas para mostrar 4 productos (2x2) en pantalla */
@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .product-card {
    max-width: none;
    padding: 0.75rem;
  }

  .product-card img {
    height: 150px;
  }

  .product-info h3 {
    font-size: 1rem;
  }

  .product-info .price,
  .product-info .product-price {
    font-size: 1.05rem;
  }

  .product-card button,
  .product-card .btn {
    font-size: 0.95rem;
    padding: 10px 12px;
  }

    /* ✅ Solo móvil (LISTADO): botón "AGREGAR AL CARRITO" compacto en altura y ancho casi completo */
#product-grid .product-card > .add-btn:not(.primary-btn):not(.secondary-btn) {
  /* ✅ MÓVIL LISTADO: full width + 1 línea + altura compacta (sin espacio vacío) */
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;

  /* 100% ancho dentro de la tarjeta */
  margin: 10px 0 0 !important;

  /* Altura compacta pero un poco más alta que antes */
  font-size: 0.70rem !important;
  line-height: 1.0 !important;
  padding: 8px 10px !important;

  height: auto !important;
  min-height: 0 !important;

  text-align: center !important;

  /* 1 sola línea */
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;

  /* Estética profesional */
  border-radius: 12px !important;
  letter-spacing: 0.3px !important;
}


  /* ✅ FIX móvil: cuando los botones están en .card-actions deben tener MISMO tamaño y alineación */
  #product-grid .product-card .card-actions{
    display: flex !important;
    gap: 12px !important;
    align-items: stretch !important; /* misma altura */
  }

  #product-grid .product-card .card-actions .details-btn,
  #product-grid .product-card .card-actions .add-btn{
    text-decoration: none !important;

    flex: 1 1 0 !important;
    width: 0 !important;              /* fuerza mismo ancho en flex */
    margin: 0 !important;
    box-sizing: border-box !important;

    min-height: 38px !important;
    height: auto !important;

    padding: 8px 10px !important;

    font-size: clamp(9.5px, 0.8vw, 10.5px) !important;
    line-height: 1.1 !important;
    letter-spacing: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;

    white-space: normal !important;
    word-break: break-word !important;
  }

}

/* ✅ Responsive grid (breakpoints solicitados) */
/* < 720px: 2 columnas (móvil) */
@media (max-width: 719px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* >= 720px y < 980px: 3 columnas */
@media (min-width: 720px) and (max-width: 979px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* >= 980px y < 2000px: 4 columnas */
@media (min-width: 980px) and (max-width: 1999px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* >= 2000px: 5 columnas */
@media (min-width: 2000px) {
  .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
/* ==== Estado de datos (Supabase) ==== */
.data-status {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.35;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.04);
}
.data-status.is-error {
  border-color: rgba(200, 0, 0, 0.25);
  background: rgba(200, 0, 0, 0.06);
}
.data-status.is-loading {
  border-color: rgba(0, 120, 255, 0.25);
  background: rgba(0, 120, 255, 0.06);
  position: relative;
  padding-left: 40px;
}
.data-status.is-loading::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid rgba(0,0,0,0.18);
  border-top-color: rgba(0,0,0,0.55);
  border-radius: 999px;
  animation: dataStatusSpin 0.8s linear infinite;
}
@keyframes dataStatusSpin {
  to { transform: rotate(360deg); }
}
.data-status .data-status-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.data-status button {
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    /* Evita que una sola tarjeta se estire a todo el ancho cuando hay 1 ítem */
    width: 100%;
    max-width: 380px;
    padding: 1rem;
    gap: 0.6rem;
    box-shadow: var(--shadow);
    transition: transform 0.22s cubic-bezier(.2,.8,.2,1), box-shadow 0.22s cubic-bezier(.2,.8,.2,1), border 0.22s cubic-bezier(.2,.8,.2,1);
    border: 1px solid #f0f0f0;
    cursor: pointer;
    will-change: transform;
    height: 100%;
    min-height: 420px;
    max-height: 480px;
}

/* Hover effects ONLY on devices that truly support hover (desktop/laptop).
   This prevents the "hover se queda pegado" bug in mobile Safari/Chrome. */
@media (hover: hover) and (pointer: fine) {
    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 28px rgba(0,0,0,0.15);
        border-color: var(--max-blue);
    }
}

/* Subtle “sheen” sweep on hover (professional feel) */
.product-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.28) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: translateX(-120%);
    transition: transform 0.65s ease;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .product-card:hover::after {
        transform: translateX(120%);
    }
}

/* Click/tap feedback */
.product-card:active {
    transform: translateY(-2px) scale(0.985);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* Keyboard accessibility */
.product-card:focus-within {
    outline: 3px solid rgba(59, 130, 246, 0.22);
    outline-offset: 2px;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
}

/* ===== VARIANTE 2: Chips de especificaciones sobre la imagen (hover/tap) ===== */
.spec-chips {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;

    display: flex;
    flex-direction: column;         /* orden vertical a la izquierda */
    align-items: flex-start;
    gap: 6px;

    pointer-events: none;           /* no bloquear clicks en la tarjeta */
    max-width: 78%;

    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.spec-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 7px 10px;
    border-radius: 12px;

    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.2px;
    color: #ffffff;

    background: rgba(0, 0, 0, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);

    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;

    /* animación por chip (stagger) */
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 220ms ease, transform 220ms ease;
    transition-delay: calc(var(--i) * 70ms);
}

.spec-ico {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    stroke: rgba(255,255,255,0.95);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25));
}

.spec-txt {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mostrar chips: en desktop via hover (solo hover devices) y en móvil/tablet via .is-touch-hover */
.product-card.is-touch-hover .spec-chips {
    opacity: 1;
    transform: translateY(0);
}

.product-card.is-touch-hover .spec-chip {
    opacity: 1;
    transform: translateX(0);
}

@media (hover: hover) and (pointer: fine) {
    .product-card:hover .spec-chips {
        opacity: 1;
        transform: translateY(0);
    }

    .product-card:hover .spec-chip {
        opacity: 1;
        transform: translateX(0);
    }
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    /* Fondo de la “zona vacía” cuando la imagen no ocupa todo el contenedor */
    background: #ffffff;
    border-radius: 8px;
    flex-shrink: 0;
    display: block;
    transition: transform 0.22s cubic-bezier(.2,.8,.2,1);
}

@media (hover: hover) and (pointer: fine) {
    .product-card:hover img {
        transform: scale(1.03);
    }
}

.stock-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc2626;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.product-info h3 {
    font-size: 1.18rem;
    font-weight: 600;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    color: var(--text-main);
}

/* ✅ Desktop-only: evita recortes y evita que el grid “estire” filas al filtrar (incluye 1024px) */
@media (min-width: 1024px) {
    /* En desktop: que las filas NO se estiren para llenar el alto disponible (evita tarjetas larguísimas) */
    .product-grid {
        align-content: start;
    }

    /* Mantener la altura original de tarjeta (no romper el layout de “Todos”) */
    .product-card {
        height: 100%;
        min-height: 420px;
        max-height: 480px;
    }

    /* Reducimos un poco la imagen para que cuando el título pase a 2 líneas no se recorte el botón */
    .product-card img {
        height: clamp(200px, 12vw, 230px);
    }
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.7rem;
}

.stars {
    color: var(--max-yellow);
}

.reviews {
    color: var(--max-blue);
}

.product-info .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--max-red);
    margin-top: 0.15rem;
    letter-spacing: -0.5px;
}

.condition-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #475569;
    background: #eef2f6;
    border: 1px solid #dbe3ec;
    padding: 4px 8px;
    border-radius: 6px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.add-btn {
    background: var(--max-blue);
    color: white;
    border: none;
    padding: 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
    transition: opacity 0.2s, background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.add-btn:hover {
    opacity: 0.9;
    background: #0056b8;
}

/* Overlay & Modals */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    display: none;
    justify-content: flex-end;
}

/* Carrito: drawer a la derecha (tipo Plaza Vea) */
#cart-overlay.overlay {
    position: fixed;
    inset: 0;
    height: 100vh;
    align-items: flex-start;
    padding: 4vh 0;
}

.cart-sidebar {
    width: 85%;
    height: auto;
    max-height: 92vh;
    background: white;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

/* En escritorio: carrito como drawer a la derecha (compacto) */
@media (min-width: 900px) {
    #cart-overlay.overlay {
        justify-content: flex-end;
        align-items: flex-start;
        padding: 6vh 0;
    }

    .cart-sidebar {
        width: min(420px, 92vw);
        height: auto;
        max-height: 88vh;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: -18px 0 50px rgba(0,0,0,0.28);
        animation: slideIn 0.26s ease-out;
    }
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items {
    flex: 0 1 auto;
    overflow-y: auto;
    padding: 1rem;
    /* Evita el gran espacio en blanco cuando hay pocos productos,
       pero permite scroll cuando hay muchos */
    max-height: calc(92vh - 220px);
}

@media (min-width: 900px) {
    .cart-items {
        max-height: calc(88vh - 220px);
    }
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    background-color: #f5f5f5;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 1.08rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--text-main);
}

.cart-specs {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}

.spec-badge {
    font-size: 0.6rem;
    background: #eef2f6;
    color: #475569;
    border: 1px solid #dbe3ec;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-weight: 500;
    width: fit-content;
}

.cart-price {
    font-size: 0.9rem;
    color: var(--max-red);
    font-weight: 700;
    margin: 0.3rem 0 0.5rem 0;
}

/* Controles de cantidad en el carrito */
.qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.6rem;
    background: #e9e9e9;
    border-radius: 999px;
    padding: 0.35rem 0.55rem;
    width: fit-content;
}

.qty-btn {
    width: 34px;
    height: 30px;
    border-radius: 999px;
    border: 0;
    background: #ffffff;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.qty-btn:active {
    transform: scale(0.98);
}

.qty-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    min-width: 30px;
    text-align: center;
}

/* Botón quitar (X) en el carrito: compacto y estético */
.cart-item {
    position: relative;
}

.cart-item .remove-item {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 34px;
    height: 30px;
    border-radius: 999px;
    background: var(--max-red);
    color: #fff;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    box-shadow: 0 6px 14px rgba(232, 17, 35, 0.25);
}

.cart-item .remove-item:hover {
    background: #c50f1f;
}

.cart-item-info p {
    margin: 0;
}

.cart-description {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400 !important;
    margin: 0.5rem 0 0 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.checkout-btn {
    width: 100%;
    background: var(--max-red);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.close-cart-mobile-btn {
    display: none;
    width: 100%;
    background: transparent;
    color: var(--max-blue);
    border: 1px solid var(--max-blue);
    padding: 0.7rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.8rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

/* Modal Details */
.modal-content {
    width: 100%;
    height: 100%;
    background: white;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 110;

    text-decoration: none !important;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;

    color: rgba(5, 5, 5, 0.9);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow: 0 10px 26px rgba(0,0,0,0.12);
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.close-modal:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.16);
    background: rgba(255, 255, 255, 0.92);
}

.close-modal:active {
    transform: translateY(0px) scale(0.98);
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.detail-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.detail-info {
    padding: 2rem;
}

.detail-info h2 {
    margin-bottom: 0.5rem;
}

.detail-info .price {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 1rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.spec-item {
    background: #f8fafc;
    padding: 0.8rem;
    border-radius: 12px;
}

.spec-item span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.spec-item strong {
    font-size: 0.9rem;
}

/* Modal Wrapper Styling */
.modal-wrapper {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.modal-hero {
    /* Fondo blanco detrás de la imagen (móvil + escritorio) */
    background: #ffffff;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-hero .detail-img {
    max-width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
}

.detail-info {
    padding: 2.5rem;
}

/* Desktop/Tablet horizontal: 2 columnas (imagen izquierda + info derecha) */
@media (min-width: 768px) {
    .modal-wrapper {
        flex-direction: row;
        max-width: 1180px;
    }

    .modal-hero {
        flex: 0 0 46%;
        padding: 1.75rem;
        min-height: auto;
        border-bottom: none;
        border-right: 1px solid #f0f0f0;
        /* Centrar imagen en escritorio */
        align-items: center;
        justify-content: center;
    }

    .modal-hero .detail-img {
        /* Un poco más grande y centrada */
        width: 100%;
        max-width: 560px;
        max-height: 600px;
    }

    .detail-info {
        flex: 1;
        padding: 1.75rem !important;
    }

    .product-header {
        margin-bottom: 1.25rem !important;
    }

    .price-section {
        margin: 1rem 0 1.25rem 0 !important;
        padding: 1.25rem !important;
    }
}


.product-header {
    margin-bottom: 2rem;
}

.product-header .meta {
    display: inline-block;
    color: var(--max-blue);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.product-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0.5rem 0;
    line-height: 1.2;
    color: var(--text-main);
}

.product-header .rating-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

.product-header .reviews {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.price-section {
    margin: 1.5rem 0 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff5f5 0%, #fffaef 100%);
    border-radius: 12px;
    border-left: 4px solid var(--max-red);
}

.price-section .price {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--max-red);
    margin: 0;
    line-height: 1;
}

.shipping-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: #f0f0f0;
    padding: 6px 10px;
    border-radius: 6px;
    margin-top: 0.75rem;
}

.description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    text-align: left;
    white-space: pre-wrap; /* respeta saltos de línea, espacios y párrafos tal cual admin.html */
    overflow-wrap: anywhere;
    margin-bottom: 2.5rem;
}

/* Descripción premium (párrafos + viñetas como modal del index) */
.rich-desc {
    margin-top: 0.75rem;
    color: rgba(5,5,5,0.80);
    font-size: 0.95rem;
    line-height: 1.65;
}

.rich-desc .desc-p{
    margin: 0 0 0.85rem 0;
    text-indent: 0.6rem;
}

.rich-desc .desc-list{
    margin: 0.2rem 0 0.95rem 1.05rem;
    padding: 0;
    list-style: disc;
}

.rich-desc .desc-list li{
    margin: 0.35rem 0;
    padding-left: 0.15rem;
}


.specs-section {
    margin-bottom: 2.5rem;
}

.specs-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--max-blue);
}

.specs-grid-detailed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.spec-card {
    display: flex;
    gap: 1rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.spec-card:hover {
    border-color: var(--max-blue);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.1);
    transform: translateY(-2px);
}

.spec-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.spec-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
}

.spec-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spec-content strong {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 700;
}

.cta-section {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
}

.primary-btn {
    text-decoration: none !important;

    flex: 1;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    background: var(--max-blue);
    color: white !important;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.primary-btn:hover {
    background: #0056b8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 120, 212, 0.3);
}

.secondary-btn {
    text-decoration: none !important;

    flex: 1;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    background: var(--max-yellow);
    color: var(--max-black) !important;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.secondary-btn:hover {
    background: #f0a800;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 185, 0, 0.3);
}

/* Pagination Controls */
#pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--max-white);
    border-top: 1px solid #e8e8e8;
    flex-shrink: 0;
}

/* Scroll infinito (móvil) */
.infinite-sentinel {
    height: 1px;
}

/* Loader (spinner) para scroll infinito (móvil) */
.infinite-loader{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 8px 18px;
    color: #374151;
    font-size: 14px;
}

.infinite-loader .spinner{
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 3px solid rgba(0,0,0,0.14);
    border-top-color: rgba(0,0,0,0.55);
    animation: spin 0.85s linear infinite;
}

.infinite-loader .spinner-text{
    line-height: 1.2;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce){
    .infinite-loader .spinner{ animation: none; }
}

@media (max-width: 768px) {
    /* En móvil usamos scroll infinito, ocultamos la paginación */
    #pagination { display: none !important; }
}

.pagination-btn {
    padding: 0.6rem 1.2rem;
    background: var(--max-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.pagination-btn:hover:not(:disabled) {
    background: #0056b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #999;
}

.page-info {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    min-width: 150px;
    text-align: center;
}

/* Load More (paginación por bloques) */
.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 16px 24px;
}

.load-more-btn {
    padding: 0.8rem 1.4rem;
    background: var(--max-blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.2px;
}

.load-more-btn:hover:not(:disabled) {
    background: #0056b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.25);
}

.load-more-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.load-more-status {
    font-size: 0.9rem;
    color: rgba(0,0,0,0.65);
    text-align: center;
}

/* Payment Modal */
#payment-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.payment-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease-out;
}

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

.payment-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.payment-modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.payment-method:hover {
    border-color: var(--max-blue);
    background: #f5f9ff;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.1);
}

.payment-icon {
    font-size: 2.5rem;
    min-width: 60px;
    text-align: center;
}

.payment-info {
    flex: 1;
}

.payment-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.3rem 0;
}

.payment-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.payment-btn {
    padding: 0.6rem 1.2rem;
    background: var(--max-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.payment-btn:hover {
    background: #0056b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

/* Attach receipt payment styling */
#attach-receipt-payment {
    border: 2px dashed var(--max-yellow) !important;
}

#attach-receipt-payment:hover {
    border-color: var(--max-yellow) !important;
    background: linear-gradient(135deg, #fffbf0 0%, #fff9e6 100%) !important;
    box-shadow: 0 4px 12px rgba(255, 185, 0, 0.2) !important;
}

#attach-receipt-payment .payment-btn:hover {
    background: #f0a800;
    box-shadow: 0 4px 12px rgba(255, 185, 0, 0.4);
}

.back-btn {
    background: none;
    border: none;
    color: var(--max-blue);
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #0056b8;
    transform: translateX(-4px);
}

.payment-btn.secondary {
    background: #f0f0f0;
    color: var(--text-main);
}

.payment-btn.secondary:hover {
    background: #e0e0e0;
}

.payment-details {
    padding: 1.5rem;
    background: #f9f9f9;
    border-top: 1px solid #e8e8e8;
}

.payment-details h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.details-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.detail-item .label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.detail-item .value {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
}

.amount-section {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f9ff 100%);
    padding: 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--max-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.amount-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amount-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--max-blue);
}

.bcp-logo-section {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
}

.bcp-logo {
    height: 60px;
    object-fit: contain;
}

#close-payment-modal {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
}

/* Admin Panel Styles */
.admin-panel-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.admin-login {
    flex-direction: column;
    gap: 1.5rem;
}

.admin-login h2 {
    color: var(--text-main);
    margin-bottom: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.admin-input:focus {
    outline: none;
    border-color: var(--max-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.admin-btn {
    padding: 0.8rem 1.5rem;
    background: var(--max-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-btn:hover {
    background: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.login-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.admin-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.admin-header h2 {
    color: var(--text-main);
}

.admin-header-buttons {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.admin-btn-download {
    padding: 0.6rem 1.2rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.admin-btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.admin-btn-logout {
    padding: 0.6rem 1.2rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-btn-logout:hover {
    background: #dc2626;
}

.admin-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-search {
    display: flex;
}

.admin-search input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
}

.admin-products-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 400px;
    overflow-y: auto;
}

.admin-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    gap: 1rem;
}

.admin-product-item:hover {
    background: #f0f0f0;
    border-color: var(--max-blue);
}

.admin-product-info {
    flex: 1;
}

.admin-product-info h4 {
    margin: 0 0 0.3rem 0;
    color: var(--text-main);
}

.admin-product-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-product-edit-btn {
    padding: 0.6rem 1rem;
    background: var(--max-blue);
    color: white;
    border: none;
    border-radius: 6px 0 0 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.admin-product-edit-btn:hover {
    background: #0066cc;
}

.admin-product-delete-btn {
    padding: 0.6rem 1rem;
    background: var(--max-red);
    color: white;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    margin-left: -1px;
}

.admin-product-delete-btn:hover {
    background: #c40812;
}

.admin-product-buttons {
    display: flex;
    gap: 0;
}

.admin-product-editor {
    border-top: 2px solid #eee;
    padding-top: 1.5rem;
}

.admin-product-editor h3 {
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.admin-edit-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-form-group label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.admin-form-group input[type="text"],
.admin-form-group input[type="url"],
.admin-form-group input[type="number"],
.admin-form-group input[type="password"],
.admin-form-group select,
.admin-form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.admin-form-group input[type="text"]:focus,
.admin-form-group input[type="url"]:focus,
.admin-form-group input[type="number"]:focus,
.admin-form-group input[type="password"]:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
    outline: none;
    border-color: var(--max-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.admin-form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.admin-image-preview {
    width: 100%;
    height: 150px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f9f9f9;
}

.admin-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.admin-image-upload {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.image-input-group {
    position: relative;
}

.file-input-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

.file-input-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.file-input-label:active {
    transform: translateY(0);
}

#admin-product-image {
    display: none;
}

.admin-btn-camera {
    padding: 0.75rem 1.5rem;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
    font-size: 0.95rem;
}

.admin-btn-camera:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.admin-btn-camera:active {
    transform: translateY(0);
}

.upload-status {
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.upload-status p {
    margin: 0;
}

.admin-btn-save {
    padding: 1rem 1.5rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.admin-btn-save:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.admin-form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.admin-btn-delete {
    flex: 1;
    padding: 0.8rem 1.5rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-btn-delete:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.admin-search-create {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-search-create input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
}

.admin-btn-create {
    padding: 0.8rem 1.5rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.admin-btn-create:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Open Filter Button - Hidden by default on desktop */
.open-filter-btn {
    display: none !important;
}

/* ===== FILTER SIDEBAR STYLES ===== */
.filter-sidebar {
    width: 280px;
    background: var(--card-bg);
    border-right: 1px solid #e8e8e8;
    padding: 1.5rem;
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-self: stretch;
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 #f5f5f5;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e8e8e8;
}

.filter-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-filter-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    font-size: 1.5rem;
    padding: 0.4rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.2s;
    align-items: center;
    justify-content: center;
}

.close-filter-btn:hover {
    background: #f0f2f5;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-section h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.5rem 0;
}

.price-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.price-inputs input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    transition: border 0.2s;
}

.price-inputs input:focus {
    border-color: var(--max-blue);
}

.price-inputs span {
    color: var(--text-muted);
    font-weight: 600;
}

.apply-filter-btn {
    padding: 0.6rem 1rem;
    background: var(--max-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.apply-filter-btn:hover {
    background: #0066a1;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

.price-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e8e8e8;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}


/* Dual range slider (min/max) */
.range-slider {
    position: relative;
    width: 100%;
    height: 26px; /* enough room for thumbs */
    margin-top: 8px;
}

.range-slider-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    border-radius: 3px;
    background: #e8e8e8; /* default; JS paints the selected range */
}

/* Overlay both sliders on the same track */
.range-slider .price-slider {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 26px;
    margin: 0;
    background: transparent;
    pointer-events: none; /* allow clicking through to the thumbs */
}

/* Re-enable interaction on thumbs */
.range-slider .price-slider::-webkit-slider-thumb {
    pointer-events: auto;
}

.range-slider .price-slider::-moz-range-thumb {
    pointer-events: auto;
}

/* Ensure max thumb can sit above min thumb when they overlap */
.price-slider-min { z-index: 3; }
.price-slider-max { z-index: 4; }

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--max-blue);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 120, 212, 0.4);
}

.price-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--max-blue);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 120, 212, 0.4);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.brands-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.brand-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.brand-checkbox:hover {
    background: #f5f5f5;
}

.brand-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--max-blue);
}

.brand-checkbox label {
    flex: 1;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
}

.main-content {
    /* Base (mobile-first): content-height (no forced empty space) */
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
    height: auto;
}

@media (min-width: 769px){
  .main-content{ flex: 1; overflow: hidden; height: 100%; }
}


/* Large desktop: 25 productos = 5 columnas x 5 filas */
@media (min-width: 2000px) {
    .product-grid {
        /* Forzamos 5 columnas para que la primera página se vea 5x5 */
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    /* En 5 columnas la tarjeta debe ocupar su celda sin un max-width rígido */
    .product-card {
        max-width: none;
    }
}

/* Mobile responsive */
@media (max-width: 1024px) {
    .product-grid {
        /* columns handled by dedicated breakpoints */
        padding: 1rem;
    }
}

@media (max-width: 768px) {

    /* ✅ SOLO MÓVIL: evita desbordes horizontales tras abrir/cerrar el detalle */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

/* ✅ Fix móvil: evita que el botón se recorte (tarjeta con altura flexible) */
.product-card{
    height: auto !important;
    min-height: unset !important;
    max-height: none !important;
    overflow: visible !important;
}


    /* Header adjustments */
    header {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .add-btn {
        /* Móvil: evita que el texto del botón se recorte en algunos navegadores */
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.1;
        padding: 0.65rem 0.6rem;
        font-size: 0.7rem;
        min-height: 44px;
    }
    .star-rating {
        font-size: 12px;
        letter-spacing: 0.5px;
    }


    .header-top {
        width: 100%;
        position: static;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    .logo {
        flex-shrink: 0;
        position: static !important;
        left: auto !important;
        order: 1;
        min-width: auto;
    }

    .logo img {
        height: 35px;
        width: 35px;
    }

    .logo-text .main {
        font-size: 1.1rem;
    }

    .logo-text .sub {
        font-size: 0.6rem;
    }

    .search-bar {
        flex: 1 1 auto !important;
        max-width: none !important;
        min-width: 120px;
        order: 2;
    }

    .search-bar input {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
    }

    .search-bar input::placeholder {
        font-size: 0.75rem;
    }

    .search-btn {
        padding: 0.5rem 0.6rem;
    }

    #admin-toggle-btn,
    #cart-btn {
        position: static !important;
        right: auto !important;
        padding: 3px 4px !important;
        font-size: 0.55rem;
        order: 3;
        flex-shrink: 0;
        border-radius: 3px;
    }

    #admin-toggle-btn {
        margin-right: 0.15rem;
        max-width: 65px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 2px 3px !important;
        font-size: 0.48rem;
    }

    #cart-btn {
        padding: 3px !important;
        min-width: 30px;
    }

    /* Filters Row */
    .filters-row {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }

    .pill {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
    }

    #sort-select {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
        max-width: 130px;
    }

    /* Product Grid */
    .product-grid {
        /* Una columna estable en móvil */
        grid-template-columns: 1fr;
        gap: 0.8rem;
        padding: 0.8rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        justify-items: stretch;
    }

    .product-card {
        /*
          En móvil el contenido de la tarjeta puede crecer (título/etiquetas/botón).
          Evitamos recortar el botón "AGREGAR AL CARRITO" eliminando alturas fijas.
        */
        height: auto;
        min-height: unset;
        max-height: none;
        padding: 0.6rem;
        gap: 0.4rem;
        max-width: 100%;
    }

    .product-card img {
        height: 180px;
        object-fit: contain;
    }

    .product-info h3 {
        font-size: 1.02rem;
    }

    .price {
        font-size: 1.1rem;
    }

    /*
      En móvil, los botones de WhatsApp para adjuntar comprobante no deben cortarse.
      Permitimos salto de línea solo para esos botones.
    */
    #whatsapp-transfer-btn,
    #whatsapp-yape-btn,
    #whatsapp-plin-btn {
        white-space: normal;
        line-height: 1.2;
        text-align: center;
        padding: 0.7rem 0.9rem;
    }

    /*
      SOLO MÓVIL: En el detalle de Yape, el botón de WhatsApp debe mostrarse
      debajo del monto a pagar y por encima del item "Número Yape".
      Lo logramos reordenando visualmente los elementos (sin tocar el HTML).
    */
    #yape-details {
        display: flex;
        flex-direction: column;
    }

    #yape-details .amount-section {
        order: 1;
        margin-bottom: 0.8rem;
    }

    #whatsapp-yape-btn {
        order: 2;
        margin-top: 0 !important;
        margin-bottom: 1.2rem;
    }

    #yape-details .details-container {
        order: 3;
    }

    #yape-details p {
        order: 4;
    }

    /* Filter Sidebar */
    .filter-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 75%;
        max-width: 320px;
        z-index: 1000;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.25);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        background: var(--card-bg);
    }

    .filter-sidebar.active {
        transform: translateX(0);
    }

    .close-filter-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-main);
        font-size: 1.5rem;
        padding: 0.4rem;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        transition: all 0.2s;
    }

    .close-filter-btn:hover {
        background: #f0f2f5;
    }

    .open-filter-btn {
        display: inline-block !important;
        padding: 0.65rem 1.2rem;
        background: var(--max-blue);
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 0.85rem;
        font-weight: 600;
        margin: 0.5rem 0.8rem;
        box-shadow: 0 2px 8px rgba(0, 120, 212, 0.2);
        transition: all 0.2s;
    }

    .open-filter-btn:hover {
        background: #0066a1;
        box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
        transform: translateY(-1px);
    }

    .main-container {
        position: relative;
        width: 100%;
    }

    .main-content {
        width: 100%;
    }

    /* Modal adjustments */
    .modal-content {
        width: 95%;
        height: 95%;
        border-radius: 12px;
    }

    /*
      MÓVIL: reordenar CTAs del modal de producto para que no se corten.
      Los botones deben ir debajo del precio y encima de especificaciones.
    */
    .detail-info {
        display: flex;
        flex-direction: column;
    }

    .detail-info .product-header { order: 1; }
    .detail-info .price-section { order: 2; }
    .detail-info .cta-section {
        order: 3;
        /*
          En móvil:
          - Acercar el precio a los botones (menos separación arriba)
          - Dar un poco más de espacio entre los botones y "Especificaciones"
        */
        margin-top: 1rem;
        margin-bottom: 2rem;
    }
    /* Primero specs y luego descripción (solo móvil) */
    .detail-info .specs-section { order: 4; }
    .detail-info .description { order: 5; }

    /* En móvil: ajustar espaciados para que el precio quede más cerca de estrellas y CTAs */
    .product-header {
        /* acercar el bloque de precio al rating (solo móvil) */
        margin-bottom: 0.6rem;
    }

    .product-header .rating-row {
        /* un poco más pegado al precio */
        margin-top: 0.05rem;
        margin-bottom: 0;
    }

    .price-section {
        /* reducir separación entre estrellas y precio (solo móvil) */
        margin: 0.1rem 0 1.2rem 0;
    }

    /*
      MÓVIL: en Yape, mover el botón de WhatsApp a la parte superior
      para evitar que se entrecorte en pantallas pequeñas.

      IMPORTANTE:
      No fijar "display: flex" de forma permanente, porque fuerza a que el
      bloque de detalles se vea aunque el HTML lo tenga en display:none.
      Solo aplicamos el layout cuando el modal de Yape está abierto.
    */
    #yape-details[style*="display: block"],
    #yape-details[style*="display:block"] {
        display: flex !important;
        flex-direction: column;
    }

    #yape-details[style*="display: block"] .back-btn,
    #yape-details[style*="display:block"] .back-btn { order: 1; }
    #yape-details[style*="display: block"] h3,
    #yape-details[style*="display:block"] h3 { order: 2; }
    #yape-details[style*="display: block"] .amount-section,
    #yape-details[style*="display:block"] .amount-section { order: 3; }
    #yape-details[style*="display: block"] #whatsapp-yape-btn,
    #yape-details[style*="display:block"] #whatsapp-yape-btn { order: 4; }
    #yape-details[style*="display: block"] .details-container,
    #yape-details[style*="display:block"] .details-container { order: 5; }
    #yape-details[style*="display: block"] p,
    #yape-details[style*="display:block"] p { order: 6; }

    .detail-img {
        max-height: 200px;
    }

    .spec-grid-detailed {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    /* Payment Modal */
    .payment-modal-content {
        width: 95%;
        height: auto;
        max-height: 95vh;
        overflow-y: auto;
    }

    .payment-method {
        flex-direction: column;
        padding: 1rem;
    }

    .payment-icon {
        font-size: 2.5rem;
    }

    /* Admin Panel */
    .admin-panel-content {
        width: 95%;
        height: auto;
        max-height: 95vh;
        border-radius: 12px;
    }

    .admin-edit-form {
        gap: 0.8rem;
    }

    .admin-form-group {
        margin-bottom: 0.8rem;
    }

    .admin-product-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-product-buttons {
        width: 100%;
        gap: 0.5rem;
    }

    .admin-product-edit-btn,
    .admin-product-delete-btn {
        flex: 1;
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .admin-product-edit-btn {
        border-radius: 6px;
        margin-left: 0;
    }

    .admin-product-delete-btn {
        border-radius: 6px;
        margin-left: 0;
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem;
    }

    .pagination-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    header {
        padding: 0.4rem 0.75rem;
    }

    .logo img {
        height: 30px;
        width: 30px;
    }

    .logo-text .main {
        font-size: 0.9rem;
    }

    .logo-text .sub {
        font-size: 0.5rem;
        letter-spacing: 1px;
    }

    .search-bar {
        flex: 0 1 200px !important;
        max-width: 200px !important;
        min-width: 150px;
    }

    .search-bar input {
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
        min-width: 100px;
    }

    .search-bar input::placeholder {
        font-size: 0.75rem;
    }

    .search-btn {
        padding: 0.4rem 0.5rem;
    }

    #admin-toggle-btn {
        padding: 2px 3px !important;
        font-size: 0.42rem;
        max-width: 50px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 48px;
    }

    #cart-btn {
        padding: 3px !important;
        min-width: 28px;
    }

    /* Filters */
    .filters-row {
        padding: 0.4rem 0.75rem;
    }

    .pill {
        padding: 0.3rem 0.8rem;
        font-size: 0.7rem;
    }

    #sort-select {
        padding: 0.3rem 0.4rem;
        font-size: 0.65rem;
        max-width: 110px;
    }

    /* Product Grid */
    .product-grid {
        /* Mantener 1 columna fija (evita que el layout "flote" tras volver del modal) */
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding: 0.6rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        justify-items: stretch;
    }

    .product-card {
        min-height: 300px;
        padding: 0.3rem;
        gap: 0.2rem;
        max-width: 100%;
    }

    .product-card img {
        height: 180px;
        object-fit: contain;
        flex-grow: 1;
    }

    .product-info h3 {
        font-size: 0.92rem;
        -webkit-line-clamp: 2;
        line-height: 1;
    }

    .price {
        font-size: 0.9rem;
        margin-top: 0.05rem;
    }

    .add-btn {
        padding: 0.5rem;
        font-size: 0.7rem;
    }

    /* Filter Pills - scrollable */
    .category-pills {
        padding: 0.5rem 0;
    }

    .pill {
        padding: 0.3rem 0.7rem;
    }

    /* Hide Sort Control */
    .sort-control {
        display: none !important;
    }

    /* Modals */
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .close-modal {
        position: fixed;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 50px;
        background: var(--max-blue);
        color: white;
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 120;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        font-size: 1.5rem;
    }

    .detail-info {
        display: flex;
        flex-direction: column;
    }

    .cta-section {
        order: -1;
        margin-top: 0;
        margin-bottom: 1.5rem;
        flex-direction: column;
    }

    .primary-btn,
    .secondary-btn {
        flex: 1;
        width: 100%;
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .modal-hero {
        max-height: 150px;
    }

    .detail-img {
        max-height: 150px;
    }

    .detail-info {
        padding: 0.8rem;
    }

    .product-header h2 {
        font-size: 1rem;
    }

    .price {
        font-size: 1rem;
    }

    /* Filter Sidebar - Visible in mobile */
    .filter-sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        height: 100vh !important;
        width: 75% !important;
        max-width: 320px !important;
        z-index: 1000 !important;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.25) !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        overflow-y: auto !important;
        display: block !important;
        padding: 1.5rem !important;
    }

    .filter-sidebar.active {
        transform: translateX(0) !important;
    }

    /* Crear overlay oscuro cuando filtros estén abiertos */
    body.filter-open::before {
        content: '';
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
    }

    /* Product Card */
    .product-card {
        display: flex;
        flex-direction: column;
    }

    .add-btn {
        margin-top: auto;
    }

    /* Cart Sidebar */
    .cart-sidebar {
        width: 100%;
        flex-direction: column;
    }

    .cart-item {
        gap: 0.8rem;
        flex-wrap: wrap;
        padding: 0.8rem;
        margin-bottom: 1rem;
    }

    .cart-item img {
        width: 50px;
        height: 50px;
        object-fit: contain;
        object-position: center;
        background-color: #f5f5f5;
    }

    .cart-item-info {
        flex: 1 1 calc(100% - 70px);
        min-width: 0;
    }

    .cart-item-info h4 {
        font-size: 0.95rem;
        word-break: break-word;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* En móvil, el carrito debe ser compacto (evita "venta" gigante) */
    .cart-specs,
    .cart-description {
        display: none;
    }

    .qty-controls {
        margin-top: 0.45rem;
    }

    .cart-items {
        flex: 1;
        overflow-y: auto;
        order: 3;
    }

    .cart-footer {
        padding: 0.8rem 1rem;
        order: 1;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
    }

    .total-row {
        margin-bottom: 0.6rem;
        font-size: 1rem;
    }

    .checkout-btn {
        padding: 0.8rem;
    }

    .close-cart-mobile-btn {
        display: flex !important;
        order: 1;
    }

    .cart-item img {
        width: 60px;
        height: 60px;
    }

    .spec-badge {
        font-size: 0.6rem;
        padding: 2px 6px;
    }

    /* Pagination */
    .pagination {
        padding: 0.75rem;
    }

    .pagination-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .page-info {
        font-size: 0.8rem;
    }
}

/* Admin toggle removed from index (admin.html es el único acceso) */
#admin-toggle-btn{display:none !important;}


/* Category badges (added by admin/index integration) */
.category-badge{display:inline-block;margin:6px 0 8px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600;line-height:1;opacity:.95;background:#eef2ff;color:#3730a3;}
.category-badge.cat-laptops{background:#e0f2fe;color:#075985;}
.category-badge.cat-tablets{background:#dcfce7;color:#166534;}
.category-badge.cat-mini-pcs{background:#fef9c3;color:#854d0e;}
.category-badge.cat-cargadores{background:#fee2e2;color:#991b1b;}
.category-badge.cat-cables{background:#e5e7eb;color:#111827;}
.category-badge.cat-audifonos{background:#f3e8ff;color:#6b21a8;}
.category-badge.cat-parlantes{background:#ffedd5;color:#9a3412;}
.category-badge.cat-otros{background:#f1f5f9;color:#334155;}


/* Hide category badge on product cards (requested) */
.category-badge{display:none !important;}

/* Admin cards (estilo tipo index) */
#productsGrid .col-12, #productsGrid [class*="col-"]{ }
.admin-product-card{
  background: rgba(15,18,33,.92);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  height:100%;
  display:flex;
  flex-direction:column;
}
.admin-card-img{
  width:100%;
  height:180px;
  object-fit:cover;
  background: rgba(255,255,255,.04);
}
.admin-card-img--placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
}
.admin-card-body{
  padding:14px 14px 16px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.admin-card-title{
  font-weight:800;
  font-size:1.05rem;
  line-height:1.2;
  color:#fff;
}
.admin-card-meta{
  color: rgba(255,255,255,.75);
  font-size:.9rem;
}
.admin-card-price{
  font-weight:900;
  font-size:1.2rem;
  color:#63b3ff;
}
.admin-card-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.admin-card-rating{
  color: rgba(255,255,255,.85);
  font-weight:700;
  font-size:.9rem;
}
.admin-specs{
  margin:4px 0 0;
  padding-left:16px;
  color: rgba(255,255,255,.8);
  font-size:.9rem;
}
.admin-specs li{ margin:2px 0; }
.admin-card-actions{
  display:flex;
  gap:8px;
  margin-top:10px;
  flex-wrap:wrap;
}


/* Rating input big like screenshot */
#admin-product-rating.form-control-lg{
  font-size: 1.6rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
}



/* ===== Admin Form: improved spacing & contrast (Fix20) ===== */
.admin-layout { color: #e5e7eb; }

.admin-form-panel,
.admin-form-card,
.admin-form-section {
  color: #e5e7eb;
}

.admin-form-card{
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.admin-form-card h2,
.admin-form-card h3,
.admin-form-card h4,
.admin-form-card label{
  color: #f8fafc;
}

.admin-form-group{
  display:flex;
  flex-direction:column;
  gap: 8px;
  margin-bottom: 18px;
}

.admin-form-group label{
  font-weight: 700;
  letter-spacing: .2px;
}

.admin-form-group input,
.admin-form-group select,
.admin-form-group textarea{
  width: 100%;
  background: rgba(2, 6, 23, 0.75);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  padding: 14px 14px;
  font-size: 16px;
}

.admin-form-group textarea{
  min-height: 110px;
  resize: vertical;
}

.admin-form-group input::placeholder,
.admin-form-group textarea::placeholder{
  color: rgba(148, 163, 184, 0.85);
}

/* ensure any nested bootstrap columns in the form stack nicely */
.admin-form-card .row > [class*="col-"]{
  width: 100%;
  flex: 0 0 100%;
  max-width: 100%;
}

.admin-form-card .row{
  --bs-gutter-x: 0.9rem;
  --bs-gutter-y: 1rem;
}

/* rating field: large, comfy */
#admin-product-rating{
  font-size: 26px;
  padding: 16px 16px;
  border-radius: 14px;
}


/* FIX21: Make form fields one-per-row and improve contrast */
.admin-card-inner, .admin-card-inner * { box-sizing: border-box; }

.admin-card-inner.admin-form-sticky{
  background: #f3f4f6;
  color:#111;
}

.admin-card-inner.admin-form-sticky h3,
.admin-card-inner.admin-form-sticky label,
.admin-card-inner.admin-form-sticky .muted{
  color:#111 !important;
}

.admin-card-inner.admin-form-sticky .admin-grid{
  display:block !important;
}

.admin-card-inner.admin-form-sticky .admin-grid > .admin-card{
  width:100% !important;
  margin-bottom: 12px;
}

.admin-card-inner.admin-form-sticky .admin-row{
  display:flex;
  flex-direction:column !important;
  gap:10px !important;
}

.admin-card-inner.admin-form-sticky input,
.admin-card-inner.admin-form-sticky select,
.admin-card-inner.admin-form-sticky textarea{
  width:100% !important;
  color:#111 !important;
  background:#fff !important;
  border:1px solid #d1d5db !important;
}

.admin-card-inner.admin-form-sticky input::placeholder,
.admin-card-inner.admin-form-sticky textarea::placeholder{
  color:#6b7280 !important;
}

.admin-card-inner.admin-form-sticky .form-text,
.admin-card-inner.admin-form-sticky small{
  color:#374151 !important;
}

.admin-card-inner.admin-form-sticky .admin-form-group{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom: 12px;
}

.admin-card-inner.admin-form-sticky .admin-form-group label{
  font-weight:700;
}

.admin-card-inner.admin-form-sticky #admin-product-rating{
  font-size:28px;
  padding:18px 16px;
  border-radius:16px;
  height:auto;
}


/* FIX22a: ensure admin table text is visible on light background */
.admin-table, .admin-table *{
  color:#111827 !important;
  opacity:1 !important;
}
.admin-table td, .admin-table th{
  color:#111827 !important;
}

/* FIX22a: left-align and widen form fields */
.admin-form-panel, .admin-form, .admin-form-inner{
  text-align:left !important;
}
.admin-form-group{
  width:100% !important;
  max-width:none !important;
}
.admin-form-group input,
.admin-form-group textarea,
.admin-form-group select{
  width:100% !important;
  max-width:none !important;
}

/* FIX22a: reduce image preview height */
.admin-image-preview{
  height:220px !important;
  max-height:220px !important;
}

#imgPreview{height:220px !important; max-height:220px !important; object-fit:contain;}


/* --- Mobile fix: close (X) aligned right and blue button (mobile only) --- */
@media (max-width: 768px) {
  /* Make header a row so title stays left and X goes right */
  .filter-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .filter-header h3 {
    margin: 0;
    line-height: 1.2;
  }

  /* Turn the X into a blue button */
  .close-filter-btn {
    width: 36px;
    height: 36px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #0d6efd !important;
    border: 1px solid #0b5ed7 !important;
    color: #fff !important;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }

  .close-filter-btn:active {
    transform: scale(0.96);
  }
}

@media (max-width: 768px) {
  .filter-header h3 {
    margin: 0;
    line-height: 1.2;
  }

  .close-filter-btn {
    background: #0d6efd !important;
    border: 1px solid #0b5ed7 !important;
  }

  .close-filter-btn:active {
    transform: scale(0.96);
  }
}


/* --- FIX: Reducir altura de gráficos en sección Ventas (Admin) --- */
#salesSection .admin-card{
  height: 260px;
  overflow: hidden;
}
#salesSection .admin-card canvas{
  height: 200px !important;
  max-height: 200px !important;
}


/* --- Admin: dashboard KPIs (Ventas) --- */
.admin-kpi{
  background: #fff;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 14px;
  padding: 14px 14px;
  box-shadow: 0 6px 18px rgba(15,23,42,0.05);
}
.admin-kpi-label{
  font-size: 12px;
  color: rgba(15,23,42,0.65);
  margin-bottom: 6px;
}
.admin-kpi-value{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .2px;
  color: rgba(15,23,42,0.92);
}
.admin-kpi-sub .admin-kpi-value{
  font-size: 18px;
}
@media (max-width: 768px){
  .admin-kpi{ padding: 12px; }
  .admin-kpi-value{ font-size: 18px; }
}

/* ===== Performance-friendly star rating (no SVG/icon rerender) ===== */
.star-rating {
  --rating: 5;
  --star-fill: #ffb900;
  --star-empty: #cbd5e1;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 1px;
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--star-fill) calc((var(--rating) / 5) * 100%),
    var(--star-empty) 0
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* El botón ✕ del carrito queda alineado y liviano */
.remove-item {
  font-size: 18px;
  line-height: 1;
}

/* Respetar accesibilidad y evitar jank en equipos lentos */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ✅ SOLO MÓVIL: reducir tamaño de estrellas para que la tarjeta no corte el botón */
@media (max-width: 768px) {

  .star-rating,
  .stars,
  .rating,
  .product-rating {
    font-size: 12px !important;
    line-height: 1 !important;
    margin: 4px 0 !important;
  }

  .star-rating i,
  .stars i,
  .rating i,
  .product-rating i {
    font-size: 12px !important;
    line-height: 1 !important;
  }

  .star-rating svg,
  .stars svg,
  .rating svg,
  .product-rating svg {
    width: 12px !important;
    height: 12px !important;
  }
}

/* =========================
   MOBILE FINAL FIXES
   ========================= */
@media (max-width: 768px) {

  /* YAPE ORDER FIX */
  #transfer-details {
    display: flex;
    flex-direction: column;
  }

  #transfer-details .amount-section {
    order: 1;
  }

  #whatsapp-yape-btn {
    order: 2;
    margin: 16px 0;
  }

  #transfer-details .details-container {
    order: 3;
  }

  /* PRODUCT GRID STABILITY (no forzar 1 columna: se define en los breakpoints finales) */
  .product-grid {
    justify-items: stretch;
  }

  .product-card {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: unset !important;
    align-self: flex-start;
  }

  .product-card .card-body {
    flex-grow: 0;
  }

}

/* =========================
   MOBILE BACK NAV FIX
   ========================= */
@media (max-width: 768px) {

  /* Reset transforms that cause floating cards on back navigation (Safari) */
  .product-card {
    transform: none !important;
    translate: none !important;
  }

  /* Ensure proper stacking after back */
  .product-grid {
    align-content: flex-start;
    place-items: stretch;
  }

}


/* === FIX: Yape WhatsApp button on top (MOBILE ONLY) === */
@media (max-width: 768px) {
  .yape-container,
  .payment-yape {
    display: flex !important;
    flex-direction: column !important;
  }

  .yape-container .btn-whatsapp,
  .payment-yape .btn-whatsapp {
    order: -1 !important;
    margin-bottom: 12px !important;
  }
}


/* === FIX: Move Yape WhatsApp button to top (MOBILE ONLY) === */
@media (max-width: 768px) {
  /*
    IMPORTANTE (móvil):
    NO forzar #yape-details visible.
    Antes tenía `display:flex !important`, lo que anula el `display:none` inline
    del HTML y hace que "Pago por Yape" aparezca incluso cuando eliges Transferencia.

    Solo aplicamos el layout flex cuando JS abre este panel (display: block).
  */
  #yape-details {
    display: none;
  }

  #yape-details[style*="display: block"],
  #yape-details[style*="display:block"] {
    display: flex !important;
    flex-direction: column !important;
  }

  #yape-details #back-from-yape { order: 0 !important; }
  #yape-details h3 { order: 1 !important; }
  #whatsapp-yape-btn {
    order: 2 !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
  }
  #yape-details .amount-section { order: 3 !important; }
  #yape-details .details-container { order: 4 !important; }
  #yape-details p { order: 5 !important; }
}



/* ===== Botón "Ver más" (base)
   - Por defecto (escritorio): oculto
   - En móvil/tablet (≤1024px): se muestra (bloque de más abajo)
===== */
#load-more-container{ display:none !important; }
#load-more-btn{ display:none !important; border:none; background:transparent; }


/* ==========================================================
   Load More inline (solo móvil + tablets)
   - Se muestra al final del grid (no fijo)
   - Aparece con animación
   - Colores según la marca (MaxStore)
========================================================== */
@keyframes loadMoreIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  /* Oculta elementos del infinite scroll en móvil/tablet */
  #infinite-loader,
  #infinite-sentinel {
    display: none !important;
  }

  /* Incrustado dentro del grid (no fijo): debe comportarse como una fila más */
  #load-more-container{display:flex;
    width: 100%;
    grid-column: 1 / -1;
    justify-content: center;
    align-items: center;
    justify-self: stretch;
    animation: loadMoreIn 260ms ease-out;
    padding: 14px 0 22px;
    background: transparent;
}

  /* Botón pequeño y "transparente" (tipo link/píldora ligera) */
  #load-more-btn {
    display: inline-flex !important;
    width: auto;
    max-width: none;
    margin: 0 auto;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.18);
    background: rgba(255,255,255,0);
    color: var(--max-blue);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: none;
}

  #load-more-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(0,0,0,0.28);
  }

  #load-more-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
  }

  /* Spinner dentro del botón */
  #load-more-btn .lm-spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(0,0,0,0.18);
    border-top-color: currentColor;
    display: none;
    animation: lmSpin 0.8s linear infinite;
  }

  #load-more-btn.is-loading .lm-spinner {
    display: inline-block;
  }

  @keyframes lmSpin {
    to { transform: rotate(360deg); }
  }
}

/* ✅ FIX FINAL: 2 columnas en TABLET y MÓVIL (se coloca al final para ganar por cascada)
   - Tablet: hasta 1024px
   - Móvil:  hasta 600px (mismo layout, solo mantiene el override si otro CSS pisa)
*/
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .product-card {
    width: 100% !important;
    max-width: none !important;
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* =========================================================
   Mobile + Tablet (<=1024px): 2 columnas con tarjetas parejas
   - Evita que una tarjeta quede más alta que la otra
   - "Hover" en touch (simulado con clase .is-touch-hover)
========================================================= */
@media (max-width: 1024px) {
  .product-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-items: stretch !important;
    align-items: stretch !important;
    grid-auto-rows: 1fr;
  }

  .product-card{
    width: 100% !important;
    max-width: none !important;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .product-image-wrapper img{
    height: 160px !important;
    object-fit: contain;
  }

  .product-info{
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .product-info h3{
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.15em);
  }

  .product-card .add-btn{
    margin-top: auto;
  }
}



/* =========================================
   Touch effect (móvil/tablet): sin "sheen" para evitar haze
   - Efecto profesional: elevación + borde sutil
========================================= */
@media (hover: none) and (pointer: coarse) {
  .product-card::after { opacity: 0 !important; }
  .product-card.is-touch-hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 26px rgba(0,0,0,0.14);
    border-color: rgba(0, 120, 212, 0.55);
  }
  .product-card.is-touch-hover img { transform: scale(1.02); }
}


/* =========================================
   Mobile (<=600px): Botón AGREGAR AL CARRITO en LISTADO
   - Ancho casi completo de la tarjeta
   - Altura cercana al texto (sin espacio vacío)
   - Ícono de carrito con "relieve" (3D sutil)
   - NO afecta al modal de detalles (primary-btn/secondary-btn)
========================================= */
@media (max-width: 600px) {
  /* Solo botones dentro de tarjetas del grid (home/listado) */
  #product-grid .product-card > .add-btn:not(.primary-btn):not(.secondary-btn) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: calc(100% - 20px) !important;
    margin: 8px auto 0 !important;

    font-size: 0.72rem !important;
    line-height: 1.02 !important;
    padding: 3px 10px !important;
    height: auto !important;
    min-height: 0 !important;

    border-radius: 14px !important;
    letter-spacing: 0.4px !important;
  }
}


/* === Mobile (<=600px) LISTING: Add-to-cart button taller + full width (final override) === */
@media (max-width: 600px) {
  /* Target only the product list cards (not modal buttons) */
  #product-grid .product-card .add-btn,
  #product-grid .product-item .add-btn,
  #product-grid .add-btn {
    width: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
    padding: 8px 10px !important; /* thicker like screenshot */
    font-size: 14px !important;
    line-height: 1.0 !important;
    border-radius: 14px !important;
    min-height: 36px !important; /* iOS friendly tap target */
    letter-spacing: 0.4px;
  }
}


/* === Mobile/Tablet (<=1024px) LISTING: Add-to-cart full width + thicker (final override) === */
@media (max-width: 1024px) {
  /* Only the product list grid (not modal detail buttons) */
  #product-grid .product-card .add-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: calc(100% - 16px) !important; /* almost full card, keeps nice inner gutter */
    margin: 10px 8px 0 !important;

    padding: 8px 10px !important;  /* thicker */
    min-height: 36px !important;    /* tap target */
    font-size: 14px !important;
    line-height: 1.0 !important;

    white-space: nowrap !important;
    border-radius: 14px !important;
  }
}

/* === FINAL OVERRIDE: Mobile/Tablet product list "Agregar al carrito" should truly fill card width === */
@media (max-width: 1024px) {
  /* Only affects the product listing grid (home/index). Does NOT touch modal buttons (primary/secondary). */
  #product-grid .product-card > .add-btn:not(.primary-btn):not(.secondary-btn),
  #product-grid .product-item .add-btn:not(.primary-btn):not(.secondary-btn),
  #product-grid .add-btn:not(.primary-btn):not(.secondary-btn) {
    width: 100% !important;          /* no left/right gaps */
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

    /* thicker like reference, but still compact */
    padding: 6px 10px !important;
    line-height: 1.0 !important;
    min-height: 32px !important;

    white-space: nowrap !important;
  }
}

/* Desktop: swap Description and Technical Specs in product detail modal */
@media (min-width: 1025px) {
  .modal-wrapper .detail-info {
    display: flex;
    flex-direction: column;
  }

  /* Desktop: show specs before description (swap) */
  .modal-wrapper .detail-info .specs-section { order: 1; }
  .modal-wrapper .detail-info .description { order: 2; }

  /* Desktop: bring CTA closer to price, and separate it from the specs title */
  .modal-wrapper .detail-info .cta-section{
    order: 0;
    margin-top: 0.9rem;
    margin-bottom: 1.8rem;
  }
}


/* =========================
   Hero / Topbar (clone UI)
   ========================= */
:root{
  --hero-blue:#0b2a6f;
  --hero-blue2:#1f4fb8;
  --hero-green:#1f7a3d;
  --hero-white:#ffffff;
}

body{ overflow:auto; }

header{ display:none !important; } /* old header */

.hero{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;

  /* Premium depth: add subtle black into the gradient */
  background:
    radial-gradient(900px 380px at 25% 20%, rgba(255,255,255,0.12), rgba(255,255,255,0) 60%),
    linear-gradient(90deg,
      #070a12 0%,
      var(--hero-blue) 12%,
      #133b9b 42%,
      var(--hero-green) 100%
    );
  color: var(--hero-white);
  padding: 18px 16px 52px;
  flex-shrink:0;
}
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.06) 45%, rgba(0,0,0,0.18) 100%);
  pointer-events:none;
}
.hero > *{ position:relative; z-index:1; }


.hero-topbar{
  position:relative;
  max-width: 1180px;
  margin: 0 auto;
  display:flex;
  justify-content:center;
  align-items:center;
  width: 100%;
}

.topbar-inner{
  width: min(920px, calc(100% - 64px));
  background: rgba(255,255,255,0.96);
  border-radius: 18px;
  padding: 10px 14px;
  display:flex;
  align-items:center;
  gap: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.20);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 150px;
}

.brand-logo{
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-text{ line-height: 1.05; }
.brand-name{
  font-weight: 800;
  color:#0b2a6f;
  font-size: 14px;
}
.brand-sub{
  font-weight: 700;
  letter-spacing: 0.3px;
  color:#1a1a1a;
  font-size: 11px;
  opacity: .65;
}

.topbar-search{
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  background: #f3f6fb;
  border: 1px solid #e2e8f5;
  border-radius: 999px;
  padding: 8px 8px 8px 14px;
}

.topbar-search input{
  flex:1;
  border:0;
  outline:0;
  background: transparent;
  color:#1a1a1a;
  font-size: 14px;
}
.topbar-search input::placeholder{ color:#6b7280; }

.topbar-search-btn{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border:0;
  background: #1f4fb8;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow: 0 8px 18px rgba(31,79,184,0.32);
}
.topbar-search-btn:active{ transform: scale(0.98); }

.topbar-contact{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #19a351;
  color: white;
  text-decoration:none;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 10px 20px rgba(25,163,81,0.28);
}

.cart-fab{
  position:absolute;
  right: 0;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border:0;
  background: rgba(255,255,255,0.96);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,0.20);
}
.cart-fab svg{ color:#111827; width: 22px; height: 22px; }

.cart-fab #cart-count{
  top: -6px;
  right: -6px;
  border: 2px solid rgba(255,255,255,0.96);
  background: #e11d48;
}

/* hero text */
.hero-content{
  max-width: 980px;
  margin: 22px auto 0;
  text-align:center;
  padding: 0 12px;
  width: 100%;
}
.hero-content h1{
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.8px;
}
.hero-content p{
  margin-top: 10px;
  font-size: 14px;
  opacity: .9;
}
.hero-actions{
  margin-top: 18px;
  display:flex;
  gap: 12px;
  justify-content:center;
  flex-wrap:wrap;
}
.hero-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 800;
  text-decoration:none;
  font-size: 13px;
}
.hero-btn-primary{
  background: #1f4fb8;
  color:#fff;
  box-shadow: 0 10px 22px rgba(31,79,184,0.30);
}
.hero-btn-whatsapp{
  background: #19a351;
  color:#fff;
  box-shadow: 0 10px 22px rgba(25,163,81,0.26);
}

/* bring filters row under hero like screenshot */
.filters-row{
  order: initial !important;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Adjust pills row vertical rhythm */
.category-pills{ padding: 6px 0; }
.pill{ text-transform: uppercase; }

/* Make the whole page scroll normally (avoid inner-scroll traps) */
#app{ height: auto; min-height: 100vh; }
.main-container{ height: auto; }
@media (max-width: 900px){
  .topbar-inner{ width: calc(100% - 64px); }
  .main-container{ height: auto; }
}
@media (max-width: 560px){
  .topbar-inner{ width: calc(100% - 56px); gap: 10px; }
  .brand{ min-width: 120px; }
  .topbar-contact span{ display:none; }
  .hero{ padding-bottom: 34px; }
}

/* =====================================================================
   Mobile: Topbar + Cart alignment + Product buttons (DEFINITIVO)
   - Solo móvil (no toca desktop)
   ===================================================================== */

@media (max-width: 560px){
  /* Oculta el botón teléfono / contacto en móvil */
  .topbar-contact{ display:none !important; }

  /* Jala el pill hacia la izquierda y deja el carrito a la derecha */
  .hero-topbar{ justify-content: flex-start; }
  .topbar-inner{
    width: calc(100% - 64px) !important; /* espacio real para el carrito */
    margin-left: 0;
    margin-right: 0;
  }

  /* Compacta marca para que todo entre */
  .brand{ min-width: 110px !important; }
  .brand-name{ font-size: 13px !important; }
  .brand-sub{ font-size: 10px !important; }

  /* Permite que el buscador se encoga sin “empujar” la lupa fuera */
  .topbar-search{ min-width: 0; }
  .topbar-search input{ min-width: 0; font-size: 13px !important; }

  /* Hero-topbar: pill a la izquierda + carrito en el mismo eje (sin flotar) */
  .hero-topbar{
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 10px !important;
  }

  /* El pill ocupa todo lo posible y deja un canal real para el carrito */
  .topbar-inner{
    width: calc(100% - 56px) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Carrito: deja de estar absolute (no "vuela" sobre la lupa) */
  .cart-fab{
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    flex: 0 0 auto !important;
  }

  /* Alineación: pill a la izquierda, carrito a la derecha (misma altura) */
  .hero-topbar{ justify-content: space-between !important; }
  .topbar-inner{
    flex: 1 1 auto !important;
    width: auto !important;
    overflow: hidden !important; /* evita que la lupa “se salga” visualmente */
  }
  .topbar-search-btn{
    width: 34px !important;
    height: 34px !important;
  }

}

/* Fallback: también ocultar Contacto en tablets pequeñas (por si el viewport reporta >560px) */
@media (max-width: 768px){
  .topbar-contact{ display:none !important; }
}

@media (max-width: 480px){
  /* En pantallas pequeñas: reduce un poco más la marca */
  .brand-name{ font-size: 12px !important; }
  .brand-sub{ font-size: 10px !important; }
  .topbar-search input{ font-size: 12px !important; }

  /* Botones de producto: MISMO tamaño (ancho/alto) y sin cortes */
  .product-card .card-actions{ gap: 10px !important; }
  /* Fuerza proporciones idénticas (ancho/alto) y neutraliza reglas viejas con !important */
  #product-grid .product-card .card-actions .details-btn,
  #product-grid .product-card .card-actions .add-btn{
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;

    height: 40px !important;
    border-radius: 18px !important;
    padding: 6px 6px !important;

    font-size: 10px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;

    white-space: nowrap !important;  /* 1 línea */
    overflow: hidden !important;
    text-overflow: clip !important;
    margin: 0 !important;
  }

  }


/* ===== Card actions (clone: Ver Detalles + Agregar side-by-side) ===== */
.product-card .card-actions{
  display:flex;
  gap:14px;
  margin-top:14px;
}

.product-card .card-actions .details-btn,
.product-card .card-actions .add-btn{
  flex: 1;
  height: 56px;
  border: 0;
  border-radius: 18px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: .2px;
}

/* Azul "Ver Detalles" */
.product-card .card-actions .details-btn{
  background: #2451d6;
  color: #ffffff;
}

/* Verde "AGREGAR" */
.product-card .card-actions .add-btn{
  background: #45a35b;
  color: #ffffff;
  text-transform: uppercase;
}

/* Override: reglas mobile antiguas que forzaban el add-btn a 100% (rompía el flex) */
#product-grid .product-card .card-actions .add-btn,
#product-grid .product-card .card-actions .details-btn{
  width: auto !important;
  display: block !important;
  margin: 0 !important;
}


/* ================================
   Fix order + Premium Info section
   ================================ */
.main-container{
  order: 0;          /* keep normal flow (Hero -> pills -> content) */
  overflow: visible; /* avoid clipping */
}

.main-content{
  overflow: visible;
}

/* Premium information block (SEO + contact) */
.premium-info{
  max-width: 1180px;
  margin: -70px auto 18px;
  padding: 0 16px;
  position: relative;
  z-index: 6;
}

.premium-info-inner{
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 16px;
}

.info-card{
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 18px 18px;
}

.info-about h2{
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.2px;
}

.info-card-head p{
  margin: 0 0 14px;
  color: rgba(15, 23, 42, 0.72);
  line-height: 1.4;
}

.info-bullets{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 14px;
}

.bullet{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.03);
}

.bullet-k{
  font-weight: 700;
  color: rgba(15, 23, 42, 0.85);
  white-space: nowrap;
}

.bullet-v{
  color: rgba(15, 23, 42, 0.78);
  text-align: right;
}

.info-links{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.info-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  color: #0f172a;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.info-chip:hover{
  background: rgba(37, 99, 235, 0.12);
}

.info-faq{
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.02);
  padding: 12px 12px;
}

.info-faq > summary{
  cursor: pointer;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.86);
}

.faq-body{
  margin-top: 10px;
  color: rgba(15, 23, 42, 0.78);
  line-height: 1.45;
}

.info-contact h3{
  margin: 0 0 6px;
  font-size: 18px;
}

.info-contact p{
  margin: 0 0 14px;
  color: rgba(15, 23, 42, 0.75);
  line-height: 1.4;
}

.whatsapp-cta{
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  padding: 14px 14px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.95), rgba(34, 197, 94, 0.95));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.25);
}

.whatsapp-cta:hover{
  filter: brightness(1.02);
}

.wa-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.20);
  display: inline-block;
}

.wa-num{
  font-weight: 900;
  letter-spacing: 0.2px;
  opacity: 0.95;
}

.contact-mini{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.10);
  color: rgba(15, 23, 42, 0.78);
}

.site-footer{
  margin-top: 18px;
}

/* Responsive */
@media (max-width: 980px){
  .premium-info-inner{ grid-template-columns: 1fr; }
  .bullet{ flex-direction: column; align-items: flex-start; }
  .bullet-v{ text-align: left; }
}

/* === FINAL FIX: make whole page scroll (no internal scroll trap) === */
.main-container{ height: auto !important; overflow: visible !important; }
.main-content{ overflow: visible !important; }
.product-grid{ overflow: visible !important; max-height: none !important; }



/* Premium placement (overlaps hero) */
@media (max-width: 900px){
  .premium-info{ margin-top: -46px; }
  .premium-info-inner{ grid-template-columns: 1fr; }
}


/* ─────────────────────────────────────────────────────────────
   Premium strip (compact info + CTA) – placed below products
   ───────────────────────────────────────────────────────────── */
.premium-strip{ max-width: 1600px; width: 100%;
  margin: 18px auto 18px;
  padding: 0 16px;
}

.premium-strip-inner{
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  align-items: stretch;
  overflow: visible;
}

/* ✅ Responsive premium strip:
   - Móvil / tablet: mostrar SOLO el mini-mapa
   - >=992px: info (izq) + mini-mapa (der) en UNA sola fila
*/
@media (max-width: 991px) {
  .premium-strip-inner{
    grid-template-columns: 1fr;
    justify-items: center; /* centra el mapa cuando es lo único */
  }
  .premium-strip .info-card{
    display: none !important;
  }
  .premium-strip .map-card{
    width: 100%;
    max-width: 980px;
  }
}

/* Laptop y Desktop: 2 columnas en una sola fila */
@media (min-width: 992px) {
  .premium-strip .info-card{ display: grid; }
  .premium-strip-inner{
    grid-template-columns: 1.25fr 0.75fr;
    gap: 12px;
    align-items: stretch;
  }
  .premium-strip .map-card{ min-width: 340px; }
}

/* ≥1080px: distribución más premium dentro de la tarjeta info */
@media (min-width: 1080px) {
  .premium-strip-inner{
    grid-template-columns: 1.35fr 1fr;
    gap: 14px;
  }

  /* ✅ Info card (premium): todo integrado en UNA sola fila */
  .premium-strip .info-card{
    padding: 14px 16px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "meta links cta";
    column-gap: 14px;
    row-gap: 0;
    align-items: center;
  }

  .premium-strip .info-card .strip-meta{ grid-area: meta; }
  .premium-strip .info-card .strip-links{
    grid-area: links;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
  }
  .premium-strip .info-card .strip-cta{
    grid-area: cta;
    justify-self: end;
    align-self: center;
    margin-left: 0;
  }

  /* Chips un poco más compactos para look premium */
  .premium-strip .info-card .strip-chip{
    padding: 8px 12px;
    border-radius: 999px;
  }
}

/* Two independent cards inside the strip */
.premium-strip .info-card,
.premium-strip .map-card{
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  height: 100%;
}

.premium-strip .info-card{
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

/* En >=1080px se redefine la grilla para meta/cta + links */


/* Keep chips in one row with nice scroll, without breaking the look */
.premium-strip .info-card .strip-links{
  padding: 0;
}

/* Map card (premium preview, opens Google Maps) */
.premium-strip .map-card{
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  position: relative;
}

.premium-strip .map-card-top{
  padding: 14px 14px 10px;
}

.premium-strip .map-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  font-weight: 800;
  font-size: 12px;
  color: #0f172a;
}

.premium-strip .map-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.premium-strip .map-title{
  margin-top: 10px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.2px;
  color: #0f172a;
}

.premium-strip .map-sub{
  margin-top: 4px;
  font-size: 13.5px;
  color: rgba(15, 23, 42, 0.68);
}

.premium-strip .map-preview{
  margin: 0 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 140px;
  background: rgba(15, 23, 42, 0.03);
}

.premium-strip .map-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.02);
}

.premium-strip .map-preview:after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.00) 50%, rgba(255,255,255,0.82) 100%);
  pointer-events: none;
}

.premium-strip .map-preview-footer{
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.78);
}

.premium-strip .map-open{
  color: rgba(37, 99, 235, 0.95);
}

.premium-strip .map-card:hover .map-open{
  text-decoration: underline;
}

.premium-strip .map-card:hover .map-img{
  transform: scale(1.05);
}

.premium-strip .map-card{
  transition: transform .15s ease, box-shadow .15s ease;
}

.premium-strip .map-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.premium-strip .map-pin{
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 18px 30px rgba(239, 68, 68, 0.28);
}

.premium-strip .map-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.02);
}

.premium-strip .map-preview:after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.00) 50%, rgba(255,255,255,0.82) 100%);
  pointer-events: none;
}



.premium-strip .map-card:hover .map-open{
  text-decoration: underline;
}

.premium-strip .map-card:hover .map-img{
  transform: scale(1.05);
}

.premium-strip .map-card{
  transition: transform .15s ease, box-shadow .15s ease;
}

.premium-strip .map-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.premium-strip .map-pin::after{
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
}


.premium-strip .map-coords{
  font-weight: 800;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.70);
}


.premium-strip .map-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.premium-strip .map-card:active{
  transform: translateY(0px);
}

.strip-title{
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.2px;
  color: #0f172a;
}

.strip-sub{
  margin-top: 4px;
  font-size: 13.5px;
  color: rgba(15, 23, 42, 0.68);
}

.strip-links{
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 12px;
  scroll-padding-left: 12px;
}
.strip-links::-webkit-scrollbar{ display:none; }

.strip-chip{
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
  font-size: 12.5px;
  white-space: nowrap;
}

.strip-chip:hover{
  background: rgba(37, 99, 235, 0.12);
}

.strip-faq{
  display: inline-flex;
  position: relative;
}

.strip-faq > summary{
  list-style: none;
  cursor: pointer;
  user-select: none;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.10);
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
}

.strip-faq > summary::-webkit-details-marker{ display:none; }

.strip-faq[open] > summary{
  background: rgba(15, 23, 42, 0.07);
}

.strip-faq-body{
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(420px, 88vw);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
  padding: 12px 12px;
  z-index: 50;
}

.strip-faq-body p{
  margin: 0 0 8px;
  font-size: 13.5px;
  color: rgba(15, 23, 42, 0.78);
}

.strip-faq-body p:last-child{ margin-bottom: 0; }

.strip-faq-body a{
  color: #2451d6;
  font-weight: 800;
  text-decoration: none;
}

.strip-cta{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.22);
  border: 1px solid rgba(22, 163, 74, 0.25);
  white-space: nowrap;
}

.strip-cta-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
}

.strip-cta-text{ font-size: 14px; }
.strip-cta-num{ font-size: 14px; opacity: 0.95; }

@media (max-width: 980px){
  .premium-strip-inner{
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .premium-strip .info-card{
    grid-template-columns: 1fr;
  }
  .strip-links{ justify-content: flex-start; }
  .strip-cta{ justify-content: center; }
  .strip-faq-body{ left: 0; right: auto; }
}

/* FAQ modal (premium, compact) */
.faq-modal{
  border: 0;
  padding: 0;
  width: min(560px, 92vw);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.faq-modal::backdrop{
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}

.faq-modal-inner{
  background: #fff;
  border-radius: 18px;
  padding: 18px 18px 16px;
  position: relative;
}

.faq-modal-inner h3{
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.faq-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  cursor: pointer;
  font-size: 24px;
  line-height: 36px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.75);
}

.faq-close:hover{ background: rgba(15, 23, 42, 0.07); }

.faq-item{
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 12px 12px;
  margin: 0 0 10px;
  background: rgba(15, 23, 42, 0.02);
}

.faq-item .q{
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 6px;
}

.faq-item .a{
  font-size: 13.5px;
  color: rgba(15, 23, 42, 0.78);
}

.faq-item .a a{
  color: #2451d6;
  font-weight: 900;
  text-decoration: none;
}
.site-footer .footer-muted{
  margin-top: 4px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}


/* Footer (minimal, no duplicate info) */
.site-footer{
  margin-top: 18px;
  padding: 14px 0 26px;
}
.footer-inner.footer-min{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display:flex;
  justify-content:center;
}
.footer-inner.footer-min .footer-muted{
  font-size: 12.5px;
  color: rgba(15, 23, 42, 0.6);
}

/* ===== FIX: Detalles (Ver Detalles) sin espacio en blanco ===== */
/* Convierto el modal de detalle en una tarjeta centrada (desktop) */
#detail-modal.overlay{
  position: fixed;
  inset: 0;
  height: 100vh;
  width: 100vw;
  justify-content: center;
  align-items: center;
  padding: 28px 18px;
}

#detail-modal .modal-content{
  width: min(980px, 94vw);
  height: auto;
  max-height: 90vh;
  border-radius: 18px;
  overflow: auto;
  box-shadow: 0 28px 80px rgba(0,0,0,0.35);
}

#detail-modal .close-modal{
  position: sticky; /* se mantiene visible al scrollear dentro */
  top: 14px;
  left: 14px;
  margin: 14px 0 0 14px;
}

/* En móvil: pantalla completa (mejor UX) */
@media (max-width: 720px){
  #detail-modal.overlay{ padding: 0; }
  #detail-modal .modal-content{
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  /* Botón regresar: centrado verticalmente y pegado a la izquierda */
  #detail-modal .close-modal{
    position: fixed;
    top: 50%;
    left: 12px;
    bottom: auto;
    margin: 0;
    transform: translateY(-50%);
    z-index: 9999;
  }
}



/* =========================================================
   PREMIUM STATIC PAGES (contacto/envios/puno)
   ========================================================= */
.page-body{
  background: #eef2f6;
}

.hero.hero--page{
  padding-bottom: 36px;
  min-height: 360px;
}

.hero.hero--page .hero-content{
  padding-top: 110px;
  padding-bottom: 34px;
}

.brand--link{
  text-decoration: none;
}

.page-nav{
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content:center;
  flex: 1;
  padding: 0 14px;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.page-nav::-webkit-scrollbar{ display:none; }

.chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(10,40,120,.12);
  color:#0f172a;
  font-weight: 700;
  text-decoration:none;
  white-space:nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.chip:hover{ transform: translateY(-1px); }
.chip--active{
  background: #0b6cd6;
  color: #fff;
  border-color: rgba(255,255,255,.25);
}

.page-main{
  max-width: 1200px;
  margin: -10px auto 0;
  padding: 22px 18px 34px;
}

.page-card{
  background:#fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(2, 8, 23, .10);
  border: 1px solid rgba(2, 8, 23, .06);
  padding: 22px;
}

.page-grid{
  display:grid;
  grid-template-columns: 1.35fr .95fr;
  gap: 18px;
  align-items:start;
}

.page-aside{
  background: #f7fafc;
  border: 1px solid rgba(2, 8, 23, .06);
  border-radius: 16px;
  padding: 16px;
}

.page-h2{
  margin: 0 0 10px;
  font-size: 18px;
  color:#0f172a;
}

.page-p{
  margin: 0 0 12px;
  color:#334155;
  line-height: 1.6;
}

.info-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin: 12px 0 16px;
}
.info-row{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(2, 8, 23, .06);
}
.info-k{
  font-weight: 800;
  color:#0f172a;
}
.info-v{
  color:#334155;
  text-align:right;
}
.info-v a{ color:#0b6cd6; font-weight:800; text-decoration:none; }
.info-v a:hover{ text-decoration:underline; }

.page-actions{
  display:flex;
  gap: 12px;
  flex-wrap:wrap;
  margin-top: 14px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 900;
  text-decoration:none;
  border: 1px solid rgba(2,8,23,.08);
}
.btn--primary{
  background: #1aa34a;
  color: #fff;
  box-shadow: 0 14px 34px rgba(26, 163, 74, .28);
}
.btn--ghost{
  background: #fff;
  color: #0f172a;
}

.nice-list{
  margin: 10px 0 0;
  padding-left: 18px;
  color:#334155;
  line-height: 1.7;
}

.steps{
  margin: 10px 0 0;
  padding-left: 18px;
  color:#334155;
  line-height: 1.7;
}

.callout{
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(11,108,214,.10), rgba(26,163,74,.12));
  border: 1px solid rgba(2, 8, 23, .06);
}
.callout--soft{
  background: linear-gradient(135deg, rgba(11,108,214,.06), rgba(26,163,74,.08));
}
.callout-title{
  font-weight: 900;
  color:#0f172a;
  margin-bottom: 6px;
}
.callout-text{
  color:#334155;
  line-height: 1.6;
}

.feature-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 6px;
}
.feature{
  border: 1px solid rgba(2, 8, 23, .06);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}
.feature-title{
  font-weight: 900;
  color:#0f172a;
  margin-bottom: 6px;
}
.feature-text{
  color:#334155;
  line-height: 1.55;
}

.site-footer--minimal{
  margin-top: 22px;
  background: transparent;
  border-top: none;
}
.site-footer--minimal .footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 18px 22px;
  display:flex;
  justify-content:space-between;
  gap: 14px;
  flex-wrap:wrap;
  color:#64748b;
}
.site-footer--minimal a{ color:#0b6cd6; font-weight:800; text-decoration:none; }
.site-footer--minimal a:hover{ text-decoration:underline; }
.footer-actions{
  display:flex;
  gap: 12px;
  flex-wrap:wrap;
}
.footer-link{
  background:#fff;
  border:1px solid rgba(2,8,23,.06);
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

@media (max-width: 920px){
  .page-grid{ grid-template-columns: 1fr; }
  .feature-grid{ grid-template-columns: 1fr; }
  .hero.hero--page{ min-height: 320px; }
  .page-nav{ justify-content:flex-start; }
}

/* =========================================================
   MOBILE CLEAN FIX (<=900px): "Ver Detalles" y "Agregar" del mismo tamaño
   - Solo afecta a los botones dentro de .card-actions (listado de productos)
   - NO cambia tipografía (no toca font-size / font-weight / line-height)
   ========================================================= */
@media (max-width: 900px){
  #product-grid .product-card .card-actions{
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
  }

  /* Más cerca del estado (SELLADO) */
  #product-grid .product-card .condition-badge{ margin-bottom: 4.5px !important; }
  #product-grid .product-card .card-actions{ margin-top: 4.5px !important; }


  #product-grid .product-card .card-actions > .details-btn,
  #product-grid .product-card .card-actions > .add-btn{
    flex: 1 1 0 !important;
    width: 0 !important;             /* mismo ancho real */
    min-width: 0 !important;
    max-width: none !important;

    height: 34px !important;         /* misma altura */
    min-height: 34px !important;
    padding: 0 12px !important;      /* solo horizontal */

    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    white-space: nowrap !important;

    /* ✅ Responsive typography: evitar que el texto se salga del botón */
    font-size: 12px !important;
    line-height: 1 !important;
  }

  /* Texto del botón verde sin mayúsculas forzadas */
  #product-grid .product-card .card-actions > .add-btn{
    text-transform: none !important;
  }
}



/* ===== Detail modal back button (mobile) - FINAL LEFT MIDDLE FIX ===== */
@media (max-width: 900px) {
  #detail-modal .close-modal{
    position: fixed !important;
    top: 50% !important;
    left: 12px !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
    z-index: 10000 !important;
  }
}


/* --- Detalle: descripción formal (móvil + desktop) --- */
#detail-modal .detail-description,
#detail-modal .product-description,
#detail-modal .description {
  text-align: justify;
  text-justify: inter-word;
}

#detail-modal .detail-description p,
#detail-modal .product-description p,
#detail-modal .description p {
  margin: 0 0 14px 0;
}

#detail-modal .desc-list {
  margin: 0 0 14px 0;
  padding-left: 22px; /* sangría */
}

#detail-modal .desc-list li {
  margin: 0 0 8px 0;
  text-align: justify;
}


/* === FIX SCROLL MODAL DETALLES === */
body.modal-open {
  overflow: hidden;
  touch-action: none;
}

#detail-modal {
  overscroll-behavior: contain;
}

#detail-modal .modal-content {
  max-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#price-slider-track{
  background: #e8e8e8 !important;
  pointer-events: none;
}



/* ===========================
   FIX: Modal de pagos centrado en desktop (no abajo)
   - No afecta al overlay del carrito/detalles porque es por ID
   =========================== */
#payment-modal.overlay{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  padding: 24px 16px;
  overflow: auto;            /* scroll del overlay si falta espacio */
  justify-content: center;   /* centra horizontal */
  align-items: flex-start;   /* asegura que arranque arriba en pantallas pequeñas */
}

/* En desktop lo centramos verticalmente */
@media (min-width: 1025px){
  #payment-modal.overlay{
    align-items: center;
    padding: 32px;
  }
}

/* Estructura interna del modal: header fijo + body con scroll */
#payment-modal .payment-modal-content{
  margin: 0;
  width: min(520px, 100%);
  max-height: calc(100vh - 64px);
  overflow: hidden;          /* el scroll va dentro del body/detalles */
  display: flex;
  flex-direction: column;
}

/* OVERRIDE del inline style que ponía position:relative */
#payment-modal .payment-modal-header{
  position: sticky !important;
  top: 0;
  background: #fff;
  z-index: 3;
}

/* scroll interno */
#payment-modal .payment-modal-body,
#payment-modal .payment-details{
  overflow: auto;
}

/* ─────────────────────────────────────────────────────────────
   Premium strip (FIX) – 2 tarjetas en 1 fila, misma altura y mini-mapa visible
   (Sobreescribe reglas previas/duplicadas)
   ───────────────────────────────────────────────────────────── */

.premium-strip{ margin: 18px auto 18px; }

.premium-strip-inner{
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 14px;
  align-items: stretch;
}

.premium-strip .info-card,
.premium-strip .map-card{
  height: 100%;
  min-height: 72px; /* “1 fila” premium */
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  border-radius: 18px;
}

/* --- Info card: todo en 1 fila (sin recortes) --- */
.premium-strip .info-card{
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.premium-strip .info-card .strip-left{
  min-width: 220px;
  flex: 1 1 auto;
  min-width: 0;
}

.premium-strip .info-card .strip-title{
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.2px;
  color: #0f172a;
  line-height: 1.15;
  white-space: nowrap;
}

/* en desktop ocultamos el subtítulo para mantener “1 fila” */
@media (min-width: 900px){
  .premium-strip .info-card .strip-sub{ display:none; }
}

/* chips: 1 fila con scroll horizontal (no se corta, solo se desplaza) */
.premium-strip .info-card .strip-links{
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0;
  max-width: 420px;
}
.premium-strip .info-card .strip-links::-webkit-scrollbar{ display:none; }

.premium-strip .info-card .strip-chip{
  height: 28px;
  padding: 0 10px;
  white-space: nowrap;
}

.premium-strip .info-card .strip-cta{
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

/* --- Map card: mini mapa real + 1 fila --- */
.premium-strip .map-card{
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.premium-strip .map-thumb{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.03);
  flex: 0 0 auto;
}

.premium-strip .map-thumb .map-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.premium-strip .map-meta{
  flex: 1 1 auto;
  min-width: 0;
}

.premium-strip .map-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  font-weight: 900;
  font-size: 12px;
}

.premium-strip .map-title{
  margin-top: 6px;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.2px;
  line-height: 1.15;
}

.premium-strip .map-sub{
  margin-top: 2px;
  font-size: 12.5px;
  color: rgba(15, 23, 42, 0.68);
  line-height: 1.15;
  white-space: nowrap;
}

.premium-strip .map-open{
  flex: 0 0 auto;
  font-weight: 900;
  color: rgba(37, 99, 235, 0.95);
  white-space: nowrap;
}

.premium-strip .map-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.premium-strip .map-card{ transition: transform .15s ease, box-shadow .15s ease; }

/* Responsive: si no hay espacio, se apilan sin cortar contenido */
@media (max-width: 920px){
  .premium-strip-inner{ grid-template-columns: 1fr; }
  .premium-strip .info-card{ flex-wrap: wrap; }
  .premium-strip .info-card .strip-links{ max-width: 100%; }
  .premium-strip .info-card .strip-sub{ display:block; }
}


/* =========================================================
   PREMIUM STRIP (INFO + MAP) — compact, 1-row on desktop
   Overrides to avoid duplicated/older rules affecting layout
   ========================================================= */
.premium-strip{ margin: 26px auto; padding: 0 18px; }
.premium-strip-inner{
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 16px;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
  justify-items: stretch;
}

/* Cards: same height, compact */
.premium-strip .info-card,
.premium-strip .map-card{
  height: auto;
  min-height: 88px;        /* “1 fila” visual (pero permite 2 filas si es necesario) */
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;        /* no recortes internos: contenido se adapta */
}

.premium-strip .info-card{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  min-width: 0;
  flex-wrap: wrap;
}

.premium-strip .strip-left{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.premium-strip .strip-title{
  font-weight: 800;
  font-size: 14px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}
.premium-strip .strip-links{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  row-gap: 8px;
  justify-content: center;
  max-width: 520px;
  flex: 1 1 380px;
  min-width: 240px;
}
.premium-strip .strip-chip{
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.06);
}
.premium-strip .strip-chip:hover{ background: rgba(59, 130, 246, 0.10); }

.premium-strip .strip-cta{
  height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 18px rgba(16, 185, 129, 0.22);
  margin-left: auto;
}

/* Map card */
.premium-strip .map-card{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
}
.premium-strip .map-card:hover{ transform: translateY(-1px); }
.premium-strip .map-embed{
  width: 190px;
  height: 62px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #f1f5f9;
  flex: 0 0 auto;
}
.premium-strip .map-embed iframe{
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none; /* clic en la tarjeta abre Maps */
  filter: grayscale(1) contrast(1.08) saturate(0.7);
}
.premium-strip .map-meta{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.premium-strip .map-title{
  font-weight: 800;
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.premium-strip .map-sub{
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.premium-strip .map-open{
  margin-left: auto;
  font-size: 12px;
  color: #2563eb;
  white-space: nowrap;
}

/* Responsive: if not enough space, stack without cutting content */
@media (max-width: 980px){
  .premium-strip-inner{ grid-template-columns: 1fr; }
  .premium-strip .info-card,
  .premium-strip .map-card{ height: auto; }
  .premium-strip .map-embed{ width: 100%; height: 180px; }
  .premium-strip .strip-title{ max-width: 100%; }
  .premium-strip .strip-links{ flex-wrap: wrap; }
}


/* ===== PREMIUM STRIP V4 (transparent + taller + colorful map + no text cut) ===== */
.premium-strip .info-card,
.premium-strip .map-card{
  height: 104px; /* un poco más alto pero sigue compacto */
  background: transparent;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.premium-strip .info-card{
  padding: 14px 16px;
}

/* No cortar texto: permitir salto de línea natural */
.premium-strip .strip-title{
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  line-height: 1.15;
  max-width: none;
}
.premium-strip .strip-subtitle{
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  line-height: 1.15;
}

/* Map card: mini-embed más visible y animación premium */
.premium-strip .map-card{
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.premium-strip .map-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  border-color: rgba(37, 99, 235, 0.22);
}

.premium-strip .map-embed{
  width: 220px;
  height: 76px;
  position: relative;
  background: rgba(15, 23, 42, 0.03);
}
.premium-strip .map-embed::after{
  content:"";
  position:absolute;
  inset:-40% -60%;
  background: radial-gradient(circle at 30% 30%, rgba(59,130,246,0.22), rgba(59,130,246,0) 55%),
              linear-gradient(115deg, rgba(255,255,255,0) 35%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 65%);
  transform: translateX(-30%) rotate(8deg);
  opacity: 0;
  pointer-events:none;
}
.premium-strip .map-card:hover .map-embed::after{
  opacity: 1;
  animation: premiumShimmer 1.2s ease forwards;
}

@keyframes premiumShimmer{
  0%   { transform: translateX(-40%) rotate(8deg); }
  100% { transform: translateX(40%) rotate(8deg); }
}

.premium-strip .map-embed iframe{
  filter: saturate(1.25) contrast(1.05) brightness(1.02) !important; /* a color */
  transform: scale(1.03);
  transition: filter .18s ease, transform .18s ease;
}
.premium-strip .map-card:hover .map-embed iframe{
  filter: saturate(1.40) contrast(1.08) brightness(1.04) !important;
  transform: scale(1.06);
}

/* Si no hay espacio, apila y evita recortes */
@media (max-width: 980px){
  .premium-strip .info-card,
  .premium-strip .map-card{
    height: auto;
  }
  .premium-strip .map-embed{
    width: 100%;
    height: 180px;
  }
}



/* =========================================================
   PREMIUM STRIP V4 (Transparent + Minimal + No Overlap)
   ========================================================= */
.premium-strip{ background: transparent !important; }
.premium-strip-inner{
  display: grid !important;
  grid-template-columns: 1fr 2fr !important; /* mapa más ancho */
  gap: 162px !important;
  align-items: stretch !important;
}

/* Cards: no "marco" visible */
.premium-strip .info-card,
.premium-strip .map-card{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 18px !important;
  height: 112px !important;
}

/* Info card layout */
.premium-strip .info-card{
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 0 !important; /* sin bloque, solo contenido */
  overflow: visible !important;
}

.premium-strip .strip-left{
  flex: 0 0 auto !important;
  min-width: 180px;
}
.premium-strip .strip-name{
  font-weight: 900;
  letter-spacing: -0.2px;
  color: #0f172a;
  line-height: 1.1;
  font-size: 16px;
  word-break: keep-all;
}
.premium-strip .strip-addr{
  margin-top: 3px;
  color: rgba(15, 23, 42, 0.70);
  font-size: 13px;
  line-height: 1.15;
}

.premium-strip .strip-links{
  display: flex !important;
  gap: 10px !important;
  flex: 1 1 auto !important;
  flex-wrap: wrap !important;  /* no se sobrepone */
  align-items: center !important;
  overflow: visible !important;
  padding: 0 !important;
}

.premium-strip .strip-chip{
  padding: 7px 10px !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  background: rgba(37, 99, 235, 0.08) !important;
  border: 1px solid rgba(37, 99, 235, 0.18) !important;
  color: #0f172a !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
.premium-strip .strip-chip:hover{
  background: rgba(37, 99, 235, 0.12) !important;
}

.premium-strip .strip-cta{
  flex: 0 0 auto !important;
  height: 44px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  color: #fff !important;
  background: linear-gradient(90deg, rgba(16,185,129,0.98), rgba(34,197,94,0.98)) !important;
  box-shadow: 0 10px 26px rgba(16,185,129,0.18) !important;
  white-space: nowrap !important;
}
.premium-strip .strip-cta:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
}
.premium-strip .strip-cta-dot{
  width: 10px; height: 10px; border-radius: 999px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.20);
}

/* Map card: full color + premium motion */
.premium-strip .map-card{
  position: relative !important;
  display: block !important;
  overflow: hidden !important;
  text-decoration: none !important;
}
.premium-strip .map-embed{
  position: absolute !important;
  inset: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}
.premium-strip .map-embed iframe{
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  pointer-events: none !important;
  filter: saturate(1.25) contrast(1.05) brightness(1.02) !important; /* a color */
  transform: scale(1.04);
  transition: transform .20s ease, filter .20s ease;
}

/* Overlay readability */
.premium-strip .map-card::after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(120% 90% at 30% 10%, rgba(255,255,255,0.32), rgba(255,255,255,0) 55%),
              linear-gradient(90deg, rgba(15,23,42,0.10), rgba(15,23,42,0) 55%);
  pointer-events:none;
  opacity: .85;
}

.premium-strip .map-meta{
  position: absolute !important;
  top: 10px !important;
  left: 12px !important;
  z-index: 2 !important;
  min-width: 0 !important;
}
.premium-strip .map-badge{
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.78) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  font-weight: 900 !important;
  font-size: 12px !important;
  color: rgba(15,23,42,0.86) !important;
}
.premium-strip .map-dot{
  width: 8px; height: 8px; border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.18);
}

.premium-strip .map-title{
  margin-top: 8px !important;
  font-weight: 950 !important;
  font-size: 14px !important;
  color: rgba(15,23,42,0.92) !important;
}
.premium-strip .map-sub{ display:none !important; } /* minimal */

.premium-strip .map-open{
  position: absolute !important;
  right: 12px !important;
  bottom: 10px !important;
  z-index: 2 !important;
  font-weight: 900 !important;
  font-size: 12px !important;
  color: rgba(15,23,42,0.80) !important;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 23, 42, 0.10);
  padding: 6px 10px;
  border-radius: 999px;
}

/* Premium hover */
.premium-strip .map-card:hover .map-embed iframe{
  transform: scale(1.07);
  filter: saturate(1.45) contrast(1.08) brightness(1.04) !important;
}
.premium-strip .map-card:hover{
  transform: translateY(-1px);
}
.premium-strip .map-card,
.premium-strip .strip-cta{
  transition: transform .18s ease, filter .18s ease;
}

/* Responsive: stack */
@media (max-width: 980px){
  .premium-strip-inner{ grid-template-columns: 1fr !important; }
  .premium-strip .info-card,
  .premium-strip .map-card{ height: auto !important; }
  .premium-strip .map-card{ height: 180px !important; }
  .premium-strip .info-card{ padding: 6px 0 !important; }
}


/* ===== PREMIUM STRIP V5 CLEAN (layout fixed, transparent containers, no overlap) ===== */
.premium-strip{ margin: 22px auto !important; padding: 0 18px !important; }
.premium-strip-inner{
  display: grid !important;
  grid-template-columns: 1fr 2fr !important; /* mapa más ancho (≈ doble) */
  gap: 18px !important;
  align-items: stretch !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

/* Make the two “cards” exist but visually invisible (no frame) */
.premium-strip .info-card,
.premium-strip .map-card{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  min-height: 112px !important;
  height: auto !important;
}

/* Keep spacing + clean alignment inside info */
.premium-strip .info-card{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 0 !important; /* container invisible */
  min-width: 0 !important;
}

.premium-strip .strip-left{
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  min-width: 210px !important;
}
.premium-strip .strip-name{
  font-weight: 800 !important;
  font-size: 15px !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}
.premium-strip .strip-addr{
  font-size: 13px !important;
  line-height: 1.2 !important;
  opacity: .78 !important;
  white-space: normal !important;
}

/* Chips: wrap nicely without stacking weird */
.strip-links{
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-width: 0 !important;
  padding: 0 !important;
}
.premium-strip .strip-chip{
  background: rgba(255,255,255,0.70) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

/* WhatsApp CTA: keep premium pill */
.premium-strip .strip-cta{
  white-space: nowrap !important;
}

/* Map: premium mini card but without outer frame */
.premium-strip .map-card{
  display: grid !important;
  grid-template-columns: 1.2fr 1fr auto !important; /* embed + meta + action */
  align-items: center !important;
  gap: 14px !important;
  padding: 0 !important;
  text-decoration: none !important;
  color: inherit !important;
}

.premium-strip .map-embed{
  height: 112px !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  position: relative !important;
  box-shadow: 0 10px 24px rgba(15,23,42,0.10) !important;
  border: 1px solid rgba(15,23,42,0.08) !important;
  background: rgba(255,255,255,0.6) !important;
}
.premium-strip .map-embed iframe{
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  pointer-events: none !important; /* click opens link */
  filter: none !important; /* keep full color */
}

/* Premium hover animation */
.premium-strip .map-embed::after{
  content: "" !important;
  position: absolute !important;
  inset: -40% !important;
  background: linear-gradient(120deg, rgba(255,255,255,0.00), rgba(255,255,255,0.45), rgba(255,255,255,0.00)) !important;
  transform: translateX(-60%) rotate(12deg) !important;
  transition: transform 700ms ease !important;
  pointer-events: none !important;
}
.premium-strip .map-card:hover .map-embed::after{
  transform: translateX(60%) rotate(12deg) !important;
}
.premium-strip .map-card:hover .map-embed{
  transform: translateY(-1px) scale(1.01) !important;
  transition: transform 220ms ease !important;
}

.premium-strip .map-meta{ min-width: 0 !important; }
.premium-strip .map-title{ font-weight: 800 !important; }
.premium-strip .map-sub{
  opacity: .75 !important;
  white-space: normal !important;
}
.premium-strip .map-open{
  background: rgba(255,255,255,0.70) !important;
  border: 1px solid rgba(15,23,42,0.10) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-radius: 999px !important;
  padding: 10px 14px !important;
  font-weight: 700 !important;
}

/* Responsive: if no space, stack (nothing cut) */
@media (max-width: 980px){
  .premium-strip-inner{
    grid-template-columns: 1fr !important;
  }
  .premium-strip .map-card{
    grid-template-columns: 1fr !important;
    justify-items: start !important;
  }
  .premium-strip .map-open{ justify-self: end !important; }
}


/* =====================================================================
   PREMIUM STRIP – CLEAN OVERRIDE (DEPURADO)
   - Mantiene 2 tarjetas separadas (Info izquierda, Mapa derecha)
   - "Invisibles": sin fondo/borde/sombra, pero SIN perder layout
   - Info en 1 sola fila, sin texto sobrepuesto
   - Mapa: 240px ancho, 112px alto, a color, con hover premium
   ===================================================================== */

.premium-strip{ max-width: 1600px; margin: 18px auto 18px; padding: 0 16px; }

.premium-strip-inner{
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 162px !important;
  overflow: visible !important;
}

/* "Tarjetas" invisibles pero existentes */
.premium-strip .info-card,
.premium-strip .map-card{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* INFO – 1 fila */
.premium-strip .info-card{
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 0 !important;
}

.premium-strip .strip-left{ flex: 0 0 auto !important; min-width: 0 !important; }
.premium-strip .strip-line{ display: inline-flex !important; align-items: baseline !important; gap: 8px !important; }
.premium-strip .strip-name{ font-weight: 900 !important; color: #0f172a !important; }
.premium-strip .strip-sep{ opacity: 0.45 !important; }
.premium-strip .strip-addr{ color: rgba(15,23,42,0.70) !important; font-weight: 600 !important; }

/* Chips: no se apilan, hacen scroll horizontal si no entra */
.premium-strip .strip-links{
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  padding: 0 !important;
  scrollbar-width: none; /* Firefox */
}
.premium-strip .strip-links::-webkit-scrollbar{ display:none; }

/* CTA WhatsApp a la derecha */
.premium-strip .strip-cta{
  flex: 0 0 auto !important;
  margin-left: 6px !important;
  white-space: nowrap !important;
}

/* MAPA – fijo 560px ancho + 112px alto */
.premium-strip .map-card{
  flex: 0 0 560px !important;
  width: 560px !important;
  position: relative !important;
  display: block !important;
  text-decoration: none !important;
}

.premium-strip .map-embed{
  height: 112px !important;
  width: 100% !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  position: relative !important;
  background: rgba(15,23,42,0.04) !important;
}

.premium-strip .map-embed iframe{
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  filter: none !important; /* a color */
  transform: scale(1.02);
  transform-origin: center;
  pointer-events: none; /* click se va al <a> */
}

/* Overlay premium + animación */
.premium-strip .map-embed::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 45%),
              linear-gradient(180deg, rgba(15,23,42,0) 55%, rgba(15,23,42,0.18) 100%);
  opacity: 0.95;
  pointer-events: none;
}

.premium-strip .map-open{
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(15,23,42,0.10);
  font-weight: 800;
  font-size: 12.5px;
  color: rgba(15,23,42,0.82);
  backdrop-filter: blur(10px);
}

.premium-strip .map-card:hover .map-embed iframe{ transform: scale(1.06); }
.premium-strip .map-card:hover .map-open{ border-color: rgba(37,99,235,0.22); color: rgba(37,99,235,0.95); }

/* Responsive: si no hay espacio, apila (sin pisarse) */
@media (max-width: 860px){
  .premium-strip-inner{ flex-direction: column !important; align-items: stretch !important; }
  .premium-strip .map-card{ width: 100% !important; flex-basis: auto !important; }
  .premium-strip .map-embed{ height: 180px !important; }
  .premium-strip .info-card{ flex-wrap: wrap !important; }
  .premium-strip .strip-links{ width: 100% !important; }
}


/* ─────────────────────────────────────────────────────────────
   PREMIUM STRIP – CLEAN OVERRIDE (v9)
   Fixes: clipping, duplicate rules, keeps 1-row info, map 560px, gap 3x
   ───────────────────────────────────────────────────────────── */
.premium-strip{
  width: 100% !important;
  max-width: 100% !important;
  margin: 18px 0 !important;
  padding: 0 24px !important;
}
.premium-strip-inner{
  display: grid !important;
  grid-template-columns: 1fr 560px !important;
  column-gap: 162px !important; /* triple separation */
  row-gap: 16px !important;
  align-items: center !important;
  overflow: visible !important;
}

/* Keep "cards" structurally present but visually invisible */
.premium-strip .info-card,
.premium-strip .map-card{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Info: single-row layout, no overlap, no clipping */
.premium-strip .info-card{
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  flex-wrap: nowrap !important;
  min-height: 112px !important;
  padding: 0 !important;
  min-width: 0 !important;
  overflow: visible !important;
}
.premium-strip .info-card .strip-meta{
  display: flex !important;
  align-items: baseline !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  min-width: 0 !important;
}
.premium-strip .info-card .strip-links{
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 4px 2px !important;
  scrollbar-width: none !important;
}
.premium-strip .info-card .strip-links::-webkit-scrollbar{ display:none !important; }

.premium-strip .info-card .strip-cta{
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

/* Map: fixed 560x112, premium hover */
.premium-strip .map-card{
  width: 560px !important;
  height: 112px !important;
  position: relative !important;
  overflow: hidden !important;
  border-radius: 16px !important;
}
.premium-strip .map-card iframe{
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  pointer-events: none !important; /* click goes to wrapper link */
  display: block !important;
}

/* Premium motion */
.premium-strip .map-card::before{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.18) 35%, rgba(255,255,255,0) 70%) !important;
  transform: translateX(-120%) !important;
  transition: transform .7s ease !important;
  pointer-events: none !important;
}
.premium-strip .map-card:hover::before{ transform: translateX(120%) !important; }
.premium-strip .map-card:hover{ transform: translateY(-1px) !important; transition: transform .2s ease !important; }

/* Responsive: stack if needed */
@media (max-width: 1200px){
  .premium-strip-inner{
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
  }
  .premium-strip .map-card{
    width: 100% !important;
    max-width: 560px !important;
  }
}



/* ─────────────────────────────────────────────────────────────
   PATCH: Keep v9 look (centered) but show full info (no clipping)
   ───────────────────────────────────────────────────────────── */
.premium-strip-inner{
  max-width: 1600px !important;
  margin: 0 auto !important;
}
.premium-strip .info-card .strip-links{
  overflow: visible !important;
}


/* ─────────────────────────────────────────────────────────────
   Mobile: hide info card (user request)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px){
  .premium-strip .info-card{ display: none !important; }
  .premium-strip-inner{
    grid-template-columns: 1fr !important;
    column-gap: 0 !important;
    row-gap: 12px !important;
    justify-items: center !important;
  }
  .premium-strip .map-card{
    width: 100% !important;
    max-width: 560px !important;
  }
}


/* ─────────────────────────────────────────────────────────────
   Mobile spacing tighten (reduce whitespace between grid, load more, and map)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px){
  /* Reduce padding/gap after product grid */
  .product-grid{
    padding-bottom: 6px !important;
    gap: 12px !important;
  }

  /* Load more: make it compact */
  #load-more-container{
    padding: 6px 0 8px !important;
    margin: 0 !important;
    gap: 8px !important;
  }
  #load-more-btn{
    padding: 10px 18px !important;
  }

  /* Premium strip closer to load more */
  .premium-strip{
    margin: 6px 0 10px !important;
    padding: 0 12px !important;
  }
  .premium-strip-inner{
    row-gap: 8px !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   MOBILE HARD GAP FIX (final)
   Reason: #app uses min-height:100vh and .main-container has flex:1,
   which creates a tall empty flex box that pushes the strip/map down.
   This override makes the layout content-height on mobile.
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px){
  #app{ min-height: unset !important; height: auto !important; }
  .main-container{ flex: 0 0 auto !important; height: auto !important; overflow: visible !important; }
  .main-content{ flex: 0 0 auto !important; height: auto !important; overflow: visible !important; }
  .product-grid{ flex: 0 0 auto !important; }

  /* Make load-more truly compact */
  #load-more-container{
    padding: 6px 0 !important;
    margin: 0 !important;
    align-items: flex-start !important;
    justify-content: center !important;
    height: auto !important;
    min-height: 0 !important;
  }

  /* Reduce the gap between load more and the strip/map */
  .premium-strip{ margin-top: 8px !important; }
}

/* ─────────────────────────────────────────────────────────────
   MOBILE HARD GAP FIX (FINAL)
   - Prevent .main-container (flex:1) from stretching to fill viewport
   - Prevent #app (min-height:100vh) from forcing extra vertical space
   - Ensures: products → load more → map (tight)
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px){
  #app{ min-height: unset !important; height: auto !important; }
  .main-container{ flex: 0 0 auto !important; height: auto !important; overflow: visible !important; }
  .main-content{ flex: 0 0 auto !important; height: auto !important; overflow: visible !important; }
  .product-grid{ flex: 0 0 auto !important; height: auto !important; }

  /* Make the load-more block only as tall as its content */
  #load-more-container,
  .load-more-container{
    height: auto !important;
    min-height: 0 !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }
}

/* MOBILE HARD GAP FIX (FINAL)
   Stops flex stretching that creates the big empty space above the map.
*/
@media (max-width: 768px){
  #app{ min-height: 0 !important; height: auto !important; }
  .main-container{ flex: 0 0 auto !important; height: auto !important; overflow: visible !important; }
  .main-content{ flex: 0 0 auto !important; height: auto !important; overflow: visible !important; }
  .product-grid{ flex: 0 0 auto !important; max-height: none !important; }

  /* Make the load-more block only as tall as the button */
  #load-more-container{ padding: 8px 0 8px !important; margin: 0 !important; align-items: flex-start !important; }

  /* Keep the map close */
  .premium-strip{ margin-top: 8px !important; }
}

/* MOBILE HARD GAP FIX (FINAL)
   Stops flex stretching that creates the big empty space above the map.
*/
@media (max-width: 768px){
  #app{ min-height: 0 !important; height: auto !important; }
  .main-container{ flex: 0 0 auto !important; height: auto !important; overflow: visible !important; }
  .main-content{ flex: 0 0 auto !important; height: auto !important; overflow: visible !important; }
  .product-grid{ flex: 0 0 auto !important; padding-bottom: 6px !important; }
  #load-more-container{ padding: 6px 0 6px !important; margin: 0 !important; min-height: 0 !important; height: auto !important; justify-content: flex-start !important; }
  .premium-strip{ margin-top: 8px !important; }
}

/* ------------------------------------------------------------------
   Admin > Registrar venta: Autocompletado custom (datalist no se puede
   estilizar y en algunos navegadores se ve transparente)
   ------------------------------------------------------------------ */
.sell-suggest{
  position:absolute;
  left:0;
  right:0;
  top:100%;
  margin-top:6px;
  background: rgba(0,0,0,0.92);
  color:#fff;
  border:1px solid rgba(255,255,255,0.16);
  border-radius:14px;
  box-shadow:0 14px 36px rgba(0,0,0,0.35);
  overflow:hidden;
  max-height:240px;
  overflow-y:auto;
  z-index: 2000;
  display:none;
}
.sell-suggest.show{ display:block; }
.sell-suggest .sell-suggest-item{
  width:100%;
  background:transparent;
  border:0;
  padding:10px 12px;
  text-align:left;
  color:inherit;
  cursor:pointer;
}
.sell-suggest .sell-suggest-item:hover,
.sell-suggest .sell-suggest-item:focus{
  background:rgba(255,255,255,0.10);
  outline:none;
}
.sell-suggest .sell-suggest-item .sub{
  display:block;
  font-size:12px;
  opacity:0.75;
  margin-top:2px;
}




/* ===== Premium sidebar filters (searchable + collapsible) ===== */
.filter-section[open] summary { margin-bottom: 0.75rem; }

.filter-section {
  display: block;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 8px 22px rgba(0,0,0,0.04);
}

.filter-section summary {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.filter-section summary::-webkit-details-marker { display: none; }

.filter-section summary::after {
  content: "▾";
  font-size: 0.9rem;
  opacity: 0.7;
  transform: rotate(0deg);
  transition: transform 0.18s ease;
}

.filter-section[open] summary::after { transform: rotate(180deg); }

.filter-body { display: flex; flex-direction: column; gap: 0.75rem; }

.filter-search {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  outline: none;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.9);
  transition: border 0.2s, box-shadow 0.2s;
}

.filter-search:focus {
  border-color: rgba(30, 64, 175, 0.35);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 240px;
  overflow: auto;
  padding-right: 0.25rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.55rem;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.option:hover {
  background: rgba(0,0,0,0.04);
  transform: translateY(-1px);
}

.option input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--max-blue);
}

.option span {
  flex: 1;
  font-size: 0.92rem;
  color: var(--text-main);
}

.sort-wrap select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  background: rgba(255,255,255,0.9);
  font-size: 0.92rem;
  outline: none;
}



/* Visually hidden (keeps accessibility) */
.sr-only{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Ordenar: dropdown premium */
.sort-dropdown{ position: relative; }
.sort-trigger{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  background: rgba(0,0,0,0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.04);
  color: var(--text-main);
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .18s ease, border-color .18s ease;
}

.sort-trigger:active{ transform: scale(0.99); }
.sort-trigger:focus{
  outline: none;
  border-color: rgba(33,111,233,0.35);
  box-shadow: 0 0 0 3px rgba(33,111,233,0.18), 0 10px 26px rgba(0,0,0,0.06);
}

.sort-trigger-label{
  flex: 1;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.sort-trigger-icon{
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
}

.sort-trigger-icon::before{
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(0,0,0,0.55);
  border-bottom: 2px solid rgba(0,0,0,0.55);
  transform: rotate(45deg);
  transition: transform .18s ease;
}

.sort-dropdown.is-open .sort-trigger-icon::before{
  transform: rotate(-135deg);
}

.sort-menu{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 16px;
  box-shadow: 0 18px 55px rgba(0,0,0,0.14);
  padding: 0.35rem;
  z-index: 80;
}

.sort-option{
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.72rem 0.75rem;
  border-radius: 12px;
  font-size: 0.92rem;
  color: var(--text-main);
  cursor: pointer;
  transition: background .14s ease;
}

.sort-option:hover{ background: rgba(33,111,233,0.08); }
.sort-option.is-active{ background: rgba(33,111,233,0.12); font-weight: 700; }

/* Desktop: ocultar título "Filtros" y optimizar espacio */
@media (min-width: 992px){
  .filter-header h3{ display:none; }
  .filter-header{
    margin-bottom: 0.8rem;
    padding-bottom: 0.6rem;
  }
}
.muted-label {
  font-size: 0.8rem;
  opacity: 0.7;
}

.clear-filters-btn {
  margin-top: 0.25rem;
  width: 100%;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.9);
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.clear-filters-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}

/* Old layout helper: if any legacy .brands-list remains */
.brands-list { max-height: 240px; overflow: auto; padding-right: 0.25rem; }



/* ===== Premium Filters Upgrade (integrated primary block) ===== */
.filter-sidebar{
  background: linear-gradient(180deg, rgba(248,250,252,0.98) 0%, rgba(255,255,255,0.98) 100%);
}

.filter-combo-card{
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.filter-section--combo{
  border: none !important;
  border-radius: 0 !important;
  padding: 0.6rem 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.filter-section--combo:first-child{ padding-top: 0 !important; }
.filter-section--combo:last-child{ padding-bottom: 0 !important; }

.filter-section--combo + .filter-section--combo{
  border-top: 1px solid rgba(0,0,0,0.08) !important;
  margin-top: 0.9rem;
  padding-top: 0.9rem !important;
}

.filter-section--combo summary{
  padding: 0.15rem 0;
  font-size: 0.95rem;
}

.filter-section--combo .filter-body{
  padding-top: 0.55rem;
}

/* Keep the dual price thumbs perfectly aligned on one row */
.range-slider .price-slider{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 26px;
}

.range-slider input[type="range"]{
  -webkit-appearance: none;
  appearance: none;
}

/* Premium scrollbar inside option lists */
.option-list{
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.25) transparent;
}
.option-list::-webkit-scrollbar{ width: 8px; }
.option-list::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
}
.option-list::-webkit-scrollbar-track{ background: transparent; }

/* Slightly more premium buttons inside filters */
.apply-filter-btn{
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  box-shadow: 0 8px 18px rgba(0, 120, 212, 0.22);
}
.apply-filter-btn:active{ transform: translateY(1px); }


.price-inputs{ flex-wrap: nowrap; }
.price-inputs input{ width: 0; }


/* option counts */
.option .opt-label{ flex: 1; }
.option .opt-count{font-size:12px; opacity:.65;}



/* ===== Responsive refinements (grid + strip) ===== */
/* Ocultar la barra inferior (tarjeta info) en pantallas mayores a iPhone 15 Pro Max */




/* =========================
   FINAL RESPONSIVE OVERRIDES
   (mantener al final para evitar conflictos con estilos previos)
   ========================= */

/* Grid de productos por breakpoint */
.product-grid{ grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
@media (min-width: 601px) and (max-width: 900px){
  .product-grid{ grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
}
@media (min-width: 901px) and (max-width: 1199px){
  .product-grid{ grid-template-columns: repeat(4, minmax(0,1fr)) !important; }
}
/* Premium strip: <=1199 solo mini-mapa; >=1200 todo (info + mini-mapa) */
@media (max-width: 1199px){
  /* Cuando solo se muestra el mini-mapa, centramos la(s) tarjeta(s) */
  .premium-strip-inner{
    display: flex !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 16px !important;
  }
  .premium-strip .info-card{ display: none !important; }
  .premium-strip .map-card{
    width: 100% !important;
    max-width: 980px !important;
  }
}
@media (min-width: 1200px){
  .premium-strip .info-card{ display: flex !important; }
  .premium-strip-inner{ grid-template-columns: 1.35fr 1fr !important; }
}

/* =========================================================
   Premium strip – chips wrap (evita que se pisen en desktop)
   ========================================================= */
.premium-strip .info-card{
  align-items: flex-start !important;
}

/* Permitir 1–2 filas en vez de scroll horizontal */
.premium-strip .info-card .strip-links,
.strip-links{
  flex-wrap: wrap !important;
  overflow: visible !important;
  padding: 0 !important;
  row-gap: 10px !important;
}

/* Que cada chip mantenga su forma y no rompa layout */
.premium-strip .info-card .strip-chip{
  height: 30px;
  font-size: 12.5px;
}



/* ===========================
   FIX: Botones "Ver Detalles" y "Agregar" mismo ancho (todas las versiones)
   =========================== */
#product-grid .product-card .card-actions{
  display: flex !important;
  gap: 12px !important;
  align-items: stretch !important;
}

#product-grid .product-card .card-actions button{
  flex: 1 1 0 !important;
  width: 0 !important;        /* mismo ancho aunque el texto sea distinto */
  min-width: 0 !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Asegura que no haya reglas antiguas que les metan ancho mínimo distinto */
#product-grid .product-card .card-actions .details-btn,
#product-grid .product-card .card-actions .add-btn{
  min-width: 0 !important;
}



/* ====== v11 HOTFIX: acciones de tarjeta (botones mismo ancho SI O SI) ====== */
#product-grid .product-card .card-actions{
  display:flex !important;
  gap:12px !important;
  align-items:stretch !important;
}
#product-grid .product-card .card-actions > .details-btn,
#product-grid .product-card .card-actions > .add-btn{
  flex:1 1 0 !important;
  width:0 !important;
  min-width:0 !important;
  margin:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;

  height:42px !important;
  padding:0 10px !important;

  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;

  font-size:clamp(10px, 1.05vw, 13px) !important;
  line-height:1 !important;
}

/* En pantallas muy angostas, baja un poco más la tipografía */
@media (max-width: 520px){
  #product-grid .product-card .card-actions > .details-btn,
  #product-grid .product-card .card-actions > .add-btn{
    font-size:11px !important;
    height:40px !important;
  }
}

/* ====== v11 HOTFIX: strip inferior ordenado (chips wrap, sin pisarse) ====== */
.premium-strip-inner{
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  gap:24px !important;
  flex-wrap:wrap !important;
}
.premium-strip-inner .info-card{
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
  flex-wrap:wrap !important;
}
.premium-strip-inner .strip-links{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}
.premium-strip-inner .strip-cta{
  flex:0 0 auto !important;
  margin-left:auto !important;
}
@media (max-width: 1199px){
  .premium-strip-inner .info-card{
    justify-content:center !important;
  }
  .premium-strip-inner .strip-cta{
    margin-left:0 !important;
  }
}

/* ─────────────────────────────────────────────
   FINAL OVERRIDES (Laptop text fits + equal buttons)
   ───────────────────────────────────────────── */
.card-actions{
  display:flex !important;
  gap: 10px !important;
}
.card-actions .details-btn,
.card-actions .add-btn,
.card-actions button,
.card-actions .btn{
  flex: 1 1 0 !important;
  width: 0 !important;              /* fuerza mismo ancho */
  min-width: 0 !important;
  box-sizing: border-box !important;

  /* Tipografía responsiva para que NO se salga del botón */
  font-size: clamp(10px, 0.9vw, 13px) !important;
  line-height: 1.1 !important;
  white-space: normal !important;
  word-break: break-word !important;

  padding: 8px 10px !important;
}
@media (max-width: 980px){
  .card-actions .details-btn,
  .card-actions .add-btn,
  .card-actions button,
  .card-actions .btn{
    font-size: 11px !important;
    padding: 8px 8px !important;
  }
}

/* ─────────────────────────────────────────────
   Premium strip: SIEMPRE 1 fila desde 720px (info izq + mapa der)
   ───────────────────────────────────────────── */
@media (max-width: 719px){
  .premium-strip-inner{ display:flex !important; flex-direction: column !important; align-items:center !important; }
  .premium-strip .info-card{ display:none !important; }
  .premium-strip .map-card{ width:100% !important; max-width: 980px !important; }
}

@media (min-width: 720px) and (max-width: 979px){
  .premium-strip-inner{ display:flex !important; flex-direction: column !important; align-items:center !important; justify-content:center !important; }
  .premium-strip .info-card{ display:none !important; }
  .premium-strip .map-card{ width:100% !important; max-width: 980px !important; }
}
@media (min-width: 980px){
  .premium-strip-inner{
    display:flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
  }
  .premium-strip .info-card{ display:grid !important; flex: 1 1 0 !important; }
  .premium-strip .map-card{
    flex: 0 0 auto !important;
    width: min(440px, 42vw) !important;
    min-width: 320px !important;
    justify-self: end !important;
  }
}


/* ===== FINAL responsive overrides (do not remove) ===== */
@media (max-width: 719px){
  .product-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (min-width: 720px) and (max-width: 979px){
  .product-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (min-width: 980px) and (max-width: 1999px){
  .product-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (min-width: 2000px){
  .product-grid{ grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}



/* ===============================
   FINAL OVERRIDES (v21+)
   Premium footer alignment on >=1080px
   =============================== */
@media (min-width: 1080px){
  /* Keep info + chips + WhatsApp tightly grouped (no isolated WhatsApp) */
  .premium-strip .info-card{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:14px !important; /* tighter spacing */
  }
  .premium-strip .info-card .strip-meta{
    flex:0 0 auto !important;
    margin:0 !important;
    padding:0 !important;
  }
  .premium-strip .info-card .strip-links{
    flex:1 1 auto !important;
    justify-content:flex-start !important;
    margin:0 !important;
    padding:0 !important;
    column-gap:10px !important;
  }
  .premium-strip .info-card .strip-cta{
    flex:0 0 auto !important;
    margin:0 !important;
    justify-self:auto !important;
  }
}


/* =========================
   MaxStore Premium Preloader
   ========================= */
html.ms-is-loading body{
  overflow: hidden !important;
}

.ms-preloader{
  position: fixed;
  inset: 0;
  z-index: 99999;
  overflow: hidden;
  background: radial-gradient(1200px 700px at 50% 58%, rgba(59,130,246,0.14), rgba(0,0,0,0.92) 62%, #000 100%);
  color: #fff;
}

.ms-preloader__bg{
  position:absolute;
  inset:0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.35) 50%, transparent 55%),
    radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.25) 50%, transparent 55%),
    radial-gradient(1px 1px at 40% 75%, rgba(255,255,255,0.22) 50%, transparent 55%),
    radial-gradient(2px 2px at 80% 70%, rgba(59,130,246,0.18) 50%, transparent 55%),
    radial-gradient(1px 1px at 15% 65%, rgba(59,130,246,0.16) 50%, transparent 55%);
  filter: blur(0.2px);
  opacity: 0.78;
  animation: msStars 6s ease-in-out infinite alternate;
}

@keyframes msStars{
  from{ transform: translateY(0px); opacity:0.70; }
  to  { transform: translateY(-12px); opacity:0.90; }
}

/* ===== Cinematic scene (full-screen mascot runner) ===== */
.ms-preloader__scene{
  position:absolute;
  inset:0;
  pointer-events:none;
}

.ms-preloader__galaxy{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index: 0;
  opacity: 0.95;
}
.ms-preloader__vignette{ z-index: 3; }
.ms-preloader__floorGlow{ z-index: 2; }
.ms-preloader__runner{ z-index: 4; }
.ms-preloader__vignette{
  position:absolute;
  inset:-20px;
  background:
    radial-gradient(900px 520px at 50% 55%, rgba(0,0,0,0.0), rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.88) 100%);
  mix-blend-mode: multiply;
}

.ms-preloader__floorGlow{
  position:absolute;
  left:-10%;
  right:-10%;
  bottom: 10vh;
  height: 28vh;
  background: radial-gradient(closest-side, rgba(59,130,246,0.30), rgba(0,0,0,0));
  filter: blur(10px);
  opacity: 0.95;
  transform: translateY(22px);
}

.ms-preloader__runner{
  position:absolute;
  left: 0;
  bottom: 10vh;
  height: min(72vh, 760px);
  width: auto;
  object-fit: contain;
  max-width: 92vw;
  filter:
    drop-shadow(0 24px 70px rgba(0,0,0,0.70))
    drop-shadow(0 0 28px rgba(59,130,246,0.18));
  pointer-events:none;
  mix-blend-mode: screen;
  will-change: transform, opacity, filter;
}

/* Fallback runner (for browsers that can't play WebM) */
.ms-preloader__runner--fallback{
  display:none;
}
.ms-preloader.has-runner-fallback .ms-preloader__runner--fallback{
  display:block;
}


.ms-preloader__speedlines{
  position:absolute;
  inset:0;
  opacity: 0.55;
  background:
    linear-gradient(90deg,
      rgba(255,255,255,0.00) 0%,
      rgba(255,255,255,0.00) 35%,
      rgba(255,255,255,0.12) 50%,
      rgba(255,255,255,0.00) 65%,
      rgba(255,255,255,0.00) 100%);
  filter: blur(0.4px);
  transform: skewX(-12deg) translateX(-20%);
  animation: msSpeed 1.2s linear infinite;
  mask: radial-gradient(closest-side, rgba(0,0,0,0.90) 45%, rgba(0,0,0,0.10) 75%, transparent 100%);
}

@keyframes msSpeed{
  to{ transform: skewX(-12deg) translateX(20%); }
}

.ms-preloader__particles{
  position:absolute;
  left:0;
  right:0;
  bottom: 8vh;
  height: 40vh;
  opacity: 0.85;
  background:
    radial-gradient(3px 3px at 10% 30%, rgba(59,130,246,0.30) 40%, transparent 50%),
    radial-gradient(2px 2px at 25% 70%, rgba(255,255,255,0.20) 40%, transparent 50%),
    radial-gradient(2px 2px at 55% 40%, rgba(59,130,246,0.22) 40%, transparent 50%),
    radial-gradient(3px 3px at 72% 65%, rgba(255,255,255,0.18) 40%, transparent 50%),
    radial-gradient(2px 2px at 90% 50%, rgba(59,130,246,0.18) 40%, transparent 50%);
  animation: msParticles 2.8s ease-in-out infinite;
  filter: blur(0.2px);
  mask: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.20) 65%, transparent 100%);
}

@keyframes msParticles{
  0%,100%{ transform: translateY(0px); opacity:0.70; }
  50%{ transform: translateY(-10px); opacity:0.95; }
}

/* ===== HUD ===== */
.ms-preloader__hud{
  position:absolute;
  left: 50%;
  bottom: 4.2vh;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 28px));
  border-radius: 22px;
  padding: 16px 16px 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 24px 80px rgba(0,0,0,0.55),
    0 0 0 1px rgba(0,0,0,0.25) inset;
  backdrop-filter: blur(14px);
  animation: msHudIn 650ms cubic-bezier(.2,.9,.2,1) both;
}

@keyframes msHudIn{
  from{ opacity:0; transform: translateX(-50%) translateY(18px) scale(.98); }
  to  { opacity:1; transform: translateX(-50%) translateY(0) scale(1); }
}

.ms-preloader__brand{
  display:flex;
  gap: 12px;
  align-items:center;
}

.ms-preloader__logoMini{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.10);
}

.ms-preloader__name{
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 18px;
  line-height: 1.12;
}

.ms-preloader__tag{
  margin-top: 2px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.74);
}

.ms-preloader__pctWrap{
  margin-left: auto;
  padding-left: 10px;
}

.ms-preloader__pct{
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
  font-size: 16px;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 10px 28px rgba(0,0,0,0.55);
}

.ms-preloader__meter{
  margin-top: 12px;
}

.ms-preloader__bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 6px 26px rgba(0,0,0,0.28) inset;
}

.ms-preloader__barFill{
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background:
    linear-gradient(90deg, rgba(59,130,246,0.95), rgba(255,255,255,0.88), rgba(59,130,246,0.95));
  background-size: 220% 100%;
  animation: msShimmer 1.25s ease-in-out infinite;
  border-radius: 999px;
  will-change: transform;
}

@keyframes msShimmer{
  0%{ background-position: 0% 50%; }
  100%{ background-position: 100% 50%; }
}

/* ===== 3D Logo moment ===== */
.ms-preloader__logo3d{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  opacity: 0;
  pointer-events:none;
}

.ms-preloader__logo3dStage{
  position: relative;
  width: min(260px, 56vw);
  aspect-ratio: 1 / 1;
  transform-style: preserve-3d;
}

.ms-preloader__logo3dImg{
  position:absolute;
  inset:0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 26px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 30px 90px rgba(0,0,0,0.62);
  transform: translateZ(42px);
  filter: drop-shadow(0 0 22px rgba(59,130,246,0.25));
}

.ms-preloader__logo3dGlow{
  position:absolute;
  inset:-40px;
  background: radial-gradient(closest-side, rgba(59,130,246,0.30), rgba(0,0,0,0));
  filter: blur(12px);
  transform: translateZ(10px);
  opacity: 0.9;
}

.ms-preloader__logo3dShadow{
  position:absolute;
  left: 50%;
  bottom: -14%;
  width: 80%;
  height: 16%;
  transform: translateX(-50%) translateZ(0);
  background: radial-gradient(closest-side, rgba(0,0,0,0.55), rgba(0,0,0,0));
  filter: blur(8px);
  opacity: 0.9;
}

/* Finishing sequence */
.ms-preloader.is-finishing .ms-preloader__hud{
  animation: msHudOut 520ms ease forwards;
}

@keyframes msHudOut{
  to{ opacity:0; transform: translateX(-50%) translateY(10px) scale(.985); }
}

.ms-preloader.is-finishing .ms-preloader__runner{
  opacity: 0.22;
  filter: blur(1px) drop-shadow(0 24px 70px rgba(0,0,0,0.70)) drop-shadow(0 0 28px rgba(59,130,246,0.22));
  transition: opacity 520ms ease, filter 520ms ease;
}

.ms-preloader.is-finishing .ms-preloader__logo3d{
  opacity: 1;
}

.ms-preloader.is-finishing .ms-preloader__logo3dStage{
  animation: msLogo3D 1100ms cubic-bezier(.2,.9,.2,1) both;
}

@keyframes msLogo3D{
  0%{
    opacity: 0;
    transform: perspective(900px) rotateX(16deg) rotateY(-20deg) translateY(16px) scale(.86);
  }
  45%{
    opacity: 1;
    transform: perspective(900px) rotateX(-6deg) rotateY(18deg) translateY(0px) scale(1.05);
  }
  100%{
    opacity: 1;
    transform: perspective(900px) rotateX(0deg) rotateY(360deg) translateY(-2px) scale(1);
  }
}

/* Fade out overlay */
.ms-preloader.is-done{
  animation: msOut 650ms ease forwards;
}

@keyframes msOut{
  to{ opacity:0; transform: scale(1.01); }
}

@media (max-width: 520px){
  .ms-preloader__runner{
    height: min(66vh, 620px);
    bottom: 12vh;
  }
  .ms-preloader__hud{
    bottom: 3.4vh;
    padding: 14px 14px 12px;
  }
  .ms-preloader__name{ font-size: 17px; }
  .ms-preloader__pct{ font-size: 15px; }
}
.ms-preloader__mascot{ width: 190px; }
  .ms-preloader__ring{ width: 235px; height: 235px; }
}


/* =========================
   MaxStore Premium Preloader v3
   ========================= */
.ms-preloader__scene{
  position:absolute; inset:0;
  overflow:hidden;
  /* Complementary background for the video (premium, dark, bluish) */
  background:
    radial-gradient(1200px 800px at 30% 55%, rgba(0,180,255,.18), transparent 55%),
    radial-gradient(900px 700px at 70% 45%, rgba(80,120,255,.14), transparent 55%),
    radial-gradient(700px 520px at 50% 70%, rgba(0,255,210,.08), transparent 60%),
    linear-gradient(180deg, rgba(6,10,20,1) 0%, rgba(3,5,10,1) 55%, rgba(0,0,0,1) 100%);
}

.ms-preloader__runner{
  position:absolute;
  left:0;
  top:50%;
  transform:translate3d(0,0,0);
  /* Make it BIG (almost full screen) */
  height:min(76vh, 720px);
  width:auto;
  margin-top: -18vh; /* lift to center visually */
  object-fit:contain;
  pointer-events:none;
  z-index:3;

  /* Remove hard edges / borders and blend with background */
  mix-blend-mode: screen;
  filter:
    drop-shadow(0 30px 80px rgba(0,140,255,.25))
    drop-shadow(0 10px 24px rgba(0,0,0,.55));
  -webkit-mask-image: radial-gradient(closest-side, rgba(0,0,0,1) 62%, rgba(0,0,0,.85) 72%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(closest-side, rgba(0,0,0,1) 62%, rgba(0,0,0,.85) 72%, rgba(0,0,0,0) 100%);
}

/* If browser doesn't support blend modes, keep it clean */
@supports not (mix-blend-mode: screen){
  .ms-preloader__runner{ mix-blend-mode: normal; }
}

.ms-preloader__pctFloat{
  position:absolute;
  left:0; top:50%;
  z-index:4;
  font-weight:800;
  letter-spacing:-.02em;
  font-size: clamp(42px, 6.8vw, 92px);
  color: rgba(220,245,255,.96);
  text-shadow:
    0 10px 30px rgba(0,120,255,.28),
    0 2px 10px rgba(0,0,0,.65);
  pointer-events:none;
  transform:translate3d(0,0,0);
  will-change: transform;
}

/* Make HUD less intrusive (keep brand + bar, not competing with runner) */
.ms-preloader__hud{
  position:absolute;
  left: clamp(14px, 2.2vw, 22px);
  top: clamp(14px, 2.2vw, 22px);
  right:auto;
  width: min(520px, calc(100vw - 28px));
  z-index:6;
}
.ms-preloader__pctWrap{ display:none; } /* we use the floating % instead */

/* Speedlines behind character */
.ms-preloader__speedlines{
  opacity:.55;
  mix-blend-mode: screen;
  filter: blur(.2px);
}
.ms-preloader__particles{
  opacity:.65;
  mix-blend-mode: screen;
}

/* --------- Stronger 3D Logo finale --------- */
.ms-preloader__logo3d{
  pointer-events:none;
}
.ms-preloader__logo3dStage{
  transform-style: preserve-3d;
  perspective: 900px;
}
.ms-preloader__logo3dImg{
  transform: translateZ(40px);
  filter: drop-shadow(0 28px 80px rgba(0,140,255,.35));
}

/* light sweep overlay */
.ms-preloader__logo3dStage::after{
  content:'';
  position:absolute; inset:-40%;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.22) 48%, transparent 65%);
  transform: translateZ(60px) translateX(-60%) rotate(6deg);
  opacity:0;
  mix-blend-mode: screen;
  pointer-events:none;
}

.ms-preloader.is-finishing .ms-preloader__logo3d{
  opacity:1;
}
.ms-preloader.is-finishing .ms-preloader__logo3dStage{
  animation: msLogoRevealPro 1250ms cubic-bezier(.2,.9,.2,1) forwards;
}
.ms-preloader.is-finishing .ms-preloader__logo3dStage::after{
  animation: msLogoSweep 980ms cubic-bezier(.2,.8,.2,1) 260ms forwards;
}

@keyframes msLogoRevealPro{
  0%   { transform: translate3d(0,10px,-80px) rotateX(12deg) rotateY(-70deg) scale(.78); opacity:0; }
  35%  { opacity:1; }
  70%  { transform: translate3d(0,0,0) rotateX(0deg) rotateY(18deg) scale(1.06); }
  100% { transform: translate3d(0,0,40px) rotateX(0deg) rotateY(0deg) scale(1); }
}
@keyframes msLogoSweep{
  0%{ opacity:0; transform: translateZ(60px) translateX(-65%) rotate(6deg); }
  25%{ opacity:1; }
  100%{ opacity:0; transform: translateZ(60px) translateX(65%) rotate(6deg); }
}

/* Responsive tweaks */
@media (max-width: 520px){
  .ms-preloader__runner{
    height: min(70vh, 560px);
    margin-top: -16vh;
  }
}



/* v4: start runner only when playing */
.ms-preloader__runner{
  opacity: 1;
  transition: opacity 220ms ease;
}



/* =========================
   Preloader v5 polish (remove left bar/card, bigger premium logo)
   ========================= */
.ms-preloader__hud{
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}
/* Hide the progress bar module completely (the % follows the runner) */
.ms-preloader__meter,
.ms-preloader__bar,
.ms-preloader__barFill{
  display:none !important;
}

/* Remove any "card" styling on brand row */
.ms-preloader__brand{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding: 0 !important;
  gap: 10px !important;
}
.ms-preloader__logoMini{
  width: 48px !important;
  height: auto !important;
  filter: drop-shadow(0 10px 26px rgba(0,140,255,.35));
}
.ms-preloader__brandText .ms-preloader__name{
  font-size: 22px !important;
  letter-spacing: -0.02em !important;
}
.ms-preloader__tag{
  opacity:.85;
}

/* 3D Logo Finale: bigger, no frame, more premium */
.ms-preloader__logo3d{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  z-index:9;
  background: radial-gradient(900px 520px at 50% 45%, rgba(0,170,255,.22), transparent 60%);
}
.ms-preloader__logo3dStage{
  position:relative;
  width: min(620px, 78vw);
  aspect-ratio: 16/10;
  display:flex;
  align-items:center;
  justify-content:center;
  transform-style: preserve-3d;
  perspective: 1100px;
}
.ms-preloader__logo3dImg{
  width: min(520px, 72vw);
  height: auto;
  transform: translateZ(70px);
  filter:
    drop-shadow(0 38px 120px rgba(0,130,255,.45))
    drop-shadow(0 12px 36px rgba(0,0,0,.7));
}

/* Add "depth" illusion using layered shadows */
.ms-preloader__logo3dStage::before{
  content:'';
  position:absolute;
  inset:-10%;
  border-radius: 26px;
  background:
    radial-gradient(closest-side, rgba(255,255,255,.06), transparent 70%),
    radial-gradient(700px 320px at 50% 70%, rgba(0,180,255,.18), transparent 60%);
  transform: translateZ(10px);
  filter: blur(6px);
  opacity:.9;
}

/* stronger sweep */
.ms-preloader__logo3dStage::after{
  opacity:0;
  border-radius: 26px;
}

/* Keep runner visible while finishing (still running behind logo) */
.ms-preloader.is-finishing .ms-preloader__scene{
  opacity:1;
  filter: blur(0.5px) saturate(1.05);
}
.ms-preloader.is-finishing .ms-preloader__runner{
  opacity:.9;
}



/* =========================
   Preloader v6: remove any logo "card" rectangle completely
   ========================= */
.ms-preloader__logo3d{
  background: radial-gradient(900px 520px at 50% 45%, rgba(0,170,255,.22), transparent 60%) !important;
}
/* Kill any pseudo-element that could look like a rounded rectangle/card */
.ms-preloader__logo3dStage::before{
  content:none !important;
  display:none !important;
}
.ms-preloader__logo3dStage::after{
  border-radius: 0 !important;
}
/* Ensure stage itself has no bg, no border, no radius */
.ms-preloader__logo3dStage{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
/* Ensure no accidental backplates */
.ms-preloader__logo3dGlow,
.ms-preloader__logo3dShadow{
  display:none !important;
}



/* =========================
   Preloader v7: remove HUD glass card completely
   ========================= */
.ms-preloader__hud{ 
  display:none !important; 
}
/* also remove any remaining logo mini rounding/border just in case */
.ms-preloader__logoMini{ border:none !important; border-radius:0 !important; background:transparent !important; }



/* =========================
   Preloader v8: fully opaque background + remove flashes
   ========================= */
.ms-preloader{
  background: #000 !important; /* fully opaque, no see-through */
}
.ms-preloader__bg{
  opacity: 1 !important;
}
.ms-preloader__scene{
  opacity: 1 !important;
}
.ms-preloader__vignette{
  opacity: 1 !important;
}
.ms-preloader__speedlines,
.ms-preloader__particles{
  display:none !important;
}



/* =========================
   Preloader v9: logo moment with ZERO rectangle/background
   ========================= */
.ms-preloader__logo3d{
  background: transparent !important;
}
.ms-preloader__logo3dStage{
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.ms-preloader__logo3dStage::before,
.ms-preloader__logo3dStage::after{
  content: none !important;
  display: none !important;
}



/* =========================
   Preloader v10: mobile responsive runner + vignette reveal + ensure logo shows
   ========================= */

/* Ensure logo moment actually shows */
.ms-preloader.is-finishing .ms-preloader__logo3d{
  opacity: 1 !important;
}

/* Mobile sizing: smaller runner so it "travels" across screen */
@media (max-width: 768px){
  .ms-preloader__runner{
    height: min(52vh, 420px) !important;
    margin-top: -12vh !important;
    filter:
      drop-shadow(0 22px 60px rgba(0,140,255,.22))
      drop-shadow(0 8px 18px rgba(0,0,0,.6)) !important;
  }
  .ms-preloader__pctFloat{
    font-size: clamp(28px, 8vw, 54px) !important;
  }
}
@media (max-width: 420px){
  .ms-preloader__runner{
    height: min(46vh, 360px) !important;
    margin-top: -10vh !important;
  }
}

/* Vignette reveal transition: open a "spotlight" to show products */
.ms-preloader{
  --ms-reveal: 0%;
}
.ms-preloader::after{
  content:'';
  position:absolute; inset:0;
  pointer-events:none;
  /* Dark vignette with a growing transparent center */
  background:
    radial-gradient(circle at 50% 55%,
      rgba(0,0,0,0) var(--ms-reveal),
      rgba(0,0,0,0.88) calc(var(--ms-reveal) + 18%),
      rgba(0,0,0,0.98) 100%);
  opacity: 0;
  transition: opacity 200ms ease;
  z-index: 99998;
}
.ms-preloader.is-revealing::after{
  opacity: 1;
  animation: msVignetteOpen 900ms cubic-bezier(.2,.9,.2,1) forwards;
}
@keyframes msVignetteOpen{
  0%   { --ms-reveal: 0%; }
  100% { --ms-reveal: 110%; }
}



/* =========================
   Preloader v11: clean sequencing (no mixing), true fade-to-transparent reveal, NO card behind logo
   ========================= */

/* Kill any rounded-rectangle panels anywhere in preloader */
.ms-preloader__logo3d,
.ms-preloader__logo3dStage{
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.ms-preloader__logo3dStage::before,
.ms-preloader__logo3dStage::after{
  content: none !important;
  display: none !important;
}

/* Hide logo by default, show ONLY when class is-logo is present */
.ms-preloader__logo3d{ opacity: 0 !important; }
.ms-preloader.is-logo .ms-preloader__logo3d{ opacity: 1 !important; }

/* When finishing, fade the runner out so it doesn't mix with the logo */
.ms-preloader.is-scene-out .ms-preloader__scene{
  opacity: 0 !important;
  transition: opacity 220ms ease;
}

/* Logo presentation (no plate) */
.ms-preloader__logo3dStage{
  width: min(760px, 86vw) !important;
  aspect-ratio: auto !important;
}
.ms-preloader__logo3dImg{
  width: min(620px, 82vw) !important;
}

/* True "vignette fade" to reveal the page: edges stay dark while overlay becomes transparent */
.ms-preloader::before{
  content:'';
  position:absolute; inset:0;
  pointer-events:none;
  z-index: 99997;
  background:
    radial-gradient(circle at 50% 55%,
      rgba(0,0,0,0.0) 0%,
      rgba(0,0,0,0.55) 55%,
      rgba(0,0,0,0.92) 100%);
  opacity: 0; /* off until revealing */
}
.ms-preloader.is-revealing::before{
  opacity: 1;
  animation: msVignetteFadeOut 1050ms cubic-bezier(.2,.9,.2,1) forwards;
}

/* Fade the whole preloader to transparent progressively */
.ms-preloader.is-revealing{
  animation: msOverlayFadeOut 1050ms cubic-bezier(.2,.9,.2,1) forwards;
}

@keyframes msOverlayFadeOut{
  0%   { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes msVignetteFadeOut{
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* Make sure nothing adds a semi-transparent panel */
.ms-preloader__hud{ display:none !important; }



/* =========================
   Preloader v12: mobile runner smaller for better travel illusion + pct closer/lower
   ========================= */
@media (max-width: 768px){
  .ms-preloader__runner{
    height: min(40vh, 320px) !important;
    margin-top: -8vh !important;
  }
}
@media (max-width: 420px){
  .ms-preloader__runner{
    height: min(34vh, 280px) !important;
    margin-top: -7vh !important;
  }
}



/* =========================
   Preloader v13: more mobile shrink for stronger travel illusion
   ========================= */
@media (max-width: 768px){
  .ms-preloader__runner{
    height: min(32vh, 260px) !important;
    margin-top: -6vh !important;
  }
}
@media (max-width: 420px){
  .ms-preloader__runner{
    height: min(26vh, 220px) !important;
    margin-top: -5vh !important;
  }
}



/* =========================
   Preloader v14: longer logo moment
   ========================= */
.ms-preloader.is-finishing .ms-preloader__logo3dStage{
  animation-duration: 1650ms !important;
}
.ms-preloader.is-finishing .ms-preloader__logo3dStage::after{
  animation-duration: 1350ms !important;
}



/* =========================
   Preloader v15: longer logo + longer reveal fade (logo stays visible during reveal)
   ========================= */

/* Slow down the fade-to-transparent reveal */
.ms-preloader.is-revealing,
.ms-preloader.is-revealing::before{
  animation-duration: 1800ms !important;
}

/* Keep logo visible during reveal */
.ms-preloader.is-revealing .ms-preloader__logo3d{
  opacity: 1 !important;
}

/* Slightly longer logo 3D animation */
.ms-preloader.is-finishing .ms-preloader__logo3dStage{
  animation-duration: 2000ms !important;
}
.ms-preloader.is-finishing .ms-preloader__logo3dStage::after{
  animation-duration: 1650ms !important;
}



/* =========================
   Preloader v16: single logo animation trigger + reveal in sync
   ========================= */

/* Ensure no leftover is-finishing based animations run */
.ms-preloader.is-finishing .ms-preloader__logo3dStage,
.ms-preloader.is-finishing .ms-preloader__logo3dStage::after{
  animation: none !important;
}

/* Trigger the logo 3D animation ONLY when is-logo is added */
.ms-preloader.is-logo .ms-preloader__logo3d{
  opacity: 1 !important;
}
.ms-preloader.is-logo .ms-preloader__logo3dStage{
  animation: msLogoRevealPro 2000ms cubic-bezier(.2,.9,.2,1) both !important;
}
.ms-preloader.is-logo .ms-preloader__logo3dStage::after{
  animation: msLogoSweep 1650ms cubic-bezier(.2,.8,.2,1) 260ms forwards !important;
}

/* Keep logo visible during reveal */
.ms-preloader.is-revealing .ms-preloader__logo3d{
  opacity: 1 !important;
}



/* =========================
   Preloader v17: hard depuration – SINGLE logo animation
   ========================= */

/* Kill any animation coming from is-finishing or default states */
.ms-preloader__logo3dStage,
.ms-preloader__logo3dStage::after{
  animation: none !important;
}

/* Only is-logo triggers the animation */
.ms-preloader.is-logo .ms-preloader__logo3dStage{
  animation: msLogoRevealPro 2200ms cubic-bezier(.2,.9,.2,1) both !important;
}
.ms-preloader.is-logo .ms-preloader__logo3dStage::after{
  animation: msLogoSweep 1800ms cubic-bezier(.2,.8,.2,1) 320ms forwards !important;
}



/* =========================
   Preloader v17: eliminate default logo stage animation (fix "double animation" jump)
   ========================= */
/* By default, the stage must NOT animate at all */
.ms-preloader__logo3dStage{
  animation: none !important;
}
/* If any other selector tries to animate it, kill it */
.ms-preloader__logo3dStage[class]{
  animation: none !important;
}
/* Only animate when is-logo is present (single source of truth) */
.ms-preloader.is-logo .ms-preloader__logo3dStage{
  animation: msLogoRevealPro 2000ms cubic-bezier(.2,.9,.2,1) both !important;
}
.ms-preloader.is-logo .ms-preloader__logo3dStage::after{
  animation: msLogoSweep 1650ms cubic-bezier(.2,.8,.2,1) 260ms forwards !important;
}



/* =========================
   Preloader v18: ONLY spin logo (no appear/fade/sweep), eliminate all other logo animations
   ========================= */

/* Hard-disable any existing logo-related animations */
.ms-preloader__logo3d,
.ms-preloader__logo3dStage,
.ms-preloader__logo3dStage::after{
  animation: none !important;
  transition: none !important;
}

/* Show logo instantly (no fade) when is-logo is active */
.ms-preloader.is-logo .ms-preloader__logo3d{
  opacity: 1 !important;
}

/* Spin-only animation (premium, smooth) */
.ms-preloader.is-logo .ms-preloader__logo3dStage{
  transform-style: preserve-3d;
  perspective: 1100px;
  animation: msLogoSpinOnly 1800ms cubic-bezier(.2,.9,.2,1) both !important;
}

/* Disable sweep highlight entirely */
.ms-preloader__logo3dStage::after{
  content: none !important;
  display: none !important;
}

/* Keep logo visible during reveal */
.ms-preloader.is-revealing .ms-preloader__logo3d{
  opacity: 1 !important;
}

@keyframes msLogoSpinOnly{
  0%   { transform: rotateY(-95deg) translateZ(40px); }
  55%  { transform: rotateY(18deg) translateZ(40px); }
  100% { transform: rotateY(0deg) translateZ(40px); }
}



/* =========================
   Preloader v19: logo has NO "appearance" animation (always present), only spin; hidden under scene until scene fades
   ========================= */

/* Layering: keep scene above logo during loading */
.ms-preloader__scene{ z-index: 5 !important; }
.ms-preloader__logo3d{ 
  z-index: 2 !important;
  opacity: 1 !important;           /* always visible (no appear) */
  background: transparent !important;
}

/* Remove any opacity toggles from is-logo */
.ms-preloader.is-logo .ms-preloader__logo3d{ opacity: 1 !important; }

/* Ensure logo never gets a panel */
.ms-preloader__logo3d,
.ms-preloader__logo3dStage{
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Only spin when is-logo is added (logo is already "there", revealed by scene fading) */
.ms-preloader.is-logo .ms-preloader__logo3dStage{
  animation: msLogoSpinOnly 1800ms cubic-bezier(.2,.9,.2,1) both !important;
}



/* =========================
   Preloader v20: keep logo fully hidden until robot finishes (no fade/appearance), then spin only
   ========================= */

/* Hide logo completely (no opacity animation) */
.ms-preloader__logo3d{
  visibility: hidden !important;
  opacity: 1 !important;
  transition: none !important;
}

/* Reveal instantly only at the end */
.ms-preloader.is-logo .ms-preloader__logo3d{
  visibility: visible !important;
}



/* =========================
   Preloader v21: longer logo spin (smoother, more premium)
   ========================= */




/* =========================
   Preloader v22: even longer logo spin
   ========================= */




/* =========================
   Preloader v23: single authoritative logo spin duration (no duplicates)
   ========================= */
.ms-preloader.is-logo .ms-preloader__logo3dStage{
  animation: msLogoSpinOnly 4200ms cubic-bezier(.2,.9,.2,1) both !important;
}



/* =========================
   Preloader v23: longer spin + ensure preloader stays long enough (no truncation)
   ========================= */
/* Final single source of truth for spin duration */
.ms-preloader.is-logo .ms-preloader__logo3dStage{
  animation-duration: 4200ms !important;
}



/* Ocultar conteos (números) al costado de cada opción de filtro */
.opt-count{
  display: none !important;
}


/* ================================
   Desktop: estandarizar altura del título y alinear botones
   Evita que los botones "suban" cuando el nombre tiene 1 sola línea
==================================*/
@media (min-width: 768px){
  #product-grid .product-card{
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  #product-grid .product-card .product-info{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
  }
  /* Título: reservar espacio para 2 líneas (aunque solo tenga 1) */
  #product-grid .product-card .product-info h3{
    line-height: 1.25;
    min-height: 2.5em; /* ~2 líneas */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  /* Botonera siempre abajo */
  #product-grid .product-card .card-actions{
    margin-top: auto;
    padding-top: 14px; /* espacio entre etiqueta/price y botones */
  }
}

/* Mejora de Velocidad: Elimina la espera artificial */
.ms-preloader.is-logo .ms-preloader__logo3dStage {
  animation-duration: 400ms !important; 
}
.ms-preloader {
  transition: opacity 0.3s ease-out !important;
}