/* ===== CONTENEDOR ===== */
#app-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 8px;
}

#lista-articulos {
    margin-bottom: 100px;
}

/* ===== VISTAS ===== */
.vista-activa {
    display: block;
}

.vista-inactiva {
    display: none;
}

/* ===== MENSAJE VACÍO ===== */
#mensaje-vacio {
    text-align: center;
    color: #78909c;
    padding: 40px 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

#mensaje-vacio img {
    width: 190px;
    height: 190px;
    margin-bottom: 12px;
    border-radius: 16px;
}

#mensaje-vacio p {
    font-size: 1rem;
    margin: 0 0 4px 0;
}

#mensaje-vacio small {
    font-size: 0.75rem;
    color: #b0bec5;
    display: block;
    line-height: 1.5;
}


/* ===== MENÚ FULL-SCREEN ===== */
#menu-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: white;
    z-index: 2000;
    display: none;
    flex-direction: column;
    animation: fadeInSimple 0.25s ease-out;
}

#menu-fullscreen.menu-visible {
    display: flex;
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #f0f2f5;
    flex-shrink: 0;
}

.menu-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0d47a1;
}

.btn-cerrar-menu {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 4px 8px;
    line-height: 1;
}

.menu-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.menu-grid-center {
    grid-template-columns: 1fr;
    max-width: 50%;
    margin: 0 auto;
}

.menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 12px;
    background: #f5f7fa;
    border-radius: 16px;
    color: #1a2332;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.15s ease;
    border: 2px solid transparent;
    min-height: 80px;
    text-align: center;
    line-height: 1.3;
}

.menu-btn:active {
    transform: scale(0.95);
    background: #e8edf3;
    border-color: #1976d3;
}

.menu-btn .menu-icon {
    font-size: 2rem;
    line-height: 1;
}

.menu-btn .menu-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* ===== FOOTER ===== */
#footer-totales {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    color: white;
    padding: 0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
    max-width: 480px;
    margin: 0 auto;
}

.footer-grid {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    align-items: stretch;
}

.footer-totales {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 5px 10px;
    background: linear-gradient(135deg, #0d47a1 0%, #1976d3 100%);
}

#footer-totales.tienda .footer-totales {
    background: linear-gradient(135deg, #1976d3 0%, #0d47a1 100%);
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.footer-col-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 17px;
    background: linear-gradient(135deg, #E65100 0%, #F57C00 100%);
}

.footer-label {
    font-size: 0.70rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.footer-valor {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffffcf;
}

.footer-monto {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
}

#total-lista-items,
#total-carrito-items {
    color: #f7fbff;
    font-size: 1rem;
    font-weight: 700;
}

#total-lista-monto,
#total-carrito-monto {
    color: #c5e5ff;
}

.btn-footer-carrito {
    border: none;
    color: #f57c00;
    cursor: pointer;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    text-decoration: none;
}

.btn-footer-carrito:active {
    transform: scale(0.92);
}

.btn-footer-carrito img {
    width: 40px;
    height: auto;
    display: block;
    flex-shrink: 0;
}

/* ===== BOTÓN FLOTANTE ===== */
#btn-abrir-form {
    position: fixed;
    bottom: 70px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d47a1 0%, #1976d3 100%);
    color: white;
    border: none;
    font-size: 28px;
    box-shadow: 0 3px 12px rgba(25, 118, 211, 0.4);
    cursor: pointer;
    z-index: 99;
    transition: transform 0.15s ease, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: reboteEntrada 0.7s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
}

