:root {
    --bg-color: #0d0d0d;
    --surface-color: #1a1a1a;
    --accent-color: #ff4500;
    --text-main: #f4f4f4;
    --text-muted: #888888;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

#webgl-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 1; pointer-events: none;
}

.main-wrapper { position: relative; z-index: 2; width: 100%; }

h1 { font-family: 'Syncopate', sans-serif; font-size: 4.5rem; line-height: 1.1; letter-spacing: -2px; }
.highlight { color: transparent; -webkit-text-stroke: 2px var(--accent-color); text-shadow: 0 0 20px rgba(255, 69, 0, 0.4); }

.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.5rem 5%; background: rgba(13, 13, 13, 0.85); backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); position: fixed; width: 100%; z-index: 100; top: 0;
}

.logo { font-family: 'Syncopate', sans-serif; font-weight: 700; font-size: 1.5rem; position: relative; z-index: 102; }
.logo span { color: var(--accent-color); }
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a { color: var(--text-main); text-decoration: none; font-weight: 600; transition: color 0.3s; font-size: 1rem; }
.nav-links a:hover { color: var(--accent-color); }
.menu-toggle { display: none; }

.btn-primary, .btn-secondary {
    background: var(--accent-color); color: #fff; border: none; padding: 1rem 2rem;
    font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1rem;
    text-transform: uppercase; cursor: pointer; clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s; position: relative; z-index: 10; text-align: center;
}
.btn-secondary { background: transparent; border: 2px solid var(--accent-color); color: var(--accent-color); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(255, 69, 0, 0.3); }
.btn-secondary:hover { background: rgba(255, 69, 0, 0.1); }

.hero { min-height: 100vh; display: flex; align-items: center; padding: 0 5%; position: relative; }
.hero-content { flex: 1; z-index: 2; }
.hero-content p { color: var(--text-muted); font-size: 1.2rem; max-width: 400px; margin: 1.5rem 0 2.5rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { flex: 1; position: relative; display: flex; justify-content: center; align-items: center; }
.motorcycle-mockup { width: 100%; height: 450px; background: url('moto-placeholder.png') no-repeat center center; background-size: contain; }
.glow-ring {
    position: absolute; width: 80%; height: 80%; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,69,0,0.15) 0%, rgba(13,13,13,0) 70%);
    animation: pulse 4s infinite alternate; pointer-events: none;
}
@keyframes pulse { 0% { transform: scale(0.9); opacity: 0.5; } 100% { transform: scale(1.1); opacity: 1; } }

.interactive-catalog { padding: 6rem 5%; position: relative; }
.sub-page-catalog { padding-top: 10rem; min-height: 80vh; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-family: 'Syncopate', sans-serif; font-size: 3rem; margin-bottom: 1rem; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; }
.catalog-container { display: flex; flex-direction: column; align-items: center; gap: 4rem; width: 100%; }

/* Contenedor 3D */
.moto-map-3d {
    position: relative; width: 100%; max-width: 1000px; height: 500px;
    background: radial-gradient(circle, rgba(26,26,26,0.8) 0%, rgba(13,13,13,0.2) 100%);
    border-radius: 20px; border: 1px solid rgba(255, 69, 0, 0.2);
    margin: 0 auto; overflow: hidden; cursor: grab;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
}
.moto-map-3d:active { cursor: grabbing; }
#loading-3d {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: var(--accent-color); font-family: 'Syncopate', sans-serif; font-size: 1.2rem;
    animation: blink 1.5s infinite; pointer-events: none;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.results-area { width: 100%; max-width: 1200px; }
#category-title { margin-bottom: 2rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; text-align: center; font-size: 1.2rem; }
.parts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; width: 100%; }

.part-card {
    background: rgba(26, 26, 26, 0.8); backdrop-filter: blur(5px); padding: 1.5rem;
    border-radius: 12px; border: 1px solid rgba(255, 69, 0, 0.05); transition: all 0.3s ease;
    cursor: pointer; display: flex; flex-direction: column;
}
.part-card:hover { transform: translateY(-5px); border-color: var(--accent-color); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.part-card h4 { margin: 1rem 0 0.5rem; font-size: 1.2rem; line-height: 1.4; }
.part-card .price { color: var(--accent-color); font-weight: bold; font-size: 1.3rem; margin-top: auto; }

.main-footer { background-color: var(--surface-color); padding: 4rem 5% 2rem; margin-top: 4rem; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3rem; max-width: 1200px; margin: 0 auto; }
.footer-brand, .footer-links, .footer-contact { flex: 1; min-width: 250px; }
.footer-brand p { color: var(--text-muted); margin-top: 1rem; font-size: 0.95rem; line-height: 1.5; }
.footer-links h4, .footer-contact h4 { text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 1.5rem; font-size: 0.9rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: var(--text-main); text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: var(--accent-color); }
.footer-contact p { color: var(--text-main); margin-bottom: 0.8rem; font-size: 0.95rem; }
.footer-bottom { text-align: center; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.05); color: var(--text-muted); font-size: 0.85rem; }

