/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Arial', sans-serif;
    background-color: #f2f2f2;
    color: #333;
    overflow-x: hidden;
}

/* ---------------- Carrusel ---------------- */
.carousel-container {
    position: relative;
    width: 100%;
    height: 195px;
    overflow: hidden;
    z-index: 0;
}

.slides-track {
    display: flex;                     /* colocar slides en fila horizontal */
    width: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;                   /* cada slide ocupa todo el contenedor */
    position: relative;
    height: 100%;
}

.logo-container img {
    width: 100%;
    height: auto;
}

.overlay {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
}

/* Puntos de navegación */
.dots-container {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: rgb(255, 255, 255);
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);

    /* <-- FIX: permitir clicks a través del overlay */
    pointer-events: none;
}

/* ---------------- Botón hamburguesa ---------------- */
.menu-btn {
    cursor: pointer;
    position: absolute; right: 22px; top: 20px; z-index: 1000;
    display: flex; flex-direction: column; justify-content: space-between;
    width: 28px; height: 22px; background:none; border:none;
}
.menu-btn .hamburger { display:block; height:4px; background-color: #fff; border-radius:2px; }
.menu-btn .hamburger:not(:last-child){ margin-bottom:5px; }
.menu-btn:hover .hamburger { background-color: #128C7E; }

/* ---------------- Logo izquierdo ---------------- */
.logo-left { position:absolute; top:15px; left:22px; width:40px; height:40px; z-index:1000; }
.logo-left img { width:100%; height:100%; object-fit:contain; }
.location-text {
    font-size:12px; color:#ffffff; cursor:pointer; display:flex; align-items:center;
    gap:2px; margin-top:-5px; font-weight:normal; white-space:nowrap;
}
.arrow-circle {
    background-color:rgb(255, 255, 255); color:rgb(0, 0, 0); border-radius:50%;
    padding:0.5px 5px; font-weight:bold; font-size:10px;
    display:flex; align-items:center; justify-content:center;
    width:12px; height:12px; user-select:none;
}
/* ---------------- Menú lateral ---------------- */
.side-menu {
    position: fixed; top: 0; right: -250px; width: 250px; height: 100%;
    background-color: #333333; padding-top: 60px;
    transition: right 0.3s ease; z-index: 999;
}
.side-menu.open { right: 0; }
.side-menu-content { display: flex; flex-direction: column; align-items: flex-start; padding-top:0; }
.menu-item {
    padding: 20px; text-decoration: none; color: white; font-size: 1rem;
    border-bottom: 1px solid #ddd; width: 100%; text-align: left;
}
.menu-item:hover { background-color: #e7ebea; }
.menu-version { margin-top: 25px; font-size: 0.8rem; color: #fff; text-align:center; width:100%; user-select:none; }
.menu-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    color: white;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: bold;
}

/* ---------------- Secciones ---------------- */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    margin: 0 0 10px 0;
    padding: 13.5px 20px;
    background-color: #333333;
    color: white;
    border: 1px solid #ddd;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: -1px;
}
.section-title h2 {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    text-align: center; /* ✔ centra el texto */
    width: 100%;        /* ✔ asegura que pueda centrarse */
    display: block;     /* ✔ garantiza alineación correcta */
}
/* ----- Sección de Envíos (título + botón) ----- */
.envio-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.envio-section-title h2 {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
    text-align: left; /* ✔ texto alineado a la izquierda */
}

.envio-btn {
    padding: 6px 14px;
    background-color: #aaff00;
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
}

.envio-btn:hover {
    opacity: 0.85;
}
/* Sección de Promociones igual que envíos */
.promo-card {
    display: flex;
    flex-direction: column;
    height: 250px;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    margin: 5px 0;
    width: 100%; /* Ocupa todo el ancho del contenedor padre */
    max-width: none; /* Elimina la limitación */
    margin-bottom: -100px;
    
}

.promo-image-container {
    width: 95%;
    height: 130px; /* Igual que envíos */
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
}

.promo-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Mantiene proporción y cubre todo el contenedor */
    display: block;
    border-radius: 8px;
}

/* Contenedor del carrusel */
.carousel-promo-container {
    overflow-x: auto;
    display: flex;
    padding: 10px 0;
    scroll-behavior: smooth;
    padding: 0 12px;
}

.carousel-promo-cards {
    display: flex;
    gap: 10px; /* espacio entre cartas */
    
}

.carousel-promo-cards .promo-image-container {
    width: 100%;
    height: 100%;
    margin-bottom: 0;
}

.carousel-promo-cards .promo-image-container img {
    border-radius: 8px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel-promo-cards .promo-card {
    flex: 0 0 auto;
    width: 300px; /* ancho fijo o relativo */
    height: 110px; /* altura fija más pequeña */
    margin: 0;
    margin-bottom: 20px;
}
/* Contenedor de cada tarjeta ya tiene position: relative */
.promo-image-container {
    position: relative;
}

/* Texto centrado sobre la imagen */
.promo-text {
    position: absolute;
    top: 50%;                 /* Centrado vertical */
    left: 50%;                /* Centrado horizontal */
    transform: translate(-50%, -50%);
    color: #fff;              /* Color del texto */
    font-size: 25px;          /* Tamaño del texto */
    font-weight: bold;
    text-align: center;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7); /* Sombra para destacar */
    pointer-events: none;     /* Evita interferencia con clicks */
    width: 90%;               /* Ajusta al ancho del contenedor */
}
/* Degradado sobre la imagen */
.promo-image-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%; /* Ajusta según necesidad */
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    border-radius: 8px;

    pointer-events: none; /* Permite que los clicks pasen al enlace */
}
/* Badge en la parte superior derecha de cada carta */
.promo-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(255, 165, 0, 0.9); /* Fondo naranja semi-transparente */
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
    pointer-events: none; /* Permite click en la carta */
}

