/* Estilos responsivos para móviles - Estilo Mercado Libre */

@media (max-width: 768px) {
    /* === GENERAL === */
    body {
        background-color: #ebebeb !important;
        padding-bottom: 56px !important;
        font-size: 14px;
    }
    
    /* Ocultar elementos desktop */
    .container-fluid.bg-dark.mb-30,
    .navbar.navbar-expand-lg,
    .d-none.d-lg-block {
        display: none !important;
    }
    
    /* === ICONOS HEADER === */
    .fas.fa-heart,
    .fas.fa-shopping-cart {
        color: #FFD333 !important;
    }
    
    .text-primary {
        color: #FFD333 !important;
    }
    
    /* === PRODUCTOS === */
    .product-item {
        background: #fff !important;
        border-radius: 4px;
        padding: 10px;
        margin-bottom: 8px;
        box-shadow: none;
        border: 1px solid #ededed;
    }
    
    .product-img {
        border-radius: 4px;
        height: 160px !important;
        width: 100% !important;
        object-fit: contain;
        background: #fff;
    }
    
    .product-item h6, .product-item .h6 {
        font-size: 14px !important;
        margin: 8px 0 4px 0 !important;
        line-height: 1.3;
        color: #333 !important;
        font-weight: 400 !important;
    }
    
    .product-item .h5, .product-item h5 {
        font-size: 24px !important;
        font-weight: 400 !important;
        color: #000 !important;
        margin: 4px 0 !important;
    }
    
    .product-item .text-muted {
        color: #00a650 !important;
        font-size: 13px !important;
    }
    
    /* Grid más compacto - 2 columnas */
    .col-lg-3, .col-lg-4, .col-md-4, .col-md-6 {
        padding: 4px !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .row {
        margin: 0 -4px !important;
    }
    
    /* === CARRUSEL === */
    .carousel {
        margin: 0 -8px !important;
        padding: 0 !important;
        width: calc(100% + 16px) !important;
    }
    
    .carousel-inner {
        border-radius: 0 !important;
    }
    
    .carousel-item {
        height: 180px !important;
    }
    
    .carousel-item img {
        height: 180px !important;
        width: 100% !important;
        object-fit: cover;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .carousel-caption {
        background: rgba(0,0,0,0.3);
        left: 0;
        right: 0;
        bottom: 0;
        padding: 20px;
    }
    
    .carousel-caption h1,
    .carousel-caption h4 {
        color: #fff !important;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        opacity: 0.7;
    }
    
    .carousel-indicators {
        bottom: 8px;
        margin: 0;
    }
    
    .carousel-indicators li {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        margin: 0 4px;
        background-color: rgba(255,255,255,0.5);
    }
    
    .carousel-indicators .active {
        background-color: #fff;
    }
    
    /* Contenedor del carrusel sin padding */
    .carousel-item .container-fluid,
    .carousel .container-fluid {
        padding: 0 !important;
    }
    
    /* Sección del carrusel sin padding */
    .mb-30:has(.carousel) {
        margin-left: -8px !important;
        margin-right: -8px !important;
        width: calc(100% + 16px) !important;
    }
    
    /* === BOTONES === */
    .btn {
        border-radius: 6px;
        font-size: 14px;
        padding: 10px 16px;
        font-weight: 500;
    }
    
    .btn-primary {
        background: #FFD333 !important;
        border: none !important;
        color: #000 !important;
    }
    
    .btn-warning {
        background: #FFD333 !important;
        border: none !important;
        color: #000 !important;
    }
    
    /* Botones del carrusel */
    .carousel .btn-primary {
        background: #FFD333 !important;
        color: #000 !important;
        border: none !important;
        font-weight: 600;
    }
    
    /* === BADGES === */
    .badge-warning {
        background: #00a650 !important;
        color: #fff !important;
        font-size: 11px;
        padding: 2px 6px;
    }
    
    /* === FORMULARIOS === */
    .form-control {
        font-size: 16px !important;
        border-radius: 6px;
        border: 1px solid #ddd;
    }
    
    /* === SECCIONES === */
    .section-title {
        font-size: 20px !important;
        font-weight: 600 !important;
        margin: 16px 0 12px 0 !important;
        color: #000 !important;
    }
    
    .container-fluid {
        padding: 0 8px !important;
    }
    
    /* Ocultar solo los banners de ofertas que están al lado del carrusel (col-lg-4) */
    .col-lg-4 .product-offer {
        display: none !important;
    }
    
    /* === CARACTERÍSTICAS (Features) === */
    .col-lg-3.col-md-6.col-sm-12.pb-1 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 4px !important;
    }
    
    .d-flex.align-items-center.bg-light.mb-4 {
        height: 100px !important;
        padding: 15px !important;
        margin-bottom: 8px !important;
    }
    
    .d-flex.align-items-center.bg-light.mb-4 h5,
    .d-flex.align-items-center.bg-light.mb-4 h6 {
        font-size: 14px !important;
        margin: 0 !important;
        line-height: 1.3 !important;
    }
    
    .d-flex.align-items-center.bg-light.mb-4 i {
        font-size: 28px !important;
        margin-right: 12px !important;
    }
    
    /* === CATEGORÍAS === */
    .col-lg-3.col-md-4.col-sm-6.pb-1:has(.cat-item) {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 4px !important;
    }
    
    .cat-item {
        height: 100px !important;
        margin-bottom: 8px !important;
        overflow: hidden;
        display: flex !important;
        align-items: center !important;
    }
    
    .cat-item img {
        height: 100px !important;
        width: 100px !important;
        object-fit: cover;
        flex-shrink: 0;
    }
    
    .cat-item .cat-img {
        height: 100px !important;
        width: 100px !important;
        overflow: hidden;
    }
    
    .cat-item h6 {
        font-size: 16px !important;
        margin-bottom: 4px !important;
    }
    
    .cat-item a {
        font-size: 13px !important;
    }
    
    /* === FOOTER === */
    .footer, .container-fluid.bg-dark.text-secondary {
        font-size: 12px;
        padding: 16px 8px !important;
    }
    
    /* === MODALES === */
    .modal-dialog {
        margin: 8px;
    }
    
    .modal-content {
        border-radius: 8px;
    }
    
    /* === TABLAS === */
    .table {
        font-size: 13px;
    }
    
    /* === MIS COMPRAS === */
    .order-card {
        background: #fff !important;
        border-radius: 6px;
        padding: 12px;
        margin-bottom: 8px;
        border: 1px solid #ededed;
    }
    
    .order-card img {
        width: 60px !important;
        height: 60px !important;
        border-radius: 4px;
    }
    
    .status-badge {
        font-size: 11px;
        padding: 4px 10px;
        border-radius: 12px;
    }
    
    /* === ESPACIADO === */
    .mb-30, .mb-5 {
        margin-bottom: 12px !important;
    }
    
    .pb-5 {
        padding-bottom: 12px !important;
    }
    
    .pt-5 {
        padding-top: 12px !important;
    }
}

/* Pantallas muy pequeñas */
@media (max-width: 576px) {
    body {
        font-size: 13px;
    }
    
    .product-item h6 {
        font-size: 13px !important;
    }
    
    .product-item .h5 {
        font-size: 22px !important;
    }
    
    .col-lg-3, .col-lg-4, .col-md-4, .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}
