/* ==========================================================
   Mecánica Baccino Motos — Hoja de estilos maestra
   Extraída y unificada del diseño real generado en Stitch
   (Home, Catálogo, Carrito, Producto) para que todas las
   páginas del sitio compartan exactamente el mismo lenguaje
   visual, sin repetir CSS en cada archivo.
   ========================================================== */

:root {
    --crimson: #dc2626;
    --charcoal: #131313;
    --silver: #c4c7ca;
}

body {
    background-color: #0a0a0a;
    color: #e5e2e1;
    font-family: 'Hanken Grotesk', sans-serif;
    overflow-x: hidden;
}

/* ---------- Texturas de fondo ---------- */
.carbon-texture {
    background-image:
        linear-gradient(45deg, rgba(20,20,20,0.8) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(20,20,20,0.8) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(20,20,20,0.8) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(20,20,20,0.8) 75%);
    background-size: 4px 4px;
    background-color: #0e0e0e;
}

.carbon-texture-dots {
    background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 8px 8px;
}

/* ---------- Cortes diagonales tipo racing ---------- */
.diagonal-clip {
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}
.diagonal-clip-reverse {
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
}
.diagonal-section {
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
}
.slant-header {
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

/* ---------- Logo: flotación, glow y destello ---------- */
@keyframes micro-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}
.animate-float {
    animation: micro-float 4s ease-in-out infinite;
}

.shine-effect {
    position: relative;
    overflow: hidden;
}
.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 50%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(30deg);
    transition: all 0.8s ease;
}
.reveal-visible .shine-effect::after {
    left: 150%;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Animaciones de entrada (scroll reveal) ---------- */
.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Refuerzo específico para el logo del Hero: garantiza que quede a opacidad
   y escala completas al revelarse, sin depender de que Tailwind (cargado vía
   CDN) elimine a tiempo las clases utilitarias opacity-0 / scale-[0.85]. */
#hero-logo-container.reveal-visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.clip-reveal {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-visible .clip-reveal {
    clip-path: inset(0 0 0 0);
}

/* ---------- Tarjetas de producto ---------- */
.product-card-hover:hover {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    border-color: rgba(220, 38, 38, 0.5);
    transform: translateY(-8px) scale(1.02);
}

.item-card {
    background: #1a1a1a;
    border: 1px solid rgba(196, 199, 202, 0.1);
    transition: border 0.3s ease;
}
.item-card:hover {
    border-color: rgba(220, 38, 38, 0.4);
}

/* ---------- Toggle de categorías (Combustión / Eléctricos) ---------- */
.racing-toggle-active {
    background-color: #dc2626;
    color: white;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.6);
    transform: skewX(-12deg);
}
.racing-toggle-inactive {
    background-color: #1a1a1a;
    color: #c4c7ca;
    transform: skewX(-12deg);
}
.racing-toggle-active > *, .racing-toggle-inactive > * {
    display: inline-block;
    transform: skewX(12deg); /* corrige el texto para que no quede inclinado */
}

/* ---------- Botones premium (reemplazan el estilo plano por defecto) ---------- */
.btn-premium {
    position: relative;
    background: #dc2626;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.05em;
    border: none;
    border-bottom: 3px solid #7f1d1d;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.btn-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}
.btn-premium:hover::before {
    transform: translateX(100%);
}
.btn-premium:hover {
    background: #ef2f2f;
    box-shadow: 0 6px 26px rgba(220, 38, 38, 0.65), inset 0 1px 0 rgba(255,255,255,0.3);
    transform: translateY(-3px);
    border-bottom-color: #991b1b;
}
.btn-premium:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.5);
}

.btn-premium-outline {
    position: relative;
    background: rgba(220, 38, 38, 0.08);
    color: #e5e2e1;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: 1.5px solid rgba(220, 38, 38, 0.6);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-premium-outline:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
    box-shadow: 0 4px 18px rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
}
.btn-premium-outline:active {
    transform: translateY(0) scale(0.97);
}

/* ---------- Botones estilo racing ---------- */
.btn-racing {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-racing:hover {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.6);
    border-right: 4px solid #c4c7ca;
    transform: translateX(4px);
}

.speed-line {
    position: relative;
}
.speed-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: #dc2626;
}

.speed-line-header {
    position: relative;
}
.speed-line-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dc2626, transparent);
}

/* ---------- Iconos Material Symbols ---------- */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* ---------- Scrollbar personalizado ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #dc2626; border-radius: 3px; }

/* ---------- Transición de fade entre páginas ---------- */
body {
    animation: page-fade-in 0.4s ease-out;
}
@keyframes page-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- Micro-interacción de click en botones principales ---------- */
.btn-click-feedback:active {
    transform: scale(0.96);
}

/* ---------- Shake del ícono de carrito al agregar producto ---------- */
@keyframes cart-shake {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-15deg); }
    40% { transform: rotate(12deg); }
    60% { transform: rotate(-8deg); }
    80% { transform: rotate(4deg); }
}
.cart-shake {
    animation: cart-shake 0.5s ease-in-out;
}

/* ---------- Franja de marcas: scroll horizontal infinito, lento y constante ---------- */
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}
.marquee-track:hover {
    animation-play-state: paused;
}

/* ---------- Panel administrativo: sin efectos, simple y funcional ---------- */
.admin-panel {
    background-color: #121212;
    color: #e5e2e1;
    font-family: 'Hanken Grotesk', sans-serif;
}
.admin-panel * {
    animation: none !important;
    transition: background-color 0.15s ease, border-color 0.15s ease !important;
}
