/* --- CONFIGURACIÓN BASE --- */
:root { 
    --bg: #0a0a0a; 
    --card-bg: rgba(255, 255, 255, 0.05); 
    --text: #fff; 
    --text-muted: #aaa; /* Un poco más claro para mejor lectura con la nueva fuente */
    --accent: #00f2ff; 
    --accent-glow: rgba(0, 242, 255, 0.3); 
    
    /* --- CAMBIO DE TIPOGRAFÍA AQUÍ --- */
    --font-head: 'Oswald', sans-serif; /* Fuente fuerte e industrial */
    --font-body: 'Montserrat', sans-serif; /* Fuente moderna y limpia */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); overflow-x: hidden; display: flex; flex-direction: column; min-height: 100vh; }

/* Loader */
#loader { position: fixed; inset: 0; background: #000; z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s; }
.loader-content { text-align: center; animation: pulse 1.5s infinite; color: var(--accent); }

/* Nav */
.glass-nav { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 1000px; background: rgba(30,30,30,0.6); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.1); border-radius: 50px; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; z-index: 100; }
.logo span { color: var(--accent); font-weight: 700; letter-spacing: 1px; } 
.nav-items { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; } 
.filter-btn { background: transparent; border: none; color: var(--text-muted); padding: 6px 12px; border-radius: 20px; cursor: pointer; transition: 0.3s; font-size: 0.85rem; white-space: nowrap; font-family: var(--font-body); font-weight: 600; }
.filter-btn.active, .filter-btn:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.nav-actions i { margin-left: 15px; cursor: pointer; color: white; transition: 0.3s; font-size: 1.1rem; } .nav-actions i:hover { color: var(--accent); }

/* Hero */
.hero { height: 50vh; min-height: 350px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%); margin-top: 80px; padding: 0 20px; }
.hero h1 { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 2px; font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1; margin-bottom: 20px; animation: fadeUp 1s 0.5s forwards; opacity: 0; } .hero em { color: var(--accent); font-style: normal; }
.hero p { font-weight: 300; letter-spacing: 0.5px; opacity: 0.8; }

