/* Variables CSS para Carrito */
:root {
    --carrito-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #0056A4;
    --text-secondary: #6c757d;
    --border-color: #e0e0e0;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --primary-color: #0056A4;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --btn-primary: #3498db;
    --btn-primary-hover: #2980b9;
}

/* Tema oscuro - paleta unificada (estilo login), sin negros */
[data-theme='dark'] {
    --carrito-bg: #111827;
    --menu-bg: #111827;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow-light: 0 2px 12px rgba(0, 0, 0, 0.25);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.35);
    --primary-color: #0056A4;
    --primary-dark: #003E78;
    --primary-light: #60a5fa;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --btn-primary: #0056A4;
    --btn-primary-hover: #003E78;
    --input-bg: #283040;
}

[data-theme='dark'] .carrito-container {
    background: var(--carrito-bg) !important;
}

[data-theme='dark'] .carrito-header {
    background: linear-gradient(135deg, #0056a4 0%, #003e78 45%, #0f172a 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 28px rgba(0, 86, 164, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

[data-theme='dark'] .carrito-header .btn-back {
    color: #f8fafc !important;
}

[data-theme='dark'] .carrito-header .btn-back:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

.carrito-container {
    width: 100vw;
    max-width: 100%;
    min-height: 100vh;
    background: var(--carrito-bg);
    padding: 0 1rem 1rem 1rem;
    margin: 0;
    box-sizing: border-box;
}

.carrito-header {
    background: var(--card-bg);
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: var(--app-header-pad-x);
    padding-right: var(--app-header-pad-x);
    padding-top: var(--app-header-pad-top);
    padding-bottom: var(--app-header-pad-bottom);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--app-header-row-gap);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-sizing: border-box;
    border-bottom: 1px solid var(--border-color);
    min-height: calc(var(--app-header-title-size) * 1.25 + var(--app-header-pad-top) + var(--app-header-pad-bottom));
}

.carrito-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.btn-back {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    color: #1a1a1a !important;
    padding: 0.2rem 0.35rem 0.2rem 0 !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
    align-self: center !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.carrito-title-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
}

.carrito-title {
    margin: 0;
    color: var(--app-header-title-color);
    font-size: var(--app-header-title-size);
    font-weight: var(--app-header-title-weight);
    line-height: 1.25;
    display: flex;
    align-items: center;
}

[data-theme='dark'] .carrito-header .carrito-title {
    color: var(--text-primary);
}

.mesero-info {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.carrito-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-shrink: 0;
}

/* Botón del carrito con badge */
.btn-carrito-badge {
    position: relative;
    padding: 0.75rem 1.25rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 50px;
}

.btn-carrito-badge:hover {
    background: var(--btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.carrito-icon {
    font-size: 1.5rem;
}

.carrito-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

.carrito-container .btn-inicio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    box-shadow: var(--shadow-light);
    background: linear-gradient(135deg, #28a745, #20c997);
}

.carrito-container .btn-inicio:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Contenido principal */
.carrito-content {
    flex: 1;
    width: 100%;
    padding: 0;
    overflow-y: auto;
    box-sizing: border-box;
    min-height: calc(100vh - 120px);
    position: relative;
    z-index: 1;
}

/* Wrapper interno para el contenido expandido */
.carrito-content > div {
    padding: 1rem;
}

/* Scroll horizontal de categorías */
.categorias-scroll-container {
    width: 100%;
    padding: 0.5rem 0;
    background: var(--card-bg);
    border-bottom: 2px solid var(--border-color);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 50;
    margin-bottom: 0;
}

.categorias-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--border-color);
}

.categorias-scroll::-webkit-scrollbar {
    height: 6px;
}

.categorias-scroll::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 3px;
}

.categorias-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.categorias-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--btn-primary-hover);
}