@keyframes reboteEntrada {
    0% {
        transform: translateY(120px) scale(0.3);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    75% {
        transform: translateY(-6px) scale(1.03);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

#btn-abrir-form:active {
    transform: scale(0.85) !important;
}

@media screen and (min-width: 481px) {
    #btn-abrir-form {
        right: calc(50% - 240px + 16px);
    }
}

/* ===== FORMULARIO PRINCIPAL Y GENERALES ===== */
.form-container {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    max-width: 480px;
    margin: 0 auto;
    animation: fadeInSimple 0.25s ease-out;
}

@keyframes fadeInSimple {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Asegurar que las dos columnas tengan la misma altura */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}


.form-row .form-group {
    display: flex;
    flex-direction: column;
    margin-top: 16px;
}

.form-row .form-group .form-control {
    height: 38px;
}

/* ===== LABELS FLOTANTES Y CAMPOS DE ENTRADA ===== */
.form-group {
    margin-top: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #546e7a;
    margin-bottom: 4px;
}

.form-label .required {
    color: #e53935;
    margin-left: 2px;
}

.form-group .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #e0e4e8;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #fafbfc;
    color: #1a2332;
    height: 38px;
}

.form-group .form-control:focus {
    outline: none;
    border-color: #1976d3;
    background: white;
    box-shadow: 0 0 0 3px rgba(25, 118, 211, 0.08);
}

.form-group .form-control[readonly] {
    background: #e8edf3;
    color: #78909c;
    font-weight: 600;
    cursor: not-allowed;
    border-color: #d0d5db;
    opacity: 1;
}




/* ===== FORMULARIO COMPLETO FULL-SCREEN ===== */
#form_complete {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    height: 100vh;
    max-height: 100vh;
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
    background: white;
    z-index: 1000;
    display: none;
    flex-direction: column;
    animation: fadeInSimple 0.25s ease-out;
    overflow: hidden;
    box-shadow: none;
}

#form_complete.form-visible {
    display: flex;
}

/* Contenedor del formulario (scroll) */
#form_complete .form-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

/* Header del formulario */
/* Botones fijos abajo */
#form_complete .form-footer {
    position: relative;  /* ← No fijo */
    background: white;
    padding: 12px 16px;
    border-top: 1px solid #f0f2f5;
    display: flex;
    gap: 10px;
    z-index: 10;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Header del formulario */
#form_complete .form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px 0px;
    background: white;
    border-bottom: 1px solid #f0f2f5;
    flex-shrink: 0;
    z-index: 2;
}
#form_complete .form-header .form-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d47a1;
    margin: 0;
}

#form_complete .form-header .btn-cerrar-form {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 4px 8px;
    line-height: 1;
}


#form_complete .form-footer .btn-cancelar {
    flex: 1;
    padding: 12px 16px;
    background: #f0f2f5;
    color: #78909c;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    height: 48px;
}

#form_complete .form-footer .btn-primary {
    flex: 2;
    padding: 12px 16px;
    background: linear-gradient(135deg, #0d47a1 0%, #1976d3 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    height: 48px;
}


#form_complete .form-footer .btn-danger {
    flex: 0 0 56px;
    padding: 0;
    background: #c62828;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#form_complete .form-footer .btn-danger img {
    width: 24px;
    height: 24px;
}

#form_complete .form-footer .btn-primary:active,
#form_complete .form-footer .btn-danger:active {
    transform: scale(0.97);
}

#form_complete .form-control::placeholder {
    color: #aaa;
    opacity: 1;
    font-weight: 400;
}

/* Ocultar elementos cuando el formulario está abierto */
body.form-open #top-ad-bar,
body.form-open #footer-totales,
body.form-open #btn-abrir-form,
body.form-open #app-container {
    display: none !important;
}



/* ===== CANTIDAD CON BOTONES ===== */
.cantidad-group {
    display: flex;
    flex-direction: column;
    margin-top: 0;
}

.cantidad-group .form-label {
    margin-bottom: 2px;
}


.cantidad-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cantidad-control .form-control {
    flex: 1;
    text-align: center;
    height: 38px;
}

.cantidad-group .form-control {
    flex: 1;
    text-align: center;
    padding: 4px 8px;
    height: 36px;
}

.cantidad-group .floating-label {
    position: absolute;
    left: 12px;
    top: 8px;
    font-size: 0.8em;
    color: #78909c;
    pointer-events: none;
    transition: all 0.2s ease-out;
    opacity: 0.7;
    background: transparent;
}

