/* Diseño moderno para CodigoAmigo.com - Basado en mockup */
/* Esquema de colores: Gris oscuro y naranja */

:root {
    --primary-orange: #FF6B35;
    --dark-gray: #2C2C2C;
    --light-gray: #404040;
    --text-white: #FFFFFF;
    --text-gray: #CCCCCC;
    --gradient-bg: linear-gradient(135deg, #2C2C2C 0%, #404040 50%, #FF6B35 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-gray);
    color: var(--text-white);
    line-height: 1.6;
    font-size: 18px;
}

/* HEADER */
.header-modern {
    background-color: var(--dark-gray);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 80px;
}

.header-container {
    max-width: 1200px;
    margin: 0;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-section {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, opacity 0.3s ease;
    align-items: flex-start;
    justify-content: center;
}

.logo-section:hover {
    text-decoration: none;
    color: inherit;
    transform: scale(1.05);
    opacity: 0.9;
}

.logo-text {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.logo-codigo {
    color: var(--text-white);
}

.logo-amigo {
    color: var(--primary-orange);
}

.logo-tagline {
    font-size: 0.8rem;
    color: var(--text-gray);
    font-style: italic;
    line-height: 1.2;
    margin-top: 0.25rem;
}

.nav-modern {
    display: flex;
    gap: 0 rem;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: 0 0;
}

.nav-link {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.8rem;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-orange);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-orange);
}

/* Dropdown moderno */
.dropdown-modern {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none !important;
    border: none;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.dropdown-toggle:hover {
    color: var(--primary-orange);
}

.dropdown-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown-modern:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu-modern {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dark-gray);
    border: 1px solid #555;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    min-width: 250px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-modern:hover .dropdown-menu-modern {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #444;
}

.dropdown-item-modern:last-child {
    border-bottom: none;
}

.dropdown-item-modern:hover {
    background-color: var(--primary-orange);
    color: var(--text-white);
}

.dropdown-item-modern img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
}

.dropdown-item-modern i {
    width: 20px;
    text-align: center;
    color: var(--primary-orange);
}

.dropdown-item-modern:hover i {
    color: var(--text-white);
}

.dropdown-item-modern span {
    flex: 1;
}

/* Estilos para página de listado de marca */
.brand-page-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--dark-gray);
}

.brand-sidebar {
    width: 280px;
    background-color: #2A2A2A;
    padding: 2rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand-main-content {
    flex: 1;
    padding: 2rem;
    background-color: var(--dark-gray);
}

.brand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #444;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-white);
    margin: 0;
}

.brand-subtitle {
    font-size: 1rem;
    color: var(--text-gray);
    margin: 0.5rem 0 0 0;
}

.brand-tabs {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.brand-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.brand-tab.active {
    color: var(--primary-orange);
    border-bottom-color: var(--primary-orange);
}

.brand-tab:hover {
    color: var(--text-white);
}

/* Filtros */
.filters-section {
    margin-bottom: 2rem;
}

/* En desktop, mostrar siempre */
@media (min-width: 769px) {
    .brand-sidebar .filters-section {
        display: block !important;
    }
}

.filters-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.75rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
    margin-right: 0.75rem;
    accent-color: var(--primary-orange);
}

.filter-checkbox label {
    color: var(--text-gray);
    cursor: pointer;
    font-size: 0.9rem;
}

.filter-checkbox:hover label {
    color: var(--text-white);
}

.price-range {
    width: 100%;
    margin: 0.5rem 0;
}

.price-range input[type="range"] {
    width: 100%;
    height: 6px;
    background: #444;
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
}

.price-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary-orange);
    border-radius: 50%;
    cursor: pointer;
}