.categoria-item {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.categoria-item:hover {
    background: rgba(22, 22, 94, 0.05);
    border-radius: 8px 8px 0 0;
}

.categoria-item.active {
    border-bottom-color: var(--primary-color);
    background: rgba(22, 22, 94, 0.1);
    border-radius: 8px 8px 0 0;
}

.categoria-item.active .categoria-nombre-text {
    color: var(--primary-color);
    font-weight: 600;
}

.categoria-nombre-text {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.categoria-item:hover .categoria-nombre-text {
    color: var(--primary-color);
}

/* Loading */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-height: 300px;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Secciones */
.productos-section,
.subcategorias-section {
    padding: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
   /* margin-bottom: 1.5rem;*/
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    color: var(--text-primary);
    font-size: 0.8rem;
    margin: 0;
    font-weight: 600;
}

.categorias-count,
.productos-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 10px;
}

/* Grid de categorías */
.categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.categoria-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    /*box-shadow: var(--shadow-light);*/
}

.categoria-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.categoria-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.categoria-icon img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.categoria-nombre-placeholder {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffffff, #e3e3e3);
    color: #254cc1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    padding: 4px;
    word-wrap: break-word;
    overflow: hidden;
}

.dark-theme .categoria-nombre-placeholder {
    background: linear-gradient(135deg, var(--primary-color), #2c3e50);
    color: white;
    border: 1px solid #4a5568;
}

.categoria-info {
    flex: 1;
    min-width: 0;
}

.categoria-indicator {
    font-size: 0.7rem;
}

.fa-solid, .fas {
    font-weight: 900;
    opacity: 60%;
}

.categoria-action {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
}

/* Grid de productos */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.producto-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: none;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.producto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.03) 0%, rgba(22, 22, 94, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.producto-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px) scale(1.01);
}

.producto-card:hover::before {
    opacity: 1;
}

.producto-icon {
    font-size: 2rem;
    min-width: 70px;
    width: 70px;
    height: 70px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.producto-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  /*  border-radius: 14px;*/
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease;
}

.producto-card:hover .producto-icon img {
    transform: scale(1.05) rotate(2deg);
}

