:root {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #dc3545;
    --whatsapp-color: #25d366;
    --background-primary: #f8fafc;
    --background-secondary: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 2rem;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}

/* =================================
   PAGE HEADER
   ================================= */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* =================================
   FILTER SECTION
   ================================= */
.filter-section {
    background: var(--background-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.filter-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-label {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.category-select {
    background: var(--background-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.2s ease;
    min-width: 250px;
    outline: none;
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.category-select:hover {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.category-select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

/* =================================
   PAGINATION
   ================================= */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    gap: 0.5rem;
}

.pagination-info {
    margin: 1rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--background-secondary);
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
}

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

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--text-secondary);
}

/* =================================
   LOADING OVERLAY
   ================================= */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-overlay.show {
    display: flex;
    opacity: 1;
}

.loading-content {
    background: var(--background-secondary);
    padding: 2rem 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 200px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.loading-overlay.show .loading-content {
    transform: scale(1);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

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

/* =================================
   BENEFITS GRID
   ================================= */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    min-height: 400px;
}

.benefit-card {
    background: var(--background-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color);
}

.benefit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
    border-color: var(--primary-light);
}

.benefit-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--background-primary);
}

.benefit-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.benefit-card:hover .benefit-image {
    transform: scale(1.03);
}

.benefit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.benefit-card:hover .benefit-overlay {
    opacity: 1;
}

.btn-ver-detalles {
    background: var(--primary-light);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-ver-detalles:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.benefit-content {
    padding: 1.5rem;
}

.benefit-category {
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.benefit-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.benefit-discount {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.benefit-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.benefit-address {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: normal;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--background-primary);
    padding: 0.75rem;
    border-radius: 6px;
    margin: -0.5rem;
    margin-top: 1rem;
}

.benefit-address i {
    color: var(--primary-light);
}

/* =================================
   MODAL - UNIFICADO
   ================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none !important;
    justify-content: center;
    align-items: center;
    z-index: 999999; /* Z-index base para modales */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.modal.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Modal de beneficios - z-index base */
#benefit-modal {
    z-index: 999999;
}

/* Modal de login - z-index superior para que aparezca encima */
#login-modal {
    z-index: 1000000;
    background: rgba(0, 0, 0, 0.85); /* Backdrop más oscuro para distinguir capas */
}

.modal-content {
    background: var(--background-secondary);
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.7) translateY(50px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    border: 1px solid var(--border-color);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

/* Modal de login más pequeño y con sombra extra */
#login-modal .modal-content {
    max-width: 450px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5); /* Sombra más intensa */
    border: 2px solid var(--primary-light); /* Borde para destacar */
}

.modal-header {
    position: relative;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Estilos para inputs del formulario */
.modal input[type="text"],
.modal input[type="tel"] {
    outline: none;
}

.modal input[type="text"]:focus,
.modal input[type="tel"]:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
    transform: translateY(-1px);
}

.modal input[type="text"]::placeholder,
.modal input[type="tel"]::placeholder {
    color: var(--text-secondary);
}

/* Botón hover effect */
.modal button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
}

.modal button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.modal-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: var(--background-primary);
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.modal-image.active {
    display: block;
}

.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 58, 138, 0.8);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.image-nav:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.prev-image {
    left: 1rem;
}

.next-image {
    right: 1rem;
}

.image-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 100;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-body {
    padding: 2rem;
}

.modal-category-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: auto;
    max-width: fit-content;
}

.benefit-name-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.modal-benefit-name {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
}

.btn-solicitar {
    background: linear-gradient(135deg, var(--whatsapp-color), #20ba5a);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
    flex-shrink: 0;
}

.btn-solicitar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.25);
}

.btn-solicitar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.modal-benefit-discount {
    font-size: 2rem;
    font-weight: 600;
    color: var(--error-color);
    margin-bottom: 1.5rem;
}

.modal-benefit-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.modal-benefit-address {
    background: var(--background-primary);
    padding: 1.25rem;
    border-radius: 8px;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-benefit-address i {
    color: var(--primary-light);
    font-size: 1.1rem;
}

/* =================================
   LOGIN MODAL
   ================================= */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.login-modal.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.login-modal-content {
    background: var(--background-secondary);
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.7) translateY(50px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    border: 1px solid var(--border-color);
}

.login-modal.active .login-modal-content {
    transform: scale(1) translateY(0);
}

.login-modal-header {
    position: relative;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    text-align: center;
}

.login-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
}

.login-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.login-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.login-modal-body {
    padding: 2rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-form-group {
    margin-bottom: 1.5rem;
}

.login-form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.login-required {
    color: var(--error-color);
    margin-left: 0.25rem;
}

.login-input-with-icon {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.875rem;
    pointer-events: none;
}

.login-form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--background-secondary);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-input-with-icon .login-form-control {
    padding-left: 2.5rem;
}

.login-form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
    transform: translateY(-1px);
}

.login-form-control::placeholder {
    color: var(--text-secondary);
}