.cantidad-group .form-control:focus + .floating-label,
.cantidad-group .form-control:not(:placeholder-shown) + .floating-label {
    top: -14px;
    left: 0;
    font-size: 0.7rem;
    color: #1976d3;
    opacity: 1;
    background: transparent;
}

.btn-cantidad {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 1.5px solid #e0e4e8;
    border-radius: 8px;
    background: #fafbfc;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1976d3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.btn-cantidad:active {
    transform: scale(0.92);
    background: #e3f2fd;
}


/* ===== FORMULARIO RÁPIDO (MODAL INFERIOR) ===== */
#form-rapido-overlay {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 200;
    height: 100vh;
    align-items: flex-end;
    justify-content: center;
    overflow-y: auto;
}

#form-rapido-overlay.active {
    display: flex;
}

#form-rapido {
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 12px 16px 16px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    max-height: 85vh;
    overflow: visible;
}

#form-rapido h3 {
    margin: 0 0 10px 0;
    color: #0d47a1;
    font-size: 1rem;
}

#form-rapido .form-control {
    padding: 6px 12px;
    margin: 2px 0 8px 0;
    height: 38px;
    font-size: 0.9rem;
    width: 100%;
    border: 1.5px solid #e0e4e8;
    border-radius: 10px;
    background: #fafbfc;
    color: #1a2332;
    transition: all 0.2s;
}

#form-rapido .form-control:focus {
    outline: none;
    border-color: #1976d3;
    background: white;
    box-shadow: 0 0 0 3px rgba(25, 118, 211, 0.1);
}

#form-rapido .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 2px;
}

#form-rapido .btn-rapido-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

#form-rapido .btn-rapido-group .btn-cancelar {
    flex: 1;
    padding: 8px 12px;
    background: #f0f2f5;
    color: #78909c;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    height: 36px;
}

#form-rapido .btn-rapido-group .btn-primary {
    flex: 2;
    padding: 8px 12px;
    background: linear-gradient(135deg, #0d47a1 0%, #1976d3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    height: 36px;
}

#form-rapido .btn-rapido-group .btn-primary:active {
    transform: scale(0.97);
}

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

/* ===== MODAL DE IMPORTACIÓN WHATSAPP ===== */
.import-dialog {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    animation: importFadeIn 0.3s ease;
}

.import-modal {
    background: white;
    padding: 24px;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: importSlideUp 0.3s ease;
}

.import-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.import-modal-title {
    margin: 0;
    color: #1a2332;
    font-size: 1.1rem;
}

.import-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.import-modal-desc {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 16px 0;
}

.import-field-group {
    margin-bottom: 12px;
}

.import-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.import-textarea {
    width: 100%;
    height: 220px;
    padding: 12px;
    border: 2px solid #e0e4e8;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
    background: white;
    color: #1a2332;
}

.import-textarea:focus {
    outline: none;
    border-color: #0d47a1;
    box-shadow: 0 0 0 3px rgb(13 71 161 / 10%);
}

