/* ========================================
   VARIABLES Y RESET
   ======================================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   HERO HEADER (Ancho completo y compacto)
   ======================================== */
.hero-header {
    background: linear-gradient(135deg, #e8f4fc 0%, #d4e9f7 50%, #c5dff0 100%);
    color: #1e3a5f;
    padding: 15px 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="rgba(37,99,235,0.03)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo Container */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.logo-container img {
    height: auto;
    max-height: 150px;
    width: 100%;
    max-width: 1800px;
    object-fit: contain;
}

.hero-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 3px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    color: #1e3a5f;
}

/* Cuando hay logo, ocultar el nombre */
.logo-container.has-logo h1 {
    display: none;
}

.hero-header p {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 10px;
    color: #3b5998;
}

.mesa-info {
    display: inline-block;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.95rem;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.mesa-info strong {
    font-size: 1.1rem;
}

/* ========================================
   SECCIONES
   ======================================== */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 100px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

/* Sticky header para productos cuando se hace scroll */
.products-section.active .section-header {
    position: sticky;
    top: 0;
    background: var(--background);
    z-index: 50;
    padding-top: 15px;
    padding-bottom: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 12px 12px;
}

.btn-filter {
    background: var(--surface);
    border: 2px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-filter:active {
    transform: scale(0.95);
}

/* ========================================
   CATEGORÍAS
   ======================================== */
.categories-section {
    padding: 30px 20px;
}

.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.category-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 2px solid transparent;
}

.category-card:active {
    transform: scale(0.95);
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.category-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
}

.category-count {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ========================================
   PRODUCTOS
   ======================================== */
.products-section {
    padding: 20px;
    display: none;
}

.products-section.active {
    display: block;
}

.products-container {
    display: grid;
    gap: 20px;
}

.product-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--background);
}

.product-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    font-size: 4rem;
}

.product-info {
    padding: 20px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    flex: 1;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    margin-left: 12px;
}

.product-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-extras {
    background: #dbeafe;
    color: #1e40af;
}

.badge-notes {
    background: #fef3c7;
    color: #92400e;
}

/* ========================================
   NUEVOS CONTROLES DE PRODUCTO
   ======================================== */
