/* NYXIVO — Diseño Moderno · Secciones DB-driven debajo del hero
 * Categorías grid, sliders horizontales (ofertas/best/nuevos), marcas.
 * Aesthetic: dark glass + brand-500 glow + color de cat como acento puntual.
 */

/* ============================================================
 * CATEGORÍAS GRID — 4 cards 2x2 con color DB como acento
 * Cada .mod-cat-card define --cat-color inline; las hijas la consumen.
 * ============================================================ */
.mod-cat-card {
    transition: border-color .5s ease, transform .5s ease;
    transform-style: preserve-3d;
    will-change: transform;
}
.mod-cat-card:hover {
    border-color: color-mix(in oklab, var(--cat-color) 35%, transparent);
}
.mod-cat-halo {
    background:
        radial-gradient(circle at 100% 100%,
            color-mix(in oklab, var(--cat-color) 28%, transparent) 0%,
            transparent 55%),
        linear-gradient(135deg,
            color-mix(in oklab, var(--cat-color) 6%, transparent) 0%,
            transparent 50%);
    opacity: .8;
    transition: opacity .5s ease;
}
.mod-cat-card:hover .mod-cat-halo { opacity: 1; }

.mod-cat-icon {
    color: var(--cat-color);
    background: color-mix(in oklab, var(--cat-color) 14%, transparent);
    border-color: color-mix(in oklab, var(--cat-color) 35%, transparent);
    box-shadow: 0 0 24px color-mix(in oklab, var(--cat-color) 25%, transparent);
}
.mod-cat-label {
    color: color-mix(in oklab, var(--cat-color) 70%, #94a3b8);
}
.mod-cat-arrow {
    border-color: color-mix(in oklab, var(--cat-color) 40%, transparent);
    color: var(--cat-color);
}
.mod-cat-card:hover .mod-cat-arrow {
    background: color-mix(in oklab, var(--cat-color) 18%, transparent);
    transform: translateX(4px);
}

/* ============================================================
 * SLIDER HORIZONTAL — scroll-snap + flex track
 * Las cards tienen ancho responsive vía clamp; el track gestiona el scroll.
 * ============================================================ */
.mod-slider-wrap {
    position: relative;
}
.mod-slider {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(220px, 28vw, 280px);
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0;
    padding-bottom: 0.75rem;
    /* Hide scrollbar (manteniendo accesibilidad por arrows) */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
@media (min-width: 1024px) {
    .mod-slider { grid-auto-columns: clamp(240px, 22vw, 300px); gap: 1.25rem; }
}
.mod-slider::-webkit-scrollbar { height: 6px; }
.mod-slider::-webkit-scrollbar-track { background: transparent; }
.mod-slider::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.10);
    border-radius: 9999px;
}
.mod-slider::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.20); }

.mod-slider > .mod-pcard {
    scroll-snap-align: start;
}

.mod-slider-arrow:active { transform: scale(0.94); }

/* ============================================================
 * PRODUCT CARD — Luxury Tech Premium v4
 * Dark minimal · Imagen protagonista · CTA único limpio
 * Inspiración: Apple Store · Nothing · Tesla · Samsung
 * ============================================================ */

/* ── Card wrapper ─────────────────────────────────────────── */
.mod-pcard {
    text-decoration: none;
    transform: translateZ(0);
    will-change: transform;
    transition:
        transform     500ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow    500ms cubic-bezier(0.4, 0, 0.2, 1),
        border-color  400ms ease;
}
.mod-pcard:hover {
    transform: translateY(-5px) scale(1.005);
    box-shadow:
        0 28px 56px -18px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(59, 130, 246, 0.14),
        0 0 32px -8px rgba(59, 130, 246, 0.22);
}

/* ── Hover ring (border glow interior) ───────────────────── */
.mod-pcard-ring {
    border: 1px solid transparent;
    transition: border-color 500ms ease, box-shadow 500ms ease;
    border-radius: inherit;
}
.mod-pcard:hover .mod-pcard-ring {
    border-color: rgba(59, 130, 246, 0.18);
    box-shadow: inset 0 0 28px rgba(59, 130, 246, 0.04);
}

