﻿/* ========================================
   BASE GENERAL
======================================== */
body {
    background: #f5f6fa;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
}

/* ========================================
   CONTENEDOR PRINCIPAL
======================================== */
.main-container {
    width: 100%;
    margin: auto;
    padding: 10px;
    margin-top:80px;
}

/* 📱 MOBILE */
@media (max-width: 768px) {
    .main-container {
        max-width: 500px;
    }
}

/* 📲 TABLET */
@media (min-width: 769px) and (max-width: 1199px) {
    .main-container {
        max-width: 800px;
    }
}

/* 💻 DESKTOP */
@media (min-width: 1200px) {
    .main-container {
        max-width: 1100px;
        padding: 20px;
    }
}

/* ========================================
   🔴 BANNER
======================================== */
.carousel-item img {
    width: 100%;
    height: 200px !important;
    object-fit: cover;
    border-radius: 15px;
}

@media (min-width: 1200px) {
    .carousel-item img {
        height: 280px !important;
    }
}

/* ========================================
   🟡 CATEGORÍAS
======================================== */
.scroll-categorias {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0;
}

.categoria-item {
    min-width: 80px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

    .categoria-item:hover {
        transform: scale(1.08);
    }

    .categoria-item img {
        width: 65px;
        height: 65px;
        border-radius: 50%;
        object-fit: cover;
    }

@media (min-width: 769px) {
    .categoria-item img {
        width: 80px;
        height: 80px;
    }
}

/* ========================================
   CATEGORIAS UI
======================================== */

/* estado normal */
.categoria-item {
    min-width: 80px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    opacity: 0.5; /* 🔥 gris visual */
}

    /* imagen */
    .categoria-item img {
        filter: grayscale(100%);
        transition: 0.2s;
    }

    /* hover */
    .categoria-item:hover {
        opacity: 1;
    }

/* ACTIVO */
.categoria-activa {
    opacity: 1 !important;
    transform: scale(1.1);
}

    .categoria-activa img {
        filter: grayscale(0%);
        border: 2px solid #E53935;
    }

/* ========================================
   🟢 PRODUCTOS
======================================== */
.card-producto {
    border-radius: 15px;
    overflow: hidden;
    background: white;
    transition: 0.2s;
    border: 1px solid #eee;
}

    .card-producto:hover {
        transform: translateY(-5px);
        box-shadow: 0px 8px 20px rgba(0,0,0,0.15);
    }

    .card-producto img {
        height: 160px;
        object-fit: cover;
    }

    /* TEXTO */
    .card-producto h6 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card-producto small {
        display: block;
        height: 30px;
        overflow: hidden;
    }

/* PRECIO */
.precio {
    color: #E53935;
    font-weight: bold;
}

/* ========================================
   NAVBAR PRO
======================================== */
.navbar-pro {
    background: white;
    border-bottom: 1px solid #eee;
    padding: 10px 20px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-radius: 0 0 15px 15px;
}

    /* 🔥 centra el contenido REAL */
    .navbar-pro .main-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

/* sombra scroll */
.navbar-scrolled {
    box-shadow: 0px 4px 12px rgba(0,0,0,0.15);
}

/* LOGO */
.logo-navbar {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* TEXTO */
.brand-text {
    font-weight: 700;
    color: #000;
    font-size: 16px;
}

/* ========================================
   BOTÓN CARRITO
======================================== */
.btn-cart {
    background: #E53935;
    color: white;
    border-radius: 30px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

    .btn-cart:hover {
        background: #c62828;
    }

/* BADGE */
.badge-cart {
    background: white;
    color: #E53935;
    border-radius: 50%;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: bold;
}

/* ========================================
   BOTONES
======================================== */
.btn-primary {
    background-color: #E53935 !important;
    border-color: #E53935 !important;
}

    .btn-primary:hover {
        background-color: #c62828 !important;
    }

/* ========================================
   PANEL CARRITO
======================================== */
.panel-carrito {
    position: fixed;
    top: 0;
    right: -350px;
    width: 300px;
    height: 100%;
    background: white;
    box-shadow: -3px 0px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

    .panel-carrito.active {
        right: 0;
    }

.carrito-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.carrito-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.carrito-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.carrito-footer {
    padding: 15px;
    border-top: 1px solid #eee;
}

/* ========================================
   ANIMACIÓN
======================================== */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


#tituloCategoria {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 10px;
    color: #212121;
}

/* CONTENEDOR TEXTO */
.brand-container {
    display: flex;
    flex-direction: column;
   
}

/* TEXTO SUPERIOR */
.brand-top {
    font-size: 12px;
    color: #555;
}

/* TEXTO PRINCIPAL */
.brand-bottom {
    font-size: 15px;
    font-weight: 700;
    color: #000;
    align-self: center;
}