/* 
    DomoTechStore - CSS MAESTRO DARK PREMIUM 2026
*/

/* VARIABLES GLOBALES */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --light-text: #f8fafc;
    --muted-text: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--light-text);
    background-color: var(--dark-bg);
    line-height: 1.5;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: var(--transition); }

/* HEADER */
.main-header {
    background: #0f172a;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}
.header-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.logo img { 
    width: 240px; 
    height: auto; 
    display: block; 
}

/* NAVEGACIÓN */
.main-nav { 
    display: flex; 
    align-items: center;
}
.nav-list { 
    display: flex; 
    list-style: none !important; 
    gap: 15px; 
    margin: 0;
    padding: 0;
}
.nav-list li { 
    list-style: none !important;
    margin: 0;
    padding: 0;
}
.nav-list a { 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: var(--light-text); 
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
}
.nav-list a:hover { color: var(--primary); background: rgba(59, 130, 246, 0.1); }

/* DROPDOWNS */
.has-dropdown { position: relative; }
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #1e293b;
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 200px;
    padding: 10px 0;
    list-style: none !important;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1001;
}
.has-dropdown:hover .dropdown { 
    opacity: 1; 
    visibility: visible; 
    transform: translateX(-50%) translateY(5px);
}
.dropdown li { list-style: none !important; }
.dropdown li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.85rem;
    white-space: nowrap;
}
.dropdown li a:hover { background: rgba(59, 130, 246, 0.1); }

/* BOTÓN PRIMARIO NAV */
.nav-btn-primary {
    background: var(--primary) !important;
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 50px !important;
}
.nav-btn-primary:hover { background: var(--primary-dark) !important; transform: scale(1.05); }

/* MOBILE TOGGLE */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* RESPONSIVE HEADER */
@media (max-width: 1024px) {
    .menu-toggle { display: block; }
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--dark-bg);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border);
        gap: 15px;
    }
    .nav-list.active { display: flex; }
    .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding-left: 20px; }
}

/* SECCIONES Y GRID */
.section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.2rem; font-weight: 800; margin-bottom: 50px; }
.bg-dark-alt { background-color: #111827; }

.grid { display: grid; gap: 30px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* CARDS */
.card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
}
.card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: var(--shadow); }

/* PRODUCT IMAGES */
.product-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 15px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image-container img { width: 100%; height: 100%; object-fit: contain; }

.card h3 { font-size: 1rem; height: 2.5em; overflow: hidden; margin-bottom: 10px; line-height: 1.3; }
.product-desc { font-size: 0.85rem; height: 3em; overflow: hidden; color: var(--muted-text); margin-bottom: 15px; }

/* BADGES & BUTTONS */
.badge, .urgency-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #ff4747;
    color: white;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-bottom: 10px;
}

/* ETIQUETAS DE VALOR (SMART TAGS) */
.badge-price { background: #22c55e !important; color: white !important; } /* Verde para Mejor Precio */
.badge-value { background: #3b82f6 !important; color: white !important; } /* Azul para Calidad-Precio */
.badge-recommended { background: #facc15 !important; color: #0f172a !important; } /* Dorado para Recomendado/Ventas */

.btn-aliexpress {
    display: block;
    width: 100%;
    padding: 12px;
    background: #ff4747;
    color: white;
    text-align: center;
    border-radius: 12px;
    font-weight: 700;
    margin-top: auto;
}
.btn-link { color: var(--primary); font-weight: 700; margin-top: 15px; display: inline-block; }

/* PRECIOS */
.price-container { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.current-price { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.old-price { text-decoration: line-through; opacity: 0.5; font-size: 0.9rem; }

/* ANIMACIONES */
@keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 0.8; } 100% { opacity: 0.5; } }
.skeleton-card { overflow: hidden; }

/* HERO */
.hero { background: radial-gradient(circle at top, #1e3a8a 0%, #0f172a 80%); padding: 100px 0; text-align: center; }
.search-hero input { width: 100%; max-width: 600px; padding: 18px 30px; border-radius: 50px; background: rgba(255,255,255,0.05); color: white; border: 1px solid var(--border); outline: none; }

/* TOP SALES GRID */
.top-sales-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.top-sales-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 15px !important;
}

.cat-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* RESPONSIVE */
@media (max-width: 1024px) { 
    .grid-4 { grid-template-columns: repeat(2, 1fr); } 
    .top-sales-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) { 
    .grid-4, .grid-3, .grid-2, .top-sales-grid { grid-template-columns: 1fr; } 
    .logo img { width: 200px; } 
}
