/* Estilos personalizados para El Gauchito Mayorista */
:root {
    --primary-color: #1976d2;
    --secondary-color: #424242;
    --accent-color: #ff5722;
    --bg-light: #f5f5f5;
    --text-dark: #212121;
}

/* Estilos para calendario de ventas día a día */
.calendar-container {
    max-width: 100%;
    margin: 0 auto;
}

.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #1976d2;
    color: white;
    font-weight: 600;
}

.calendar-day-header {
    padding: 12px 8px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid #dee2e6;
}

.calendar-week:last-child {
    border-bottom: none;
}

.calendar-day {
    min-height: 100px;
    padding: 8px;
    border-right: 1px solid #dee2e6;
    background-color: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: background-color 0.2s;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day.empty {
    background-color: #f8f9fa;
}

.calendar-day.today {
    background-color: #e3f2fd;
    border: 2px solid #1976d2;
    font-weight: bold;
}

.calendar-day.past {
    background-color: #fff;
}

.calendar-day.future {
    background-color: #f8f9fa;
    opacity: 0.7;
}

.calendar-day-number {
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    margin-bottom: 4px;
}

.calendar-day.today .calendar-day-number {
    color: #1976d2;
    font-size: 16px;
}

.calendar-day-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4px 0;
}

.calendar-day-content.empty-data {
    color: #6c757d;
}

.calendar-data-small {
    font-size: 11px;
    line-height: 1.4;
    margin: 2px 0;
}

.calendar-data-small strong {
    color: #1976d2;
    font-size: 12px;
}

.calendar-data-large {
    font-size: 14px;
    font-weight: 600;
    color: #28a745;
}

.calendar-day.today .calendar-data-large {
    font-size: 16px;
}

/* Mapa de calor - niveles de intensidad */
.calendar-day.heat-0 {
    background-color: #f8f9fa !important;
}

.calendar-day.heat-1 {
    background-color: #fff3cd !important;
}

.calendar-day.heat-2 {
    background-color: #ffe69c !important;
}

.calendar-day.heat-3 {
    background-color: #ffd54f !important;
}

.calendar-day.heat-4 {
    background-color: #ff9800 !important;
    color: #fff;
}

.calendar-day.heat-5 {
    background-color: #f57c00 !important;
    color: #fff;
}

/* Asegurar que el texto sea visible en días con fondo oscuro */
.calendar-day.heat-4 .calendar-day-number,
.calendar-day.heat-5 .calendar-day-number {
    color: #fff;
    font-weight: 700;
}

.calendar-day.heat-4 .calendar-data-small,
.calendar-day.heat-5 .calendar-data-small {
    color: #fff;
}

.calendar-day.heat-4 .calendar-data-small strong,
.calendar-day.heat-5 .calendar-data-small strong {
    color: #fff;
}

.calendar-day.heat-4 .calendar-data-large,
.calendar-day.heat-5 .calendar-data-large {
    color: #fff;
}

/* Mantener estilos especiales para el día actual */
.calendar-day.today.heat-4,
.calendar-day.today.heat-5 {
    border: 3px solid #1976d2 !important;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.3);
}

