:root {
    --primary-dark: #0b2545;
    --primary-blue: #134074;
    --accent-green: #25d366;
    --accent-green-hover: #1ebe5d;
    --bg-light: #f4f7f6;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--bg-light); color: #333; overflow-x: hidden; position: relative; }

/* ================= HEADER MODERNO ================= */
header { 
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue)); 
    color: var(--white); 
    padding: 15px 20px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-circular {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--white);
    box-shadow: 0 0 10px rgba(37, 211, 102, 0.5);
    transition: transform 0.4s ease;
}
.logo-circular:hover {
    transform: rotate(360deg) scale(1.05);
}

.header-texto h1 { font-size: 19px; margin-bottom: 2px; color: var(--white); letter-spacing: 0.5px; font-weight: 700; }
.header-texto p { font-size: 11px; color: #8da9c4; font-style: italic; }

.header-center {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
}

.header-center form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.header-center label {
    font-size: 12px;
    color: #e2e8f0;
    font-weight: 600;
}

.header-center input {
    padding: 5px 8px;
    border: none;
    border-radius: 15px;
    font-size: 12px;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
}

.btn-cita-header {
    background-color: var(--accent-green);
    color: var(--white);
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-cita-header:hover {
    background-color: var(--accent-green-hover);
}

.header-right {
    text-align: right;
    font-size: 12px;
    color: #e2e8f0;
}
.header-right .badge-24hrs {
    display: inline-block;
    background: var(--accent-green);
    color: var(--white);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: bold;
    margin-top: 2px;
}

/* ================= CONTENEDOR PRINCIPAL ================= */
.contenedor-principal { max-width: 1300px; margin: 20px auto; padding: 0 15px; }

.buscador-seccion { 
    background: var(--white); 
    padding: 12px 20px; 
    border-radius: 30px; 
    box-shadow: var(--shadow); 
    margin-bottom: 25px; 
    display: flex; 
    gap: 10px; 
    align-items: center; 
}
.buscador-seccion input { flex: 1; padding: 8px 10px; border: none; font-size: 15px; outline: none; background: transparent; }
.buscador-seccion button { background-color: var(--primary-blue); color: var(--white); border: none; padding: 10px 20px; border-radius: 20px; cursor: pointer; font-weight: bold; }

.carrito-contenedor { 
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark)); 
    padding: 20px; 
    color: var(--white); 
    border-radius: 12px; 
    margin-bottom: 30px; 
    box-shadow: var(--shadow); 
}
.carrito-contenedor h3 { margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 6px; font-size: 18px; }
.tabla-carrito { width: 100%; border-collapse: collapse; margin-top: 10px; background: rgba(255,255,255,0.05); border-radius: 6px; overflow-x: auto; display: block; }
.tabla-carrito th, .tabla-carrito td { padding: 10px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 13px; white-space: nowrap; }
.btn-eliminar { background-color: #d90429; color: var(--white); padding: 5px 10px; text-decoration: none; border-radius: 4px; font-size: 11px; }
.carrito-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; flex-wrap: wrap; gap: 10px; }
.btn-whatsapp { background-color: var(--accent-green); color: var(--white); padding: 10px 20px; text-decoration: none; border-radius: 20px; font-weight: bold; font-size: 14px; }

.grid-productos { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.tarjeta { 
    background: var(--white); 
    border-radius: 12px; 
    padding: 18px; 
    box-shadow: var(--shadow); 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    border-top: 4px solid var(--primary-blue);
    transition: transform 0.3s ease;
}
.tarjeta:hover { transform: translateY(-5px); }
.codigo-prod { font-size: 11px; color: #888; margin-bottom: 4px; font-weight: 600; }
.depto-prod { background-color: #e2e8f0; color: #1e293b; font-size: 10px; padding: 3px 8px; border-radius: 15px; display: inline-block; margin-bottom: 8px; font-weight: bold; text-transform: uppercase; }
.tarjeta h4 { color: var(--primary-dark); font-size: 15px; margin-bottom: 10px; min-height: 40px; }
.precio { font-size: 18px; color: #2b9348; font-weight: bold; margin-bottom: 12px; }

.form-agregar { display: flex; gap: 8px; align-items: center; }
.form-agregar input[type="number"] { width: 55px; padding: 8px; border: 1px solid #cbd5e1; border-radius: 6px; text-align: center; font-weight: bold; }
.form-agregar button { flex: 1; background-color: var(--primary-blue); color: var(--white); border: none; padding: 9px; border-radius: 6px; cursor: pointer; font-weight: bold; }

/* ================= BOTÓN FLOTANTE INICIO ================= */
.btn-flotante-inicio {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 12px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 2px solid var(--white);
}
.btn-flotante-inicio:hover { background-color: var(--primary-dark); }

/* ================= PIE DE PÁGINA ================= */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 30px 20px 20px;
    margin-top: 50px;
    border-top: 4px solid var(--accent-green);
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}
.footer-section h4 { color: var(--accent-green); margin-bottom: 12px; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 4px; }
.footer-section p { color: #cbd5e1; font-size: 13px; line-height: 1.5; margin-bottom: 6px; }
.footer-bottom { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 15px; font-size: 12px; color: #94a3b8; }

@media (max-width: 768px) {
    .header-container { flex-direction: column; align-items: stretch; text-align: center; }
    .header-left { justify-content: center; }
    .header-right { text-align: center; }
    .header-center { justify-content: center; width: 100%; }
    .header-center form { justify-content: center; width: 100%; }
    .buscador-seccion { flex-direction: column; }
    .buscador-seccion button, .buscador-seccion a { width: 100%; text-align: center; justify-content: center; }
    .carrito-footer { flex-direction: column; align-items: stretch; text-align: center; }
    .btn-whatsapp { width: 100%; text-align: center; }
}