
:root {
  --color-fondo: #ffffff;
  --color-texto: #212529;
  --color-texto-secundario: #6c757d;
  --color-tarjeta-fondo: #FFFFFF;
  --color-borde: #dee2e6;
  --color-borde-claro: #eee;
  --color-sutil: rgba(0, 0, 0, 0.04);
  --color-sombra: rgba(0,0,0,0.1);
}

[data-theme="dark"] {
  --color-fondo: #121212;
  --color-texto: #E0E0E0;
  --color-texto-secundario: #adb5bd;
  --color-tarjeta-fondo: #1E1E1E;
  --color-borde: #444444;
  --color-borde-claro: #333333;
  --color-sutil: rgba(255, 255, 255, 0.05);
  --color-sombra: rgba(255,255,255,0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.offcanvas-header { 
    justify-content: space-between; 
}

.offcanvas-body { 
    padding: 0; 
}

#cart-items { 
    list-style: none; 
    margin-bottom: 0; 
    height: 100%;
}

.cart-item { 
    display: flex; 
    align-items: center; 
    padding: 1.25rem 1rem; 
    border-bottom: 1px solid var(--color-borde-claro); 
}

.cart-footer { 
    padding: 1rem; 
    background-color: var(--color-tarjeta-fondo); 
    border-top: 1px solid var(--color-borde-claro); 
}

.cart-aviso-tiendas {
    list-style: none; display: flex; gap: 0.55rem; align-items: flex-start; margin: 0 0 0.6rem; padding: 0.6rem 0.75rem;
    border-radius: 10px; background: #fff8e6; border: 1px solid #f6dfa4; color: #7a5a12; font-size: 0.8rem; line-height: 1.35;
}
.cart-aviso-tiendas i { margin-top: 0.15rem; }
.cart-tienda {
    list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    margin-top: 0.6rem; padding: 0.45rem 0.1rem 0.35rem; border-bottom: 1px solid var(--color-borde-claro);
}
.cart-tienda:first-child, .cart-aviso-tiendas + .cart-tienda { margin-top: 0; }
.cart-tienda__nombre { display: flex; align-items: center; gap: 0.45rem; min-width: 0; font-weight: 700; font-size: 0.9rem; color: var(--color-texto, #212529); }
.cart-tienda__nombre span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-tienda__nombre i { color: #249F5F; }
.cart-tienda__mas {
    flex: none; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.55rem; border-radius: 999px;
    border: 1px solid #bfe3cf; color: #1e8a50; font-size: 0.75rem; font-weight: 600; text-decoration: none;
}
.cart-tienda__mas:hover { background: #ecfdf3; color: #1e8a50; }
.cart-tienda__mas i { font-size: 0.65rem; }

.dropdown-toggle::after { 
    display: none; 
}

.offcanvas-header .btn-close { 
    padding: 0; 
    margin: 0; 
}

.empty-cart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.empty-cart-icon {
    width: 120px;
    height: 120px;
    stroke: var(--color-borde);
    stroke-width: 1.5;
    margin-bottom: 1.5rem;
}

.empty-cart-container h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-texto);
    margin: 0 0 0.5rem 0;
}

.empty-cart-container p {
    font-size: 1rem;
    color: var(--color-texto-secundario);
    margin: 0;
}

.cart-item .button-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item .btn-quantity {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    border: none;
}

.cart-item .btn-quantity[data-delta="1"] {
    background-color: #F7C044;
    color: #333;
}

.cart-item .btn-quantity[data-delta="1"]:hover {
    opacity: 0.9;
}

.cart-item .btn-quantity[data-delta="-1"] {
    background-color: transparent;
    color: #8B572A;
    border: 1.5px solid #F7C044;
}

.cart-item .btn-quantity[data-delta="-1"]:hover {
    background-color: rgba(247, 192, 68, 0.1);
}

.cart-item .quantity-display {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-texto);
    min-width: 20px;
    text-align: center;
}

.carousel,
.carousel-inner {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.carousel-inner img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}


@media (max-width: 768px) {
    .carousel,
    .carousel-inner {
        border-radius: 12px;
    }
    
    .carousel-item {
        height: 180px;
    }
    
    .carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

@media (max-width: 576px) {
    .carousel,
    .carousel-inner {
        border-radius: 10px;
        max-height: 120px;
    }
    
    .carousel-item {
        height: 120px;
        max-height: 120px;
    }
    
    .carousel-item img {
        width: 100%;
        height: 100%;
        max-height: 120px;
        object-fit: contain;
        object-position: center;
        background-color: #f8f9fa;
    }
}

@media (max-width: 400px) {
    .carousel,
    .carousel-inner {
        border-radius: 8px;
        max-height: 100px;
    }
    
    .carousel-item {
        height: 100px;
        max-height: 100px;
    }
    
    .carousel-item img {
        width: 100%;
        height: 100%;
        max-height: 100px;
        object-fit: contain;
        object-position: center;
        background-color: #f8f9fa;
    }
}

@media (max-width: 360px) {
    .carousel,
    .carousel-inner {
        max-height: 90px;
    }
    
    .carousel-item {
        height: 90px;
        max-height: 90px;
    }
    
    .carousel-item img {
        width: 100%;
        height: 100%;
        max-height: 90px;
        object-fit: contain;
        object-position: center;
        background-color: #f8f9fa;
    }
}

@media (max-width: 576px) {
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
    }
}