/* Estilos para fichas de empresas - Nuevo diseño cuadrado */
.ficha-empresa {
    background-color: white !important;
    transition: all 0.3s ease;
    border: 1px solid #cbd9e8;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card.ficha-empresa {
    background-color: white !important;
}

.ficha-empresa:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #007bff;
}

/* Layout de grid responsivo - Fichas una al lado de la otra */
.grid-empresas {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 5px;
    padding: 3px;
    justify-content: center;
}
    
.ficha-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Tamaños responsivos - Cuadrado perfecto que crece dinámicamente */
/* Móvil y tablets pequeñas: 2 fichas por fila */
@media (max-width: 991px) {
    .grid-empresas {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 5px;
        padding: 4px;
        justify-content: stretch;
        align-items: stretch;
    }

    .grid-empresas .ficha-container {
        display: block;
        width: 100%;
    }
    .ficha-empresa {
        width: 100%;
        max-width: none;
        height: 380px;
        margin: 0 auto;
        transition: height 0.3s ease;
    }
    .ficha-nombre {
        font-size: 1rem;
    }
}

/* Refuerzo específico para móviles típicos (iPhone / Android) */
@media (min-width: 360px) and (max-width: 767px) {
    /* VERSION TEST 2025-11-16-0953 - si ves el borde verde en móvil,
       esta es la última versión del CSS de fichas-core */
    body .grid-empresas {
        /* En móviles pequeños forzamos UNA sola columna
           y un ancho fijo en píxeles para que todas las fichas
           ocupen exactamente el mismo ancho (sin porcentajes) */
        display: flex !important;
        flex-direction: column;
        align-items: center;
        padding: 8px;
    }

    body .grid-empresas .ficha-container {
        width: 170px !important;   /* ancho fijo de la ficha en móvil */
        max-width: 100%;           /* por si el viewport es más pequeño */
        margin: 0 0 4px 0;         /* separar lo mínimo entre fichas */
    }

    body .grid-empresas .ficha-empresa {
        width: 170px !important;   /* mismo ancho que el contenedor */
        max-width: 100%;
        outline: 1px solid transparent; /* borde verde para resaltar fichas en móvil */
    }
}

/* Tablets medianas y desktop pequeño */
@media (min-width: 992px) and (max-width: 1199px) {
    .grid-empresas {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px;
    }
    .ficha-empresa {
        width: 100%;
        max-width: 380px;
        height: 400px;
        transition: height 0.3s ease;
    }
}

@media (min-width: 1200px) and (max-width: 3839px) {
    .grid-empresas {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 25px;
    }
    .ficha-empresa {
        width: 100%;
        max-width: 420px;
        height: 400px;
        transition: height 0.3s ease;
    }
}

@media (min-width: 3840px) {
    .grid-empresas {
        grid-template-columns: repeat(6, 1fr) !important;
        gap: 30px;
    }
    .ficha-empresa {
        width: 100%;
        max-width: 600px;
        height: 500px;
        transition: height 0.3s ease;
    }
}

/* Fila 1: Header con nombre, logo y categoría */
.ficha-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.6rem;
    display: grid;
    /* Igualamos la columna del logo al tamaño real del logo (120px) para mantener 1:1 */
    grid-template-columns: 120px minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas:
        "logo nombre"
        "logo categoria";
    align-items: center;
    column-gap: 0.8rem;
    row-gap: 0.25rem;
    flex-shrink: 0;
}

.ficha-logo {
    width: 120px;
    height: auto;
    border-radius: 7px;
    object-fit: cover;
    background: white;
    padding: 2px;
    flex-shrink: 0;
}

/* En vista normal (desktop) asegurar proporción 1:1 perfecta del logo */
@media (min-width: 768px) {
    .ficha-logo {
        aspect-ratio: 1 / 1;
        width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
    }
}

/* Asignar áreas del grid */
.field-logo {
    grid-area: logo;
}

.ficha-nombre {
    grid-area: nombre;
}

.field-categoria {
    grid-area: categoria;
}

.ficha-nombre {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
}