@media screen and (max-width: 992px) {
    h1 { font-size: 3.5rem; }
    .hero { flex-direction: column; text-align: center; padding-top: 120px; justify-content: flex-start; }
    .hero-content { display: flex; flex-direction: column; align-items: center; margin-bottom: 2rem; }
    .hero-actions { justify-content: center; }
    .moto-map-3d { height: 400px; }
}
@media screen and (max-width: 768px) {
    h1 { font-size: 2.5rem; letter-spacing: -1px; }
    .section-header h2 { font-size: 2rem; }
    .menu-toggle { display: flex; flex-direction: column; cursor: pointer; gap: 6px; z-index: 110; }
    .menu-toggle .bar { width: 30px; height: 3px; background-color: var(--accent-color); transition: all 0.3s ease; border-radius: 3px; }
    .nav-links {
        position: fixed; top: 0; right: -100%; height: 100vh; width: 85%;
        background: rgba(26, 26, 26, 0.98); flex-direction: column; justify-content: center; align-items: center;
        transition: right 0.4s cubic-bezier(0.1, 0.8, 0.2, 1); box-shadow: -10px 0 30px rgba(0,0,0,0.8); z-index: 105;
    }
    .nav-links.active { right: 0; }
    .nav-links li { margin: 1.5rem 0; }
    .nav-links a { font-size: 1.5rem; }
    .desktop-btn { display: none; }
    .mobile-only-btn { display: inline-block !important; width: 100%; }
    .hero-content p { font-size: 1rem; margin: 1rem 0 2rem; padding: 0 1rem; }
    .motorcycle-mockup { height: 300px; }
    .sub-page-catalog { padding-top: 8rem; }
    .moto-map-3d { height: 350px; border-radius: 12px; }
    .parts-grid { grid-template-columns: 1fr; gap: 1.5rem; padding: 0 1rem; }
    .part-card { padding: 1.2rem; flex-direction: row; align-items: center; gap: 1rem; text-align: left; }
    .part-card > div { width: 80px; height: 80px !important; margin-bottom: 0 !important; flex-shrink: 0; }
    .part-card h4 { margin: 0; font-size: 1.1rem; }
    .part-card .price { margin-top: 0.5rem; font-size: 1.1rem; }
    .footer-content { flex-direction: column; text-align: center; gap: 2rem; }
}
@media screen and (max-width: 480px) {
    h1 { font-size: 2rem; }
    .moto-map-3d { height: 280px; }
    .part-card { flex-direction: column; text-align: center; }
    .part-card > div { width: 100%; height: 120px !important; margin-bottom: 1rem !important; }
}

/* =========================================
   ESTILOS PARA BUSCADOR Y MEJORAS 3D
   ========================================= */

/* Contenedor 3D Premium */
.premium-3d {
    background: radial-gradient(circle, rgba(20,20,20,1) 0%, rgba(5,5,5,1) 100%);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 0 100px rgba(255,69,0,0.05);
    border: 1px solid rgba(255, 69, 0, 0.1);
}

#loading-3d {
    color: var(--text-main);
    letter-spacing: 2px;
    font-size: 0.9rem;
    background: rgba(255,69,0,0.2);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid var(--accent-color);
}

/* Layout de la página Buscar */
.search-page {
    padding: 8rem 5% 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.search-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.filters-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: rgba(26, 26, 26, 0.6);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h3 {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s;
}

.filter-group label:hover {
    color: var(--accent-color);
}

.filter-group input[type="checkbox"] {
    accent-color: var(--accent-color);
    width: 16px;
    height: 16px;
}

.search-results {
    flex: 1;
}

/* Responsive Buscador */
@media screen and (max-width: 900px) {
    .search-layout {
        flex-direction: column;
    }
    .filters-sidebar {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .filter-group { margin-bottom: 1rem; }
}

@media screen and (max-width: 600px) {
    .filters-sidebar { grid-template-columns: 1fr; }
}