/* Gallery */
.gallery-container { max-width: 1200px; margin: 0 auto; padding: 40px 20px; flex: 1; width: 100%; }
.stats-bar { display: flex; gap: 40px; margin-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; flex-wrap: wrap; justify-content: center; }
.stat { text-align: center; } .stat span { font-size: 1.5rem; font-weight: 700; color: var(--accent); display: block; font-family: var(--font-head); letter-spacing: 1px; } .stat label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; letter-spacing: 1px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* Card */
.card { background: var(--card-bg); border-radius: 15px; border: 1px solid rgba(255,255,255,0.05); overflow: hidden; height: 320px; display: flex; flex-direction: column; position: relative; cursor: pointer; opacity: 0; animation: fadeUp 0.5s ease forwards; transition: transform 0.1s; transform-style: preserve-3d; }
.card:hover { border-color: var(--accent-glow); box-shadow: 0 20px 40px rgba(0,0,0,0.6); }
.card-img-container { height: 65%; position: relative; overflow: hidden; background: #000; } 
.card-img-container img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; } .card:hover img { transform: scale(1.1); }
.card-content { padding: 15px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(to top, #111, transparent); }
.card-cat { color: var(--accent); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; } .card-title { font-size: 1.2rem; font-weight: 400; font-family: var(--font-head); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.card-brand { font-size: 0.8rem; color: var(--text-muted); display: flex; justify-content: space-between; margin-top: auto; font-weight: 500; }
.shine { position: absolute; inset: 0; pointer-events: none; }

/* Footer */
footer { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 60px; padding: 30px 20px; text-align: center; color: var(--text-muted); font-size: 0.85rem; background: #050505; }
footer a { color: var(--accent); text-decoration: none; transition: 0.3s; } footer a:hover { text-shadow: 0 0 10px var(--accent); }

/* --- MODALES Y GALERÍA DOBLE --- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.4s; backdrop-filter: blur(5px); padding: 20px; } 
.modal-backdrop.active { opacity: 1; pointer-events: all; }

.detail-window { width: 100%; max-width: 900px; height: 85vh; background: #111; display: flex; border-radius: 20px; overflow: hidden; transform: translateY(50px); transition: 0.4s; flex-direction: row; } 
.modal-backdrop.active .detail-window { transform: translateY(0); }

/* NUEVO: Galería de Fotos en Modal */
.detail-gallery { 
    flex: 1.5; background: #000; 
    display: flex; flex-direction: column; 
    overflow-y: auto; /* Scroll vertical si son muchas en desktop */
    scroll-snap-type: y mandatory;
}
.detail-gallery img { 
    width: 100%; height: auto; min-height: 50%; object-fit: contain; 
    display: block; scroll-snap-align: start; border-bottom: 1px solid #222;
}

.detail-content { flex: 1; padding: 30px; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid #222; overflow-y: auto; }
.d-badge { color: var(--accent); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; margin-bottom: 10px; display: block; letter-spacing: 1px; }
.detail-content h2 { font-family: var(--font-head); font-size: 2.5rem; line-height: 1; margin-bottom: 15px; text-transform: uppercase; }
.d-meta { color: var(--text-muted); margin-bottom: 20px; display: flex; gap: 15px; flex-wrap: wrap; font-size: 0.9rem; } .d-meta i { color: var(--accent); margin-right: 5px; }

/* Admin Responsive */
.glass-panel { background: #111; padding: 30px; width: 100%; max-width: 500px; border-radius: 12px; border: 1px solid #333; box-shadow: 0 10px 40px rgba(0,0,0,0.8); max-height: 90vh; overflow-y: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
input, select, textarea { width: 100%; padding: 12px; background: #222; border: 1px solid #333; color: white; margin-bottom: 15px; border-radius: 6px; outline: none; transition: border-color 0.3s; font-family: var(--font-body); } input:focus, select:focus { border-color: var(--accent); }
.btn-neon { background: var(--accent); color: #000; border: none; padding: 14px; font-weight: 800; text-transform: uppercase; cursor: pointer; transition: 0.3s; width: 100%; border-radius: 6px; margin-top: 10px; font-family: var(--font-head); letter-spacing: 1px; font-size: 1.1rem; } .btn-neon.delete { background: #dc2626; color: white; }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid #333; margin-bottom: 20px; }
.tab-btn { flex: 1; background: none; border: none; color: #666; padding: 12px; cursor: pointer; font-weight: bold; transition: 0.3s; font-family: var(--font-body); }
.tab-btn.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.tab-content { display: none; } .tab-content.active { display: block; }
.cat-list { list-style: none; margin-top: 10px; max-height: 200px; overflow-y: auto; border: 1px solid #222; border-radius: 4px; padding: 5px; }
.cat-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: #1a1a1a; margin-bottom: 5px; border-radius: 4px; }
.cat-actions i { cursor: pointer; margin-left: 12px; color: #666; transition: 0.2s; } .cat-actions i:hover { color: white; } .cat-actions .fa-trash:hover { color: #dc2626; }
.file-upload { border: 1px dashed #444; padding: 20px; text-align: center; margin-bottom: 5px; cursor: pointer; border-radius: 6px; color: #aaa; transition: 0.3s; } .file-upload:hover { border-color: var(--accent); color: white; }
.btn-small { background: var(--accent); border:none; color:black; width:40px; height:40px; border-radius:4px; cursor:pointer; display: grid; place-items: center;}
.search-overlay { position: fixed; inset: 0; background: #000; z-index: 2500; height: 0; overflow: hidden; transition: 0.4s; display: flex; align-items: center; justify-content: center; } .search-overlay.open { height: 100%; }
#search-input { background: transparent; border: none; border-bottom: 2px solid var(--text-muted); font-size: clamp(1.5rem, 5vw, 3rem); color: white; width: 80%; padding: 10px; font-family: var(--font-head); text-align: center; text-transform: uppercase; }
.close-modal, .close-detail, #close-search { position: absolute; top: 20px; right: 20px; font-size: 1.8rem; cursor: pointer; color: white; z-index: 10; transition: 0.3s; }
.btn-text { background: none; border: none; color: #666; width: 100%; margin-top: 15px; cursor: pointer; font-size: 0.9rem;}
.tiny-text { font-size: 0.75rem; color: #555; margin-top: 10px; font-style: italic; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

@media (max-width: 768px) {
    .glass-nav { width: 95%; top: 10px; padding: 10px 15px; }
    .nav-items { display: none; }
    .hero { margin-top: 60px; height: auto; padding: 60px 20px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
    .card { height: 260px; }
    .detail-window { flex-direction: column; height: 90vh; overflow-y: auto; }
    
    /* Galería en móvil: Slider Horizontal */
    .detail-gallery { 
        height: 300px; flex: none; width: 100%; 
        flex-direction: row; overflow-x: auto; overflow-y: hidden; 
        scroll-snap-type: x mandatory; 
    }
    .detail-gallery img { 
        width: 100%; height: 100%; min-width: 100%; 
        object-fit: cover; border-right: 1px solid #333; border-bottom: none;
    }

    .detail-content { padding: 20px; border-left: none; border-top: 1px solid #333; }
    .grid-2 { grid-template-columns: 1fr; gap: 0; }
    .glass-panel { padding: 20px; }
}