.producto-nombre-placeholder {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #5c6bc0 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    padding: 6px;
    word-wrap: break-word;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(22, 22, 94, 0.25);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.producto-card:hover .producto-nombre-placeholder {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(22, 22, 94, 0.35);
}

.producto-info {
    flex: 1;
    min-width: 0;
}

.producto-nombre {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.producto-card:hover .producto-nombre {
    color: var(--primary-color);
}

.producto-precio {
    color: var(--success-color);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.producto-action {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

/* Botón agregar (solo +) */
.btn-agregar {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.35), 0 2px 4px rgba(40, 167, 69, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-agregar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-agregar:hover {
    background: linear-gradient(135deg, #218838 0%, var(--success-color) 100%);
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5), 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-agregar:hover::before {
    width: 300px;
    height: 300px;
}

.action-icon {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

/* Control de cantidad (+/-) */
.cantidad-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    border: 2px solid transparent;
    border-radius: 30px;
    padding: 0.35rem 0.5rem;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
    transition: all 0.3s ease;
}

.producto-card:hover .cantidad-control {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(32, 201, 151, 0.15) 100%);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
}

.btn-menos,
.btn-mas {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: bold;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.btn-menos:hover,
.btn-mas:hover {
    background: linear-gradient(135deg, #218838 0%, var(--success-color) 100%);
    transform: scale(1.15);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.4);
}

.btn-menos:active,
.btn-mas:active {
    transform: scale(0.95);
}

.cantidad {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

/* Mensaje sin contenido */
.no-content-message {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.no-content-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-content-message h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.no-content-message p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .carrito-header {
        flex-direction: row;
        gap: var(--app-header-row-gap);
        padding-left: var(--app-header-pad-x-page);
        padding-right: var(--app-header-pad-x-page);
        padding-top: var(--app-header-pad-top);
        padding-bottom: var(--app-header-pad-bottom);
        align-items: center;
    }
    
    .carrito-header-left {
        width: auto;
        flex: 1;
        justify-content: flex-start;
        align-items: center;
        gap: 1rem;
    }
    
    .btn-back {
        font-size: 1.8rem;
        min-width: 45px;
        height: 45px;
        margin-left: 0;
    }
    
    .carrito-title {
        font-size: var(--app-header-title-size);
        line-height: 1.25;
    }
    
    .carrito-actions {
        width: auto;
        justify-content: flex-end;
        gap: 0.5rem;
        flex-direction: row;
        align-items: center;
    }
    
    .btn-carrito-badge {
        min-width: 50px;
        height: 45px;
        padding: 0.65rem 1rem;
    }
    
    .carrito-container .btn-inicio {
        flex: 1;
        justify-content: center;
        max-width: none;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .categorias-scroll-container {
        position: sticky;
        top: 0;
    }
    
    .categorias-scroll {
        padding: 0.5rem;
    }
    
    .categoria-item {
        padding: 0.5rem 1rem;
    }
    
    .categoria-nombre-text {
        font-size: 0.9rem;
    }
    
    .productos-section,
    .subcategorias-section {
        padding: 0.5rem;
    }
    
    .categorias-grid,
    .productos-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .categoria-card,
    .producto-card {
        padding: 1rem;
    }
    
    /* Botones más pequeños en tablet/móvil para .producto-action */
    .producto-action {
        min-width: 35px;
    }
    
    .btn-agregar {
        width: 38px;
        height: 38px;
    }
    
    .action-icon {
        font-size: 1.3rem;
    }
    
    .cantidad-control {
        gap: 0.5rem;
        padding: 0.3rem 0.4rem;
    }
    
    .btn-menos,
    .btn-mas {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }
    
    .cantidad {
        min-width: 26px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .carrito-header {
        padding-left: var(--app-header-pad-x-page);
        padding-right: var(--app-header-pad-x-page);
        padding-top: var(--app-header-pad-top);
        padding-bottom: var(--app-header-pad-bottom);
        gap: var(--app-header-row-gap);
    }
    
    .carrito-header-left {
        gap: 0.75rem;
    }
    
    .btn-back {
        font-size: 1.6rem;
        min-width: 40px;
        height: 40px;
        margin-left: 0;
    }
    
    .carrito-title {
        font-size: var(--app-header-title-size);
        line-height: 1.25;
    }
    
    .carrito-actions {
        flex-direction: row;
        gap: 0.5rem;
        width: auto;
        align-items: center;
    }
    
    .btn-carrito-badge {
        min-width: 45px;
        height: 40px;
        padding: 0.6rem 0.9rem;
        font-size: 1.3rem;
    }
    
    .carrito-icon {
        font-size: 1.3rem;
    }
    
    .carrito-count {
        min-width: 20px;
        height: 20px;
        font-size: 0.7rem;
        top: -4px;
        right: -4px;
    }

    .carrito-container .btn-inicio {
        flex: 1;
        max-width: none;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .categorias-scroll-container {
        position: sticky;
        top: 0;
    }
    
    .categoria-item {
        padding: 0.5rem 0.75rem;
    }
    
    .categoria-nombre-text {
        font-size: 0.85rem;
    }
    
    .productos-section,
    .subcategorias-section {
        padding: 0.5rem;
    }
    
    .subcategoria-expandida {
        padding: 1rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .categoria-card,
    .producto-card {
        padding: 0.3rem;
    }
    
    .categoria-icon,
    .producto-icon {
        font-size: 1.5rem;
        min-width: 40px;
    }
    
    .producto-icon img,
    .producto-nombre-placeholder,
    .categoria-icon img,
    .categoria-nombre-placeholder {
        width: 80px;
        height: 80px;
        font-size: 0.8rem;
    }
    
    .categoria-nombre,
    .producto-nombre {
        font-size: 1rem;
    }
    
    /* Botones más pequeños en móvil para .producto-action */
    .producto-action {
        min-width: 30px;
    }
    
    .btn-agregar {
        width: 32px;
        height: 32px;
    }
    
    .action-icon {
        font-size: 1.1rem;
    }
    
    .cantidad-control {
        gap: 0.4rem;
        padding: 0.25rem 0.35rem;
    }
    
    .btn-menos,
    .btn-mas {
        width: 26px;
        height: 26px;
        font-size: 1rem;
    }
    
    .cantidad {
        min-width: 22px;
        font-size: 0.85rem;
    }
}

/* Estilos para escritorio */
@media (min-width: 769px) {
    .carrito-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 2rem 2rem 2rem;
    }
    
    .carrito-header {
        padding-left: var(--app-header-pad-x);
        padding-right: var(--app-header-pad-x);
        padding-top: var(--app-header-pad-top);
        padding-bottom: var(--app-header-pad-bottom);
        border-radius: 0 0 12px 12px;
        margin-bottom: 2rem;
    }
    
    .btn-back {
        font-size: 2.2rem;
        min-width: 55px;
        height: 55px;
    }
    
    .carrito-title {
        font-size: var(--app-header-title-size);
    }
    
    .categorias-scroll-container {
        position: sticky;
        top: 0;
        border-radius: 12px;
    }
    
    .productos-section,
    .subcategorias-section {
        padding: 1.5rem 2rem;
    }
    
    .subcategoria-expandida {
        padding: 2rem;
        margin-top: 2rem;
        margin-bottom: 2.5rem;
    }
    
    .categorias-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.5rem;
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 2rem;
    }
    
    .productos-grid-small {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.5rem;
    }
    
    .categoria-card,
    .producto-card {
        padding: 0.8rem;
        border-radius: 16px;
    }
    
    .producto-card-small {
        padding: 1.25rem;
        min-height: 100px;
    }
    
    .producto-icon img,
    .producto-nombre-placeholder,
    .categoria-icon img,
    .categoria-nombre-placeholder {
        width: 50px;
        height: 60px;
        font-size: 0.8rem;
    }
    
    .no-content-message {
        padding: 4rem;
        border-radius: 16px;
    }
}

/* Estilos para subcategorías expandidas */
.subcategoria-expandida {
    margin-bottom: 2rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.subcategoria-expandida:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.subcategoria-expandida:first-child {
    margin-top: 1.5rem;
}

.subcategoria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.subcategoria-titulo {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.productos-count-small {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.productos-count-xsmall {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Grid de productos pequeño (para subcategorías) */
.productos-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.producto-card-small {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: none;
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    min-height: 90px;
}

.producto-card-small::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.03) 0%, rgba(22, 22, 94, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.producto-card-small:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px) scale(1.02);
}

.producto-card-small:hover::before {
    opacity: 1;
}

.producto-icon-small {
    font-size: 1.5rem;
    min-width: 55px;
    width: 55px;
    height: 55px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.producto-icon-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease;
}

.producto-card-small:hover .producto-icon-small img {
    transform: scale(1.08) rotate(2deg);
}

.producto-nombre-placeholder-small {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #5c6bc0 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    padding: 5px;
    word-wrap: break-word;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(22, 22, 94, 0.25);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.producto-card-small:hover .producto-nombre-placeholder-small {
    transform: scale(1.08);
    box-shadow: 0 5px 14px rgba(22, 22, 94, 0.35);
}

.producto-info-small {
    flex: 1;
    min-width: 0;
}

.producto-nombre-small {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.producto-card-small:hover .producto-nombre-small {
    color: var(--primary-color);
}

.producto-precio-small {
    color: var(--success-color);
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0;
}

.producto-action-small {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 25px;
}

/* Botón agregar pequeño (solo +) */
.btn-agregar-small {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.35), 0 2px 4px rgba(40, 167, 69, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-agregar-small::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-agregar-small:hover {
    background: linear-gradient(135deg, #218838 0%, var(--success-color) 100%);
    transform: scale(1.2) rotate(90deg);
    box-shadow: 0 5px 16px rgba(40, 167, 69, 0.5), 0 3px 6px rgba(40, 167, 69, 0.3);
}

.btn-agregar-small:hover::before {
    width: 200px;
    height: 200px;
}

.action-icon-small {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
}

/* Control de cantidad pequeño (+/-) */
.cantidad-control-small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    border: 2px solid transparent;
    border-radius: 24px;
    padding: 0.3rem 0.4rem;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.15);
    transition: all 0.3s ease;
}

.producto-card-small:hover .cantidad-control-small {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(32, 201, 151, 0.15) 100%);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.25);
}

.btn-menos-small,
.btn-mas-small {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
}

.btn-menos-small:hover,
.btn-mas-small:hover {
    background: linear-gradient(135deg, #218838 0%, var(--success-color) 100%);
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.4);
}

.btn-menos-small:active,
.btn-mas-small:active {
    transform: scale(0.95);
}

.cantidad-small {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Estilos para subsubcategorías (nivel 3) */
.subsubcategoria-expandida {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(22, 22, 94, 0.05) 0%, rgba(92, 107, 192, 0.03) 100%);
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.subsubcategoria-expandida:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

[data-theme='dark'] .subsubcategoria-expandida {
    background: rgba(0, 86, 164, 0.12);
    border-color: var(--border-color);
}

.subsubcategoria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.subsubcategoria-titulo {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Modal del Carrito */
.modal-overlay-carrito {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content-carrito {
    background: var(--menu-bg);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header-carrito {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-carrito h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.btn-close-modal {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    background: #c82333;
    transform: scale(1.05);
}

.modal-body-carrito {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Modo oscuro: modal del carrito (mismo color slate que menú) */
[data-theme='dark'] .modal-overlay-carrito {
    background: rgba(0, 0, 0, 0.65);
}

[data-theme='dark'] .modal-content-carrito {
    background: #1e293b !important;
    border: 1px solid #334155;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme='dark'] .modal-header-carrito {
    background: #243044 !important;
    border-bottom: 1px solid #334155;
    color: var(--text-primary);
}

[data-theme='dark'] .modal-header-carrito h3 {
    color: var(--text-primary);
}

[data-theme='dark'] .modal-body-carrito {
    background: #1e293b !important;
    color: var(--text-primary);
}

[data-theme='dark'] .carrito-actions-footer {
    background: #243044 !important;
    border-top: 1px solid #334155;
}

/* Mensaje informativo */
.carrito-info-message {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.carrito-info-message h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.carrito-info-message p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

[data-theme='dark'] .carrito-info-message {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(0, 86, 164, 0.15) 100%);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme='dark'] .carrito-info-message h4 {
    color: var(--text-primary);
}

/* Lista de productos en el carrito */
.carrito-productos-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.carrito-producto-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.carrito-producto-item:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.carrito-producto-imagen {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.carrito-producto-imagen:hover {
    transform: scale(1.05);
}

.carrito-producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.carrito-producto-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #5c6bc0);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
}

.carrito-producto-info {
    flex: 1;
    min-width: 0;
}

.carrito-producto-nombre {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.carrito-producto-precio {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--success-color);
}

.carrito-producto-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--menu-bg);
    padding: 0.5rem;
    border-radius: 20px;
    border: 2px solid var(--success-color);
}

.btn-modal-menos,
.btn-modal-mas {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--success-color);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-menos:hover,
.btn-modal-mas:hover {
    background: #218838;
    transform: scale(1.1);
}

.carrito-producto-cantidad {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Total del carrito */
.carrito-total {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.carrito-total-items {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
}

.carrito-total-items strong {
    color: var(--text-primary);
}

.carrito-total-items span {
    color: var(--primary-color);
    font-weight: 700;
}

.carrito-total-monto {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.carrito-total-monto strong {
    color: var(--text-primary);
}

.carrito-total-monto span {
    color: #16a34a;
    font-weight: 700;
}

[data-theme='dark'] .carrito-total-monto span {
    color: #4ade80;
}

/* Footer del modal */
.carrito-actions-footer {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.btn-limpiar-carrito {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-limpiar-carrito:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Carrito vacío */
.carrito-vacio {
    text-align: center;
    padding: 3rem 1rem;
}

.carrito-vacio-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.carrito-vacio h4 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.carrito-vacio p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* Estilos para pantallas muy grandes */
@media (min-width: 1200px) {
    .carrito-container {
        max-width: 1600px;
        padding: 0 3rem;
    }
    
    .categorias-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 2rem;
    }
    
    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 2rem;
    }
    
    .productos-grid-small {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .subcategoria-expandida {
        padding: 2.5rem;
        margin-top: 2.5rem;
        margin-bottom: 3rem;
    }
    
    .producto-card-small {
        padding: 1.25rem;
    }
}

/* Responsive para subcategorías expandidas */
@media (max-width: 768px) {
    .subcategoria-expandida {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .subcategoria-titulo {
        font-size: 1.1rem;
    }
    
    .productos-grid-small {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .subsubcategoria-expandida {
        padding: 0.75rem;
        margin-top: 1rem;
    }
    
    .subsubcategoria-titulo {
        font-size: 1rem;
    }
    
    /* Botones más pequeños en tablet/móvil */
    .producto-action-small {
        min-width: 22px;
    }
    
    .btn-agregar-small {
        width: 32px;
        height: 32px;
    }
    
    .action-icon-small {
        font-size: 1.1rem;
    }
    
    .cantidad-control-small {
        gap: 0.4rem;
        padding: 0.25rem 0.35rem;
    }
    
    .btn-menos-small,
    .btn-mas-small {
        width: 26px;
        height: 26px;
        font-size: 1rem;
    }
    
    .cantidad-small {
        min-width: 22px;
        font-size: 0.85rem;
    }
    
    /* Botones del modal más pequeños en tablet/móvil */
    .carrito-producto-controls {
        gap: 0.5rem;
        padding: 0.4rem;
    }
    
    .btn-modal-menos,
    .btn-modal-mas {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
    
    .carrito-producto-cantidad {
        min-width: 24px;
        font-size: 0.95rem;
    }
    
    .carrito-producto-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .subcategoria-expandida {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .subcategoria-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .subcategoria-titulo {
        font-size: 1rem;
    }
    
    .producto-card-small {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .producto-nombre-small {
        font-size: 0.85rem;
    }
    
    /* Botones más pequeños en móvil */
    .producto-action-small {
        min-width: 20px;
    }
    
    .btn-agregar-small {
        width: 28px;
        height: 28px;
    }
    
    .action-icon-small {
        font-size: 1rem;
    }
    
    .cantidad-control-small {
        gap: 0.35rem;
        padding: 0.25rem 0.3rem;
    }
    
    .btn-menos-small,
    .btn-mas-small {
        width: 24px;
        height: 24px;
        font-size: 0.9rem;
    }
    
    .cantidad-small {
        min-width: 20px;
        font-size: 0.8rem;
    }
    
    /* Botones del modal más pequeños en móvil */
    .carrito-producto-controls {
        gap: 0.4rem;
        padding: 0.35rem;
    }
    
    .btn-modal-menos,
    .btn-modal-mas {
        width: 24px;
        height: 24px;
        font-size: 0.9rem;
    }
    
    .carrito-producto-cantidad {
        min-width: 20px;
        font-size: 0.85rem;
    }
    
    .carrito-producto-item {
        padding: 0.65rem;
        gap: 0.65rem;
    }
    
    .carrito-producto-imagen,
    .carrito-producto-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .carrito-producto-nombre {
        font-size: 0.9rem;
    }
    
    .carrito-producto-precio {
        font-size: 0.8rem;
    }
}

/* Estilos para el Modal de Imagen del Producto */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
}

[data-theme='dark'] .modal-overlay {
    background: rgba(0, 0, 0, 0.65);
}

[data-theme='dark'] .modal-imagen-producto {
    background: #1e293b !important;
    border: 1px solid #334155;
    color: var(--text-primary);
}

[data-theme='dark'] .modal-imagen-producto .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
    border-bottom: 1px solid #334155;
}

[data-theme='dark'] .modal-imagen-producto .modal-body-imagen {
    background: #1e293b;
    color: var(--text-primary);
}

[data-theme='dark'] .modal-imagen-producto .imagen-producto-container,
[data-theme='dark'] .modal-imagen-producto .descripcion-producto-container {
    background: #283040;
    border-color: var(--border-color);
}

.modal-imagen-producto {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalAppear 0.3s ease-out;
    color: var(--text-primary);
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-cerrar {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-cerrar:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body-imagen {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.imagen-producto-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--carrito-bg);
    border-radius: 8px;
    padding: 1rem;
    min-height: 300px;
}

.imagen-producto-full {
    max-width: 100%;
    max-height: 60vh;
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.descripcion-producto-container {
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.descripcion-titulo {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.descripcion-texto {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

.producto-sin-imagen-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--carrito-bg);
    border-radius: 8px;
    padding: 2rem;
    min-height: 300px;
}

.producto-nombre-placeholder-large {
    background: linear-gradient(135deg, var(--primary-color), #2c3e50);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    box-shadow: var(--shadow-light);
    max-width: 100%;
    word-wrap: break-word;
}

/* Responsividad para el modal de imagen */
@media (max-width: 768px) {
    .modal-imagen-producto {
        max-width: 95%;
        margin: 0.5rem;
    }
    
    .modal-body-imagen {
        padding: 1rem;
    }
    
    .imagen-producto-full {
        max-height: 50vh;
    }
    
    .imagen-producto-container {
        min-height: 200px;
        padding: 0.5rem;
    }
}

/* ════════════════════════════════════════════════════════════════════════
   Skin mesaqr aplicado a Carrito.razor
   Solo afecta cuando el contenedor lleva .mesaqr-skin. Estos ajustes
   complementan a wwwroot/css/mesaqr-menu.css cubriendo lo que Carrito
   tiene de propio (back button, controles -/+, modal local del carrito).
   ════════════════════════════════════════════════════════════════════════ */

/* ── Padding lateral del contenedor (reset del 1rem viejo) ─────────── */
.carrito-container.mesaqr-skin {
    padding: 0 0 1.5rem 0;
}

/* ── Back button: mismo lenguaje visual que .mq-cart-btn ───────────── */
.mesaqr-skin .mq-back-btn {
    appearance: none;
    border: none;
    background: var(--mq-card-bg);
    color: var(--mq-text-primary);
    width: 44px;
    height: 44px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--mq-card-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
    font-size: 1.05rem;
    padding: 0;
}

.mesaqr-skin .mq-back-btn:hover {
    transform: translateY(-1px) scale(1.04);
    box-shadow: var(--mq-card-shadow-hover);
}

.mesaqr-skin .mq-back-btn:active {
    transform: scale(0.96);
}

.mesaqr-skin .mq-back-btn .fa-solid {
    opacity: 1;
    font-weight: 900;
}

/* ── Controles -/+ dentro de producto-footer ───────────────────────── */
.mesaqr-skin .producto-footer .cantidad-control,
.mesaqr-skin .producto-footer .cantidad-control-small {
    background: var(--mq-accent-soft);
    border: 1px solid var(--mq-card-border);
    border-radius: 999px;
    padding: 0.2rem 0.35rem;
    gap: 0.45rem;
    box-shadow: none;
    margin: 0;
    opacity: 1;
    transform: none;
}

.mesaqr-skin .producto-footer .btn-menos,
.mesaqr-skin .producto-footer .btn-mas,
.mesaqr-skin .producto-footer .btn-menos-small,
.mesaqr-skin .producto-footer .btn-mas-small {
    background: linear-gradient(135deg, #0056A4 0%, #0070D0 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1rem;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(0, 86, 164, 0.35);
}

.mesaqr-skin .producto-footer .btn-menos:hover,
.mesaqr-skin .producto-footer .btn-mas:hover,
.mesaqr-skin .producto-footer .btn-menos-small:hover,
.mesaqr-skin .producto-footer .btn-mas-small:hover {
    background: linear-gradient(135deg, #003E78 0%, #0056A4 100%);
    box-shadow: 0 6px 14px rgba(0, 86, 164, 0.45);
    transform: scale(1.08);
}

[data-theme='dark'] .mesaqr-skin .producto-footer .btn-menos,
[data-theme='dark'] .mesaqr-skin .producto-footer .btn-mas,
[data-theme='dark'] .mesaqr-skin .producto-footer .btn-menos-small,
[data-theme='dark'] .mesaqr-skin .producto-footer .btn-mas-small {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.45);
}

[data-theme='dark'] .mesaqr-skin .producto-footer .btn-menos:hover,
[data-theme='dark'] .mesaqr-skin .producto-footer .btn-mas:hover,
[data-theme='dark'] .mesaqr-skin .producto-footer .btn-menos-small:hover,
[data-theme='dark'] .mesaqr-skin .producto-footer .btn-mas-small:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
}

.mesaqr-skin .producto-footer .cantidad,
.mesaqr-skin .producto-footer .cantidad-small {
    color: var(--mq-text-primary);
    font-weight: 800;
    min-width: 24px;
    font-size: 0.95rem;
}

/* ════════════════════════════════════════════════════════════════════
   Modal del carrito local — adopta el layout mesaqr-pedido-modal y le
   agrega los pocos elementos que son propios de Carrito (thumb del
   producto, controles -/+ y botón Limpiar). Reutiliza variables del
   skin mesaqr definidas en mesaqr-menu.css.
   El selector usa .mq-cart-modal como modificador para NO contaminar
   el modal "Mi pedido" del comensal QR.
   ════════════════════════════════════════════════════════════════════ */

/* Thumb pequeño del producto a la izquierda del nombre (no existe en mesaqr) */
.modal-preview-card.mq-cart-modal .pedido-item {
    align-items: center;
    gap: 0.75rem;
}

.modal-preview-card.mq-cart-modal .pedido-item-thumb {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--mq-placeholder-bg, linear-gradient(135deg, #0056A4 0%, #003E78 100%));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease;
}

.modal-preview-card.mq-cart-modal .pedido-item-thumb:hover {
    transform: scale(1.05);
}

.modal-preview-card.mq-cart-modal .pedido-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-preview-card.mq-cart-modal .pedido-item-thumb-placeholder {
    color: var(--mq-placeholder-text, #ffffff);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Grupo de controles -/+ (sustituye al pedido-pill original) */
.modal-preview-card.mq-cart-modal .pedido-item-control {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--mq-accent-soft, #eef4fb);
    border: 1px solid var(--mq-card-border, #e5e7eb);
    border-radius: 999px;
    padding: 0.22rem 0.32rem;
}

[data-theme='dark'] .modal-preview-card.mq-cart-modal .pedido-item-control {
    background: var(--mq-accent-soft, #1e3a5f);
    border-color: var(--mq-card-border, #2e3a52);
}

.modal-preview-card.mq-cart-modal .pedido-item-btn {
    appearance: none;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0056A4 0%, #0070D0 100%);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 3px 8px rgba(0, 86, 164, 0.32);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    padding: 0;
}

.modal-preview-card.mq-cart-modal .pedido-item-btn:hover {
    background: linear-gradient(135deg, #003E78 0%, #0056A4 100%);
    box-shadow: 0 5px 12px rgba(0, 86, 164, 0.45);
    transform: scale(1.08);
}

.modal-preview-card.mq-cart-modal .pedido-item-btn:active {
    transform: scale(0.95);
}

[data-theme='dark'] .modal-preview-card.mq-cart-modal .pedido-item-btn {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.4);
}

[data-theme='dark'] .modal-preview-card.mq-cart-modal .pedido-item-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
}

.modal-preview-card.mq-cart-modal .pedido-item-cant-num {
    min-width: 22px;
    text-align: center;
    color: var(--mq-text-primary, #0f172a);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

/* Footer del modal: botón Limpiar */
.modal-preview-card.mq-cart-modal .pedido-footer-actions {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--mq-card-border, #e5e7eb);
    display: flex;
    justify-content: center;
}

.modal-preview-card.mq-cart-modal .pedido-btn-limpiar {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.modal-preview-card.mq-cart-modal .pedido-btn-limpiar:hover {
    background: #ef4444;
    color: #ffffff;
    transform: translateY(-1px);
}

.modal-preview-card.mq-cart-modal .pedido-btn-limpiar:active {
    transform: scale(0.97);
}

[data-theme='dark'] .modal-preview-card.mq-cart-modal .pedido-btn-limpiar {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

[data-theme='dark'] .modal-preview-card.mq-cart-modal .pedido-btn-limpiar:hover {
    background: #ef4444;
    color: #ffffff;
}