/* Badge de los primeros 2 */
.promo-badge.badge-fixed {
    background: linear-gradient(135deg, #FF6F00, #FFA500); /* Naranja degradado */
    color: #fff;
    border-radius: 12px 4px 12px 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transform: rotate(-5deg);
}

/* Badge de las demás cartas del carrusel */
.promo-badge.badge-carousel {
    background: linear-gradient(135deg, #2196F3, #21CBF3); /* Azul degradado */
    color: #fff;
    border-radius: 4px 12px 4px 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    transform: rotate(5deg);
}


/* ---------------- Menú lateral ---------------- */
.side-menu {
    position: fixed; top: 0; right: -250px; width: 250px; height: 100%;
    background-color: #2F4F4F; padding-top: 60px;
    transition: right 0.3s ease; z-index: 999;
}
.side-menu.open { right: 0; }
.side-menu-content { display: flex; flex-direction: column; align-items: flex-start; padding-top:0; }
.menu-item {
    padding: 20px; text-decoration: none; color: white; font-size: 1rem;
    border-bottom: 1px solid #ddd; width: 100%; text-align: left;
}
.menu-item:hover { background-color: #e7ebea; }
.menu-version { margin-top: 25px; font-size: 0.8rem; color: #fff; text-align:center; width:100%; user-select:none; }

/* ---------------- Popup ---------------- */
.popup-ad {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
    visibility: hidden; opacity: 0;
    transition: visibility 0s, opacity 0.4s ease;
}
.popup-ad.show { visibility: visible; opacity: 1; }

.popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    max-width: 90%;      /* ancho máximo del contenedor */
    max-height: 90%;     /* altura máxima del contenedor */
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    overflow: hidden;    /* evita que la imagen se salga */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.popup-content img {
    width: 100%;            /* ocupa todo el ancho del contenedor */
    max-height: 80vh;       /* nunca más alto que 80% de la pantalla */
    object-fit: contain;    /* mantiene proporción */
    border-radius: 8px;
}

.popup-close {
    position: absolute; top: 10px; right: 15px;
    font-size: 28px; font-weight: bold;
    color: #444; cursor: pointer;
    background-color: #e0e0e0; border-radius: 50%; padding: 2px 10px;
    transition: background-color 0.3s ease;
    z-index: 20;
}
.popup-close:hover { background-color: #ccc; }

.popup-send-btn {
    position: absolute;
    font-size: 12px;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 10px;  
    background-color: green; 
    color: white; 
    font-weight: bold;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease;
    z-index: 10; 
}
.popup-send-btn:hover { background-color: #333; }


/* ---------------- Envíos ---------------- */
.envio-card {
    position: relative;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: -1px;
    margin-top: -11px;
    animation: fadeIn 0.5s ease-out both;
    overflow: hidden;
}

/* Contenedor de la imagen */
.envio-image-container {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.envio-image-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease;
}

/* Badge superior derecho */
.envio-card .status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px 5px 20px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #000;
    background-color: gray;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.envio-card .status-badge::before {
    content: '';
    position: absolute;
    left: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: blink 1s infinite;
}

.envio-card .status-badge.open {
    background-color: #fff3cd;
    color: #856404;
}
.envio-card .status-badge.open::before { background-color: #ffc107; }

.envio-card .status-badge.closed {
    background-color:#f8d7da;
    color:#721c24;
}
.envio-card .status-badge.closed::before { background-color:#dc3545; }


.envio-card .envio-timer.open {
    animation: pulseStore 2s infinite;
}

/* Contenido del envío */
.envio-card .envio-content {
    margin-top: 10px;
    font-family: Arial, Helvetica, sans-serif;
}
.envio-card .envio-content h2 { font-size: 1.1rem; margin-bottom: 5px; }
.envio-card .envio-content p { font-size: 0.7rem; margin-bottom: 10px; }

/* Botón Enviar */
.envio-card .envio-btn {
    display: inline-block;
    background-color: #25D366;
    color: #fff;
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    border: none;
    cursor: pointer;
}
.envio-card .envio-btn:hover { background-color: #128C7E; }

/* Fondo más oscuro si está cerrado */
.envio-card.closed img {
    filter: brightness(60%);
}
.envio-card.closed {
    background-color: #e0e0e0; /* Gris más fuerte */
}

/* Animaciones */
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
@keyframes pulseStore {
    0% { background-color: rgba(0,128,0,0.6); }
    50% { background-color: rgba(0,128,0,0.85); }
    100% { background-color: rgba(0,128,0,0.6); }
}
@keyframes fadeIn { from{opacity:0; transform:translateY(20px);} to{opacity:1; transform:translateY(0);} }
.envio-btn {
    background-color: #25D366;   /* color principal */
    color: #fff;                 /* texto en blanco */
    border: none;                /* sin borde */
    border-radius: 4px;          /* esquinas redondeadas */
    padding: 5px 10px;           /* espacio interno */
    font-size: 12px;             /* tamaño de texto */
    font-weight: 600;            /* texto semi-negrita */
    cursor: pointer;             /* cursor de mano */
    transition: all 0.3s ease;   /* animación suave */
}

.envio-btn:hover {
    background-color: #333;   /* tono más oscuro al pasar */
    transform: scale(1.05);      /* efecto zoom suave */
}

.envio-btn:active {
    background-color: #cc4c00;   /* aún más oscuro al presionar */
    transform: scale(0.97);      /* se hunde un poco */
}
/* === Estado cerrado en SECCIÓN DE ENVÍOS === */

/* Cuando la tarjeta de envío está cerrada */
.envio-card.closed {
    background-color: #f8d7da; /* mismo estilo que restaurante cerrado */
}

/* Imagen grisada con overlay */
.envio-image-container.closed img {
    filter: grayscale(100%) brightness(0.7);
    opacity: 0.7;
    pointer-events: none;
}

/* Overlay gris encima de la imagen */
.envio-image-container.closed::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(128, 128, 128, 0.45);
    border-radius: 7px;
    pointer-events: none;
}

/* Botón cerrado (ya estaba pero lo ajusto para que sea consistente) */
.envio-btn.closed {
    background-color: #ccc !important;
    color: #666 !important;
    border: 1px solid #bbb;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 1;
}
/* Imagen gris cuando el envío está cerrado */
.envio-image-container img.closed-img {
    filter: grayscale(100%) brightness(0.7);
    opacity: 0.7;
    pointer-events: none; /* bloquea clicks solo cuando está cerrado */
}

/* Cuando la sección se abre */
.envio-card.open img.closed-img {
    filter: none;
    opacity: 1;
    pointer-events: auto; /* permite clicks */
}

/* Overlay opcional */
.envio-image-container.closed::after {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(128, 128, 128, 0.35);
    border-radius: 7px;
    pointer-events: none; /* nunca bloquea clicks */
}

/* Quitar overlay cuando se abre */
.envio-image-container.open::after {
    display: none;
}

/* Responsive */
@media(max-width: 768px){
    .envio-image-container img { height: 150px; }
    .envio-content h2 { font-size: 0.9rem; }
    .envio-content p { font-size: 0.75rem; }
    .envio-btn { padding: 8px 15px; }
}
/* Etiqueta tipo sticker 3D estilo app de mensajería */
.envio-price-tag-3d {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;

    background: linear-gradient(135deg, #FF6F00, #FFA500);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 4px 14px 14px 4px;
    transform: skewX(-12deg) perspective(100px) rotateX(3deg);
    text-align: center;
    pointer-events: none;

    /* Sombra para efecto levantado */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 0 10px rgba(255,165,0,0.4);

    /* Glow suave tipo pulsante */
    animation: envio-tag-3d-glow 2s infinite alternate;
}

@keyframes envio-tag-3d-glow {
    0% { box-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 0 6px rgba(255,165,0,0.3); }
    50% { box-shadow: 0 4px 12px rgba(0,0,0,0.35), 0 0 14px rgba(255,165,0,0.6); }
    100% { box-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 0 6px rgba(255,165,0,0.3); }
}
/* Etiqueta estilo app de mensajería en naranja */
.envio-price-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;

    background: linear-gradient(135deg, #FF6F00, #FFA500); /* degradado naranja */
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 4px 12px 12px 4px; /* inclinación sutil */
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    transform: skewX(-10deg); /* perspectiva ligera */
    pointer-events: none;
    text-align: center;

    /* Efecto de luz suave (glow) */
    animation: envio-tag-glow 2s infinite alternate;
}

@keyframes envio-tag-glow {
    0% { box-shadow: 0 3px 6px rgba(255,111,0,0.5); }
    50% { box-shadow: 0 3px 12px rgba(255,165,0,0.7); }
    100% { box-shadow: 0 3px 6px rgba(255,111,0,0.5); }
}

/* Degradado sobre la imagen para mejorar visibilidad de texto y etiquetas */
.envio-image-container::after {
    content: "";
    position: absolute;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    border-radius: 8px; /* igual que la imagen */
    background: linear-gradient(to top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* degradado suave de abajo hacia arriba */
    pointer-events: none; /* permite clicks sobre la imagen */
    z-index: 1; /* debajo de las etiquetas y textos */
}

.combo-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 10;

    background: linear-gradient(135deg, #E53935, #FF5252); /* degradado rojo */
    color: #fff;
    font-weight: 600;
    font-size: 11px; /* un poco más pequeña */
    padding: 4px 10px;
    border-radius: 4px; /* bordes iguales a la etiqueta envíos */
    text-align: center;
    pointer-events: none;

    /* Sombra suave para resaltar */
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}
/* Etiqueta pequeña para Combos en tarjetas de comida (roja) con brillo pulsante */
.comida-combo-tag {
    position: absolute;
    bottom: 10px;       
    left: 10px;         
    z-index: 11;

    background: linear-gradient(135deg, #E53935, #FF5252); /* degradado rojo */
    color: #fff;
    font-weight: 600;
    font-size: 11px;           
    padding: 4px 10px;         
    border-radius: 4px 12px 4px 12px; 
    transform: skewX(-10deg);  
    text-align: center;
    pointer-events: none;

    /* sombra y resplandor pulsante */
    box-shadow: 0 3px 6px rgba(0,0,0,0.3), 0 0 8px rgba(255,82,82,0.5);
    animation: combo-tag-glow 2s infinite alternate; /* pulsación del brillo */
}

/* Animación de resplandor pulsante */
@keyframes combo-tag-glow {
    0%   { box-shadow: 0 3px 6px rgba(0,0,0,0.3), 0 0 6px rgba(255,82,82,0.3); }
    50%  { box-shadow: 0 3px 6px rgba(0,0,0,0.3), 0 0 12px rgba(255,82,82,0.6); }
    100% { box-shadow: 0 3px 6px rgba(0,0,0,0.3), 0 0 6px rgba(255,82,82,0.3); }
}
