/* =========================================
   1. BASE Y CONFIGURACIÓN GLOBAL
   ========================================= */
:root {
    --bg-body: #FAFAFA;
    --color-primary: #1E293B; /* Azul oscuro serio (Confianza) */
    --color-accent: #F97316;  /* Naranja industrial (Cartón/Energía) */
    --color-text: #475569;    /* Gris para texto */
    --color-whatsapp: #25D366;
    --radius: 8px;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.1);
    --transition: 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Roboto', sans-serif;
    color: var(--color-text);
    background: var(--bg-body);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
button { font-family: inherit; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* NAVBAR COMPARTIDO */
.header-bg { background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: fixed; top: 0; width: 100%; height: 70px; display: flex; align-items: center; z-index: 1000; }
.navbar { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 1.4rem; font-weight: 900; color: var(--color-primary); letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { font-weight: 500; color: var(--color-primary); font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--color-accent); }
.btn-nav-accent { background: var(--color-primary); color: white !important; padding: 8px 18px; border-radius: 6px; font-size: 0.9rem; }
.btn-nav-accent:hover { background: var(--color-accent); }
.header-spacer { height: 70px; }

/* =========================================
   2. ESTILOS DE SECCIONES GENERALES
   ========================================= */
.section-padding { padding: 90px 0; }
.bg-white { background: white; }
.section-title { text-align: center; font-size: 2.4rem; color: var(--color-primary); margin-bottom: 60px; font-weight: 800; }
.section-title-left { font-size: 2.4rem; color: var(--color-primary); margin-bottom: 25px; line-height: 1.2; font-weight: 800; }

.hero-section {
    position: relative; height: 85vh; min-height: 500px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    background-size: cover; background-position: center;
}
.hero-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(rgba(15,23,42,0.85), rgba(15,23,42,0.75)); }
.hero-content { position: relative; z-index: 2; color: white; max-width: 700px; }
.badge-hero { background: rgba(249, 115, 22, 0.2); border: 1px solid var(--color-accent); color: var(--color-accent); padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 20px; display: inline-block; }
.hero-content h1 { font-size: 3rem; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero-content p { font-size: 1.1rem; margin-bottom: 30px; opacity: 0.9; }
.text-accent { color: var(--color-accent); }

.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.btn { padding: 12px 25px; border-radius: 6px; font-weight: bold; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: 0.3s; }
.btn-primary { background: var(--color-accent); color: white; border: none; }
.btn-primary:hover { background: #ea580c; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(234, 88, 12, 0.3); }
.btn-whatsapp { background: #25D366; color: white; border: none; }
.btn-whatsapp:hover { background: #20bd5a; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3); }

/* Valores y Tarjetas */
.values-bar { background: white; padding: 50px 0; border-bottom: 1px solid #eee; }
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; text-align: center; }
.value-item i { font-size: 2.2rem; color: var(--color-accent); margin-bottom: 20px; }
.value-item h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--color-primary); font-weight: 700; }

.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 35px; }
.cat-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: 0.4s ease; border: 1px solid transparent; }
.cat-card:hover { transform: translateY(-10px); border-color: var(--color-accent); box-shadow: var(--shadow-hover); }
.cat-img { height: 220px; overflow: hidden; position: relative; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.cat-card:hover .cat-img img { transform: scale(1.08); }
.cat-content { padding: 30px; }
.cat-content h3 { font-size: 1.4rem; margin-bottom: 12px; color: var(--color-primary); font-weight: 700; }
.btn-text { color: var(--color-accent); font-weight: 700; font-size: 0.95rem; display: inline-flex; align-items: center; }

/* About Split (Para Inicio y Nosotros) */
.about-split { display: flex; align-items: center; gap: 60px; }
.about-text { flex: 1; }
.about-img { flex: 1; position: relative; height: 400px; }
.about-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.img-caption { position: absolute; bottom: 25px; right: -25px; background: white; padding: 12px 25px; border-radius: 6px; font-weight: 700; color: var(--color-primary); box-shadow: var(--shadow-hover); border-left: 5px solid var(--color-accent); }
.kicker { color: var(--color-accent); font-weight: 700; font-size: 0.85rem; letter-spacing: 1.5px; text-transform: uppercase; display: block; margin-bottom: 15px; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; color: var(--color-accent); font-weight: 700; margin-top: 25px; border-bottom: 2px solid transparent; transition: 0.3s; }
.link-arrow:hover { gap: 15px; border-color: var(--color-accent); }

/* CTA Final */
.cta-section { background: var(--color-primary); color: white; padding: 80px 0; text-align: center; border-radius: 0; }
.cta-section h2 { margin-bottom: 15px; font-size: 2.2rem; font-weight: 800; }
.btn-whatsapp-lg { background: #25D366; color: white; font-size: 1.1rem; padding: 15px 35px; margin-top: 35px; display: inline-flex; border-radius: 50px; transition: 0.3s; }
.btn-whatsapp-lg:hover { background: #20bd5a; transform: translateY(-3px); box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4); }

/* Footer */
footer { background: #0f172a; color: #94a3b8; padding: 60px 0 25px 0; font-size: 0.95rem; margin-top: auto; }
.footer-content { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid #1e293b; padding-bottom: 40px; margin-bottom: 25px; flex-wrap: wrap; gap: 30px; }
.footer-col h3 { color: white; margin-bottom: 15px; font-size: 1.2rem; }
.copyright { text-align: center; font-size: 0.85rem; opacity: 0.7; }

/* =========================================
   3. ESTILOS DE CATÁLOGO
   ========================================= */
.filter-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; background: white; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.search-wrapper { position: relative; flex: 1; min-width: 250px; }
.search-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #999; }
.search-input { width: 100%; padding: 12px 15px 12px 40px; border: 1px solid #eee; border-radius: 50px; outline: none; transition: 0.3s; background: #f9f9f9; }
.search-input:focus { border-color: var(--color-accent); background: white; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1); }
.filter-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-btn { background: #f1f5f9; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; color: var(--color-text); font-weight: 500; transition: 0.2s; }
.filter-btn:hover, .filter-btn.active { background: var(--color-primary); color: white; }

.catalog-wrapper { display: flex; gap: 30px; align-items: flex-start; }
.products-column { flex: 3; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; width: 100%; }
.cart-column { flex: 1; min-width: 300px; position: sticky; top: 90px; }

/* Tarjetas de Producto */
.product-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: 0.3s; border: 1px solid transparent; display: flex; flex-direction: column; animation: fadeInUp 0.5s ease forwards; opacity: 0; }
.product-card:hover { transform: translateY(-5px); border-color: var(--color-accent); box-shadow: var(--shadow-hover); }
.card-image-wrapper { height: 200px; background: #f1f5f9; position: relative; overflow: hidden; cursor: pointer; }
.card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.product-card:hover img { transform: scale(1.1); }
.overlay-btn { position: absolute; bottom: -40px; left: 0; width: 100%; background: rgba(30, 41, 59, 0.9); color: white; padding: 8px; text-align: center; font-size: 0.8rem; font-weight: bold; transition: 0.3s; }
.product-card:hover .overlay-btn { bottom: 0; }

.product-info { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; }
.category-tag { font-size: 0.7rem; text-transform: uppercase; color: #94a3b8; font-weight: bold; letter-spacing: 1px; margin-bottom: 5px; }
.product-info h4 { font-size: 1.1rem; color: var(--color-primary); margin-bottom: 10px; line-height: 1.3; flex-grow: 1; }
.price { font-size: 1.2rem; font-weight: 800; color: var(--color-accent); margin-bottom: 0; display: inline-block; }
.btn-add-mini { float: right; background: #f1f5f9; width: 35px; height: 35px; border-radius: 50%; border: none; cursor: pointer; color: var(--color-primary); transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.btn-add-mini:hover { background: var(--color-accent); color: white; }

/* Carrito */
.sticky-cart { background: white; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #f1f5f9; overflow: hidden; }
.cart-header { background: var(--color-primary); color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.cart-items-box { padding: 0 20px; max-height: 350px; overflow-y: auto; background: #f8fafc; }
.cart-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #e2e8f0; font-size: 0.9rem; align-items: center; }
.cart-item-info b { display: block; color: var(--color-primary); font-size: 0.95rem; }
.cart-item-total { font-weight: bold; color: var(--color-accent); }
.empty-cart-state { text-align: center; padding: 40px 20px; color: #cbd5e1; }
.empty-cart-state i { font-size: 3rem; margin-bottom: 10px; }
.cart-footer { padding: 20px; background: white; border-top: 1px solid #eee; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 800; color: var(--color-primary); margin-bottom: 15px; }
.full-width { width: 100%; border-radius: 8px; justify-content: center; }

/* Admin Panel */
.admin-panel { background: white; border: 2px dashed #cbd5e1; padding: 30px; border-radius: var(--radius); margin-bottom: 40px; display: none; }
.admin-panel.active { display: block; animation: fadeInUp 0.5s; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.9rem; font-weight: bold; color: var(--color-primary); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #e2e8f0; border-radius: 6px; outline: none; font-family: inherit; }
.form-group input:focus { border-color: var(--color-accent); }
.btn-admin { background: var(--color-primary); color: white; border: none; padding: 12px 20px; border-radius: 6px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.btn-admin:hover { background: #334155; }

/* Modales (General) */
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.8); z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.3s; backdrop-filter: blur(5px); }
.modal-backdrop.active { opacity: 1; pointer-events: all; }
.modal-content { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-hover); transform: translateY(30px); transition: 0.3s; position: relative; }
.modal-backdrop.active .modal-content { transform: translateY(0); }
.product-content { width: 90%; max-width: 800px; display: flex; min-height: 400px; }
.modal-img { flex: 1; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.modal-img img { max-width: 100%; max-height: 400px; object-fit: contain; }
.modal-details { flex: 1; padding: 40px; display: flex; flex-direction: column; }
.modal-price { font-size: 2rem; color: var(--color-accent); font-weight: 800; margin: 10px 0 20px 0; }
.btn-add-modal { background: var(--color-primary); color: white; border: none; padding: 15px 30px; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 1rem; width: 100%; margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 10px; transition: 0.3s; }
.btn-add-modal:hover { background: var(--color-accent); }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 2rem; cursor: pointer; z-index: 10; color: #94a3b8; }
.login-content { width: 90%; max-width: 400px; padding: 40px; }

/* Utilidades de Animación y Extras */
.skeleton-card { background: white; border-radius: var(--radius); overflow: hidden; height: 320px; border: 1px solid #eee; }
.skeleton { background: #e2e8f0; position: relative; overflow: hidden; }
.skeleton::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent); transform: translateX(-100%); animation: shimmer 1.5s infinite; }
.sk-img { height: 200px; width: 100%; }
.sk-txt { height: 20px; width: 80%; margin: 15px; border-radius: 4px; }
.sk-price { height: 25px; width: 40%; margin: 0 15px; border-radius: 4px; }
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--color-primary); color: white; padding: 12px 20px; border-radius: 6px; box-shadow: var(--shadow-hover); display: flex; align-items: center; gap: 10px; animation: slideInRight 0.3s ease; border-left: 4px solid var(--color-accent); }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes shake { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(5deg); } 75% { transform: rotate(-5deg); } }
.shake { animation: shake 0.4s ease; }
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; } .delay-2 { transition-delay: 0.3s; } .delay-3 { transition-delay: 0.45s; }

/* =========================================
   4. ESTILOS ESPECÍFICOS PARA LA MODAL DE LOGIN (MEJORADO Y CORREGIDO)
   ========================================= */

/* Estilos de la Modal de Login */
.login-content {
    width: 90%;
    max-width: 400px;
    padding: 40px;
    text-align: center;
}

/* Estilo del icono (fas fa-user-shield) */
.login-content .fas.fa-3x {
    color: var(--color-primary);
    font-size: 3.5rem;
    margin-bottom: 15px;
}

/* Título 'Acceso Taller' */
.login-content h2 {
    color: var(--color-primary);
    font-weight: 800;
    margin-top: 10px;
    margin-bottom: 25px;
}

/* Estilo para los campos de entrada de Usuario y Contraseña (ALTA ESPECIFICIDAD) */
.login-content .input-modern { 
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-primary);
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.login-content .input-modern:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

/* Botón 'ENTRAR' */
.login-content .btn-admin {
    width: 100%;
    padding: 12px 20px;
    margin-top: 5px;
    background: var(--color-primary);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.login-content .btn-admin:hover {
    background: #334155;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 900px) {
    .catalog-wrapper { flex-direction: column; }
    .cart-column { width: 100%; position: relative; top: 0; margin-bottom: 40px; order: -1; }
    .sticky-cart { max-height: none; }
    .cart-items-box { max-height: 200px; }
    .product-content { flex-direction: column; overflow-y: auto; max-height: 90vh; }
    .modal-img { height: 250px; }
    .form-grid { grid-template-columns: 1fr; }
    .about-split { flex-direction: column; }
    .about-img { width: 100%; height: 300px; }
    .hero-content h1 { font-size: 2.2rem; }
    .footer-content { flex-direction: column; }
    .img-caption { right: 20px; bottom: -20px; left: 20px; }
}