/* Leyenda del mapa de calor */
.calendar-legend {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.calendar-legend h6 {
    font-weight: 600;
    margin-bottom: 15px;
    color: #495057;
}

.legend-items {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    display: inline-block;
}

.legend-color.heat-0 {
    background-color: #f8f9fa;
}

.legend-color.heat-1 {
    background-color: #fff3cd;
}

.legend-color.heat-2 {
    background-color: #ffe69c;
}

.legend-color.heat-3 {
    background-color: #ffd54f;
}

.legend-color.heat-4 {
    background-color: #ff9800;
}

.legend-color.heat-5 {
    background-color: #f57c00;
}

@media (max-width: 768px) {
    .calendar-day {
        min-height: 80px;
        padding: 4px;
    }
    
    .calendar-day-number {
        font-size: 12px;
    }
    
    .calendar-data-small {
        font-size: 9px;
    }
    
    .calendar-data-large {
        font-size: 11px;
    }
    
    .calendar-day-header {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .legend-items {
        gap: 10px;
    }
    
    .legend-item {
        font-size: 12px;
    }
    
    .legend-color {
        width: 25px;
        height: 25px;
    }
}

/* Estilos mejorados para paginación */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    min-width: 44px;
    text-align: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.pagination .page-item.disabled .page-link {
    cursor: default;
    background-color: transparent;
    border-color: #dee2e6;
    color: #6c757d;
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: #1976d2;
    border-color: #1976d2;
}

.pagination .page-link:hover {
    z-index: 2;
    color: #1976d2;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link:hover {
    color: #fff;
    background-color: #1976d2;
    border-color: #1976d2;
}

/* Barra inferior flotante del carrito */
.cart-fixed-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid #1976d2;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    padding: 1rem;
    z-index: 1040;
    display: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cart-fixed-bar.show {
    display: block;
    animation: slideUpCart 0.3s ease;
}

@keyframes slideUpCart {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cart-fixed-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cart-fixed-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.cart-fixed-bar-total {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1976d2 !important;
    white-space: nowrap;
}

.cart-fixed-bar-items {
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
}

.cart-fixed-bar-right {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

    .cart-fixed-bar .btn {
        white-space: nowrap;
        padding: 0.75rem 1.5rem;
        font-weight: 600;
    }

/* Ajustar padding-bottom del body cuando hay barra de carrito */
body.has-cart-bar {
    padding-bottom: 90px;
}

@media (max-width: 768px) {
    body.has-cart-bar {
        padding-bottom: 120px; /* Más espacio en mobile */
    }
    
    .cart-fixed-bar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .cart-fixed-bar-left {
        justify-content: center;
        text-align: center;
    }
    
    .cart-fixed-bar-right {
        justify-content: center;
    }
    
    .cart-fixed-bar .btn {
        width: 100%;
    }
    
    .cart-fixed-bar-total {
        font-size: 1.1rem;
    }
    
    .cart-fixed-bar-items {
        font-size: 0.85rem;
    }
}

/* Mega Menu Dropdown */
.mega-menu-item {
    position: relative;
}

.mega-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 800px;
    max-width: 1200px;
    max-height: 70vh;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    padding: 1.5rem;
    margin-top: 0;
    z-index: 1055;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Menú que se abre hacia la izquierda cuando está muy a la derecha */
.mega-menu-item.mega-menu-right .mega-menu-dropdown {
    left: auto;
    right: 0;
}

.mega-menu-item:hover .mega-menu-dropdown {
    display: flex;
    flex-wrap: wrap;
}

.mega-menu-item .dropdown-toggle[aria-expanded="true"] ~ .mega-menu-dropdown {
    display: flex;
    flex-wrap: wrap;
}

.mega-menu-column {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    padding: 0 1rem;
    max-height: calc(70vh - 3rem);
    overflow-y: auto;
    overflow-x: hidden;
}

.mega-menu-column:first-child {
    padding-left: 0;
}

.mega-menu-column:last-child {
    padding-right: 0;
}

.mega-menu-group {
    margin-bottom: 1.5rem;
}

.mega-menu-group:last-child {
    margin-bottom: 1rem;
}

.mega-menu-group:last-child {
    margin-bottom: 0;
}

.mega-menu-group-title {
    display: block;
    font-weight: 600;
    color: #1976d2;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 2px solid #1976d2;
    transition: color 0.2s;
}

.mega-menu-group-title:hover,
.mega-menu-group-title.active {
    color: #0d47a1;
    text-decoration: none;
}

.mega-menu-subgrupos {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-subgrupos li {
    margin-bottom: 0.35rem;
}

.mega-menu-subgrupos a {
    display: block;
    padding: 0.35rem 0.75rem;
    color: #495057;
    text-decoration: none;
    border-radius: 0.25rem;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.mega-menu-subgrupos a:hover {
    background-color: #f8f9fa;
    color: #1976d2;
    padding-left: 1rem;
    text-decoration: none;
}

.mega-menu-subgrupos a.active {
    background-color: #1976d2;
    color: #fff;
    font-weight: 500;
}

/* Scrollbar personalizado para mega menu */
.mega-menu-dropdown::-webkit-scrollbar,
.mega-menu-column::-webkit-scrollbar {
    width: 8px;
}

.mega-menu-dropdown::-webkit-scrollbar-track,
.mega-menu-column::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.mega-menu-dropdown::-webkit-scrollbar-thumb,
.mega-menu-column::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.mega-menu-dropdown::-webkit-scrollbar-thumb:hover,
.mega-menu-column::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Centrar dropdown del vendedor en mobile */
@media (max-width: 767px) {
    .page-header .dropdown-menu {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
    }
}

/* Mobile responsive para mega menu */
@media (max-width: 991px) {
    .mega-menu-dropdown {
        min-width: 100%;
        max-width: 100%;
        position: static;
        display: none !important;
    }
    
    .mega-menu-item:hover .mega-menu-dropdown {
        display: none !important;
    }
    
    /* En mobile, usar dropdown estándar de Bootstrap */
    .mega-menu-column {
        width: 100%;
        padding: 0;
        margin-bottom: 1rem;
    }
    
    .mega-menu-group {
        margin-bottom: 1rem;
    }
}

/* Responsive para paginación */
@media (max-width: 576px) {
    .pagination {
        font-size: 0.8rem;
    }
    
    .pagination .page-link {
        min-width: 36px;
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .pagination .page-link:not(.bi-chevron-left):not(.bi-chevron-right) {
        display: none;
    }
    
    /* En mobile, solo mostrar primera, anterior, siguiente, última y página actual */
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:nth-child(2) .page-link,
    .pagination .page-item.active .page-link,
    .pagination .page-item:nth-last-child(2) .page-link,
    .pagination .page-item:last-child .page-link {
        display: inline-block;
    }
    
    /* Ocultar puntos suspensivos en mobile */
    .pagination .page-item.disabled:not(.active) .page-link {
        display: none;
    }
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
}

.page-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: box-shadow 0.3s ease;
}

.page-header.scrolled {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Navbar sticky debajo del header */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1029;
    margin-top: -1px;
}

/* Filtros sticky en buscar.php */
.filters-sticky-card {
    position: sticky;
    top: 60px; /* Ajustar según altura del header */
    z-index: 1025;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.filters-sticky-card.scrolled {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .filters-sticky-card {
        top: 0; /* En mobile, que quede pegado arriba */
    }
    
    .cart-fixed-bar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .cart-fixed-bar-left {
        justify-content: center;
        text-align: center;
    }
    
    .cart-fixed-bar-right {
        justify-content: center;
    }
    
    .cart-fixed-bar .btn {
        width: 100%;
    }
}

.logo img {
    max-height: 86px;
}

.search-form {
    width: 100%;
}

.search-form .form-control {
    border-radius: 25px 0 0 25px;
    border: 2px solid var(--primary-color);
}

.search-form .btn {
    border-radius: 0 25px 25px 0;
}

.navbar-dark.bg-primary {
    background-color: var(--primary-color) !important;
}

.section-title {
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.banner-section img {
    max-height: 400px;
    object-fit: cover;
}

.promo-card {
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: transform 0.3s;
    text-align: center;
}

.promo-card:hover {
    transform: translateY(-5px);
}

.promo-card img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    transition: all 0.3s;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Estilos para precios - Hacerlos super claros y legibles */
.product-price {
    text-align: center;
    padding: 1rem 0.5rem;
    margin: 1rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    border: 2px solid #e3f2fd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.product-price h4 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1976d2 !important;
    letter-spacing: 0.5px;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.product-price span {
    font-size: 1rem;
    font-weight: 500;
}

/* Precio en detalle de producto */
#product-price-container {
    text-align: center;
    padding: 1.5rem;
    margin: 1.5rem 0;
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #1976d2;
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.15);
}

#product-price-container h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1976d2 !important;
    letter-spacing: 1px;
    margin: 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 767px) {
    .product-price {
        padding: 0.75rem 0.5rem;
        margin: 0.75rem 0;
    }
    
    .product-price h4 {
        font-size: 1.5rem;
    }
    
    #product-price-container {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    #product-price-container h2 {
        font-size: 2rem;
    }
}

/* Precios en el carrito - Más legibles */
.cart-item strong.text-primary,
.cart-item strong {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1976d2 !important;
}

.cart-item .text-end strong {
    font-size: 1.15rem;
    font-weight: 600;
}

/* Resumen del carrito */
.card .d-flex.justify-content-between strong,
.card h5.text-primary {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1976d2 !important;
}

/* Barra inferior flotante del carrito - Total más visible */
/* Precios en pedidos */
.table td strong,
.table th strong {
    font-size: 1.1rem;
    font-weight: 600;
}

.table .text-end strong {
    font-size: 1.15rem;
}

/* Precios en subtotales de presentaciones */
.presentacion-subtotal {
    text-align: center;
}

.presentacion-subtotal small {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-align: center;
    display: block;
    padding: 0.5rem;
    background-color: #f0f8ff;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* Espacio vertical entre product cards */
.product-card-wrapper {
    margin-bottom: 2rem;
}

@media (max-width: 767px) {
    .product-card-wrapper {
        margin-bottom: 1.5rem;
    }
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 1rem;
    background: var(--bg-light);
    padding: 0.5rem;
    border-radius: 4px;
}

.product-card .product-name {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Precios en el carrito - Más legibles */
.cart-item strong.text-primary,
.cart-item strong {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1976d2 !important;
}

.cart-item .text-end strong {
    font-size: 1.15rem;
    font-weight: 600;
}

/* Resumen del carrito */
.card .d-flex.justify-content-between strong,
.card h5.text-primary {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1976d2 !important;
}

/* Barra inferior flotante del carrito */
/* Precios en pedidos */
.table td strong,
.table th strong {
    font-size: 1.1rem;
    font-weight: 600;
}

.table .text-end strong {
    font-size: 1.15rem;
}

/* Precios en subtotales de presentaciones */
.presentacion-subtotal small {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    display: block;
    padding: 0.5rem;
    background-color: #f0f8ff;
    border-radius: 4px;
}

.product-card .product-code {
    font-size: 0.875rem;
    color: #757575;
    margin-bottom: 0.5rem;
}

.product-card .product-stock {
    font-weight: 600;
    color: var(--primary-color);
}

.product-card .btn {
    width: 100%;
    margin-top: auto;
    margin-bottom: 0;
}

.page-footer {
    margin-top: 4rem;
}

.page-footer a {
    text-decoration: none;
}

.page-footer a:hover {
    text-decoration: underline;
}

.product-presentaciones {
    max-width: 100%;
    overflow: hidden;
}

.product-presentaciones .border {
    background-color: #f8f9fa;
    max-width: 100%;
}

.product-presentaciones .btn-xs {
    padding: 0.15rem 0.3rem;
    font-size: 0.7rem;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.product-presentaciones .btn-xs i {
    margin: 0;
    font-size: 0.875rem;
}

.product-presentaciones .cart-qty-display {
    font-size: 0.875rem;
    color: var(--text-dark);
}

.product-presentaciones .badge {
    max-width: calc(100% - 40px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

.product-presentaciones .d-flex.gap-2 {
    gap: 0.5rem !important;
}

/* Loading spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Product detail page */
#product-detail img {
    max-height: 500px;
    width: 100%;
    object-fit: contain;
    background: var(--bg-light);
    padding: 2rem;
}

/* En mobile, quitar sombra y dar más espacio */
@media (max-width: 767px) {
    #product-detail img {
        box-shadow: none !important;
        margin-bottom: 2rem;
    }
    
    #product-categories {
        margin-top: 0.5rem;
    }
}

#product-detail h1 {
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
}

.breadcrumb {
    background: transparent;
    padding: 0;
}

/* Filtros */
.card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.card-title {
    font-family: 'Rubik', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

.form-select {
    border-radius: 4px;
}

/* Breadcrumb mejorado */
.breadcrumb {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 4px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    padding: 0 0.5rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-dark);
    font-weight: 500;
}

/* Product card con categorías */
.product-card .text-muted {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.product-card .text-muted a {
    color: var(--primary-color);
    text-decoration: none;
}

.product-card .text-muted a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    /* Header responsive */
    .page-header {
        padding: 0.5rem 0;
    }
    
    .page-header .row {
        margin: 0;
    }
    
    .page-header .col-md-3,
    .page-header .col-md-6 {
        padding: 0.5rem 15px;
    }
    
    .logo {
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .logo img {
        max-height: 50px;
        height: auto;
    }
    
    /* Formulario de búsqueda en mobile */
    .search-form {
        margin-bottom: 0.5rem;
    }
    
    .search-form .form-control {
        font-size: 14px;
        padding: 0.5rem;
    }
    
    .search-form .btn {
        padding: 0.5rem 1rem;
        font-size: 14px;
    }
    
    /* Botones del header en mobile */
    .page-header .text-end {
        text-align: center !important;
        margin-top: 0.5rem;
    }
    
    .page-header .d-inline-flex {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem !important;
        margin-bottom: 0.5rem;
    }
    
    .page-header #cart-total {
        font-size: 0.875rem;
        display: block !important;
        width: 100%;
        text-align: center;
        margin-bottom: 0.25rem;
    }
    
    .page-header .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }
    
    .page-header .btn-outline-primary {
        min-width: auto;
    }
    
    .page-header .btn-link {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Ocultar texto en botones, solo iconos en mobile */
    .page-header .btn-outline-primary span,
    .page-header .btn-link span {
        display: none;
    }
    
    .page-header .btn-outline-primary .bi-cart3::after {
        content: " Carrito";
        margin-left: 0.25rem;
    }
    
    .page-header .btn-link .bi-person::after {
        content: " Entrar";
        margin-left: 0.25rem;
    }
    
    .page-header .btn-link .bi-person-check::after {
        content: " " attr(data-nombre);
        margin-left: 0.25rem;
    }
    
    /* Badge del carrito */
    .page-header #cart-counter-badge {
        font-size: 0.7rem;
        padding: 0.25em 0.5em;
        min-width: 18px;
        height: 18px;
        line-height: 1.2;
    }
    
    /* Dropdown de usuario */
    .page-header .dropdown {
        display: block;
        width: 100%;
        margin-top: 0.25rem;
    }
    
    .page-header .dropdown .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .page-header .dropdown-menu {
        width: auto;
        min-width: 200px;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
    }
    
    /* Product cards */
    .product-card {
        margin-bottom: 1rem;
    }
    
    /* Filtros */
    #filters-form .col-md-3 {
        margin-bottom: 1rem;
    }
    
    /* Navigation */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* Estilos para imágenes de clientes en la lista de ruta */
#ruta-ordenada .list-group-item img {
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

#ruta-ordenada .list-group-item img:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-color: var(--primary-color);
}

#ruta-ordenada .list-group-item:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Estilos para alertas motivadoras */
.motivational-alerts {
    margin-bottom: 0.75rem;
}

.motivational-alerts .alert {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.motivational-alerts .alert strong {
    font-weight: 600;
}

.product-motivational-alerts {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.product-card .product-motivational-alerts .alert {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.5rem;
}

.product-motivational-alerts .btn-close {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