.product-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.product-action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-product-action {
    flex: 1;
    padding: 8px 12px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.btn-extras {
    /* Mismo estilo que los demás */
}

.btn-extras:hover {
    background: var(--background);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-extras:active {
    transform: scale(0.95);
}

.btn-personalizable {
    /* Mismo estilo que los demás */
}

.btn-personalizable:hover {
    background: var(--background);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-personalizable:active {
    transform: scale(0.95);
}

.product-bottom {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.product-quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--background);
    padding: 6px 8px;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.btn-quantity-product {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-quantity-product:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.btn-quantity-product:active {
    transform: scale(0.95);
}

.quantity-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    min-width: 30px;
    text-align: center;
}

.btn-add-product {
    flex: 1;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn-add-product:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-add-product:active {
    transform: translateY(0);
}

/* ========================================
   SELECTOR DE OPCIONES DE PRODUCTO
   ======================================== */
.product-options {
    margin: 8px 0 12px 0;
    padding: 0;
}

.option-selector {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--primary);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232563eb' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.option-selector:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.option-selector:hover {
    border-color: var(--primary-dark);
}

/* ========================================
   MODALES DE EXTRAS Y NOTAS
   ======================================== */
.modal-extras-simple,
.modal-notas-simple {
    max-width: 500px;
    width: 90%;
    padding: 32px 28px;
}

.modal-extras-simple h2,
.modal-notas-simple h2 {
    margin-bottom: 24px;
    padding-right: 40px;
}

.modal-extras-body,
.modal-notas-body {
    padding: 8px 0;
}

.modal-extras-body h3,
.modal-notas-body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 16px 0 12px 0;
}

.modal-extras-body h3:first-child,
.modal-notas-body h3:first-child {
    margin-top: 0;
}

.modal-notas-body textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: var(--transition);
}

.modal-notas-body textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.btn-cancel,
.btn-confirm {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel {
    background: var(--background);
    color: var(--text);
}

.btn-cancel:hover {
    background: var(--border);
}

.btn-confirm {
    background: var(--primary);
    color: white;
}

.btn-confirm:hover {
    background: var(--primary-dark);
}

.btn-cancel:active,
.btn-confirm:active {
    transform: scale(0.95);
}

/* ========================================
   FEEDBACK TOAST
   ======================================== */
.feedback-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    pointer-events: none;
}

.feedback-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.feedback-toast.feedback-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

.feedback-toast.feedback-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.feedback-toast.feedback-error {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .product-bottom {
        flex-direction: column;
        gap: 10px;
    }

    .product-quantity-controls {
        width: 100%;
        justify-content: center;
    }

    .btn-add-product {
        width: 100%;
    }

    /* Los botones de acción se mantienen en línea */
    .product-action-buttons {
        /* NO cambiar a column, mantener en línea */
    }

    .modal-extras-simple,
    .modal-notas-simple {
        width: 95%;
        max-width: none;
    }

    .modal-footer {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-confirm {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .product-card {
        cursor: default;
    }

    .product-info {
        padding: 16px;
    }

    .product-name {
        font-size: 1.1rem;
    }

    .product-price {
        font-size: 1.3rem;
    }

    .btn-product-action {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

/* ========================================
   CARRITO FLOTANTE
   ======================================== */
.cart-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    transition: var(--transition);
}

.cart-floating:active {
    transform: scale(0.95);
}

.cart-floating:hover {
    background: var(--primary-dark);
}

.cart-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--danger);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    border: 3px solid white;
}

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

.cart-total {
    font-weight: 700;
    font-size: 1.1rem;
}

/* ========================================
   PANEL DEL CARRITO
   ======================================== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-overlay.active {
    display: block;
    opacity: 1;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 500px;
    height: 100%;
    background: var(--surface);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 201;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-panel.active {
    right: 0;
}

.cart-header {
    padding: 24px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary);
    color: white;
}

.cart-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.btn-close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.btn-close-cart:active {
    transform: scale(0.9);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 20px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.cart-details {
    margin-top: 20px;
}

.cart-item {
    background: var(--background);
    border-radius: 12px;
    padding: 16px;
    position: relative;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.cart-item-name {
    font-weight: 700;
    font-size: 1.1rem;
    flex: 1;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.cart-item-extras {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.cart-item-notes {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
}

.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-qty {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-qty:active {
    transform: scale(0.9);
}

.btn-remove {
    background: var(--danger);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-remove:active {
    transform: scale(0.95);
}

/* ========================================
   EXTRAS Y NOTAS EN CARRITO
   ======================================== */
.cart-item-extras-section,
.cart-item-notes-section {
    margin: 12px 0;
}

.extras-list-cart,
.notes-list-cart {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.extra-tag,
.note-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.extra-tag {
    border-color: #1e40af;
    background: #dbeafe;
    color: #1e40af;
}

.note-tag {
    border-color: #92400e;
    background: #fef3c7;
    color: #92400e;
}

.btn-remove-tag {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: inherit;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
}

.btn-remove-tag:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

.btn-remove-tag:active {
    transform: scale(0.9);
}

.cart-item-edit-buttons {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.btn-edit-cart {
    flex: 1;
    padding: 8px 12px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.btn-edit-cart:hover {
    background: var(--background);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-edit-cart:active {
    transform: scale(0.95);
}

.cart-footer-fixed {
    padding: 20px;
    border-top: 2px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

.cart-notes {
    margin-bottom: 16px;
}

.cart-notes label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.cart-notes textarea,
.cart-notes input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    transition: var(--transition);
}

.cart-notes textarea:focus,
.cart-notes input[type="text"]:focus,
.cart-notes input[type="tel"]:focus {
    outline: none;
    border-color: var(--primary);
}

.cart-notes input[type="tel"],
.cart-notes input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.cart-notes input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
}

/* Botón de ubicación */
.btn-ubicacion {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-ubicacion:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.btn-ubicacion:active {
    transform: scale(0.95);
}

.btn-ubicacion.loading {
    background: var(--secondary);
    cursor: wait;
}

.btn-ubicacion.success {
    background: var(--success);
}

/* ========================================
   MÉTODOS DE PAGO
   ======================================== */
.metodos-pago-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-metodo-pago {
    flex: 1;
    min-width: 100px;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    background: white;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-metodo-pago:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.btn-metodo-pago.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.btn-metodo-pago:active {
    transform: scale(0.98);
}

/* ========================================
   COMPROBANTE DE TRANSFERENCIA
   ======================================== */
.comprobante-section {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 12px;
    border: 1px solid #a7f3d0;
}

.comprobante-upload-area {
    position: relative;
    width: 100%;
    min-height: 120px;
    border: 2px dashed #10b981;
    border-radius: 10px;
    background: white;
    overflow: hidden;
}

.comprobante-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: pointer;
    color: #059669;
    transition: var(--transition);
}

.comprobante-prompt:hover {
    background: #ecfdf5;
}

.comprobante-prompt span {
    font-weight: 600;
    margin-top: 0.5rem;
}

.comprobante-prompt small {
    color: #6b7280;
    margin-top: 0.25rem;
}

.comprobante-preview {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0.5rem;
}

.comprobante-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    object-fit: contain;
}

.btn-remove-comprobante {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-remove-comprobante:hover {
    background: #dc2626;
}

/* Datos cliente remoto */
.cart-cliente-remoto {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid #bae6fd;
}

.cart-summary {
    background: var(--background);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1rem;
}

.summary-row.total {
    font-size: 1.25rem;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 2px solid var(--border);
    color: var(--primary);
}

.btn-confirm {
    width: 100%;
    background: var(--success);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-confirm:active {
    transform: scale(0.98);
}

.btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   MODAL DE PRODUCTO
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 300;
    overflow-y: auto;
    padding: 20px;
}

/* Modal de cambio de mesa debe estar por encima de modal de comandas */
#modalCambioMesa {
    z-index: 350;
}

/* Modal de notificación debe estar por encima de todos */
#modalNotificacion,
#modalConfirmacionAccion {
    z-index: 400;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideUp 0.3s ease-out;
}

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

.btn-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.btn-modal-close:active {
    transform: scale(0.9);
}

.modal-product-image {
    width: 100%;
    height: 300px;
    background: var(--background);
    overflow: hidden;
}

.modal-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: var(--text-light);
}

.modal-product-info {
    padding: 24px;
}

.modal-product-info h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-product-info p {
    color: var(--text-light);
    margin-bottom: 16px;
}

.modal-price {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--background);
    border-radius: 12px;
}

.price-label {
    font-weight: 600;
    color: var(--text-light);
}

.price-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.modal-extras,
.modal-notes {
    padding: 24px;
    border-top: 1px solid var(--border);
}

.modal-extras h3,
.modal-notes h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.extras-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.extra-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--background);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.extra-item:active {
    transform: scale(0.98);
}

.extra-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    cursor: pointer;
}

