/* --- VARIABLES Y RESET --- */
:root {
    --primary-red: #D62828;       /* Rojo Sangre */
    --primary-red-hover: #b91c1c;
    --bg-black: #0a0a0a;          /* Negro Profundo */
    --bg-dark: #141414;           /* Gris muy oscuro */
    --bg-card: #1c1c1c;           /* Fondo de tarjetas */
    --text-white: #f4f4f4;
    --text-gray: #a0a0a0;
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Quita el cuadro azul al tocar en celulares */
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden; /* Evita scroll horizontal en móvil */
}

/* --- UTILIDADES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-red { color: var(--primary-red); }
.text-center { text-align: center; }

/* --- BOTONES (Estilo App) --- */
.btn {
    display: inline-block;
    padding: 15px 30px; /* Más altos para fácil toque con el dedo */
    border-radius: 8px; /* Bordes un poco más suaves */
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
    box-shadow: 0 4px 15px rgba(214, 40, 40, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-red-hover);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid white;
    color: white;
    margin-left: 10px;
}

.btn-outline:hover {
    background-color: white;
    color: black;
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px); /* Efecto cristal de App */
    height: 80px;
    display: flex;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-link {
    display: flex;
    align-items: left;
    text-decoration: none;
    height: 100%;
    margin-right: 60px; 
}

.logo-img {
    max-height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05); 
    filter: brightness(1.1); 
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.nav-links a:hover { color: var(--primary-red); }

.btn-nav {
    background-color: var(--primary-red);
    padding: 10px 20px;
    border-radius: 6px;
}

.btn-nav:hover { color: white !important; background-color: var(--primary-red-hover); }

/* Hamburguesa (Móvil) */
.hamburger { display: none; cursor: pointer; z-index: 1001; }
.hamburger span {
    display: block; width: 28px; height: 3px; background: white; margin: 6px auto; transition: 0.3s; border-radius: 3px;
}
.hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }


/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
}

.hero-subtitle {
    font-size: 1rem;
    letter-spacing: 4px;
    color: var(--primary-red);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-title);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 900;
}

.hero-text {
    max-width: 600px;
    margin: 0 auto 30px auto;
    color: #ccc;
    font-size: 1.1rem;
}

/* --- SECCIONES GENERALES --- */
.section { padding: 80px 0; }
.bg-dark { background-color: var(--bg-dark); }
.bg-black { background-color: var(--bg-black); }

.section-title {
    font-family: var(--font-title);
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-transform: uppercase;
}
.section-subtitle { color: var(--text-gray); margin-bottom: 50px; }