.login-help-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.login-error-message {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.login-form-control.is-valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.login-form-control.is-invalid {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.login-message {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.login-message-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.login-message-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn-login-submit {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    min-height: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
}

.btn-login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =================================
   OTROS MODALES
   ================================= */
.whatsapp-validation-modal, 
.contact-registration-modal, 
.error-modal, 
.token-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.whatsapp-validation-modal.active, 
.contact-registration-modal.active, 
.error-modal.active, 
.token-modal.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* =================================
   MENSAJES DE ESTADO
   ================================= */
.no-benefits-message,
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--background-secondary);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    margin: 2rem 0;
}

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

.no-benefits-icon {
    color: var(--primary-light);
}

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

.no-benefits-message h3,
.error-message h3 {
    margin: 1rem 0 0.5rem 0;
    color: var(--text-primary);
}

.no-benefits-message p,
.error-message p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-clear-filter,
.btn-retry {
    background: var(--primary-light);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-clear-filter:hover,
.btn-retry:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .filter-section {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.25rem 1rem;
        align-items: stretch;
    }

    .filter-left,
    .filter-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .filter-label {
        justify-content: flex-start;
        font-size: 0.95rem;
        text-align: left;
    }
    
    .category-select {
        width: 100%;
        min-width: unset;
        padding: 1rem 1.25rem;
        font-size: 1rem;
        border-radius: 10px;
        background-position: right 1rem center;
        padding-right: 3rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        border: 2px solid var(--border-color);
    }
    
    .category-select:focus {
        border-color: var(--border-focus);
        box-shadow: 0 0 0 4px rgb(59 130 246 / 0.12);
        transform: translateY(-1px);
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .benefit-card {
        border-radius: 10px;
    }

    .modal-content {
        margin: 2% auto;
        width: 95%;
        max-height: 95vh;
    }

    .modal-image-container {
        height: 250px;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-benefit-name {
        font-size: 1.5rem;
    }

    .modal-benefit-discount {
        font-size: 1.7rem;
    }
    
    .modal-header {
        padding: 1.25rem 1.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
        padding-right: 2rem;
    }

    .benefit-name-section {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .btn-solicitar {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }
    
    .page-header {
        margin-bottom: 2rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .filter-section {
        padding: 1rem 0.75rem;
        margin-bottom: 1.5rem;
        border-radius: 8px;
    }
    
    .category-select {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
        padding-right: 2.75rem;
        background-position: right 0.875rem center;
    }
    
    .modal-content {
        margin: 0.5rem;
        max-height: 95vh;
        border-radius: 8px;
    }

    .modal-header {
        padding: 1rem 1.25rem;
    }
    
    .modal-header h3 {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 1.25rem;
    }

    .modal-benefit-name {
        font-size: 1.4rem;
    }

    .modal-benefit-discount {
        font-size: 1.5rem;
    }
}

@supports (-webkit-touch-callout: none) {
    .category-select {
        -webkit-appearance: none;
        border-radius: 8px;
    }
}

/* =================================
   MODAL DE ERROR WHATSAPP
   ================================= */

/* Z-index más alto que todos los otros modales */
#whatsapp-error-modal.modal {
    z-index: 1000001 !important; /* Más alto que login-modal (1000000) */
    background: rgba(0, 0, 0, 0.85) !important; /* Backdrop más oscuro */
}

#whatsapp-error-modal .modal-content {
    max-width: 500px;
    margin: 2rem auto;
    position: relative;
    border: 2px solid #dc2626; /* Borde rojo para destacar el error */
    box-shadow: 0 25px 80px rgba(220, 38, 38, 0.3); /* Sombra rojiza */
}

/* Animación de entrada para el modal de error */
#whatsapp-error-modal.active {
    animation: fadeInError 0.3s ease-out;
}

@keyframes fadeInError {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Botones del modal de error */
#whatsapp-error-modal button {
    transition: all 0.2s ease;
    font-weight: 500;
}

#whatsapp-error-modal button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#whatsapp-error-modal button:active {
    transform: translateY(0);
}

/* Icono de error animado */
#whatsapp-error-modal .error-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive para el modal de error */
@media (max-width: 768px) {
    #whatsapp-error-modal .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
        border-width: 1px; /* Borde más delgado en móvil */
    }
    
    #whatsapp-error-modal .modal-body {
        padding: 1.5rem !important;
    }
    
    #whatsapp-error-modal h3 {
        font-size: 1.25rem !important;
    }
    
    #whatsapp-error-modal p {
        font-size: 0.9rem !important;
    }
    
    #whatsapp-error-modal ul {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 480px) {
    #whatsapp-error-modal .modal-content {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    #whatsapp-error-modal .modal-body {
        padding: 1.25rem !important;
    }
    
    #whatsapp-error-modal h3 {
        font-size: 1.1rem !important;
    }
}

/* Asegurar que el backdrop del error sea visible por encima de todo */
#whatsapp-error-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1); /* Overlay adicional */
    z-index: -1;
}

/* Forzar que el modal de error esté por encima incluso si otros modales están activos */
body.modal-open #whatsapp-error-modal {
    z-index: 1000001 !important;
}

/* Opcional: Agregar clase al body cuando el modal de error esté activo */
body.error-modal-open {
    overflow: hidden;
}

body.error-modal-open #whatsapp-error-modal {
    z-index: 1000001 !important;
}