/* ============================================
   ELECTRONICS STORE - ESTILOS OFICIALES
   Paleta de colores:
   Rojo Corporativo: #E00016
   Rojo Oscuro: #C90014
   Negro: #000000
   Gris Oscuro: #4A4A4A
   Gris Claro: #E5E5E5
   Blanco: #FFFFFF
   ============================================ */

:root {
    --red-primary: #E00016;
    --red-dark: #C90014;
    --black: #000000;
    --gray-dark: #4A4A4A;
    --gray-light: #E5E5E5;
    --white: #FFFFFF;
    
    /* Transiciones */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--black);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Tipografías especiales */
h1, h2, h3, .brand-font, .logo, .hero-title, .section-title {
    font-family: 'Anton', sans-serif;
    letter-spacing: 1px;
}

h4, h5, h6, .subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */

.top-bar {
    background-color: var(--black) !important;
    color: var(--white);
    font-size: 0.85rem;
}

.top-bar i {
    color: var(--red-primary);
    margin-right: 5px;
}

.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-family: 'Anton', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
}

.navbar-brand i {
    color: var(--red-primary);
    font-size: 2rem;
}

.navbar-brand strong {
    color: var(--black);
}

.navbar-brand span {
    color: var(--red-primary);
}

.nav-link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--black) !important;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--red-primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--red-primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.action-icon {
    color: var(--black);
    transition: var(--transition);
    position: relative;
}

.action-icon:hover {
    color: var(--red-primary);
    transform: scale(1.1);
}

.cart-badge {
    background-color: var(--red-primary) !important;
    font-size: 0.7rem;
    padding: 2px 6px;
}

.btn-outline-primary {
    border-color: var(--red-primary);
    color: var(--red-primary);
}

.btn-outline-primary:hover {
    background-color: var(--red-primary);
    border-color: var(--red-primary);
    color: var(--white);
}

.btn-primary {
    background-color: var(--red-primary);
    border-color: var(--red-primary);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--red-dark);
    border-color: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(224,0,22,0.3);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--black) 0%, var(--gray-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="2" fill="%23E00016" opacity="0.1"/></svg>') repeat;
    pointer-events: none;
}

.hero h1 {
    font-family: 'Anton', sans-serif;
    font-size: 4rem;
    letter-spacing: 2px;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: var(--gray-light);
    animation: fadeInUp 1s ease;
}

.hero .btn-primary {
    animation: fadeInUp 1.2s ease;
    padding: 12px 30px;
    font-size: 1.1rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   PRODUCTOS Y CARDS
   ============================================ */

.section-title {
    font-family: 'Anton', sans-serif;
    font-size: 2.5rem;
    color: var(--black);
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--red-primary);
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray-light);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(224,0,22,0.15);
    border-color: var(--red-primary);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--red-primary), transparent);
    transition: var(--transition);
}

.product-card:hover::before {
    left: 100%;
}

.product-card img {
    height: 220px;
    object-fit: contain;
    padding: 20px;
    transition: var(--transition);
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card .card-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--red-primary);
    font-family: 'Montserrat', sans-serif;
}

.price old {
    font-size: 0.9rem;
    color: var(--gray-dark);
    text-decoration: line-through;
    margin-left: 10px;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--red-primary);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
}

/* ============================================
   FILTROS Y CATEGORÍAS
   ============================================ */

.category-filter {
    background-color: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: 10px;
    padding: 20px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    font-weight: 600;
    color: var(--black);
    margin-bottom: 10px;
    display: block;
}

.filter-checkbox {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
}

.filter-checkbox input {
    margin-right: 10px;
    accent-color: var(--red-primary);
}

.price-slider {
    width: 100%;
    height: 4px;
    background: var(--gray-light);
    border-radius: 5px;
    outline: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--red-primary);
    border-radius: 50%;
    cursor: pointer;
}

/* ============================================
   CARRITO Y CHECKOUT
   ============================================ */

.cart-table {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
}

.cart-table thead {
    background-color: var(--black);
    color: var(--white);
}

.cart-table thead th {
    border: none;
    padding: 15px;
}

.cart-summary {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    border: 2px solid var(--gray-light);
}

.cart-summary h4 {
    border-bottom: 2px solid var(--red-primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: var(--black) !important;
    color: var(--white);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--red-primary), transparent);
}

.footer h5, .footer h6 {
    font-family: 'Anton', sans-serif;
    letter-spacing: 1px;
}

.footer a {
    color: var(--gray-light);
    transition: var(--transition);
}

.footer a:hover {
    color: var(--red-primary);
    transform: translateX(5px);
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--red-primary);
    transform: translateY(-3px);
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb-wrapper {
    background-color: var(--gray-light) !important;
}

.breadcrumb-item a {
    color: var(--gray-dark);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--red-primary);
}

.breadcrumb-item.active {
    color: var(--red-primary);
    font-weight: 600;
}

/* ============================================
   PAGINACIÓN
   ============================================ */

.pagination .page-link {
    color: var(--black);
    border-color: var(--gray-light);
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: var(--red-primary);
    border-color: var(--red-primary);
    color: var(--white);
}

.pagination .active .page-link {
    background-color: var(--red-primary);
    border-color: var(--red-primary);
    color: var(--white);
}

/* ============================================
   FORMULARIOS
   ============================================ */

.form-control:focus,
.form-select:focus {
    border-color: var(--red-primary);
    box-shadow: 0 0 0 0.2rem rgba(224,0,22,0.25);
}

/* ============================================
   BOTÓN VOLVER ARRIBA
   ============================================ */

#backToTop {
    background-color: var(--red-primary);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    cursor: pointer;
    transition: var(--transition);
    z-index: 99;
}

#backToTop:hover {
    background-color: var(--red-dark);
    transform: translateY(-3px);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .product-card img {
        height: 180px;
    }
    
    .cart-table {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .price {
        font-size: 1.2rem;
    }
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(224,0,22,0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(224,0,22,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(224,0,22,0);
    }
}

.btn-add-to-cart {
    animation: pulse 2s infinite;
}

/* ============================================
   WISHLIST ICON
   ============================================ */

.wishlist-icon {
    color: var(--gray-dark);
    transition: var(--transition);
}

.wishlist-icon:hover,
.wishlist-icon.active {
    color: var(--red-primary);
}

/* ============================================
   NOTIFICACIONES TOAST
   ============================================ */

.toast-notification {
    background: var(--white);
    border-left: 4px solid var(--red-primary);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.toast-notification.success i {
    color: var(--red-primary);
}

/* ============================================
   SCROLLBAR PERSONALIZADO
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--red-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red-dark);
}