/* =============================================================================
   MODAL DE DETALLE DE OFERTA
   Componente reutilizable para mostrar detalle completo de ofertas
   ============================================================================= */

/* ===========================================
   OVERLAY Y CONTENEDOR PRINCIPAL
   =========================================== */

.offer-detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.offer-detail-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Desktop: centrado */
@media (min-width: 769px) {
    .offer-detail-modal-overlay {
        align-items: center;
        padding: 2rem;
    }
}

.offer-detail-modal {
    background: #fff;
    width: 100%;
    max-width: 580px;
    max-height: 95vh;
    max-height: 95dvh; /* Dynamic viewport height para iOS */
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.3);
}

.offer-detail-modal-overlay.active .offer-detail-modal {
    transform: translateY(0);
}

/* Desktop: modal centrado con bordes redondeados completos */
@media (min-width: 769px) {
    .offer-detail-modal {
        border-radius: 24px;
        max-height: 90vh;
        box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
        transform: scale(0.9) translateY(30px);
    }
    
    .offer-detail-modal-overlay.active .offer-detail-modal {
        transform: scale(1) translateY(0);
    }
}

/* ===========================================
   BOTÓN CERRAR
   =========================================== */

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #ff6b6b;
    color: white;
    transform: scale(1.1);
}

.modal-close-btn:active {
    transform: scale(0.95);
}

.modal-close-btn i {
    font-size: 1.1rem;
    color: #64748b;
    transition: color 0.2s;
}

.modal-close-btn:hover i {
    color: white;
}

/* ===========================================
   ESTADOS: LOADING, ERROR
   =========================================== */

.modal-loading,
.modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    min-height: 300px;
}

.modal-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f1f5f9;
    border-top-color: #ff6b6b;
    border-radius: 50%;
    animation: modalSpin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes modalSpin {
    to { transform: rotate(360deg); }
}

.modal-loading span {
    color: #64748b;
    font-weight: 500;
}

