 :root {
    --primario: #7a101b;
    /* Rojo oscuro del diseño */
    --rosa-claro: #fff0f3;
    --rosa-hover: #ffe4e8;
    --fondo: #fcfcfc;
    --tarjeta-bg: #ffffff;
    --texto: #333;
    --borde: #f0f0f0;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--fondo);
    color: var(--texto);
    margin: 0;
    padding: 0;
    padding-bottom: 120px;
}

/* HEADER Y TABS */
/* --- ESTILOS DEL ENCABEZADO --- */
.header {
    background-color: #fff0f3;
    /* Tu fondo rosa pálido */
    padding: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.header-contenido {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    /* Separa logo a izq y texto a der */
    align-items: center;
}

.logo-header {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(144, 13, 30, 0.1);
}

.info-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: right;
    /* Alinea los textos hacia la derecha */
}

.info-header a,
.info-header span {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: var(--primario);
    /* Usa tu color bordó */
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Mantiene los íconos pegados al texto */
    gap: 8px;
    transition: color 0.3s ease;
}

.info-header a:hover {
    color: #ff8fa3;
    /* Un rosa más claro al pasar el mouse */
}

/* --- ADAPTACIÓN PARA CELULARES --- */
@media (max-width: 600px) {
    .header-contenido {
        flex-direction: column;
        /* Apila el logo arriba y la info abajo */
        gap: 20px;
    }

    .info-header {
        text-align: center;
        /* Centra el texto en celulares */
    }

    .info-header a,
    .info-header span {
        justify-content: center;
        /* Centra los íconos en celulares */
    }
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: var(--tarjeta-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    flex-wrap: wrap;
}

.tab-btn {
    background-color: transparent;
    border: 2px solid var(--rosa-claro);
    color: var(--primario);
    padding: 10px 24px;
    border-radius: 30px;
    /* Bien redondeado */
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
}

.tab-btn.active,
.tab-btn:hover {
    background-color: var(--rosa-claro);
    border-color: var(--rosa-claro);
}

.seccion {
    display: none;
    padding: 40px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.seccion.active {
    display: block;
}

.titulo-seccion {
    color: var(--primario);
    font-weight: 800;
    font-size: 24px;
    margin-bottom: 5px;
}

.subtitulo-seccion {
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* TARJETAS DISEÑO NUEVO */
.tarjeta {
    background: var(--tarjeta-bg);
    border-radius: 24px;
    /* Más redondeado */
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border: 1px solid var(--borde);
}

/* Efecto Hover */
.tarjeta:hover {
    transform: scale(1.03) translateY(-5px);
    background-color: var(--rosa-hover);
    box-shadow: 0 10px 25px rgba(122, 16, 27, 0.1);
    border-color: var(--rosa-hover);
}

.img-placeholder {
    background-color: var(--fondo);
    border-radius: 16px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: var(--primario);
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    padding: 20px;
}

/* Si quieres usar fotos reales, descomenta esta clase en el HTML y borra el img-placeholder */
.tarjeta img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 15px;
}

.tarjeta h3 {
    margin: 0 0 5px 0;
    color: #000;
    font-size: 16px;
    font-weight: 800;
}

select,
input[type="date"],
textarea {
    width: 100%;
    padding: 8px;
    margin: 5px 0 15px 0;
    border: none;
    background-color: transparent;
    color: #666;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.footer-tarjeta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.precio {
    font-weight: 800;
    color: var(--primario);
    font-size: 16px;
}

.btn-agregar {
    background-color: var(--primario);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-agregar:hover {
    background-color: var(--primario);
    color: white;
}

/* ESTILOS INTERNOS TORTA PERSONALIZADA */
.contenedor-torta {
    max-width: 600px;
    margin: 0 auto;
    background: var(--tarjeta-bg);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--borde);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.paso-torta {
    background: var(--fondo);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.paso-torta h4 {
    margin-top: 0;
    color: var(--primario);
    margin-bottom: 15px;
}

.paso-torta select,
.paso-torta input,
.paso-torta textarea {
    background-color: #fff;
    border: 1px solid var(--borde);
    border-radius: 12px;
    padding: 12px;
}

.precio-flotante {
    position: sticky;
    top: 75px;
    background: var(--rosa-claro);
    padding: 15px;
    text-align: center;
    border-radius: 16px;
    margin-bottom: 20px;
    z-index: 10;
}

.precio-flotante span {
    font-size: 28px;
    font-weight: 800;
    color: var(--primario);
    display: block;
}

/* CARRITO MEJORADO */
.carrito-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--tarjeta-bg);
    border: 1px solid var(--borde);
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 320px;
    z-index: 1000;
    display: none;
}

.carrito-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--borde);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.carrito-header h3 {
    margin: 0;
    color: var(--primario);
    font-weight: 800;
}

.lista-carrito {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    font-size: 14px;
}

.lista-carrito li {
    padding: 8px 0;
    border-bottom: 1px solid var(--fondo);
    display: flex;
    justify-content: space-between;
    color: #555;
}

.carrito-total {
    font-weight: 800;
    font-size: 18px;
    text-align: right;
    margin: 15px 0;
    color: var(--primario);
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 800;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
}

/* BOTÓN FLOTANTE DE CONSULTAS LIBRES */
.flotante-whatsapp {
    position: fixed;
    bottom: 25px;
    left: 20px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    text-decoration: none;
    z-index: 999;
}

.mensaje-flotante {
    background-color: white;
    color: var(--primario);
    padding: 12px 18px;
    border-radius: 20px 20px 20px 5px;
    /* Forma de globito de chat */
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--rosa-claro);
    max-width: 220px;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.flotante-whatsapp i {
    background-color: #25D366;
    color: white;
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s ease;
}

.flotante-whatsapp:hover .mensaje-flotante {
    transform: translateY(-5px);
    background-color: var(--rosa-claro);
}

.flotante-whatsapp:hover i {
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .precio-flotante {
        top: 120px;
        /* Baja el cartel para que no choque con los botones de arriba */
        padding: 10px;
    }

    .precio-flotante span {
        font-size: 24px;
        /* Un poco más chico para que entre perfecto */
    }
}

/* --- BOTÓN FLOTANTE DEL CARRITO --- */
.btn-flotante-carrito {
    display: none;
    position: fixed;
    bottom: 110px;
    /* Más arriba para no chocar con el botón de WhatsApp */
    right: 20px;
    background-color: var(--primario);
    color: white;
    border: none;
    width: 60px;
    /* Tamaño fijo para evitar que se corte */
    height: 60px;
    border-radius: 50%;
    font-size: 22px;
    box-shadow: 0 5px 15px rgba(122, 16, 27, 0.3);
    z-index: 998;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-flotante-carrito:hover {
    transform: scale(1.05);
}

#contador_flotante {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: white;
    color: var(--primario);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Ajuste del panel del carrito para celulares pequeños */
@media (max-width: 400px) {
    .carrito-panel {
        width: 90vw;
        right: 5vw;
    }
}

/* CARTELITO DE NOTIFICACIÓN (TOAST) */
#toast_notificacion {
    position: fixed;
    bottom: -50px;
    /* Empieza escondido abajo */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primario);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

#toast_notificacion.mostrar {
    opacity: 1;
    visibility: visible;
    bottom: 90px;
    /* Sube y aparece en pantalla */
}