.import-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.import-btn,
.import-example-btn,
.import-cancel-btn {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.import-btn {
    flex: 2;
    padding: 12px 20px;
    background: #0d47a1;
    color: white;
    min-width: 120px;
    font-size: 16px;
}

.import-example-btn {
    flex: 1;
    padding: 12px 16px;
    background: #b7d3fd;
    color: #0d47a1;
    font-size: 14px;
}

.import-cancel-btn {
    flex: 1;
    padding: 12px 16px;
    background: #f5f7fa;
    color: #666;
    font-size: 14px;
}

.import-preview {
    display: none;
    margin-top: 16px;
    padding: 12px;
    background: #f5f7fa;
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.import-preview.active {
    display: block;
}

.import-preview-title {
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
}

.import-preview-list {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
}

@keyframes importFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes importSlideUp {
    from {
        transform: translateY(12px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== TOAST DE IMPORTACIÓN ===== */
.toast-import {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a2332;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: importToastIn 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.toast-import-hide {
    opacity: 0;
    transition: opacity 0.5s ease;
}

@keyframes importToastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== PRECIO POR CONTENIDO ===== */
/* #precio-por-contenido {
    background: #e3f2fd;
    padding: 8px;
    border-radius: 8px;
    margin: 4px 0 10px 0;
    text-align: center;
    font-size: 0.85rem;
}

#precio-contenido-valor {
    color: #0d47a1;
    font-weight: 700;
} */

/* ===== TIENDAS ===== */
.grupo-tienda {
    background: white;
    border-radius: 12px;
    margin-bottom: 2em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.grupo-tienda[data-color="0"] h3 { background: linear-gradient(135deg, #1565C0 0%, #1E88E5 100%); }
.grupo-tienda[data-color="1"] h3 { background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%); }
.grupo-tienda[data-color="2"] h3 { background: linear-gradient(135deg, #E65100 0%, #F57C00 100%); }
.grupo-tienda[data-color="3"] h3 { background: linear-gradient(135deg, #B71C1C 0%, #D32F2F 100%); }
.grupo-tienda[data-color="4"] h3 { background: linear-gradient(135deg, #006064 0%, #00838F 100%); }
.grupo-tienda[data-color="5"] h3 { background: linear-gradient(135deg, #4E342E 0%, #6D4C41 100%); }
.grupo-tienda[data-color="6"] h3 { background: linear-gradient(135deg, #283593 0%, #3949AB 100%); }
.grupo-tienda[data-color="7"] h3 { background: linear-gradient(135deg, #6A1B9A 0%, #8E24AA 100%); }
.grupo-tienda[data-color="8"] h3 { background: linear-gradient(135deg, #004D40 0%, #00796B 100%); }
.grupo-tienda[data-color="9"] h3 { background: linear-gradient(135deg, #455A64 0%, #607D8B 100%); }

.grupo-tienda h3 {
    color: white;
    padding: 10px 14px;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grupo-tienda h3 span {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.grupo-tienda ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ===== TARJETA DE ARTÍCULO ===== */
.grupo-tienda li {
    padding: 0;
    border-bottom: 1px solid #f0f2f5;
    background: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    min-height: 60px;
    transition: background-color 0.3s ease;
}

.grupo-tienda li:last-child {
    border-bottom: none;
}

.grupo-tienda li:active {
    background: #f5f8fc;
}

.swiping {
    touch-action: none !important;
    user-select: none !important;
}

.item-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 2;
    background: white;
    padding: 2px 0;
}

.item-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-header .item-nombre {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1a2332;
    flex: 1;
}

.item-categoria-tag {
    background: #e8edf3;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    color: #546e7a;
    font-weight: 500;
    flex-shrink: 0;
}

.item-detalles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #546e7a;
}

.item-detalles .item-total {
    font-weight: 700;
    color: #1976d3;
    font-size: 0.95rem;
}

.item-meta {
    font-size: 0.7rem;
    color: #78909c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-cont strong {
    color: #1976d3;
    font-weight: 600;
}

.meta-presentacion {
    font-size: 0.65rem;
    color: #90a4ae;
}

.item-url {
    font-size: 0.65rem;
    color: #1976d3;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-url a {
    color: #1976d3;
    text-decoration: none;
}

.item-url a:active {
    text-decoration: underline;
}

.item-precio-unitario {
    color: #546e7a;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    gap: 8px;
}

.item-footer .item-url {
    font-size: 0.65rem;
    color: #1976d3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0; /* Para que el ellipsis funcione */
}

.item-footer .item-url a {
    color: #1976d3;
    text-decoration: none;
}

.item-footer .item-url a:active {
    text-decoration: underline;
}

.item-footer .item-categoria-tag {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    margin-left: auto; /* Empuja la categoría a la derecha */
}

.item-footer .item-categoria-tag[data-color="0"] { background: #1565C0; }
.item-footer .item-categoria-tag[data-color="1"] { background: #1B5E20; }
.item-footer .item-categoria-tag[data-color="2"] { background: #E65100; }
.item-footer .item-categoria-tag[data-color="3"] { background: #B71C1C; }
.item-footer .item-categoria-tag[data-color="4"] { background: #006064; }
.item-footer .item-categoria-tag[data-color="5"] { background: #4E342E; }
.item-footer .item-categoria-tag[data-color="6"] { background: #283593; }
.item-footer .item-categoria-tag[data-color="7"] { background: #6A1B9A; }
.item-footer .item-categoria-tag[data-color="8"] { background: #004D40; }
.item-footer .item-categoria-tag[data-color="9"] { background: #455A64; }

/* ===== FONDOS DE DESLIZAMIENTO ===== */
.grupo-tienda li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(90deg, #f19920 0%, #ffcb5b 100%);
    background-image: url('../assets/icons/canasta-agregar.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 34px 34px;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px 0 0 8px;
    z-index: 1;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.grupo-tienda li::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(-90deg, #c62828, #e53935);
    background-image: url('../assets/icons/basura.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 34px 34px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 8px 8px 0;
    z-index: 1;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.grupo-tienda li.swipe-right::before {
    transform: translateX(0);
}

.grupo-tienda li.swipe-left::after {
    transform: translateX(0);
}

/* ===== CONTENIDO DEL ARTÍCULO ===== */
.grupo-tienda li .item-content {
    position: relative;
    z-index: 2;
    background: white;
    padding: 10px 14px;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-sizing: border-box;
    min-height: 60px;
    justify-content: center;
}

/* ===== EFECTO AL DESLIZAR ===== */
.grupo-tienda li.swipe-right .item-content {
    transform: translateX(100px);
}

.grupo-tienda li.swipe-right {
    background: linear-gradient(90deg, #f19920 0%, #ffcb5b 100%);
}

.grupo-tienda li.swipe-left .item-content {
    transform: translateX(-100px);
}

.grupo-tienda li.swipe-left {
    background: linear-gradient(-90deg, #e53935, #c62828);
}

/* ===== DESTACADO PARA NUEVO ARTÍCULO ===== */
/* ===== DESTACADO PARA NUEVO ARTÍCULO ===== */
.grupo-tienda li.destacado .item-content {
    animation: destacadoFade 5s ease forwards;
}

@keyframes destacadoFade {
    0% {
        background-color: #ffeb3c;
        box-shadow: inset 0 0 0 3px #fbc02d;
    }
    30% {
        background-color: #ffeb3c;
        box-shadow: inset 0 0 0 3px #fbc02d;
    }
    100% {
        background-color: transparent;
        box-shadow: none;
    }
}


/* ===== RESPONSIVE ===== */
@media screen and (max-width: 480px) {
    .grupo-tienda li::before,
    .grupo-tienda li::after {
        width: 80px;
        font-size: 0.65rem;
    }

    .grupo-tienda li.swipe-right .item-content {
        transform: translateX(80px);
    }

    .grupo-tienda li.swipe-left .item-content {
        transform: translateX(-80px);
    }
}

/* ===== DROPDOWN PERSONALIZADO ===== */
.dropdown-container {
    position: relative;
    width: 100%;
}

.dropdown-container .form-control {
    width: 100%;
}

.dropdown-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1.5px solid #e0e4e8;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    padding: 4px 0;
    margin: 0;
    list-style: none;
}

.dropdown-list.dropdown-up {
    top: auto;
    bottom: calc(100% + 4px);
}

.dropdown-list.visible {
    display: block;
}

.dropdown-list li {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #1a2332;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f5f7fa;
}

.dropdown-list li:last-child {
    border-bottom: none;
}

.dropdown-list li:hover,
.dropdown-list li:active {
    background: #f0f4ff;
}

.dropdown-list li .dropdown-sub {
    font-size: 0.75rem;
    color: #78909c;
    display: block;
    margin-top: 2px;
}

.dropdown-list .dropdown-empty {
    padding: 20px 14px;
    text-align: center;
    color: #b0bec5;
    font-size: 0.85rem;
}