.price-range input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary-orange);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.price-display {
    display: flex;
    justify-content: space-between;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.brand-search {
    width: 100%;
    padding: 0.75rem;
    background-color: #444;
    border: 1px solid #555;
    border-radius: 8px;
    color: var(--text-white);
    font-size: 0.9rem;
}

.brand-search:focus {
    outline: none;
    border-color: var(--primary-orange);
}

.popular-brands {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.popular-brand {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background-color: #444;
    border-radius: 20px;
    color: var(--text-gray);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popular-brand:hover {
    background-color: var(--primary-orange);
    color: var(--text-white);
}

.popular-brand i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* Grid de productos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-card {
    background-color: #2A2A2A;
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #444;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.product-image {
    width: 100%;
    height: 200px;
    background-color: #444;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.brand-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 80%;
    max-height: 80%;
}

/* Estilos para tarjetas de código en home */
.code-brand-image {
    width: 100%;
    height: 120px;
    background-color: #444;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Unificación de tarjetas: aplicar mismo patrón a destacados */
.featured-brand-logo {
    width: 100%;
    height: 120px;
    background-color: #444;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.featured-brand-logo .brand-link { display: block; width: 100%; height: 100%; }
.featured-brand-logo .brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 80%;
    max-height: 80%;
}
.featured-brand-logo .brand-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-orange);
    font-size: 2rem;
}

.featured-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .5rem; }
.featured-user-info { display: flex; align-items: center; gap: .75rem; }
.featured-user-avatar { width: 35px; height: 35px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.featured-user-img { width: 100%; height: 100%; object-fit: cover; }
.featured-user-placeholder { width: 100%; height: 100%; background: var(--primary-orange); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1rem; }
.featured-user-details { display: flex; flex-direction: column; gap: .2rem; }
.featured-user-name { font-weight: 600; color: var(--text-white); font-size: 1rem; }

.code-brand-image .brand-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.code-brand-image .brand-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 80%;
    max-height: 80%;
}

.code-brand-image .brand-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-orange);
    font-size: 2rem;
}

.user-iniciales {
    font-weight: bold;
    font-size: 0.8rem;
    color: white;
}

.product-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.current-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-white);
}

.discount-badge {
    background-color: var(--primary-orange);
    color: var(--text-white);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.original-price {
    color: var(--text-gray);
    text-decoration: line-through;
    font-size: 1rem;
}

.product-description {
    color: var(--text-gray);
    font-size: 1.4rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.product-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-white);
    font-size: 0.9rem;
}

.user-label {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.user-date {
    font-size: 0.75rem;
    color: var(--text-gray);
    display: block;
    margin-top: 2px;
    color: white !important;
}

.product-user i {
    color: var(--primary-orange);
}

/* Estilos para información de usuario en tarjetas de códigos */
.code-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.code-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.code-user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.code-user-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.code-user-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.code-user-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.code-user-name {
    font-weight: 600;
    color: var(--text-white);
    font-size: 1.3rem;
}

.code-user-label {
    font-size: 1rem;
    color: var(--text-gray);
}

/* Estilos para tarjetas destacadas con usuario */
.featured-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.featured-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.featured-user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.featured-user-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-user-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.featured-user-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.featured-user-name {
    font-weight: 600;
    color: var(--text-white);
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.featured-user-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-icons {
    display: flex;
    gap: 0.75rem;
}

.product-icon {
    width: 32px;
    height: 32px;
    background-color: #444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-icon:hover {
    background-color: var(--primary-orange);
    color: var(--text-white);
}

.view-offer-btn {
    background-color: var(--primary-orange);
    color: var(--text-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.view-offer-btn:hover {
    background-color: #E55A2B;
    transform: translateY(-2px);
}

/* Secciones especiales */
.featured-offers {
    margin: 3rem 0;
}

.featured-offers-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--text-white);
    margin-bottom: 1.5rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.featured-card {
    background-color: #2A2A2A;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #444;
}

.featured-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.featured-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.featured-card-price {
    color: var(--primary-orange);
    font-weight: bold;
    font-size: 1.4rem;
}

/* Categorías populares */
.popular-categories {
    margin: 3rem 0;
}

.popular-categories-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--text-white);
    margin-bottom: 1.5rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.category-item {
    background-color: #2A2A2A;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #444;
}

.category-item:hover {
    background-color: var(--primary-orange);
    transform: translateY(-2px);
}

.category-icon {
    font-size: 2rem;
    color: var(--primary-orange);
    margin-bottom: 0.75rem;
}

.category-item:hover .category-icon {
    color: var(--text-white);
}

.category-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
}

/* Responsive */
@media (max-width: 1024px) {
    .brand-page-container {
        flex-direction: column;
    }
    
    .brand-sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .brand-main-content {
        padding: 1rem;
    }
    
    .brand-sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 0;
        background: #f8f9fa;
        border-bottom: 1px solid #dee2e6;
    }
    
    /* Botón hamburguesa para brand-sidebar */
    .brand-sidebar .filter-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        background: #FF6B35;
        color: white;
        border: none;
        width: 100%;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .brand-sidebar .filter-toggle-btn:hover {
        background: #E55A2B;
    }
    
    .brand-sidebar .filter-toggle-btn i {
        font-size: 1.2rem;
        transition: transform 0.3s ease;
    }
    
    .brand-sidebar .filter-toggle-btn.open i {
        transform: rotate(180deg);
    }
    
    /* Contenido del sidebar oculto por defecto */
    .brand-sidebar .filters-section {
        display: none;
        padding: 20px;
        background: white;
        border-top: 1px solid #dee2e6;
    }
    
    .brand-sidebar .filters-section.show {
        display: block;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .brand-title {
        font-size: 2rem;
    }
}

/* Estilos para página de detalle del código */
.code-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--dark-gray);
    min-height: 100vh;
}