/* ── Zona imagen — 3:4 portrait, imagen protagonista ─────── */
.mod-pcard-img {
    aspect-ratio: 3 / 4;
    background:
        radial-gradient(ellipse 70% 55% at 50% 20%,
            rgba(59, 130, 246, 0.09) 0%,
            transparent 70%),
        radial-gradient(ellipse 50% 40% at 50% 100%,
            rgba(8, 13, 26, 0.6) 0%,
            transparent 70%);
}

/* Glow ambiente sobre la imagen (aparece en hover de card) */
.mod-pcard-img-glow {
    background: radial-gradient(ellipse 80% 60% at 50% 30%,
        rgba(59, 130, 246, 0.00) 0%,
        rgba(59, 130, 246, 0.00) 100%);
    transition: background 600ms ease;
}
.mod-pcard:hover .mod-pcard-img-glow {
    background: radial-gradient(ellipse 80% 60% at 50% 30%,
        rgba(59, 130, 246, 0.10) 0%,
        transparent 70%);
}

/* Línea divisora imagen/info — brillo sutil */
.mod-pcard-img-line {
    background: linear-gradient(90deg,
        transparent     0%,
        rgba(59, 130, 246, 0.25) 30%,
        rgba(14, 165, 233, 0.30) 50%,
        rgba(59, 130, 246, 0.25) 70%,
        transparent     100%);
    opacity: 0;
    transition: opacity 400ms ease;
}
.mod-pcard:hover .mod-pcard-img-line { opacity: 1; }

/* Link imagen — cursor pointer sin overlay visual */
.mod-pcard-img-link {
    outline: none;
}
.mod-pcard-img-link:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.70);
    outline-offset: -2px;
}

/* ── Favorito (top-right, siempre visible, minimal) ──────── */
.mod-pcard-fav {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9999px;
    background: rgba(6, 10, 22, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: rgba(148, 163, 184, 0.80);
    font-size: 12px;
    cursor: pointer;
    transition:
        background-color 300ms ease,
        color            300ms ease,
        border-color     300ms ease,
        transform        300ms cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow       300ms ease;
}
.mod-pcard-fav:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    transform: scale(1.12);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.30);
}
.mod-pcard-fav:active { transform: scale(0.90); }

.mod-pcard-fav.is-active,
.mod-pcard-fav[aria-pressed="true"] {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.50);
}
.mod-pcard-fav.is-active i::before,
.mod-pcard-fav[aria-pressed="true"] i::before {
    content: "\f004"; /* fa-heart solid */
}

/* ── Info zone ────────────────────────────────────────────── */
.mod-pcard-body {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Marca chip — sutil, tipografía técnica */
.mod-pcard-brand {
    color: rgba(96, 165, 250, 0.75);
    letter-spacing: 0.20em;
    font-size: 9.5px;
    font-weight: 700;
}

/* Nombre del producto */
.mod-pcard-name {
    color: rgba(241, 245, 249, 0.92);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.4;
}
.mod-pcard-name a { color: inherit; text-decoration: none; }
.mod-pcard-name a:hover { color: rgba(147, 197, 253, 0.90); }

/* Precio */
.mod-pcard-price {
    background: linear-gradient(135deg, #e2e8f0 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ── Stock urgente ────────────────────────────────────────── */
.mod-pcard-urgent {
    color: #fbbf24;
    font-size: 10px;
    letter-spacing: 0.01em;
}
.mod-pcard-urgent i { color: #f97316; }

/* ── CTA — único botón de acción, estilo premium full-width ─ */
.mod-pcard-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 0.60rem 1rem;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.12);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.28);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition:
        transform     250ms cubic-bezier(0.34, 1.56, 0.64, 1),
        background    250ms ease,
        border-color  250ms ease,
        color         250ms ease,
        box-shadow    250ms ease;
}

/* Línea superior brillante del botón */
.mod-pcard-cta::before {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(147, 197, 253, 0.60) 50%,
        transparent 100%);
    border-radius: 9999px;
    transition: left 250ms ease, right 250ms ease, opacity 250ms ease;
}

