/* ══════════════════════════════════════════════════════
   Alice Store — Design System
   Colores: Naranja #FF6B00 ·Fucsia #E91E8C · Negro #1A1A1A
   ══════════════════════════════════════════════════════ */

:root {
    --orange:        #FF6B00;
    --orange-dark:   #E85F00;
    --orange-light:  #FF8C33;
    --orange-bg:     #FFF4EE;
    --fuchsia:       #E91E8C;
    --fuchsia-dark:  #C2185B;
    --fuchsia-light: #F06292;
    --fuchsia-bg:    #FCE4EC;
    --black:         #1A1A1A;
    --black-2:       #2D2D2D;
    --black-3:       #424242;
    --text:          #1A1A1A;
    --text-2:        #616161;
    --text-3:        #9E9E9E;
    --bg:            #F5F5F5;
    --surface:       #FFFFFF;
    --border:        #EEEEEE;
    --border-2:      #E0E0E0;
    --green:         #2E7D32;
    --red:           #C62828;
    --shadow-sm:     0 1px 4px rgba(0,0,0,.08);
    --shadow-md:     0 2px 12px rgba(0,0,0,.1);
    --shadow-lg:     0 4px 24px rgba(0,0,0,.14);
    --radius-sm:     4px;
    --radius-md:     8px;
    --radius-lg:     12px;
    --transition:    all .18s ease;
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text); background: var(--bg); line-height: 1.5;
    font-size: 14px;
}
a   { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, select, textarea { font: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 12px; }

/* ── Animaciones ────────────────────────────────────── */
@keyframes fadeIn  { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
@keyframes spin    { to{transform:rotate(360deg)} }
@keyframes shimmer { 0%{background-position:-200% 0} 100%{background-position:200% 0} }
@keyframes popIn   { 0%{transform:scale(.9);opacity:0} 100%{transform:scale(1);opacity:1} }
@keyframes slideInRight { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:none} }

.fade-in  { animation: fadeIn .3s ease both; }
.pop-in   { animation: popIn .2s ease both; }

/* ── Header ──────────────────────────────────────────── */
.top-bar {
    background: var(--black);
    position: sticky; top: 0; z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
    border-bottom: 2px solid var(--fuchsia);
}
.top-bar-inner {
    display: flex; align-items: center;
    gap: 12px; padding: 10px 0;
}
.logo {
    font-size: 1.5rem; font-weight: 900;
    letter-spacing: -1px; white-space: nowrap;
    flex-shrink: 0; display: flex; align-items: center;
}
.logo .logo-alice { color: var(--orange); }
.logo .logo-star  { color: var(--fuchsia); font-size: 1rem; margin: 0 1px; }
.logo .logo-store { color: white; }

/* Buscador */
.search-bar { flex: 1; }
.searchbar {
    display: flex; background: white;
    border-radius: var(--radius-md); overflow: hidden;
    border: 2px solid var(--orange);
    transition: border-color .2s;
}
.searchbar:focus-within { border-color: var(--fuchsia); }
.search-input {
    flex: 1; padding: 8px 16px;
    border: none; outline: none;
    font-size: .9rem; color: var(--text);
}
.search-btn {
    padding: 8px 20px;
    background: var(--orange); color: white;
    font-weight: 800; font-size: .9rem;
    border-radius: 0 6px 6px 0;
    transition: background .15s;
}
.search-btn:hover { background: var(--orange-dark); }

.user-actions { display: flex; gap: 4px; flex-shrink: 0; }
.btn-icon {
    display: flex; flex-direction: column;
    align-items: center; gap: 2px;
    padding: 5px 9px; border-radius: var(--radius-md);
    color: white; font-size: .7rem; font-weight: 600;
    transition: var(--transition); position: relative; white-space: nowrap;
}
.btn-icon:hover { background: rgba(255,255,255,.1); }
.btn-icon .icon { font-size: 1.1rem; line-height: 1; }
.label { font-size: .68rem; }
.badge {
    position: absolute; top: 1px; right: 2px;
    background: var(--fuchsia); color: white;
    border-radius: 999px; min-width: 15px; height: 15px;
    font-size: .62rem; font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    padding: 0 2px;
}

/* ── Nav categorías ──────────────────────────────────── */
.categoria-nav {
    background: white;
    border-bottom: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.categoria-nav .container {
    display: flex; overflow-x: auto; scrollbar-width: none;
}
.categoria-nav::-webkit-scrollbar { display: none; }
.cat-link {
    padding: 10px 16px; font-size: .82rem; font-weight: 700;
    color: var(--text-2); white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: var(--transition); margin-bottom: -2px;
}
.cat-link:hover { color: var(--fuchsia); border-bottom-color: var(--fuchsia); }
.cat-link.activa { color: var(--orange); border-bottom-color: var(--orange); }

/* ── Main ─────────────────────────────────────────────── */
.main-content { padding: 12px 0 2rem; }

/* ── Grid categorías ─────────────────────────────────── */
.cats-grid {
    display: grid; grid-template-columns: repeat(8, 1fr);
    gap: 1px; background: var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    margin-bottom: 12px; box-shadow: var(--shadow-sm);
}
.cat-box {
    background: white; display: flex; flex-direction: column;
    align-items: center; gap: 6px; padding: 14px 8px;
    cursor: pointer; transition: var(--transition);
}
.cat-box:hover { background: var(--orange-bg); }
.cat-box:hover .cat-icon { transform: scale(1.15); }
.cat-icon { font-size: 1.6rem; transition: transform .2s; }
.cat-name { font-size: .72rem; font-weight: 700; color: var(--text-2); text-align: center; line-height: 1.2; }

/* ── Banner ──────────────────────────────────────────── */
.banner {
    border-radius: var(--radius-lg); padding: 16px 20px;
    margin-bottom: 12px; background: var(--black);
    border-left: 5px solid var(--fuchsia);
    display: flex; align-items: center;
    justify-content: space-between; gap: 1rem;
}
.banner-text h3 { font-size: 1rem; font-weight: 900; color: white; margin-bottom: 4px; }
.banner-text p { font-size: .8rem; color: var(--text-3); }
.banner-text span { color: var(--orange); font-weight: 900; }
.banner-btn {
    background: var(--fuchsia); color: white;
    padding: 9px 18px; border-radius: var(--radius-md);
    font-weight: 800; font-size: .82rem; flex-shrink: 0;
    transition: background .15s;
}
.banner-btn:hover { background: var(--fuchsia-dark); }

/* ── Flash section ───────────────────────────────────── */
.flash-section {
    background: white; border-radius: var(--radius-lg);
    margin-bottom: 12px; overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.flash-header {
    background: var(--black); padding: 10px 14px;
    display: flex; align-items: center; justify-content: space-between;
}
.flash-title {
    color: white; font-weight: 900; font-size: .9rem;
    display: flex; align-items: center; gap: 8px;
}
.flash-title .ic { color: var(--orange); }
.timer { display: flex; gap: 3px; align-items: center; }
.timer-block {
    background: var(--orange); color: white;
    border-radius: 4px; padding: 2px 7px;
    font-weight: 900; font-size: .78rem;
    min-width: 24px; text-align: center;
}
.timer-sep { color: var(--orange); font-weight: 900; }
.ver-mas {
    color: var(--fuchsia); font-size: .78rem; font-weight: 800;
    cursor: pointer; transition: color .15s;
}
.ver-mas:hover { color: var(--orange); }

/* ── Sección normal ──────────────────────────────────── */
.seccion {
    background: white; border-radius: var(--radius-lg);
    margin-bottom: 12px; overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.seccion-header {
    padding: 12px 14px 8px; display: flex;
    align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
}
.seccion-titulo {
    font-size: .9rem; font-weight: 900;
    display: flex; align-items: center; gap: 8px;
}
.seccion-titulo .barra {
    width: 4px; height: 18px; border-radius: 2px;
    background: linear-gradient(to bottom, var(--orange), var(--fuchsia));
}

/* ── Grid productos ──────────────────────────────────── */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1px;
    background: var(--border);
}

/* Skeleton cards — sin width fijo para respetar el grid */
.skeleton-card {
    background: white;
}

.skeleton-img-card {
    aspect-ratio: 1;
    margin-bottom: 0;
    border-radius: 0;
}

/* Infinite scroll UI */
.infinite-scroll-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: white;
}

.infinite-scroll-fin {
    text-align: center;
    padding: 16px;
    font-size: .78rem;
    color: var(--text-3);
    font-weight: 700;
    background: white;
    border-top: 1px solid var(--border);
}

/* ── Tarjeta producto ────────────────────────────────── */
.producto-card {
    background: white; cursor: pointer;
    transition: var(--transition); position: relative;
}
.producto-card:hover { z-index: 2; box-shadow: var(--shadow-md); }
.producto-card:hover .producto-card-img img { transform: scale(1.06); }

.producto-card-link { display: block; }

.producto-card-img {
    position: relative; padding-top: 100%;
    overflow: hidden; background: #FAFAFA;
}
.producto-card-img img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain; padding: 6px;
    transition: transform .3s ease;
}

.badge-descuento {
    position: absolute; top: 5px; left: 5px;
    background: var(--orange); color: white;
    font-size: .68rem; font-weight: 900;
    padding: 2px 6px; border-radius: var(--radius-sm); z-index: 1;
}
.badge-nuevo {
    position: absolute; top: 5px; right: 5px;
    background: var(--fuchsia); color: white;
    font-size: .68rem; font-weight: 800;
    padding: 2px 6px; border-radius: var(--radius-sm);
}
.overlay-agotado {
    position: absolute; inset: 0;
    background: rgba(26,26,26,.5); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .82rem;
}

.producto-card-info { padding: 8px 10px 4px; }
.card-nombre {
    font-size: .8rem; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 4px; line-height: 1.4; min-height: 2.5em;
}
.card-rating {
    display: flex; align-items: center;
    gap: 2px; margin-bottom: 4px;
}
.star { color: #E0E0E0; font-size: .72rem; }
.star.activa { color: #FF9800; }
.resenas-count { font-size: .68rem; color: var(--text-3); margin-left: 2px; }
.card-precio {
    display: flex; align-items: baseline;
    gap: 4px; flex-wrap: wrap; margin-bottom: 2px;
}
.precio { font-size: 1rem; font-weight: 900; color: var(--orange); line-height: 1; }
.precio-tachado { font-size: .72rem; color: var(--text-3); text-decoration: line-through; }
.vendidos { font-size: .68rem; color: var(--text-3); margin-bottom: 4px; }

.card-acciones {
    padding: 0 8px 8px;
    display: flex; justify-content: flex-end;
}
.btn-carrito-rapido {
    width: 30px; height: 30px;
    background: var(--black); color: white;
    border-radius: 50%; font-size: .9rem;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.btn-carrito-rapido:hover:not(:disabled) {
    background: var(--fuchsia); transform: scale(1.12);
    box-shadow: 0 3px 10px rgba(233,30,140,.4);
}
.btn-carrito-rapido:disabled { background: #BDBDBD; box-shadow: none; cursor: not-allowed; }
.btn-carrito-rapido.btn-loading { opacity: .7; pointer-events: none; }
.spinner-mini {
    width: 13px; height: 13px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: white; border-radius: 50%;
    animation: spin .6s linear infinite; display: inline-block;
}

/* ── Catálogo ────────────────────────────────────────── */
.catalogo-layout { display: grid; grid-template-columns: 200px 1fr; gap: 12px; }
.filtros-sidebar {
    background: white; border-radius: var(--radius-lg);
    padding: 14px; border: 1px solid var(--border);
    align-self: start; position: sticky; top: 76px;
    box-shadow: var(--shadow-sm);
}
.filtros-sidebar h3 {
    font-size: .78rem; font-weight: 900;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--text); margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--orange);
}
.filtro-grupo { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.filtro-grupo h4 { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin-bottom: 8px; }
.input-precio { width: 100%; padding: 6px 10px; border: 1px solid var(--border-2); border-radius: var(--radius-md); font-size: .8rem; margin-bottom: 6px; }
.input-precio:focus { outline: none; border-color: var(--orange); }
.btn-aplicar { width: 100%; padding: 7px; background: var(--orange); color: white; border-radius: var(--radius-md); font-weight: 800; font-size: .8rem; }
.btn-aplicar:hover { background: var(--orange-dark); }

.catalogo-toolbar {
    background: white; border-radius: var(--radius-lg);
    padding: 10px 14px; margin-bottom: 8px;
    display: flex; align-items: center; gap: 12px;
    border: 1px solid var(--border); box-shadow: var(--shadow-sm); flex-wrap: wrap;
}
.catalogo-toolbar select { padding: 5px 10px; border: 1px solid var(--border-2); border-radius: var(--radius-md); font-size: .82rem; }
.resultado-info { font-size: .82rem; color: var(--text-2); flex: 1; }
.resultado-info strong { color: var(--text); font-weight: 800; }
.sin-resultados { background: white; border-radius: var(--radius-lg); text-align: center; padding: 4rem 2rem; border: 1px solid var(--border); }

/* ── Botones globales ────────────────────────────────── */
.btn-primary {
    background: var(--orange); color: white;
    padding: 10px 20px; border-radius: var(--radius-md);
    font-weight: 800; font-size: .88rem;
    display: inline-flex; align-items: center; gap: 6px;
    transition: var(--transition); border: none;
}
.btn-primary:hover:not(:disabled) { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,0,.3); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-outline {
    border: 2px solid var(--orange); color: var(--orange);
    padding: 9px 20px; border-radius: var(--radius-md);
    font-weight: 800; font-size: .88rem;
    display: inline-flex; align-items: center; gap: 6px;
    background: white; transition: var(--transition);
}
.btn-outline:hover { background: var(--orange); color: white; transform: translateY(-1px); }
.btn-outline-sm {
    border: 1px solid var(--border-2); color: var(--text-2);
    padding: 5px 12px; border-radius: var(--radius-md);
    font-size: .78rem; font-weight: 700; background: white;
    transition: var(--transition);
}
.btn-outline-sm:hover { border-color: var(--fuchsia); color: var(--fuchsia); }
.btn-full { width: 100%; justify-content: center; }

/* ── Detalle producto ────────────────────────────────── */
.breadcrumb {
    display: flex; gap: 6px; align-items: center;
    font-size: .78rem; color: var(--text-3); margin-bottom: 14px; flex-wrap: wrap;
}
.breadcrumb a:hover { color: var(--orange); }
.producto-detalle { animation: fadeIn .3s ease; }
.producto-detalle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.imagen-principal-wrapper {
    position: relative; background: white;
    border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden;
}
.imagen-principal { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 12px; transition: transform .4s ease; }
.imagen-principal:hover { transform: scale(1.04); }
.badge-descuento-detalle { position: absolute; top: 10px; left: 10px; background: var(--orange); color: white; font-weight: 800; font-size: .78rem; padding: 3px 8px; border-radius: var(--radius-sm); }
.miniaturas { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.miniatura { width: 58px; height: 58px; object-fit: contain; border: 2px solid var(--border); border-radius: var(--radius-md); cursor: pointer; padding: 3px; background: white; transition: var(--transition); }
.miniatura:hover { border-color: var(--orange); }
.miniatura.activa { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(255,107,0,.2); }

.badge-marca { display: inline-block; background: var(--orange-bg); color: var(--orange); font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }
.producto-nombre { font-size: 1.1rem; font-weight: 800; line-height: 1.4; margin-bottom: 8px; }
.rating-row { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.vendidos-badge { background: var(--orange-bg); color: var(--orange-dark); font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }

/* Precios escalonados */
.precios-escalonados { margin: 10px 0 14px; }
.tabla-precios { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.tabla-precios th { background: #F5F5F5; border: 1px solid var(--border); padding: 6px 10px; font-size: .75rem; font-weight: 800; color: var(--text-2); text-align: center; }
.tabla-precios td { border: 1px solid var(--border); padding: 6px 10px; font-weight: 900; color: var(--orange); font-size: .9rem; text-align: center; }
.tabla-precios th.precio-activo { background: var(--orange-bg); color: var(--orange); }
.tabla-precios td.precio-activo { background: var(--orange-bg); font-size: 1rem; }
.precio-original-label { font-size: .72rem; color: var(--text-3); margin-top: 4px; }
.precio-bloque { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.precio-principal { font-size: 1.5rem; font-weight: 900; color: var(--orange); }
.precio-tachado { font-size: .88rem; color: var(--text-3); text-decoration: line-through; }

/* Cases selector */
.cases-selector { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; margin: 12px 0; background: #FAFAFA; animation: fadeIn .25s ease; }
.selector-titulo { font-size: .85rem; font-weight: 900; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.marcas-celular { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.btn-marca { padding: 5px 14px; border-radius: 999px; border: 2px solid var(--border-2); font-size: .78rem; font-weight: 700; cursor: pointer; transition: var(--transition); background: white; color: var(--text); }
.btn-marca:hover { border-color: var(--orange); color: var(--orange); }
.btn-marca.activa { background: var(--orange); color: white; border-color: var(--orange); }
.input-buscar-modelo { width: 100%; padding: 7px 12px; border: 1px solid var(--border-2); border-radius: var(--radius-md); font-size: .82rem; margin-bottom: 8px; }
.input-buscar-modelo:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,107,0,.12); }
.lista-modelos { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.modelo-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-md); border: 2px solid var(--border); cursor: pointer; background: white; transition: var(--transition); }
.modelo-item:hover { border-color: var(--orange); background: var(--orange-bg); }
.modelo-item.seleccionado { border-color: var(--orange); background: var(--orange-bg); }
.modelo-info { flex: 1; }
.modelo-nombre { font-weight: 700; font-size: .82rem; }
.badge-agotado { background: var(--fuchsia-bg); color: var(--fuchsia); font-size: .65rem; padding: 1px 5px; border-radius: 999px; margin-left: 4px; }
.modelo-precio { text-align: right; flex-shrink: 0; }
.precio-case { font-weight: 900; color: var(--orange); font-size: .85rem; }
.precio-case-tachado { font-size: .7rem; color: var(--text-3); text-decoration: line-through; margin-left: 3px; }
.modelo-img { width: 36px; height: 36px; object-fit: contain; border-radius: 4px; border: 1px solid var(--border); }
.sin-modelos { text-align: center; color: var(--text-3); padding: 1rem; font-size: .82rem; }
.case-seleccionado-info { margin-top: 8px; padding: 7px 12px; background: #E8F5E9; border: 1px solid #A5D6A7; border-radius: var(--radius-md); font-size: .82rem; color: var(--green); display: flex; align-items: center; gap: 6px; animation: popIn .2s ease; }

/* Cantidad */
.cantidad-row { display: flex; align-items: center; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.cantidad-row label { font-size: .85rem; font-weight: 800; }
.cantidad-control { display: flex; align-items: center; border: 2px solid var(--border-2); border-radius: var(--radius-md); overflow: hidden; }
.btn-cantidad { width: 34px; height: 34px; background: #F5F5F5; font-size: 1rem; font-weight: 700; transition: background .15s; display: flex; align-items: center; justify-content: center; }
.btn-cantidad:hover { background: var(--border-2); }
.cantidad-valor { min-width: 38px; text-align: center; font-weight: 800; }
.stock-ok    { color: var(--green); font-size: .78rem; font-weight: 700; }
.stock-agotado { color: var(--red); font-size: .78rem; font-weight: 700; }

/* Botones compra */
.acciones-compra { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.btn-agregar {
    display: flex; align-items: center; gap: 6px;
    background: var(--orange); color: white;
    padding: 12px 24px; border-radius: var(--radius-md);
    font-weight: 800; font-size: .95rem; border: none;
    cursor: pointer; transition: var(--transition);
    min-width: 170px; justify-content: center;
    box-shadow: 0 3px 10px rgba(255,107,0,.3);
}
.btn-agregar:hover:not(:disabled) { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 5px 16px rgba(255,107,0,.4); }
.btn-agregar:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-comprar {
    padding: 12px 24px; border-radius: var(--radius-md);
    border: 2px solid var(--fuchsia); color: var(--fuchsia);
    font-weight: 800; font-size: .95rem;
    cursor: pointer; background: white; transition: var(--transition);
}
.btn-comprar:hover:not(:disabled) { background: var(--fuchsia); color: white; transform: translateY(-1px); }
.btn-comprar:disabled { opacity: .55; cursor: not-allowed; }
.aviso-selector { background: #FFF8E1; border: 1px solid #FFE082; border-radius: var(--radius-md); padding: 7px 12px; font-size: .8rem; color: #E65100; margin-top: 6px; animation: fadeIn .3s ease; }
.breve-desc { color: var(--text-2); font-size: .85rem; line-height: 1.6; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.descripcion-completa { margin-top: 14px; background: white; border-radius: var(--radius-lg); padding: 16px; border: 1px solid var(--border); }
.descripcion-completa h2 { margin-bottom: 12px; font-size: .95rem; font-weight: 800; }
.seccion-selector { margin: 10px 0; }

/* Skeleton */
.detalle-skeleton { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 16px 0; }
.skeleton { background: linear-gradient(90deg,#F5F5F5 25%,#EEEEEE 50%,#F5F5F5 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-md); }
.skeleton-img { aspect-ratio: 1; border-radius: var(--radius-lg); }
.skeleton-info { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.skeleton-titulo { height: 1.6rem; width: 80%; }
.skeleton-precio { height: 2.5rem; width: 45%; }
.skeleton-btn { height: 2.8rem; width: 55%; border-radius: var(--radius-md); }

/* Carrito */
.carrito-layout { display: grid; grid-template-columns: 1fr 300px; gap: 12px; }
.carrito-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: white; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 8px; transition: var(--transition); }
.carrito-item:hover { box-shadow: var(--shadow-sm); }
.item-img { width: 80px; height: 80px; object-fit: contain; border-radius: var(--radius-md); border: 1px solid var(--border); flex-shrink: 0; padding: 4px; background: #FAFAFA; }
.item-info { flex: 1; }
.item-nombre { font-size: .85rem; font-weight: 600; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-acciones { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.item-acciones button { width: 26px; height: 26px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: .9rem; transition: var(--transition); }
.item-acciones button:hover { border-color: var(--orange); color: var(--orange); }
.btn-eliminar { color: var(--red) !important; }
.btn-eliminar:hover { background: #FFEBEE !important; border-color: #FFCDD2 !important; }
.carrito-vacio { text-align: center; padding: 5rem 1rem; background: white; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.resumen-card { background: white; border-radius: var(--radius-lg); padding: 16px; border: 1px solid var(--border); position: sticky; top: 76px; box-shadow: var(--shadow-sm); }
.resumen-card h3 { font-size: .9rem; font-weight: 900; margin-bottom: 14px; }
.totales { margin: 12px 0; }
.total-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: .85rem; }
.total-final { border-top: 2px solid var(--border); padding-top: 10px; margin-top: 6px; font-size: 1rem; }
.btn-checkout { width: 100%; padding: 12px; background: var(--orange); color: white; border-radius: var(--radius-md); font-weight: 900; font-size: .95rem; margin-top: 10px; cursor: pointer; transition: var(--transition); border: none; box-shadow: 0 3px 10px rgba(255,107,0,.3); }
.btn-checkout:hover { background: var(--orange-dark); transform: translateY(-1px); }

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr 300px; gap: 12px; }
.checkout-step { background: white; border-radius: var(--radius-lg); padding: 16px; border: 1px solid var(--border); }
.checkout-step h2 { font-size: .9rem; font-weight: 900; margin-bottom: 14px; border-left: 3px solid var(--orange); padding-left: 8px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: .75rem; font-weight: 800; color: var(--text-2); margin-bottom: 4px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 12px; border: 1.5px solid var(--border-2); border-radius: var(--radius-md); font-size: .88rem; transition: border-color .15s; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,107,0,.1); }
.btn-confirmar { width: 100%; padding: 12px; background: var(--fuchsia); color: white; border-radius: var(--radius-md); font-weight: 900; font-size: .95rem; margin-top: 12px; cursor: pointer; transition: var(--transition); border: none; box-shadow: 0 3px 10px rgba(233,30,140,.25); }
.btn-confirmar:hover:not(:disabled) { background: var(--fuchsia-dark); transform: translateY(-1px); }
.btn-confirmar:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.error-general { background: #FFEBEE; border: 1px solid #FFCDD2; border-radius: var(--radius-md); padding: 8px 12px; color: var(--red); font-size: .82rem; margin-bottom: 10px; }
.error-msg { font-size: .72rem; color: var(--red); display: block; margin-top: 3px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: .82rem; cursor: pointer; }

/* Confirmación */
.confirmacion-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.confirmacion-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 2.5rem 2rem; max-width: 480px; width: 100%; text-align: center; border-top: 4px solid var(--orange); }
.icono-ok { font-size: 3rem; margin-bottom: 12px; }
.confirmacion-card h1 { font-size: 1.4rem; font-weight: 900; margin-bottom: 6px; }
.numero-pedido { font-size: 1rem; color: var(--text-2); margin: 6px 0 16px; }
.confirmacion-acciones { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* Tracking */
.tracking-page { max-width: 600px; margin: 0 auto; padding: 1.5rem 1rem; }
.tracking-buscar { display: flex; gap: 8px; margin: 14px 0; }
.input-tracking { flex: 1; padding: 9px 14px; border: 1.5px solid var(--border-2); border-radius: var(--radius-md); font-size: .88rem; }
.input-tracking:focus { outline: none; border-color: var(--orange); }
.tracking-resultado { margin-top: 20px; animation: fadeIn .3s ease; }
.estado-actual { text-align: center; padding: 16px; background: white; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 12px; padding-bottom: 18px; position: relative; }
.timeline-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--border-2); border: 2px solid var(--border-2); flex-shrink: 0; margin-top: 3px; }
.timeline-dot.activo { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,107,0,.18); }
.timeline-dot.completado { background: var(--green); border-color: var(--green); }
.timeline-contenido { flex: 1; }
.evento-titulo { font-weight: 700; font-size: .85rem; }
.evento-desc { color: var(--text-2); font-size: .78rem; margin: 2px 0; }
.evento-fecha { font-size: .72rem; color: var(--text-3); }

/* Auth */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 2rem 1rem; }
.auth-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 2rem 1.75rem; width: 100%; max-width: 400px; border-top: 4px solid var(--fuchsia); }
.auth-card h1 { font-size: 1.3rem; font-weight: 900; text-align: center; margin-bottom: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 2px; }
.auth-footer { text-align: center; margin-top: 14px; font-size: .82rem; color: var(--text-2); }
.auth-footer a { color: var(--fuchsia); font-weight: 800; }

/* Pedidos */
.pedido-card { background: white; border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 12px; margin-bottom: 8px; transition: var(--transition); }
.pedido-card:hover { box-shadow: var(--shadow-sm); border-left: 3px solid var(--orange); }
.pedido-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pedido-header .numero { font-weight: 900; font-size: .88rem; }
.pedido-header .fecha { color: var(--text-3); font-size: .78rem; }
.pedido-footer { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.detalle-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.detalle-header h2 { font-size: 1.1rem; font-weight: 900; }
.detalle-item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.detalle-totales { background: white; border-radius: var(--radius-lg); padding: 12px; border: 1px solid var(--border); max-width: 380px; margin-top: 12px; }

/* Mini carrito */
.mini-carrito-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 300; opacity: 0; pointer-events: none; transition: opacity .25s; }
.mini-carrito-overlay.visible { opacity: 1; pointer-events: all; }
.mini-carrito { position: fixed; top: 0; right: -420px; width: 400px; height: 100vh; background: white; z-index: 301; box-shadow: var(--shadow-lg); transition: right .3s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; }
.mini-carrito.abierto { right: 0; }
.mini-carrito-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: var(--black); color: white; border-bottom: 2px solid var(--orange); }
.mini-carrito-header h3 { font-size: .9rem; font-weight: 900; }
.mini-carrito-header button { color: white; opacity: .7; font-size: 1.2rem; }
.mini-carrito-header button:hover { opacity: 1; }
.mini-carrito-items { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.mini-carrito-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.mini-total { display: flex; justify-content: space-between; font-size: 1rem; font-weight: 900; }
.mini-total strong { color: var(--orange); }
.mini-item { display: flex; gap: 10px; align-items: center; background: var(--bg); border-radius: var(--radius-md); padding: 8px; }
.mini-item img { width: 50px; height: 50px; object-fit: contain; border-radius: var(--radius-sm); background: white; border: 1px solid var(--border); padding: 2px; flex-shrink: 0; }
.mini-item-info { flex: 1; font-size: .78rem; }
.mini-nombre { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-subtotal { font-weight: 900; color: var(--orange); font-size: .85rem; white-space: nowrap; flex-shrink: 0; }
.btn-checkout-mini { width: 100%; padding: 11px; background: var(--orange); color: white; border-radius: var(--radius-md); font-weight: 900; font-size: .9rem; border: none; cursor: pointer; transition: var(--transition); box-shadow: 0 3px 10px rgba(255,107,0,.3); }
.btn-checkout-mini:hover { background: var(--orange-dark); transform: translateY(-1px); }
.btn-carrito-full { width: 100%; padding: 9px; border: 2px solid var(--border-2); color: var(--text-2); border-radius: var(--radius-md); font-weight: 700; font-size: .85rem; background: white; cursor: pointer; transition: var(--transition); }
.btn-carrito-full:hover { border-color: var(--fuchsia); color: var(--fuchsia); }

/* Toast */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 10px 14px; display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 360px; opacity: 0; transform: translateX(20px); transition: all .3s ease; border-left: 4px solid var(--border); pointer-events: all; }
.toast.visible { opacity: 1; transform: translateX(0); }
.toast-exito     { border-left-color: var(--green); }
.toast-error     { border-left-color: var(--red); }
.toast-advertencia { border-left-color: var(--orange); }
.toast-info      { border-left-color: var(--fuchsia); }
.toast-msg { flex: 1; font-size: .82rem; font-weight: 600; }

/* Footer */
.footer { background: var(--black); color: white; margin-top: 2rem; padding: 2rem 0 1rem; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-bottom: 1.5rem; }
.footer h4 { font-size: .78rem; font-weight: 900; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--orange); }
.footer a { color: #9E9E9E; font-size: .8rem; display: block; margin-bottom: 6px; transition: color .15s; }
.footer a:hover { color: var(--fuchsia); }
.footer-bottom { border-top: 1px solid #2D2D2D; padding-top: 1rem; text-align: center; font-size: .75rem; color: #616161; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .catalogo-layout {
        grid-template-columns: 1fr;
    }

    .filtros-sidebar {
        position: static;
    }

    .producto-detalle-grid {
        grid-template-columns: 1fr;
    }

    .carrito-layout {
        grid-template-columns: 1fr;
    }

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .mini-carrito {
        width: 100vw;
        right: -100vw;
    }

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

    .cats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .top-bar-inner {
        flex-wrap: wrap;
    }

    .search-bar {
        order: 3;
        width: 100%;
        flex-basis: 100%;
    }

    .detalle-skeleton {
        grid-template-columns: 1fr;
    }

    .acciones-compra {
        flex-direction: column;
    }

    .btn-agregar,
    .btn-comprar {
        width: 100%;
    }

    /* — Grid de productos: 2 columnas exactas, sin overflow — */
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1px;
        width: 100%;
    }

    /* Cada card no puede desbordarse de su celda */
    .producto-card {
        min-width: 0;
        overflow: hidden;
    }

    /* Precio ligeramente más pequeño en mobile */
    .precio {
        font-size: .88rem;
    }
}

@media (min-width: 1200px) {
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    }
}