.code-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #444;
}

.code-detail-brand h1 {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-white);
    margin: 0;
}

.code-detail-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin: 0.5rem 0 0 0;
}

.btn-back {
    background-color: #444;
    color: var(--text-white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back:hover {
    background-color: var(--primary-orange);
}

.code-detail-actions {
    display: flex;
    gap: 1rem;
}

.btn-share, .btn-favorite {
    background-color: #444;
    color: var(--text-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-share:hover, .btn-favorite:hover {
    background-color: var(--primary-orange);
}

.code-detail-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.code-info-section {
    background-color: #2A2A2A;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.code-benefit {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-orange) 0%, #E55A2B 100%);
    border-radius: 12px;
}

.benefit-amount {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-white);
}

.benefit-label {
    font-size: 1.2rem;
    color: var(--text-white);
    opacity: 0.9;
}

.code-description h3 {
    color: var(--text-white);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.code-description p {
    color: var(--text-gray);
    line-height: 1.6;
    font-size: 1.1rem;
}

.code-display-section {
    background-color: #2A2A2A;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.code-display-section h3 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.code-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #444;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--primary-orange);
}

.code-text {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-orange);
    letter-spacing: 2px;
}

.btn-copy {
    background-color: var(--primary-orange);
    color: var(--text-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-copy:hover {
    background-color: #E55A2B;
    transform: translateY(-2px);
}

.user-info-section {
    background-color: #2A2A2A;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.user-info-section h3 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background-color: var(--primary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.5rem;
}

.user-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.25rem;
}

.user-date {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.how-to-use-section {
    background-color: #2A2A2A;
    border-radius: 12px;
    padding: 2rem;
}

.how-to-use-section h3 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-orange);
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.step-text {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* Ocultar sección hero */
.hero-section {
    display: none;
}

/* Estilos para filtros de radio buttons */
.filter-radio {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-radio input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #666;
    border-radius: 50%;
    background: transparent;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-radio input[type="radio"]:checked {
    border-color: var(--primary-orange);
    background: var(--primary-orange);
}

.filter-radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.filter-radio label {
    color: var(--text-white);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.filter-radio:hover label {
    color: var(--primary-orange);
}

/* Botones de filtros */
.filter-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-apply-filters,
.btn-clear-filters {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-apply-filters {
    background: var(--primary-orange);
    color: white;
}

.btn-apply-filters:hover {
    background: #E55A2B;
    transform: translateY(-2px);
}

.btn-clear-filters {
    background: transparent;
    color: var(--text-gray);
    border: 1px solid #666;
}

.btn-clear-filters:hover {
    background: #666;
    color: white;
}

/* Estilos para marcas relacionadas */
.featured-card-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--primary-orange);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.featured-card-link:hover {
    background: #E55A2B;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* Estilos para categorías populares */
.category-item {
    position: relative;
    cursor: pointer;
}

.category-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.category-item:hover {
    transform: translateY(-5px);
    background-color: #4A4A4A;
}

.category-item:hover .category-name {
    color: var(--primary-orange);
}

/* Estilos para el header de marca con logo */
.brand-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
}

.brand-logo {
    flex-shrink: 0;
}

.brand-logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 15px;
    background: white;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.brand-logo-img:hover {
    transform: scale(1.05);
}

.brand-info {
    flex: 1;
}

.brand-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-white);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.brand-subtitle {
    font-size: 1.4rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-weight: 600;
}

.brand-description {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 600px;
}

.brand-website {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-orange);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.brand-website:hover {
    background: var(--primary-orange);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* Fondo de marca con efectos de scroll */
.brand-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.brand-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.1);
    transition: transform 0.3s ease;
    filter: blur(2px);
}

.brand-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.8) 0%,
        rgba(45, 45, 45, 0.7) 25%,
        rgba(26, 26, 26, 0.9) 50%,
        rgba(45, 45, 45, 0.8) 75%,
        rgba(26, 26, 26, 0.9) 100%
    );
    backdrop-filter: blur(1px);
}

/* Efecto de parallax en scroll */
.brand-page-container {
    position: relative;
    z-index: 1;
}

.brand-main-content {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px 20px 0 0;
    margin-top: 2rem;
    padding: 2rem;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
}

/* Animación de scroll para el fondo */
@keyframes parallaxScroll {
    0% {
        transform: translateY(0) scale(1.1);
    }
    100% {
        transform: translateY(-20px) scale(1.15);
    }
}

.brand-bg-image:hover {
    animation: parallaxScroll 0.5s ease-out forwards;
}

/* Responsive para el header de marca */
@media (max-width: 768px) {
    .brand-header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .brand-logo-img {
        width: 100px;
        height: 100px;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .brand-subtitle {
        font-size: 1.1rem;
    }
    
    .brand-description {
        font-size: 0.95rem;
    }
    
    .brand-main-content {
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 15px 15px 0 0;
    }
    
    .brand-bg-image {
        height: 100%;
        transform: scale(1.2);
    }
}

/* Estilos para páginas de categoría */
.category-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.category-header {
    background: linear-gradient(135deg, var(--primary-orange) 0%, #E55A2B 100%);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    color: white;
    text-align: center;
}

.category-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.category-icon-large {
    font-size: 4rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.category-info {
    text-align: center;
}

.category-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.category-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.6;
}

.category-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.brands-grid {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-white);
    margin-bottom: 2rem;
    text-align: center;
}

.brands-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.brand-card {
    background: var(--light-gray);
    border-radius: 15px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #555;
    text-decoration: none;
    color: inherit;
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    color: inherit;
}

.brand-card-image {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.brand-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-orange);
    color: white;
    font-size: 2rem;
}

.brand-card-info {
    text-align: center;
}

.brand-card-name {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.brand-card-description {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.5;
    font-size: 1.4rem;
}

.brand-card-stats {
    margin-bottom: 1.5rem;
}

.brand-codes-count {
    display: inline-block;
    background: var(--primary-orange);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.brand-card-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--dark-gray);
    color: var(--text-white);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.brand-card-button:hover {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
}

.no-brands {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-gray);
}

.no-brands i {
    font-size: 4rem;
    color: var(--primary-orange);
    margin-bottom: 1rem;
}

.no-brands h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-white);
}