.mod-pcard-cta:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: rgba(96, 165, 250, 0.55);
    color: #fff;
    box-shadow:
        0 8px 20px -6px rgba(37, 99, 235, 0.60),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.mod-pcard-cta:hover::before { left: 8%; right: 8%; }

.mod-pcard-cta:active { transform: translateY(0) scale(0.97); }

.mod-pcard-cta:disabled,
.mod-pcard-cta[aria-disabled="true"] {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.07);
    color: #475569;
    cursor: not-allowed;
    box-shadow: none;
}
.mod-pcard-cta:disabled::before { display: none; }
.mod-pcard-cta:disabled:hover   { transform: none; }

/* Ripple (compatible con el legacy .btn-add-cart ripple handler) */
.mod-pcard-cta .ripple {
    position: absolute;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.28);
    transform: scale(0);
    animation: mod-pcard-ripple 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}
@keyframes mod-pcard-ripple {
    to { transform: scale(2.4); opacity: 0; }
}

/* ── Badges ───────────────────────────────────────────────── */
.mod-pcard-badge--oferta {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #fff;
    box-shadow: 0 2px 10px -2px rgba(220, 38, 38, 0.55);
    text-shadow: none;
}
.mod-pcard-badge--nuevo {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 2px 10px -2px rgba(37, 99, 235, 0.55);
}
.mod-pcard-badge--best {
    background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
    color: #fef3c7;
    box-shadow: 0 2px 10px -2px rgba(217, 119, 6, 0.55);
}

/* ── Accesibilidad: reducir movimiento ───────────────────── */
@media (prefers-reduced-motion: reduce) {
    .mod-pcard,
    .mod-pcard-fav,
    .mod-pcard-cta,
    .mod-pcard-img-glow,
    .mod-pcard-img-line,
    .mod-pcard-ring {
        transition: none;
        animation: none;
    }
}

/* Line clamp utility para títulos de 2 líneas */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
 * BRANDS CHIPS — strip horizontal con hover lift
 * ============================================================ */
.mod-brand-chip {
    text-decoration: none;
    transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow .35s ease,
                border-color .35s ease,
                background-color .35s ease;
}
.mod-brand-chip:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 30px -10px rgba(0, 0, 0, 0.5),
        0 0 18px -4px rgb(var(--brand-glow) / 0.4);
}

/* ============================================================
 * WHY-CHOOSE-CARDS — 4 cards con tonos diferenciados
 * ============================================================ */
.mod-why-card { transform-style: preserve-3d; }
.mod-why-icon {
    transition: background-color .4s ease, color .4s ease, box-shadow .4s ease;
}
.mod-why-halo {
    background: radial-gradient(circle at 30% 0%, var(--why-tint, rgba(59,130,246,0.18)) 0%, transparent 60%);
}