.extra-item label {
    flex: 1;
    cursor: pointer;
}

.extra-price {
    font-weight: 700;
    color: var(--primary);
}

/* Formulario extra personalizado */
.custom-extra-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.extra-input {
    flex: 2;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
}

.extra-price-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    max-width: 100px;
}

.extra-input:focus,
.extra-price-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Mensaje sin items */
.no-items-message {
    color: var(--text-secondary);
    font-style: italic;
    padding: 12px;
    text-align: center;
    background: var(--background);
    border-radius: 8px;
}

.notes-predefined {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.note-btn {
    padding: 8px 16px;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.note-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.modal-notes textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    resize: none;
    transition: var(--transition);
}

.modal-notes textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-quantity {
    padding: 24px;
    border-top: 1px solid var(--border);
}

.modal-quantity label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
}

.btn-quantity {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-quantity:active {
    transform: scale(0.9);
}

.quantity-controls input {
    width: 80px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 8px;
}

.btn-add-cart {
    width: calc(100% - 48px);
    margin: 24px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-cart:active {
    transform: scale(0.98);
}

/* ========================================
   MODAL DE CONFIRMACIÓN
   ======================================== */
.success-modal {
    text-align: center;
    padding: 24px 20px;
}

.success-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
    animation: successPulse 0.5s ease-out;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.success-modal h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--success);
}

.comanda-info {
    margin: 16px 0;
}

.comanda-info p {
    color: var(--text-light);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.comanda-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--background);
    padding: 12px 20px;
    border-radius: 12px;
    display: inline-block;
    min-width: 120px;
}