.modal-error i {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.modal-error p {
    color: #64748b;
    margin-bottom: 1rem;
}

.btn-retry {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* ===========================================
   CONTENIDO DEL MODAL
   =========================================== */

.modal-content {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Scrollbar elegante */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f8fafc;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff6b6b 0%, #ff8e8e 100%);
    border-radius: 3px;
}

/* ===========================================
   HEADER CON IMAGEN
   =========================================== */

.modal-header {
    position: relative;
    width: 100%;
}

.modal-image-container {
    position: relative;
    width: 100%;
    background: #f8fafc;
}

.modal-offer-image {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    background: #f8fafc;
    display: block;
}

.modal-offer-image-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-offer-image-placeholder i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Badge destacada en modal */
.modal-badge-featured {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #2d3748;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    z-index: 5;
}

/* Badge de tipo en modal */
.modal-badge-type {
    position: absolute;
    bottom: 16px;
    left: 16px;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.modal-badge-type.badge-gratis {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.modal-badge-type.badge-2x1,
.modal-badge-type.badge-3x2 {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.modal-badge-type.badge-cupon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.modal-badge-type.badge-stock {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.modal-badge-type.badge-descuento {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.modal-badge-type.badge-otro {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

/* Botón favorito en modal */
.modal-favorite-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 5;
}

.modal-favorite-btn i {
    font-size: 1.3rem;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.modal-favorite-btn:hover {
    transform: scale(1.1);
}

.modal-favorite-btn:hover i {
    color: #ff6b6b;
}

.modal-favorite-btn.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
}

.modal-favorite-btn.active i {
    color: white;
}

/* ===========================================
   CONTENIDO PRINCIPAL
   =========================================== */

.modal-main-content {
    padding: 1.5rem;
}

.modal-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
}

.modal-category i {
    color: #ff6b6b;
}

.modal-views {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.modal-title {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

/* ===========================================
   PRECIOS EN MODAL
   =========================================== */

.modal-pricing {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%);
    border-radius: 16px;
    border: 1px solid #fecaca;
}

.modal-pricing .price-original {
    font-size: 1rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.modal-pricing .price-current {
    font-size: 2rem;
    font-weight: 800;
    color: #ff6b6b;
}

.modal-pricing .price-current.price-free {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-pricing .discount-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Precios NxM en modal */
.price-nxm-detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.price-nxm-detail .price-nxm-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #8b5cf6;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.price-nxm-detail .price-original {
    font-size: 0.95rem;
}

.price-nxm-detail .price-current {
    font-size: 1.75rem;
}

.price-nxm-detail .price-savings {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #10b981;
    background: #ecfdf5;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    margin-top: 0.25rem;
    width: fit-content;
}

/* ===========================================
   VALIDEZ Y STOCK
   =========================================== */

.modal-validity {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: #f1f5f9;
    color: #64748b;
}

.modal-validity i {
    font-size: 1rem;
}

.modal-validity.urgente {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.modal-validity.pronto {
    background: #fef3c7;
    color: #d97706;
}

.modal-validity.vencida {
    background: #fee2e2;
    color: #dc2626;
}

.modal-validity.stock {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.modal-stock-info {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.modal-stock-info .stock-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.modal-stock-info .stock-bar {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #f97316 50%, #10b981 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.modal-stock-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #92400e;
}

/* ===========================================
   DESCRIPCIÓN
   =========================================== */

.modal-description {
    margin-bottom: 1.5rem;
}

.modal-description h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-description h4 i {
    color: #ff6b6b;
}

.modal-description p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    white-space: pre-wrap;
}

/* ===========================================
   SECCIÓN DEL COMERCIO
   =========================================== */

.modal-comercio-section {
    padding: 0 1.5rem 1.5rem;
}

.modal-comercio-section > h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-comercio-section > h4 i {
    color: #ff6b6b;
}

.comercio-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

/* Header del comercio */
.comercio-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
}

.comercio-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.comercio-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comercio-avatar-letter {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.comercio-name-info {
    flex: 1;
    min-width: 0;
}

.comercio-name-info h5 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

.premium-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #d97706;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

/* Stats del comercio */
.comercio-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #e2e8f0;
}

.comercio-stats span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #64748b;
}

.comercio-stats span i {
    color: #ff6b6b;
}

.comercio-stats .delivery-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
}

/* Info items */
.comercio-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.comercio-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #475569;
}

.comercio-info-item i {
    color: #ff6b6b;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.comercio-info-item a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.comercio-info-item a:hover {
    text-decoration: underline;
}

/* Horarios */
.comercio-horarios {
    margin-bottom: 1rem;
}

.comercio-horarios h5 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comercio-horarios h5 i {
    color: #ff6b6b;
}

.horarios-grid {
    display: grid;
    gap: 0.35rem;
}

.horario-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    background: white;
}

.horario-row .dia {
    font-weight: 600;
    color: #1e293b;
    width: 40px;
}

.horario-row .horas {
    color: #64748b;
}

.horario-row.cerrado {
    opacity: 0.6;
}

.horario-row.cerrado .horas {
    color: #ef4444;
}

.comercio-horarios-simple {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.comercio-horarios-simple i {
    color: #ff6b6b;
}

/* Redes sociales */
.comercio-redes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.red-social-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.red-social-btn i {
    font-size: 1.25rem;
    color: white;
}

.red-social-btn:hover {
    transform: translateY(-3px);
}

.red-social-btn.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.red-social-btn.instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.3);
}

.red-social-btn.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.red-social-btn.website {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.red-social-btn.tiktok {
    background: linear-gradient(135deg, #000000 0%, #25f4ee 50%, #fe2c55 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Métodos de pago */
.comercio-metodos-pago {
    margin-bottom: 1rem;
}

.comercio-metodos-pago h5 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comercio-metodos-pago h5 i {
    color: #ff6b6b;
}

.metodos-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.metodo-pago-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.metodo-pago-tag i {
    color: #10b981;
}

/* Descripción del comercio */
.comercio-descripcion {
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
}

.comercio-descripcion p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
}

/* ===========================================
   OFERTAS RELACIONADAS
   =========================================== */

.modal-related-section {
    padding: 0 1.5rem 1.5rem;
}

.modal-related-section > h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-related-section > h4 i {
    color: #ff6b6b;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.related-card:active {
    transform: translateY(-1px);
}

.rel-image {
    width: 100%;
    height: 90px;
    background-size: cover;
    background-position: center;
    background-color: #f8fafc;
}

.rel-image.rel-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rel-image.rel-placeholder i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.rel-info {
    padding: 0.75rem;
}

.rel-store {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rel-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rel-pricing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rel-price-old {
    font-size: 0.75rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.rel-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ff6b6b;
}

.rel-discount {
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
}

/* ===========================================
   ACCIONES DEL MODAL
   =========================================== */

.modal-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
    background: linear-gradient(180deg, transparent 0%, #f8fafc 100%);
    position: sticky;
    bottom: 0;
}

.modal-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.modal-action-btn.share-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.modal-action-btn.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.modal-action-btn.comercio-btn {
    background: white;
    color: #1e293b;
    border: 2px solid #e2e8f0;
}

.modal-action-btn.comercio-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
    transform: translateY(-2px);
}

/* ===========================================
   INDICADOR VISUAL EN CARDS
   Para que el usuario sepa que puede hacer click
   =========================================== */

.offer-card {
    position: relative;
}

/* Indicador "Ver más" en hover */
.offer-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b 0%, #ff8e53 50%, #ff6b6b 100%);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 0 20px 20px;
}

.offer-card:hover::after {
    opacity: 1;
    animation: shimmerBar 1.5s ease infinite;
}

@keyframes shimmerBar {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Cursor y feedback visual */
.offer-card {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Efecto de presión en móvil */
@media (hover: none) {
    .offer-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .offer-card::after {
        display: none;
    }
}

/* ===========================================
   RESPONSIVE MODAL
   =========================================== */

@media (max-width: 480px) {
    .offer-detail-modal {
        max-height: 92vh;
        max-height: 92dvh;
        border-radius: 20px 20px 0 0;
    }
    
    .modal-close-btn {
        width: 40px;
        height: 40px;
        top: 12px;
        right: 12px;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .modal-main-content {
        padding: 1.25rem;
    }
    
    .modal-pricing {
        padding: 0.875rem;
    }
    
    .modal-pricing .price-current {
        font-size: 1.75rem;
    }
    
    .modal-comercio-section,
    .modal-related-section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .comercio-card {
        padding: 1rem;
    }
    
    .comercio-avatar {
        width: 48px;
        height: 48px;
    }
    
    .comercio-name-info h5 {
        font-size: 1rem;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .rel-image {
        height: 75px;
    }
    
    .rel-info {
        padding: 0.6rem;
    }
    
    .rel-title {
        font-size: 0.8rem;
    }
    
    .modal-actions {
        padding: 0.875rem 1.25rem calc(0.875rem + env(safe-area-inset-bottom, 0px));
    }
    
    .modal-action-btn {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }
}

/* iOS safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .modal-actions {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }
}

/* Landscape móvil */
@media (max-height: 500px) and (orientation: landscape) {
    .offer-detail-modal {
        max-height: 100vh;
        max-height: 100dvh;
    }
    
    .modal-offer-image {
        max-height: 180px;
    }
    
    .related-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Prevenir scroll del body cuando modal abierto */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Fix para iOS */
@supports (-webkit-touch-callout: none) {
    body.modal-open {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

/* ===========================================
   MODAL ACTIONS - SINGLE BUTTON (MI PÁGINA)
   =========================================== */

.modal-actions-single {
    justify-content: center;
}

.modal-actions-single .share-btn-full {
    flex: none;
    width: 100%;
    max-width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
}