/* ESTILOS SUAVES PARA CAJITAS Y NOTAS EN LAS TARJETAS */
.tarjeta select,
.tarjeta input[type="text"] {
    width: 100%;
    background-color: var(--rosa-claro);
    /* Fondo suave */
    border: 1px solid transparent;
    /* Sin borde rústico */
    border-radius: 12px;
    /* Bordes bien redondeados */
    padding: 10px 14px;
    margin: 8px 0;
    color: #555;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
}

/* Efecto cuando el cliente hace clic para escribir o elegir */
.tarjeta select:focus,
.tarjeta input[type="text"]:focus {
    background-color: white;
    border: 1px solid var(--primario);
    box-shadow: 0 0 8px rgba(122, 16, 27, 0.1);
    /* Brillo sutil */
}

/* ESTILO PARA EL AVISO DE PRECIO BASE */
.alerta-info {
    background-color: var(--rosa-claro);
    border: 2px dashed var(--primario);
    /* Borde punteado estilo pastelería */
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 25px;
    font-size: 13.5px;
    color: var(--primario);
    line-height: 1.5;
    box-shadow: 0 4px 10px rgba(122, 16, 27, 0.05);
}

.alerta-info i {
    font-size: 16px;
    margin-right: 5px;
}

/* --- SOBRE MEJORADO Y REALISTA --- */
#pantalla_bienvenida {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff0f3;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease;
    cursor: pointer;
    perspective: 1000px;
}