.success-message {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.5;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:active {
    transform: scale(0.95);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-secondary:active {
    transform: scale(0.95);
}

/* ========================================
   LOADING
   ======================================== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 400;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 768px) {
    .products-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (min-width: 1024px) {
    .products-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   MODAL DE SELECCIÓN DE MESA
   ======================================== */
.modal-mesas {
    max-width: 600px;
    padding: 24px;
}

.modal-mesas h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

.modal-mesas-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.zona-section {
    background: var(--background);
    padding: 16px;
    border-radius: 12px;
}

.zona-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mesas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.mesa-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

.mesa-card:active {
    transform: scale(0.98);
}

.mesa-card.disponible {
    border-color: var(--success);
}

.mesa-card.ocupada {
    border-color: var(--danger);
    opacity: 0.6;
}

.mesa-card.reservada {
    border-color: var(--warning);
}

.mesa-card.mantenimiento {
    border-color: var(--secondary);
    opacity: 0.5;
    cursor: not-allowed;
}

.mesa-numero {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.mesa-capacidad {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.mesa-estado {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
}

.mesa-estado.disponible {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.mesa-estado.ocupada {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.mesa-estado.reservada {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.mesa-estado.mantenimiento {
    background: rgba(100, 116, 139, 0.1);
    color: var(--secondary);
}

.mesa-info.clickable {
    cursor: pointer;
    transition: var(--transition);
}

.mesa-info.clickable:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.mesa-info.clickable:active {
    transform: scale(0.98);
}

@media (max-width: 480px) {
    .hero-header h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .cart-panel {
        max-width: 100%;
    }

    .mesas-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .modal-mesas {
        padding: 16px;
    }
}

/* ========================================
   BOTÓN COMANDAS
   ======================================== */
.btn-comandas {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 16px;
}

.btn-comandas:hover {
    background: white;
    color: var(--primary);
}

.btn-comandas:active {
    transform: scale(0.95);
}

/* ========================================
   MODAL DE COMANDAS
   ======================================== */
.modal-comandas {
    max-width: 900px;
    max-height: 90vh;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.modal-comandas h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.comandas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.comandas-filtros {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comandas-filtros label {
    font-weight: 600;
    color: var(--text);
}

.comandas-filtros select {
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--surface);
    cursor: pointer;
    transition: var(--transition);
}

.comandas-filtros select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-refresh {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-refresh:hover {
    background: var(--primary-dark);
}

.btn-refresh:active {
    transform: scale(0.95);
}

.modal-comandas-body {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding: 8px;
}

.no-comandas {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ========================================
   TARJETAS DE COMANDA
   ======================================== */
.comanda-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comanda-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.comanda-card.estado-pendiente {
    border-left: 4px solid var(--warning);
}

.comanda-card.estado-en_preparacion {
    border-left: 4px solid var(--primary);
}

.comanda-card.estado-listo {
    border-left: 4px solid var(--success);
}

.comanda-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.comanda-numero {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.comanda-estado {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.estado-pendiente .comanda-estado {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.estado-en_preparacion .comanda-estado {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.estado-listo .comanda-estado {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.comanda-body {
    flex: 1;
}

.comanda-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.comanda-mesa {
    font-weight: 700;
    color: var(--text);
    font-size: 1rem;
}

.comanda-hora {
    font-size: 0.875rem;
    color: var(--text-light);
}

.comanda-items {
    font-size: 0.875rem;
    color: var(--text-light);
}

.comanda-actions {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.btn-accion {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-imprimir {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.btn-imprimir:hover {
    background: var(--success);
    color: white;
}

.btn-cambiar {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.btn-cambiar:hover {
    background: var(--primary);
    color: white;
}

.btn-eliminar {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.btn-eliminar:hover:not(:disabled) {
    background: var(--danger);
    color: white;
}

.btn-eliminar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-accion:active:not(:disabled) {
    transform: scale(0.95);
}

/* ========================================
   RESPONSIVE - COMANDAS
   ======================================== */
@media (max-width: 768px) {
    .modal-comandas {
        max-width: 95%;
        padding: 16px;
    }

    .modal-comandas-body {
        grid-template-columns: 1fr;
    }

    .comandas-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .comandas-filtros {
        justify-content: space-between;
    }
}

/* ========================================
   MODAL DE NOTIFICACIÓN
   ======================================== */
.modal-notificacion {
    max-width: 400px;
    padding: 32px;
    text-align: center;
}

.notificacion-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.modal-notificacion h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.modal-notificacion p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-notificacion .btn-primary {
    width: 100%;
}

/* ========================================
   MODAL DE CONFIRMACIÓN
   ======================================== */
.modal-confirmacion {
    max-width: 450px;
    padding: 32px;
    text-align: center;
}

.confirmacion-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.modal-confirmacion h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.modal-confirmacion p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.confirmacion-acciones {
    display: flex;
    gap: 12px;
}

.confirmacion-acciones .btn-cancel,
.confirmacion-acciones .btn-confirm {
    flex: 1;
}

/* ========================================
   MODAL DE VISTA PREVIA DE COMANDA
   ======================================== */
.modal-preview {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 450;
}

.modal-preview.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-preview-content {
    background: var(--surface);
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

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

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

.modal-preview-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-preview-action {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-preview-action:hover {
    background: var(--primary-dark);
}

.btn-preview-action:active {
    transform: scale(0.95);
}

.btn-preview-close {
    background: var(--danger);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-preview-close:hover {
    background: #dc2626;
}

.btn-preview-close:active {
    transform: scale(0.95);
}

.modal-preview-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--background);
}

.comanda-preview {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.comanda-preview-header {
    text-align: center;
    border-bottom: 2px dashed var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.comanda-preview-separator {
    border-bottom: 1px dashed var(--border);
    margin: 1rem 0;
}

/* ========================================
   WOMPI CHECKOUT MODAL FIX
   ======================================== */

/*
 * El widget de Wompi usa clases: waybox-backdrop, waybox-modal, waybox-iframe
 * El iframe tiene scrolling="no" por defecto, intentamos sobrescribirlo
 */

/* Modal de Wompi - hacer scrollable */
.waybox-modal {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-height: 100vh !important;
    height: 100vh !important;
}

/* Iframe de Wompi - intentar habilitar scroll */
.waybox-iframe {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100vh !important;
}

/* Fix para escritorio */
@media screen and (min-width: 769px) {
    .waybox-modal {
        max-height: 95vh !important;
        height: auto !important;
        min-height: 600px !important;
    }

    .waybox-iframe {
        min-height: 650px !important;
        height: 90vh !important;
    }
}

/* Fix para móviles - pantalla completa */
@media screen and (max-width: 768px) {
    .waybox-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        overflow-y: auto !important;
    }

    .waybox-iframe {
        width: 100% !important;
        height: 100vh !important;
        min-height: 100vh !important;
    }
}

/* ========================================
   MODAL RESULTADO DE PAGO
   ======================================== */
.modal-resultado-pago {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.resultado-pago-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.resultado-pago-icon.aprobado {
    color: var(--success);
}

.resultado-pago-icon.rechazado {
    color: var(--danger);
}

.resultado-pago-icon.error {
    color: var(--warning);
}

.resultado-pago-icon.pendiente {
    color: var(--secondary);
}

.resultado-pago-detalles {
    margin: 1.5rem 0;
}

#resultadoPagoMensaje {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.resultado-pago-info {
    background: var(--background);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: left;
}

.resultado-pago-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.resultado-pago-info .info-row:last-child {
    border-bottom: none;
}

.resultado-pago-info .info-label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
}

.resultado-pago-info .info-value {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    word-break: break-all;
}

.resultado-pago-acciones {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.resultado-pago-acciones .btn-primary,
.resultado-pago-acciones .btn-secondary {
    min-width: 120px;
}

/* ========================================
   MODAL IMAGEN PRODUCTO
   ======================================== */
.modal-imagen-producto {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.modal-imagen-preview {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-imagen-preview img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

.modal-imagen-info {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-imagen-info h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.modal-imagen-descripcion {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.modal-imagen-precio {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.modal-imagen-opciones {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-imagen-opciones .option-selector {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--surface);
}

.modal-imagen-extras {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-imagen-extras h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.modal-imagen-notas {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-imagen-notas h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.modal-imagen-notas textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    resize: none;
    margin-top: 0.5rem;
}

.modal-imagen-cantidad {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.modal-imagen-cantidad label {
    font-weight: 600;
    color: var(--text);
}

.modal-imagen-producto .btn-add-cart {
    margin: 1rem 1.5rem 1.5rem;
    width: calc(100% - 3rem);
}

/* Hacer la imagen clickeable en la tarjeta de producto */
.product-card .product-image.clickable {
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card .product-image.clickable:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-card .product-image.clickable:active {
    transform: scale(0.98);
}