/* Responsive para páginas de categoría */
@media (max-width: 768px) {
    .category-page-container {
        padding: 1rem;
    }
    
    .category-header {
        padding: 2rem 1rem;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .category-description {
        font-size: 1rem;
    }
    
    .category-stats {
        gap: 1rem;
    }
    
    .stat-item {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .brands-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .brand-card {
        padding: 1.5rem;
    }
}

/* Responsive para página de detalle */
@media (max-width: 768px) {
    .code-detail-container {
        padding: 1rem;
    }
    
    .code-detail-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .code-detail-brand h1 {
        font-size: 2rem;
    }
    
    .code-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .code-display {
        flex-direction: column;
        text-align: center;
    }
    
    .steps {
        gap: 1rem;
    }
}

/* Estilos para el modal de login */
.modal {
    z-index: 1050;
    display: none; /* Oculto por defecto */
}

.modal.show {
    display: block; /* Mostrar cuando tenga la clase 'show' */
}

.modal-backdrop {
    z-index: 1040;
}

.modal-dialog {
    margin: 30px auto;
}

.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background-color: #2C2C2C !important;
    color: #FFFFFF !important;
}

.modal-header {
    border-bottom: 1px solid #404040 !important;
    border-radius: 10px 10px 0 0;
    background-color: #2C2C2C !important;
    color: #FFFFFF !important;
}

.modal-header .close {
    color: #FFFFFF !important;
    opacity: 0.8;
    font-size: 28px;
    font-weight: normal;
}

.modal-header .close:hover {
    color: #FF6B35 !important;
    opacity: 1;
}

.modal-header .modal-title {
    color: #FFFFFF !important;
}

.modal-body {
    padding: 30px;
    background-color: #2C2C2C !important;
    color: #FFFFFF !important;
}

.modal-footer {
    background-color: #2C2C2C !important;
    border-top: 1px solid #404040 !important;
    color: #FFFFFF !important;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    height: 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    padding: 10px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #3466FF;
    box-shadow: 0 0 0 0.2rem rgba(52, 102, 255, 0.25);
}

.btn_codigo_amigo {
    font-size: 18px;
    background-color: #3466FF !important;
    color: white !important;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

/* Mantener colores dorados para códigos destacados */
.card_real.destacado .btn.ir_codigo,
.card_real.destacado .btn_codigo_amigo {
    color: white !important;
    border: 1px solid #c1a309 !important;
    background: #c1a309 !important;
    text-shadow: 1px 1px 3px black;
    font-weight: bold;
    white-space: break-spaces;
}

/* Color dorado para el beneficio en códigos destacados */
.card_real.destacado .span_descuento {
    color: #c1a309 !important;
}

/* Color dorado para el icono de estrella en códigos destacados */
.card_real.destacado .fa-star {
    color: #c1a309 !important;
}

/* Estilo para el badge "Destacado" con colores dorados */
.featured-badge {
    background-color: #c1a309 !important;
    color: white !important;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* Estilo para el badge "Borrado" con colores rojos */
.deleted-badge {
    background-color: #dc3545 !important;
    color: white !important;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    opacity: 0.8;
}

.btn_codigo_amigo:hover {
    background-color: #2c5ce6 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 102, 255, 0.3);
}

.text .enlace {
    color: #3466FF;
    text-decoration: none;
    font-weight: 500;
}

.text .enlace:hover {
    text-decoration: underline;
}

.hr.codigo {
    border: none;
    height: 1px;
    background: #e0e0e0;
    margin: 25px 0;
}

.text-primary {
    color: #3466FF !important;
}

.text-primary:hover {
    color: #2c5ce6 !important;
}

/* Estilos para el botón de Google */
.g_id_signin {
    margin: 15px 0;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-control {
        height: 40px;
        font-size: 14px;
    }
    
    .btn_codigo_amigo {
        font-size: 16px;
        padding: 10px 25px;
    }
}

.search-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: flex-end;
    flex-shrink: 0;
    height: 45px;
}

.search-container {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #404040 0%, #555 100%);
    border: 2px solid transparent;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.search-input-wrapper:focus-within {
    border-color: var(--primary-orange);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
    transform: translateY(-1px);
}

/* Menú de usuario */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--light-gray);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    height: 45px;
    box-sizing: border-box;
}

.user-profile:hover {
    background-color: #555;
    border-color: var(--primary-orange);
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-orange);
}