.mod-why-card--blue    { --why-tint: rgba(59, 130, 246, 0.20); }
.mod-why-card--blue    .mod-why-icon { background: rgba(59,130,246,0.10); border: 1px solid rgba(59,130,246,0.30); color: #60a5fa; box-shadow: 0 0 22px rgba(59,130,246,0.20); }
.mod-why-card--blue:hover    .mod-why-icon { background: rgba(59,130,246,0.18); color: #93c5fd; }

.mod-why-card--violet  { --why-tint: rgba(59, 130, 246, 0.22); }
.mod-why-card--violet  .mod-why-icon { background: rgba(59,130,246,0.10); border: 1px solid rgba(59,130,246,0.30); color: #93c5fd; box-shadow: 0 0 22px rgba(59,130,246,0.20); }
.mod-why-card--violet:hover  .mod-why-icon { background: rgba(59,130,246,0.18); color: #bfdbfe; }

.mod-why-card--emerald { --why-tint: rgba(16, 185, 129, 0.22); }
.mod-why-card--emerald .mod-why-icon { background: rgba(16,185,129,0.10); border: 1px solid rgba(16,185,129,0.30); color: #34d399; box-shadow: 0 0 22px rgba(16,185,129,0.20); }
.mod-why-card--emerald:hover .mod-why-icon { background: rgba(16,185,129,0.18); color: #6ee7b7; }

.mod-why-card--amber   { --why-tint: rgba(245, 158, 11, 0.22); }
.mod-why-card--amber   .mod-why-icon { background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.30); color: #fbbf24; box-shadow: 0 0 22px rgba(245,158,11,0.20); }
.mod-why-card--amber:hover   .mod-why-icon { background: rgba(245,158,11,0.18); color: #fcd34d; }

/* ============================================================
 * CAT FEATURED — secciones por categoría con --cat-color
 * ============================================================ */
.mod-cat-featured { /* el padding/max-width vienen del Tailwind utility */ }
.mod-cat-feat-halo {
    background:
        radial-gradient(ellipse at 0% 0%,
            color-mix(in oklab, var(--cat-color) 18%, transparent) 0%,
            transparent 50%),
        radial-gradient(ellipse at 100% 100%,
            color-mix(in oklab, var(--cat-color) 12%, transparent) 0%,
            transparent 50%);
}
.mod-cat-feat-icon {
    color: var(--cat-color);
    background: color-mix(in oklab, var(--cat-color) 14%, transparent);
    border: 1px solid color-mix(in oklab, var(--cat-color) 35%, transparent);
    box-shadow: 0 0 24px color-mix(in oklab, var(--cat-color) 25%, transparent);
}
.mod-cat-feat-eyebrow { color: color-mix(in oklab, var(--cat-color) 75%, #94a3b8); }
.mod-cat-feat-eyedot {
    background: var(--cat-color);
    box-shadow: 0 0 8px var(--cat-color);
}
.mod-cat-feat-cta {
    background: color-mix(in oklab, var(--cat-color) 10%, transparent);
    border: 1px solid color-mix(in oklab, var(--cat-color) 35%, transparent);
    color: #fff;
}
.mod-cat-feat-cta:hover {
    background: color-mix(in oklab, var(--cat-color) 18%, transparent);
    border-color: color-mix(in oklab, var(--cat-color) 55%, transparent);
}

.mod-subcat-chip {
    text-decoration: none;
    transition: background-color .35s ease, border-color .35s ease, color .35s ease, transform .35s ease;
}
.mod-subcat-chip:hover {
    background: color-mix(in oklab, var(--cat-color, #3b82f6) 12%, rgba(255,255,255,0.04));
    border-color: color-mix(in oklab, var(--cat-color, #3b82f6) 40%, transparent);
    transform: translateY(-1px);
}

/* ============================================================
 * FOOTER — links, contact rows, social
 * ============================================================ */
.mod-foot-link {
    color: #cbd5e1;
    text-decoration: none;
    transition: color .25s ease, transform .25s ease;
    display: inline-block;
}
.mod-foot-link:hover {
    color: #fff;
    transform: translateX(2px);
}
.mod-foot-contact { text-decoration: none; }
.mod-social-link {
    text-decoration: none;
    transition: transform .35s ease, background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.mod-social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px -8px rgba(0,0,0,0.5),
                0 0 16px -4px rgb(var(--brand-glow) / 0.4);
}

/* ink-950 (más oscuro que ink-900 para footer) */
.bg-ink-950 { background-color: #050811; }

/* Visually-hidden utility (a11y) */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
 * REDUCED MOTION — respeto de preferencias
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .mod-pcard:hover,
    .mod-brand-chip:hover,
    .mod-foot-link:hover,
    .mod-social-link:hover,
    .mod-subcat-chip:hover { transform: none; }
}
