/* Los @import deben ir antes que cualquier otra regla: si van después el navegador los ignora */
@import 'components/bottom-nav.css';
@import 'components/banner-carousel.css';

:root {
    --primary-color: #74f6c3;
    --secondary-color: #119b6e;
    --accent-color: #FFB800;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.page-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 160px; /* Espacio para bottom nav (56px) + barras fijas adicionales */
}

/* Barra fija superior al bottom navigation */
.fixed-bottom-bar {
    position: fixed;
    bottom: 56px; /* Altura del bottom navigation */
    left: 0;
    right: 0;
    z-index: 999;
    background-color: white;
}

/* Personalización MudBlazor */
.mud-appbar {
    border-bottom: 1px solid #E9ECEF !important;
}

.category-chip {
    white-space: nowrap !important;
}

.product-card {
    transition: transform 0.2s, box-shadow 0.2s !important;
    overflow: visible !important;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

.product-image {
    object-fit: cover;
    background: #F8F9FA;
}

.rounded-lg {
    border-radius: 12px !important;
}

/* Scroll horizontal sin barra */
.mud-stack::-webkit-scrollbar {
    display: none;
}

.mud-stack {
    -ms-overflow-style: none;
    scrollbar-width: none;
}


/* Las etiquetas de descuento y el corazón de favoritos van con position: absolute dentro de la tarjeta */
.product-card {
    position: relative;
}

/* Pantallas anchas (web en computadora, tablets horizontales). En celulares nada de esto aplica,
   así que la app mobile se ve igual que antes. La grilla de productos ya se adapta sola (xs=6 sm=4 md=3). */
@media (min-width: 960px) {
    /* El contenido se centra a un ancho cómodo de lectura; las barras fijas siguen ocupando todo el ancho */
    .page-content > .mud-container {
        max-width: 1280px;
        margin-left: auto;
        margin-right: auto;
    }

    .banner-carousel-mud {
        height: 320px !important;
    }

    .product-carousel {
        height: 480px !important;
    }

    /* La barra del carrito no necesita cruzar toda la pantalla */
    .fixed-bottom-bar {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
        max-width: 1280px;
    }
}