.sobre-contenedor {
    position: relative;
    width: 320px;
    height: 210px;
    transition: all 0.8s ease;
}

/* La parte de atrás del sobre (más oscura para dar sombra) */
.sobre-espalda {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f28b9f;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(144, 13, 30, 0.15);
    transition: opacity 0.6s ease;
}

/* La carta interior ahora ordena todo en columna */
.carta-elegante {
    position: absolute;
    top: 10px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    background-color: white;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    /* Espacio entre la frase y las redes */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 1s ease 0.3s;
    z-index: 2;
}

.frase-carta {
    font-family: 'Dancing Script', cursive;
    font-size: 38px;
    color: var(--primario);
    margin: 0;
}

/* Tipografía limpia y moderna para los datos */
.contacto-carta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: #666;
    /* Un gris oscuro para que no compita con el título */
}

.contacto-carta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contacto-carta i {
    color: var(--primario);
    /* Los íconos en el bordó de tu marca */
    font-size: 16px;
}

/* El frente del sobre (Corte en V perfecto) */
.sobre-frente {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffa6b8;
    /* Rosa del relleno de tu manga */
    clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
    border-radius: 0 0 8px 8px;
    z-index: 3;
    transition: opacity 0.6s ease;
}

/* La solapa de arriba */
.sobre-solapa {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background-image: linear-gradient(to bottom, #ffb3c3, #ffa6b8);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top;
    transition: transform 0.6s ease, opacity 0.6s ease;
    z-index: 4;
}

/* Tu logo como sticker */
.sello-amarhi {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 5;
    transition: all 0.4s ease;
}

.texto-instruccion {
    margin-top: 50px;
    color: var(--primario);
    font-weight: 800;
    font-size: 15px;
    animation: latido 1.5s infinite;
    transition: opacity 0.3s ease;
}

@keyframes latido {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* --- FASES DE LA ANIMACIÓN (Magia pura) --- */
/* Fase 1: Se rompe el sello, se abre, y la carta sale */
#pantalla_bienvenida.fase1 .sello-amarhi {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
}

#pantalla_bienvenida.fase1 .sobre-solapa {
    transform: rotateX(180deg);
}

#pantalla_bienvenida.fase1 .texto-instruccion {
    opacity: 0;
}

#pantalla_bienvenida.fase1 .carta-elegante {
    transform: translateY(-140px) scale(1.2);
    /* Sube mucho y se agranda */
    z-index: 10;
    /* Se pone por encima de todo el sobre */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

#pantalla_bienvenida.fase1 .sobre-contenedor {
    transform: translateY(40px);
    /* El sobre baja un poquito por peso visual */
}

/* Fase 2: El sobre vacío desaparece y la carta queda flotando sola */
#pantalla_bienvenida.fase2 .sobre-espalda,
#pantalla_bienvenida.fase2 .sobre-frente,
#pantalla_bienvenida.fase2 .sobre-solapa {
    opacity: 0;
}

/* Fase 3: Fin de la animación, entramos a la web */
#pantalla_bienvenida.fase3 {
    opacity: 0;
    visibility: hidden;
}

#fecha_global_pedido,
#nota_global_pedido {
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.buscador-estilo {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 20px;
    margin-bottom: 25px;
    border: 2px solid var(--rosa-claro);
    border-radius: 20px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: 0.3s;
}

.buscador-estilo:focus {
    border-color: var(--primario);
}

@media (max-width: 380px) {
    .sobre-contenedor {
        transform: scale(0.8);
    }

    .carta-elegante {
        font-size: 32px;
    }
}

textarea {
    resize: none;
}