/* Split Section (Nosotros) */
.split-section { display: flex; align-items: center; gap: 50px; }
.text-part, .image-part { flex: 1; }
.feature-list { list-style: none; margin-top: 20px; }
.feature-list li { margin-bottom: 15px; font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.img-box img { width: 100%; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

/* --- GRID DE PRODUCTOS --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--bg-card);
    border-radius: 15px; /* Más curvo estilo App */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(214, 40, 40, 0.15);
    border-color: var(--primary-red);
}

.product-img-container {
    height: 220px;
    overflow: hidden;
    position: relative;
    background: #111;
}

.product-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover img { transform: scale(1.08); }

.product-info { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }

.product-cat { font-size: 0.75rem; color: var(--primary-red); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.product-title { font-size: 1.3rem; margin: 8px 0; font-family: var(--font-title); }
.product-desc { color: var(--text-gray); font-size: 0.9rem; margin-bottom: 20px; }

.btn-card {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--text-gray);
    color: white;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 8px;
    font-weight: bold;
    margin-top: auto; /* Empuja el botón al fondo */
}

.btn-card:hover { background: var(--primary-red); border-color: var(--primary-red); color: white; }

/* --- FOOTER --- */
footer { background-color: black; padding: 40px 20px; border-top: 1px solid #222; text-align: center; color: #666; font-size: 0.9rem; }

/* --- ESTILOS DEL MAPA Y CONTACTO --- */
.map-container { margin-top: 60px; text-align: center; }
.map-title { font-family: var(--font-title); color: white; margin-bottom: 20px; letter-spacing: 1px; font-size: 1.5rem; font-weight: 700; }
.map-frame { border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); }

.contact-wrapper { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 30px; }
.contact-card { background-color: var(--bg-card); padding: 30px 20px; border-radius: 15px; border: 1px solid rgba(255, 255, 255, 0.05); width: 100%; max-width: 320px; text-align: center; }
.contact-icon { font-size: 2.5rem; color: var(--primary-red); margin-bottom: 15px; }
.contact-card h3 { margin-bottom: 10px; font-size: 1.2rem; font-family: var(--font-title); }
.contact-card a { color: var(--text-gray); text-decoration: none; font-weight: 600; }

.social-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 10px; }
.social-btn { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; background-color: #333; font-size: 1.3rem; }
.social-btn.fb:hover { background-color: #1877F2; }
.social-btn.ig:hover { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); }
.social-btn.wa:hover { background-color: #25D366; }

/* --- FORMULARIOS (Optimizados para evitar Zoom en iOS) --- */
input, select, textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #0a0a0a;
    border: 1px solid #333;
    color: white;
    border-radius: 8px;
    outline: none;
    font-family: var(--font-body);
    font-size: 16px !important; /* IMPORTANTE: Evita zoom en iPhone */
    appearance: none; /* Estilo nativo limpio */
}
input:focus, select:focus, textarea:focus { border-color: var(--primary-red); }

/* --- ESTILOS GLOBALES DEL SISTEMA (Admin/Cajero) --- */
body.dashboard-mode { padding-top: 80px; }
.page-header { margin-bottom: 2rem; border-bottom: 1px solid #333; padding-bottom: 1rem; }
.page-title { font-family: var(--font-title); color: var(--primary-red); text-transform: uppercase; font-size: 2rem; line-height: 1.2; }
.card-dark { background-color: var(--bg-card); border: 1px solid rgba(255,255,255,0.05); border-radius: 15px; padding: 20px; margin-bottom: 20px; }
.card-header-dark { border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 15px; padding-bottom: 10px; font-family: var(--font-title); font-size: 1.2rem; }

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-dark { width: 100%; border-collapse: collapse; min-width: 600px; }
.table-dark th { background-color: #111; color: var(--primary-red); padding: 15px; text-align: left; font-family: var(--font-title); border-bottom: 2px solid var(--primary-red); }
.table-dark td { padding: 15px; border-bottom: 1px solid #333; vertical-align: middle; }

.badge { padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; font-weight: bold; color: white; display: inline-block; }


/* =========================================
   📱 RESPONSIVE (MAGIA MOBILE FIRST)
   ========================================= */
@media (max-width: 768px) {
    /* Navbar */
    .navbar { height: 70px; padding: 0; }
    .logo-img { max-height: 45px; margin-left: 10px; }
    
    /* Menú Desplegable Estilo App */
    .nav-links {
        position: fixed;
        top: 70px;
        right: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 20px;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }
    
    .nav-links.active { transform: translateX(0%); }
    .hamburger { display: block; margin-right: 15px; }
    
    /* Enlaces del menú en celular (Grandes y tocables) */
    .nav-links li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .nav-links a { 
        display: block; 
        padding: 20px 10px; 
        font-size: 1.1rem; 
        text-align: left; 
    }
    .btn-nav { text-align: center; margin-top: 20px; font-size: 1.1rem; padding: 15px; }

    /* Tipografía Hero */
    .hero-title { font-size: 2.2rem; line-height: 1.2; margin-top: 10px; }
    .hero-subtitle { font-size: 0.85rem; letter-spacing: 2px; }
    .hero-text { font-size: 1rem; padding: 0 10px; }
    
    /* Botones Full Width en Móvil */
    .hero-btns { display: flex; flex-direction: column; gap: 15px; width: 100%; padding: 0 20px; }
    .btn { width: 100%; margin-left: 0 !important; }

    /* Secciones más compactas */
    .section { padding: 50px 0; }
    .section-title { font-size: 1.8rem; text-align: center; }
    .section-subtitle { text-align: center; margin-bottom: 30px; font-size: 0.95rem; }
    
    /* Nosotros */
    .split-section { flex-direction: column; gap: 30px; text-align: center; }
    .feature-list li { justify-content: center; font-size: 1rem; }
    
    /* Tarjetas de producto */
    .products-grid { grid-template-columns: 1fr; gap: 20px; }
    .product-img-container { height: 200px; }
    
    /* Contacto */
    .contact-wrapper { flex-direction: column; padding: 0 10px; }
    .contact-card { max-width: 100%; padding: 25px 15px; }

    /* Títulos Dashboards */
    .page-title { font-size: 1.5rem; }
}