:root {
    --verde: #65b946;
    --verde2: #4f9f39;
    --amarillo: #f7d90b;
    --vino: #3b0a12;
    --gris-fondo: #f4f6f3;
    --blanco: #ffffff;
    --texto-oscuro: #2b2b2b;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--gris-fondo);
    color: var(--texto-oscuro);
    overflow-x: hidden;
}

/* NAVBAR Y LOGO */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: var(--vino);
    color: var(--blanco);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container img {
    width: 45px; /* Redimensiona el ancho del logo */
    height: auto; /* Mantiene la proporción para que no se deforme */
    border-radius: 50%; /* Opcional: si quieres que el fondo del logo se vea redondo */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Sombra sutil para resaltar los colores */
}

.logo-text {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--amarillo);
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--blanco);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--amarillo);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--amarillo);
}

.branch-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.branch-wrapper label {
    font-size: 0.85rem;
    font-weight: 600;
}

#branchSelector {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid var(--verde);
    background: var(--blanco);
    font-weight: 700;
    color: var(--vino);
    cursor: pointer;
    outline: none;
}

/* HERO SECTION */
.hero {
    height: 75vh;
    background: linear-gradient(135deg, rgba(59, 10, 18, 0.8), rgba(79, 159, 57, 0.4)), url('../images/hero.jpg') center center/cover;
    position: relative;
}

.hero-overlay {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--blanco);
    text-align: center;
    padding: 0 20px;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    text-shadow: 2px 4px 10px rgba(0,0,0,0.5);
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 30px;
    max-width: 700px;
}

/* BOTONES ANIMADOS */
.btn-primary {
    background: var(--amarillo);
    color: var(--vino);
    text-decoration: none;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(247, 217, 11, 0.4);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(247, 217, 11, 0.6);
    background: #ffe31a;
}

/* SECCIONES COMPARTIDAS */
.section {
    padding: 80px 10%;
}

.white-bg {
    background-color: var(--blanco);
}

.section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--vino);
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* GALERÍA DE PLATILLOS */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.gallery-card {
    background: var(--blanco);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(59, 10, 18, 0.1);
}

.card-image-placeholder {
    font-size: 4rem;
    background: var(--gris-fondo);
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    margin-bottom: 15px;
}

.badge, .badge-yellow {
    position: absolute;
    top: 15px;
    left: 15px;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge { background: var(--vino); }
.badge-yellow { background: var(--verde2); }

/* CUADRÍCULA DE MENÚ E ITEMS INTERACTIVOS */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.menu-item {
    background: var(--blanco);
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 2px solid transparent;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-item:hover {
    border-color: var(--verde);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(101, 185, 70, 0.15);
}

.menu-item h3 {
    color: var(--vino);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.menu-item .price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--verde2);
    margin-bottom: 15px;
}

.menu-item button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--verde);
    color: var(--blanco);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.menu-item button:hover {
    background: var(--verde2);
    box-shadow: 0 4px 10px rgba(79, 159, 57, 0.3);
}

/* CARRITO DE COMPRAS INTERACTIVO */
.cart-container {
    background: var(--blanco);
    max-width: 650px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 2px dashed #ddd;
}

.cart-box {
    margin: 25px 0;
}

.empty-cart-msg {
    text-align: center;
    color: #888;
    padding: 20px 0;
    font-style: italic;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    animation: fadeIn 0.3s ease;
}

.cart-item-info h4 {
    font-weight: 700;
    color: var(--vino);
}

.cart-item-info span {
    color: var(--verde2);
    font-weight: 600;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-qty {
    background: var(--gris-fondo);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-qty:hover {
    background: var(--vino);
    color: white;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 3px double #eee;
}

.cart-total h3 {
    font-size: 1.6rem;
    color: var(--vino);
}

.btn-order {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: #25D366;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: var(--transition);
}

.btn-order:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    background: #20ba59;
}

.btn-order.disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

/* SUCURSALES Y CONTACTO */
.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: center;
}

.branch-info-card {
    background: var(--vino);
    color: var(--blanco);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.branch-info-card h3 {
    color: var(--amarillo);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.branch-info-card p {
    line-height: 1.6;
    font-size: 1.1rem;
}

/* FOOTER */
footer {
    background: var(--vino);
    color: var(--blanco);
    text-align: center;
    padding: 50px 20px;
    border-top: 5px solid var(--amarillo);
}

footer h3 {
    color: var(--amarillo);
    margin-bottom: 10px;
}

.copyright {
    margin-top: 25px;
    font-size: 0.8rem;
    color: #9c8488;
}

/* WHATSAPP FLOTANTE CON ANIMACIÓN Y BADGE */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-decoration: none;
    z-index: 1000;
    transition: var(--transition);
    animation: bounce 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-icon {
    font-size: 28px;
}

.badge-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--amarillo);
    color: var(--vino);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 0.85rem;
    border: 2px solid white;
}

/* ALERT TOAST */
.toast {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--vino);
    color: var(--amarillo);
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1001;
    transform: translateY(150px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 5px solid var(--verde);
}

.toast.show {
    transform: translateY(0);
}

/* LLAMADAS A ANIMACIONES AUTOMÁTICAS */
.pulse-animation {
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 15px; padding: 20px; }
    .nav-links { gap: 15px; }
    .hero h1 { font-size: 2.8rem; }
    .contacto-grid { grid-template-columns: 1fr; }
    .section { padding: 50px 5%; }
}