/* css/site.css - Estilos compartidos de El Algo (sitio público y paneles internos) */

:root {
    --ea-chocolate: #6F4023;
    --ea-caramel: #D98C3D;
    --ea-pink: #F2A6B8;
    --ea-cream: #FFF8F0;
    --ea-dark: #2D2013;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--ea-cream);
    color: var(--ea-dark);
}

a { text-decoration: none; }

/* ---------- Sitio público ---------- */

.ea-navbar {
    background: linear-gradient(135deg, var(--ea-chocolate) 0%, var(--ea-caramel) 100%);
}

.ea-navbar .navbar-brand {
    font-weight: 700;
    color: #fff !important;
    letter-spacing: 0.5px;
}

.ea-navbar .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 600;
}

.ea-hero {
    background: linear-gradient(135deg, var(--ea-chocolate) 0%, var(--ea-caramel) 100%);
    color: #fff;
    padding: 60px 0;
    border-radius: 0 0 30px 30px;
}

.ea-hero img { border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }

.ea-section-title {
    color: var(--ea-chocolate);
    font-weight: 700;
    border-left: 6px solid var(--ea-pink);
    padding-left: 12px;
    margin-bottom: 20px;
}

.ea-card-producto {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: transform 0.15s ease;
    height: 100%;
}

.ea-card-producto:hover { transform: translateY(-4px); }

.ea-card-producto img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f1e7db;
}

.ea-card-producto .cuerpo { padding: 15px; }

/* ---------- Contenedores de imagen de tamaño fijo ----------
   Cualquier foto (sea cual sea su tamaño/proporción original) se recorta y adapta
   (object-fit: cover) al contenedor definido, para que el sitio se vea consistente
   sin importar qué imagen suba el admin/vendedor. */

.ea-img-1x1 {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.12);
    background-color: #f1e7db;
    display: block;
}

.ea-img-4x3 {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    background-color: #f1e7db;
    display: block;
}

.ea-thumb-45 { width: 45px; height: 45px; object-fit: cover; border-radius: 8px; }
.ea-thumb-50 { width: 50px; height: 50px; object-fit: cover; border-radius: 8px; }
.ea-thumb-60x36 { width: 60px; height: 36px; object-fit: cover; border-radius: 6px; }

.ea-precio { color: var(--ea-caramel); font-weight: 700; font-size: 1.1rem; }

.ea-precio-tachado { color: #999; text-decoration: line-through; font-size: 0.9rem; margin-right: 6px; }

.ea-btn {
    background-color: var(--ea-caramel);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 30px;
}

.ea-btn:hover { background-color: var(--ea-chocolate); color: #fff; }

.ea-footer {
    background-color: var(--ea-dark);
    color: #f1e7db;
    padding: 30px 0;
    margin-top: 60px;
}

/* ---------- Selector de diseño de sobre (producto.php / mostrador de vendedor) ---------- */

.ea-sobre-opcion {
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.ea-sobre-opcion:hover { transform: translateY(-2px); }

.ea-sobre-opcion.seleccionado { border-color: var(--ea-caramel); }

.ea-sobre-opcion img { width: 100%; height: 70px; object-fit: cover; display: block; }

.ea-sobre-nombre {
    font-size: 0.7rem;
    text-align: center;
    padding: 4px 2px;
    color: var(--ea-chocolate);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Banner de promociones (llamativo, sitio público, siempre visible) ---------- */

.ea-promo-link { display: block; }

/* Con imagen subida por el admin: banner de ANCHO Y ALTO fijos (contenido dentro del mismo
   ancho que el resto de la página, no a todo lo ancho de la pantalla) — cualquier imagen que
   suba (apaisada, cuadrada, vertical) se recorta y adapta igual, sin sobredimensionarse. */
.ea-promo-banner-img {
    position: relative;
    width: 100%;
    height: 130px;
    overflow: hidden;
    border-radius: 14px;
    margin: 14px 0;
    animation: ea-promo-pulse 2.5s ease-in-out infinite;
}

.ea-promo-banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 767px) {
    .ea-promo-banner-img { height: 100px; }
}

.ea-promo-banner-img-texto {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0));
    color: #fff;
    padding: 20px 14px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
}

.ea-promo-banner-img-texto .badge {
    background-color: var(--ea-caramel);
    color: #fff;
    font-size: 0.8rem;
    padding: 5px 10px;
}

/* Sin imagen: aviso de texto llamativo (fallback) */
.ea-promo-banner {
    background: repeating-linear-gradient(135deg, var(--ea-pink), var(--ea-pink) 20px, #f7c1cd 20px, #f7c1cd 40px);
    color: var(--ea-dark);
    text-align: center;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.95rem;
    animation: ea-promo-pulse 2s ease-in-out infinite;
}

@keyframes ea-promo-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.08); }
}

/* ---------- Botón flotante de WhatsApp (todas las páginas) ---------- */

.ea-whatsapp-flotante {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 58px;
    height: 58px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    z-index: 1050;
    transition: transform 0.15s ease;
}

.ea-whatsapp-flotante:hover { transform: scale(1.08); color: #fff; }

/* ---------- Paneles internos (admin/vendedor/produccion/domiciliario) ---------- */

.ea-panel-header {
    background: linear-gradient(135deg, var(--ea-chocolate) 0%, var(--ea-dark) 100%);
    color: #fff;
    padding: 18px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.ea-panel-menu a {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    margin-right: 18px;
}

.ea-panel-menu a.activo, .ea-panel-menu a:hover { color: #fff; text-decoration: underline; }

.ea-tarjeta {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    padding: 20px;
}

.ea-table thead th {
    background-color: #f8f5f1;
    color: var(--ea-chocolate);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-estado { font-size: 0.75rem; padding: 6px 10px; border-radius: 20px; }