.user-name-small {
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.9rem;
}

.user-profile i {
    color: var(--text-gray);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.user-profile.active i {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--dark-gray);
    border: 1px solid #555;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-white);
    text-decoration: none;
    transition: background-color 0.3s ease;
    border-radius: 4px;
    margin: 0.25rem;
}

.user-dropdown .dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--text-white);
    text-decoration: none;
}

.user-dropdown .dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--primary-orange);
}

.dropdown-divider {
    border: none;
    border-top: 1px solid #555;
    margin: 0.5rem 0;
}

/* Botón de acceder */
.btn-acceder {
    background-color: var(--primary-orange);
    color: var(--text-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 45px;
    box-sizing: border-box;
}

.btn-acceder:hover {
    background-color: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.search-input-header {
    background: transparent;
    border: none;
    color: var(--text-white);
    width: 300px;
    padding: 16px 20px 16px 45px;
    font-size: 16px;
    outline: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    height: 45px;
    box-sizing: border-box;
}

.search-input-header::placeholder {
    color: var(--text-gray);
    font-weight: 400;
}

.search-input-header:focus {
    background: rgba(255, 255, 255, 0.05);
}

.search-icon {
    position: absolute;
    left: 15px;
    color: var(--text-gray);
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    z-index: 2;
    transition: color 0.3s ease;
}

.search-input-wrapper:focus-within .search-icon {
    color: var(--primary-orange);
}

.search-btn {
    background: var(--primary-orange);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.search-btn:hover {
    background: #e55a2b;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.search-btn:active {
    transform: scale(0.95);
}

.search-btn i {
    font-size: 14px;
}

/* Estilos específicos para móvil */
@media (max-width: 768px) {
    .search-header {
        width: 100%;
        justify-content: center;
        margin: 1rem 0;
    }
    
    .search-input-header {
        width: 100%;
        max-width: 300px;
        font-size: 1.4rem;
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        background-color: white;
        color: #333;
        border: 1px solid #ddd;
    }
    
    .search-input-header::placeholder {
        color: #999;
    }
    
    .search-icon {
        color: #ff6b35;
        font-size: 1.2rem;
    }
    
    .header-modern {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-modern {
        display: none; /* Ocultar navegación en móvil */
    }
}

.btn-acceder {
    background-color: var(--primary-orange);
    color: var(--text-white);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-acceder:hover {
    background-color: #E55A2B;
}

/* HERO SECTION */
.hero-section {
    background: var(--gradient-bg);
    padding: 2rem 2rem;
    text-align: center;
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-title {
    font-size: 6rem;
    font-weight: bold;
    color: var(--primary-orange);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-description {
    font-size: 2rem;
    color: var(--text-white);
    margin-bottom: 3rem;
    max-width: 600px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.search-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    max-width: 600px;
    width: 100%;
}

.search-input-hero {
    background-color: rgba(255,255,255,0.9);
    border: none;
    border-radius: 30px;
    padding: 1rem 1.5rem;
    color: var(--dark-gray);
    font-size: 1.8rem;
    flex: 1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.search-input-hero::placeholder {
    color: #666;
}

.btn-buscar {
    background-color: var(--primary-orange);
    color: var(--text-white);
    border: none;
    border-radius: 30px;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-buscar:hover {
    background-color: #E55A2B;
    transform: translateY(-2px);
}

/* CONTENIDO PRINCIPAL */
.main-content {
    background-color: var(--dark-gray);
    padding: 2rem;
    min-height: 100vh;
    height: 100%;
}

.codes-section {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-orange);
    margin-bottom: 2rem;
    text-align: center;
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.code-card {
    background-color: #2a2a2a;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.code-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.code-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-white);
    background: rgba(255,255,255,0.05);
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
}

.code-description {
    color: var(--text-gray);
    line-height: 1.55;
    font-size: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
}

.code-button {
    background: linear-gradient(135deg, var(--primary-orange), #ff8c42);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.25);
}

.code-button:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(255,107,53,0.35);
}

/* Mejora del header de la tarjeta */
.code-card-header {
    margin-bottom: 0.5rem;
}
.code-user-name { color: var(--text-white); font-size: .95rem; }

/* Beneficio destacado compacto */
.beneficio-destacado {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: linear-gradient(135deg, #1f7a1f, #2bbf6a);
    border: 1px solid rgba(255,255,255,0.06);
    color: #fff;
    padding: .45rem .75rem;
    border-radius: 12px;
}
.beneficio-icono { font-size: 1rem; }
.beneficio-cantidad { font-weight: 800; font-size: 1.05rem; }
.beneficio-tipo { opacity: .9; font-size: .85rem; }

/* Fecha de publicación compacta */
.fecha-publicacion-large {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--text-gray);
}
.fecha-publicacion-large i { color: var(--primary-orange); }

/* FOOTER */
.footer-modern {
    background-color: #1A1A1A;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #333;
}


.rewards-link {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.8rem;
    transition: color 0.3s ease;
}

.rewards-link:hover {
    color: #E55A2B;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .header-modern {
        padding: 0.75rem 1rem;
        min-height: 70px;
    }
    
    .logo-text {
        font-size: 3.5rem;
    }
    
    .logo-tagline {
        font-size: 1.5rem;
    }
    
    .nav-link {
        font-size: 1.6rem;
    }
    
    .dropdown-toggle {
        font-size: 1.6rem;
    }
    
    .search-input-header {
        width: 200px;
        font-size: 1.4rem;
    }
    
    .btn-acceder {
        font-size: 1.4rem;
        padding: 0.6rem 1.2rem;
    }
}

@media (max-width: 768px) {
    .header-modern {
        flex-direction: column;
        gap: 1rem;
        padding: 0.5rem;
        min-height: auto;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .nav-modern {
        gap: 0.5rem;
        margin: 0;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .search-header {
        width: 100%;
        justify-content: center;
        height: auto;
        max-width: 100%;
    }
    
    .search-input-header {
        width: 100%;
        max-width: 100%;
        font-size: 1.2rem;
        padding: 12px 16px;
        border-radius: 25px;
    }
    
    .logo-text {
        font-size: 2.5rem;
        text-align: center;
    }
    
    .logo-tagline {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: 8px 12px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .dropdown-toggle {
        font-size: 1.2rem;
        padding: 8px 12px;
        min-height: 44px;
    }
    
    .hero-title {
        font-size: 3rem;
        text-align: center;
    }
    
    .hero-description {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .search-hero {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }
    
    .search-input-hero {
        width: 100%;
        max-width: 100%;
        font-size: 1.4rem;
        padding: 14px 18px;
    }
    
    .btn-buscar {
        width: 100%;
        max-width: 200px;
        font-size: 1.4rem;
        padding: 14px 20px;
    }
    
    .codes-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .code-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 15px;
        border-radius: 12px;
    }
    
    .footer-modern {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 20px 15px;
        width: 100%;
        max-width: 100vw;
    }
    
    /* Mejoras para secciones de marcas */
    .products-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .product-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 15px;
        border-radius: 12px;
    }
    
    .product-image {
        height: 150px;
        margin-bottom: 15px;
        border-radius: 8px;
    }
    
    .product-title {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .product-description {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    
    .product-user {
        margin-top: 15px;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .logo-text {
        font-size: 2.5rem;
    }
    
    .nav-modern {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* SECCIÓN DE MARCAS POPULARES - SLIDER */
.popular-brands-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    padding: 4rem 0;
    margin: 3rem 0;
}

.popular-brands-section .section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-orange), #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popular-brands-section .section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Contenedor del slider */
.brands-slider-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0;
    overflow: hidden;
}

.brands-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 2rem;
}

.brand-slide {
    flex: 0 0 calc(25% - 1.5rem);
    min-width: 0;
}

.brand-card {
    background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(255, 107, 53, 0.1);
    height: 100%;
}

.brand-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.2);
    border-color: var(--primary-orange);
}

.brand-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.brand-image {
    height: 120px;
    background: linear-gradient(135deg, #3c3c3c, #2c2c2c);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.brand-image img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1);
    transition: all 0.3s ease;
}

.brand-card:hover .brand-image img {
    transform: scale(1.1);
    filter: brightness(1.3) contrast(1.2);
}

.brand-info {
    padding: 1.5rem;
    text-align: center;
}

.brand-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.brand-category {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.codes-count {
    background: linear-gradient(45deg, var(--primary-orange), #ff8c42);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* Controles del slider */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-orange);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.slider-btn:hover {
    background: #E55A2B;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}

/* Indicadores de puntos */
.slider-dots {
    text-align: center;
    margin-top: 2rem;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
    background-color: var(--primary-orange);
    transform: scale(1.2);
}

/* Responsive para slider de marcas populares */
@media (max-width: 1024px) {
    .brand-slide {
        flex: 0 0 calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .popular-brands-section {
        padding: 2rem 0;
        margin: 2rem 0;
    }
    
    .popular-brands-section .section-title {
        font-size: 2rem;
    }
    
    .popular-brands-section .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .brands-slider-container {
        padding: 0 1rem;
    }
    
    .brand-slide {
        flex: 0 0 calc(33.333% - 1.33rem);
    }
    
    .brand-card {
        border-radius: 15px;
    }
    
    .brand-image {
        height: 100px;
    }
    
    .brand-image img {
        max-height: 60px;
    }
    
    .brand-info {
        padding: 1rem;
    }
    
    .brand-name {
        font-size: 1.1rem;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .slider-prev {
        left: 5px;
    }
    
    .slider-next {
        right: 5px;
    }
    
    .dot {
        height: 10px;
        width: 10px;
        margin: 0 3px;
    }
}

/* ESTILOS PARA SCROLL INFINITO DE CÓDIGOS DESTACADOS */
.load-more-container {
    text-align: center;
    margin: 3rem 0;
    padding: 0 0;
}

.load-more-btn {
    background: linear-gradient(45deg, var(--primary-orange), #ff8c42);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.load-more-btn:hover {
    background: linear-gradient(45deg, #E55A2B, #ff8c42);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animación para códigos que se cargan */
.featured-card-loading {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Indicador de scroll infinito */
.infinite-scroll-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.infinite-scroll-indicator .fa-spinner {
    margin-right: 0.5rem;
}

/* Responsive para botón "Ver más" */
@media (max-width: 768px) {
    .load-more-container {
        margin: 2rem 0;
        padding: 0 1rem;
    }
    
    .load-more-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }
}