.ficha-categoria {
    font-size: 0.75rem;
    opacity: 0.9;
    background: rgba(255,255,255,0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    display: inline-block;
}

/* Ajustes específicos para móvil: ordenar nombre, logo, categoría en columna */
@media (max-width: 768px) {
    .ficha-header {
        padding: 0.35rem;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "nombre"
            "logo"
            "categoria";
        text-align: center;
        justify-items: center;
    }

    .ficha-nombre {
        font-size: 1rem;
        margin-bottom: 0.1rem;
    }

    .field-categoria {
        margin-top: 0.1rem;
    }
}

/* Fila 2: Información principal */
.ficha-body {
    background-color: white;
    padding: 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.ficha-info-principal {
    background-color: white;
    position: relative;
}

.ficha-productos {
    font-size: 0.8rem;
    color: #495057;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.ficha-direccion {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.ficha-telefono {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
}

.ficha-info-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    color: white;
    transition: all 0.2s ease;
}

.ficha-info-icon:hover {
    background: #0056b3;
    transform: scale(1.1);
}

/* Filas 3-7: Acordeones */
.ficha-acordeon {
    border: 1px solid #7a8da0;
    border-radius: 6px;
    margin-bottom: 0.2rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ficha-acordeon-header {
    background: #f8f9fa;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
}

.ficha-acordeon-header:hover {
    background: #e9ecef;
}

.ficha-acordeon-header.ofertas {
    background: #ff6b35;
    color: white;
}

.ficha-acordeon-header.ofertas:hover {
    background: #e55a2b;
}

.ficha-acordeon-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.ficha-acordeon-content.active {
    max-height: 300px;
    animation: bounceIn 0.4s ease-out;
}

.ficha-acordeon-content.active.horario {
    max-height: 400px;
}

/* Aumentar altura para el acordeón de ofertas (tiene 3 secciones) */
.ficha-acordeon-content.active.ofertas-content {
    max-height: 500px;
}

.ficha-acordeon-text {
    padding: 0.6rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.ficha-acordeon-arrow {
    transition: transform 0.3s ease;
}

.ficha-acordeon.active .ficha-acordeon-arrow {
    transform: rotate(180deg);
}

@keyframes bounceIn {
    0% {
        transform: translateY(-10px);
        opacity: 0;
    }
    50% {
        transform: translateY(5px);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Estilos para el modal personalizado */
.modal-overlay-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content-custom {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-custom h5 {
    margin: 0;
    font-size: 1.2rem;
}

.btn-close-custom {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body-custom {
    padding: 1.5rem;
}

.modal-footer-custom {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

.btn-close-modal {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.info-field {
    margin-bottom: 1rem;
}

.info-field-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.info-field-value {
    color: #6c757d;
    line-height: 1.4;
    font-size: 0.85rem;
}

/* Estilos adicionales para index.html */
.modal-ficha {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-ficha.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    margin: 0 auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: #007bff;
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

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

.modal-body {
    padding: 20px;
}

.modal-info-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.modal-info-item strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.modal-info-item span {
    color: #666;
    line-height: 1.4;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Spinner personalizado */
.spinner-custom {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25rem solid #007bff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Mensajes de estado */
.mensaje-estado {
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin: 20px;
}

.mensaje-cargando {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.mensaje-sin-empresas {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.mensaje-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.mensaje-estado h4 {
    margin: 0.5rem 0;
}

.mensaje-estado p {
    margin: 0.5rem 0;
}

.mensaje-estado button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.mensaje-estado button:hover {
    background-color: #0056b3;
}

/* Forzar fondo blanco en todas las partes de la ficha */
.grid-empresas .ficha-empresa,
.grid-empresas .ficha-empresa *:not(.ficha-header):not(.ficha-header *):not(.ficha-acordeon-header):not(.ficha-acordeon-header *):not(.btn-ofertas-modal):not(.ficha-boton-ofertas):not(.btn-ofertas-modal *):not(.fas.fa-percent):not(.btn-menu-ficha):not(.ficha-boton-menu):not(.btn-menu-ficha *):not(.fas.fa-utensils) {
    background-color: white !important;
}

.grid-empresas .card.ficha-empresa {
    background: white !important;
}

/* Estilos para Ofertas & Promociones */
.ofertas-sections {
    padding: 0.6rem;
    background: white; 
}

.oferta-section {
    margin-bottom: 0.8rem;
}

.oferta-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #ff6b35;
}

.ofertas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
    max-height: 150px; /* Ajustado para que quepan las 3 secciones sin scroll */
    overflow-y: auto;
    overflow-x: hidden;
}

.oferta-item {
    cursor: pointer;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.oferta-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

.oferta-item:hover img {
    transform: scale(1.1);
}

.oferta-info {
    /* Ocultar completamente el overlay en las miniaturas */
    display: none;
}

.oferta-titulo {
    font-weight: 600;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oferta-descripcion {
    font-size: 0.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-ofertas {
    color: #6c757d;
    font-size: 0.75rem;
    font-style: italic;
    padding: 0.5rem;
    text-align: center;
}

.proximamente {
    color: #6c757d;
    font-size: 0.75rem;
    font-style: italic;
    padding: 0.5rem;
    text-align: center;
}

/* ============================================================================
   BOTONES DE MENÚ PERSONALIZADOS
   ============================================================================ */

.btn-menu-personalizado {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-menu-personalizado:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.btn-menu-personalizado:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

/* El emoji se maneja automáticamente sin estilos adicionales */

/* Efecto de brillo al hover */
.btn-menu-personalizado::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-menu-personalizado:hover::before {
    left: 100%;
}

/* Botón de Menú - Alineado como acordeón */
.ficha-boton-menu {
    border: 1px solid #7a8da0;
    border-radius: 6px;
    margin-bottom: 0.2rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    background: #f8f9fa !important;
}

.btn-menu-ficha {
    width: 100%;
    background: #f8f9fa !important;
    background-color: #f8f9fa !important;
    color: #ff6b35 !important;
    border: none;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-align: center;
    margin: 0;
    outline: none;
    box-sizing: border-box;
    text-decoration: none;
}

.btn-menu-ficha:hover {
    background: #e9ecef !important;
    background-color: #e9ecef !important;
    text-decoration: none;
    color: #ff6b35 !important;
}

.btn-menu-ficha:active {
    background: #e9ecef !important;
}

/* Quitar fondo blanco del icono del botón de menú */
.btn-menu-ficha .fas.fa-utensils {
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 !important;
    border: none !important;
}

/* Botón de Ofertas y Promociones - Alineado como acordeón */
.ficha-boton-ofertas {
    border: 1px solid #7a8da0;
    border-radius: 6px;
    margin-bottom: 0.2rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    background: #ff6b35 !important;
}

.btn-ofertas-modal {
    width: 100%;
    background: #ff6b35 !important;
    background-color: #ff6b35 !important;
    color: white !important;
    border: none;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-align: center;
    margin: 0;
    outline: none;
    box-sizing: border-box;
}

.btn-ofertas-modal:hover {
    background: #e55a2b !important;
    background-color: #e55a2b !important;
}

.btn-ofertas-modal:active {
    background: #e55a2b !important;
}

/* Quitar fondo blanco del icono del botón de ofertas */
.btn-ofertas-modal .fas.fa-percent {
    background: transparent !important;
    background-color: transparent !important;
    padding: 0 !important;
    border: none !important;
}

/* Modal de Ofertas y Promociones */
.modal-ofertas-promociones {
    display: none;
    position: fixed;
    z-index: 2147483647;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: auto;
}

.modal-ofertas-promociones.active {
    display: flex;
}

.modal-ofertas-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-ofertas-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-ofertas-titulo {
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
}

.btn-cerrar-modal-ofertas {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-cerrar-modal-ofertas:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-ofertas-body {
    padding: 1.5rem;
}

.modal-empresa-nombre {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal-oferta-section {
    margin-bottom: 2rem;
}

.modal-oferta-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ff6b35;
}

/* Grid de ofertas en el modal - Responsive */
.modal-ofertas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-start;
}

/* Items de ofertas con hover */
.modal-oferta-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.modal-oferta-item img {
    display: block;
    object-fit: cover;
    transition: all 0.3s ease;
}

/* Hover info */
.modal-oferta-hover-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 100%);
    color: white;
    padding: 0.8rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.modal-oferta-item:hover .modal-oferta-hover-info {
    transform: translateY(0);
}

.modal-oferta-hover-titulo {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.modal-oferta-hover-descripcion {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.modal-oferta-hover-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-oferta-hover-btn:hover {
    background: #e55a2b;
}

/* Tamaños responsivos de imágenes */
/* Móviles: 180x180px */
@media (max-width: 768px) {
    /* Modal más ancho en móviles */
    .modal-ofertas-content {
        width: 97%;
    }
    
    /* Reducir padding del modal en móviles (50% menos) */
    .modal-ofertas-promociones {
        padding: 10px;
    }
    
    .modal-ofertas-body {
        padding: 0.5rem;
    }
    
    .modal-ofertas-header {
        padding: 0.75rem;
    }
    
    /* Gap más pequeño entre imágenes en móviles */
    .modal-ofertas-grid {
        gap: 0.5rem;
    }
    
    /* Imágenes más pequeñas en móviles */
    .modal-oferta-item img {
        width: 150px;
        height: 150px;
    }
}

/* Desktop normal: 300x300px */
@media (min-width: 769px) and (max-width: 3839px) {
    .modal-oferta-item img {
        width: 300px;
        height: 300px;
    }
}

/* Resolución 4K: 400x400px */
@media (min-width: 3840px) {
    .modal-oferta-item img {
        width: 400px;
        height: 400px;
    }
}

/* Animación square-in-center */
@keyframes square-in-center {
    from {
        clip-path: inset(100% 100% 100% 100%);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

[transition-style="in:square:center"] {
    animation: 2.5s cubic-bezier(.25, 1, .30, 1) square-in-center both;
}

/* ============================================================================
   ESTILOS PARA COMPARTIR FICHA POR WHATSAPP
   ============================================================================ */

/* Compartir ficha - Solo texto e ícono */
.ficha-compartir-whatsapp {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0;
    margin-top: 10px;
    margin-bottom: 10px;
    background: transparent;
    position: relative;
    bottom: 0;
}

.ficha-compartir-whatsapp span {
    color: #666;
    font-size: 0.7rem;
    font-weight: 400;
    pointer-events: none;
}

.ficha-compartir-whatsapp i {
    color: #25D366;
    font-size: 20px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ficha-compartir-whatsapp i:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}

/* Modal compartir */
.modal-compartir-ficha {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-compartir-ficha.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-compartir-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

/* Header del modal */
.modal-compartir-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-compartir-header h3 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-compartir-header h3 i {
    font-size: 1.5rem;
}

.btn-cerrar-modal-compartir {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-cerrar-modal-compartir:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.btn-cerrar-modal-compartir i {
    font-size: 1.2rem;
}

/* Body del modal */
.modal-compartir-body {
    padding: 25px;
}

.modal-compartir-empresa-nombre {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #333;
}

.modal-compartir-descripcion {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.modal-compartir-input-group {
    margin-bottom: 20px;
}

.modal-compartir-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
}

.modal-compartir-input:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.modal-compartir-ayuda {
    display: block;
    margin-top: 8px;
    color: #888;
    font-size: 0.85rem;
}

.modal-compartir-ayuda i {
    margin-right: 4px;
    color: #25D366;
}

/* Preview del mensaje */
.modal-compartir-preview {
    background: #f8f9fa;
    border-left: 4px solid #25D366;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-compartir-preview strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.9rem;
}

.modal-compartir-preview .mensaje-preview {
    color: #555;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.modal-compartir-preview .link-preview {
    color: #007bff;
    word-break: break-all;
    font-weight: 500;
}

/* Botones del modal */
.modal-compartir-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-cancelar-compartir,
.btn-enviar-compartir {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancelar-compartir {
    background: #e0e0e0;
    color: #666;
}

.btn-cancelar-compartir:hover {
    background: #d0d0d0;
}

.btn-enviar-compartir {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-enviar-compartir:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-enviar-compartir i {
    font-size: 1.1rem;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    .modal-compartir-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-compartir-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-compartir-body {
        padding: 20px;
    }
    
    .modal-compartir-buttons {
        flex-direction: column;
    }
    
    .btn-cancelar-compartir,
    .btn-enviar-compartir {
        width: 100%;
        justify-content: center;
    }
}