/* ========================================
   PRODUCTS CON PLAN CSS - Modern UX/UI Design
   Optimized for conversions and user experience
   ======================================== */

/* ========================================
   HERO SECTION - BASE STYLES
   ======================================== */

.hero-plp {
    background: radial-gradient(circle at 20% 20%, #0f3d73 0%, #02142c 55%, #010a18 100%);
    padding: 90px 0 40px;
    color: #ffffff;
    position: relative;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.1;
    letter-spacing: -0.5px;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 640px;
    margin: 0 auto 2rem;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-stats-wrapper {
    margin-top: 24px;
    width: 100%;
    overflow: hidden;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    padding: 1rem 0;
}

/* Marquee animation for mobile */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.hero-stats.marquee-mode {
    display: flex;
    width: max-content;
    animation: marquee 20s linear infinite;
    will-change: transform;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.hero-stats.marquee-mode .stat-item {
    flex: 0 0 auto;
    padding: 0 2rem;
    white-space: nowrap;
}

.hero-stats .stat-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    /* background: rgba(255, 255, 255, 0.08); */
    /* padding: 0.7rem 1.2rem; */
    /* border-radius: 10px; */
    /* border: 1px solid rgba(255, 255, 255, 0.15); */
    transition: all 0.3s ease;
}

.hero-stats .stat-item:hover {
    /* background: rgba(255, 255, 255, 0.12); */
    /* border-color: rgba(255, 255, 255, 0.25); */
    transform: translateY(-2px);
}

.hero-stats .stat-item i {
    font-size: 1.2rem;
}

/* ========================================
   FILTERS SECTION - BASE STYLES
   ======================================== */

.filters-section {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.filters-toggle {
    display: none;
}

.filters-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filters-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-weight: 600;
    color: var(--color-gray-5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.filter-select {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--color-gray-2);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    background: white;
    color: var(--color-gray-6);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.filter-select:hover {
    border-color: var(--color-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(1, 157, 244, 0.1);
}

.btn-clear-filters {
    padding: 0.6rem 1.2rem;
    border: none;
    background: var(--color-gray-1);
    color: var(--color-gray-5);
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-clear-filters:hover {
    background: var(--color-gray-2);
    color: var(--color-gray-6);
}

/* ========================================
   PRODUCTS SECTION - BASE STYLES
   ======================================== */

.products-section {
    padding: 1.5rem 0 3rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.products-count {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: 600;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 1.5rem;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--color-border);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: var(--color-primary);
}

.product-card-featured {
    border: 2px solid var(--color-primary);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.product-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.product-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.25);
}

.product-badge-featured {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    box-shadow: 0 4px 12px rgba(1, 157, 244, 0.3);
}

.badge-discount {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.25);
}

.product-image-wrapper {
    position: relative;
    padding: 20px 14px 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.product-image-cel {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image-cel {
    transform: scale(1.08);
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.product-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
}

.product-brand {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 3px 0;
}

.product-model {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.product-storage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f7ff;
    color: var(--color-primary-dark);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

.product-plan {
    /* background: #f5fbff; */
    color: #003b5c;
    /* padding: 16px; */
    /* border-radius: 12px; */
    /* border: 1px solid #d8ecff; */
}

.plan-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: var(--color-primary-dark);
    display: block;
    margin-bottom: 4px;
}

.plan-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #002b45;
}

.product-pricing {
    /* background: #fdfefe; */
    /* padding: 16px; */
    /* border-radius: 12px; */
    /* border: 1px solid var(--color-border); */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-header {
    font-size: 0.78rem;
    font-weight: 700;
    color: #6b7a8c;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.price-before {
    display: inline-block;
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 4px;
}

.price-current-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.price-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: flex-start;
}

.price-amount .currency {
    font-size: 0.5em;
    color: var(--color-primary);
    margin-right: 4px;
    margin-top: 6px;
    font-weight: 700;
}

.price-amount .amount {
    color: var(--color-dark-blue);
}

.price-tag {
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(255, 178, 102, 0.2);
    color: #9a4700;
    padding: 4px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.price-installments {
    display: flex;
    align-items: center;
    gap: 8px;
    /* padding: 10px 12px; */
    /* background: white; */
    /* border-radius: 10px; */
    margin-top: 4px;
    font-size: 0.9rem;
    color: #4c5966;
    font-weight: 600;
    /* border: 1px dashed #dbe4ef; */
    line-height: 1.1;
}

.price-installments i {
    color: var(--color-primary);
    font-size: 1.2rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #edf1f7;
}

/* ========================================
   ACTION BUTTONS
   ======================================== */

.btn-buy {
    background: linear-gradient(135deg, #01a6ff 0%, #0068a3 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}
.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(1, 157, 244, 0.4);
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #005a8f 100%);
}

.btn-details {
    color: var(--color-primary);
    background: transparent;
    border: none;
    padding: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-details:hover {
    color: var(--color-primary-dark);
}

.btn-details i {
    transition: transform 0.3s ease;
}

.btn-details:hover i {
    transform: translateX(4px);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets y pantallas medianas - 3 columnas */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (max-width: 992px) {
    .products-section {
        padding: 32px 0 48px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .product-info {
        padding: 18px;
    }
    
    .price-amount {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image-wrapper {
        min-height: 180px;
        padding: 20px 14px 12px;
    }
    
    .product-image-cel {
        max-height: 160px;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 12px;
}

/* ========================================
   DESKTOP BREAKPOINTS
   ======================================== */

@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-stats-wrapper {
        overflow: hidden;
        width: 100%;
        mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    }
    
    .hero-stats {
        display: flex;
        justify-content: center;
    }
    
    .hero-stats.marquee-mode {
        justify-content: flex-start;
        width: max-content;
        animation: marquee 20s linear infinite;
    }
    
    .hero-stats.marquee-mode .stat-item {
        flex: 0 0 auto;
        padding: 0 2.5rem;
    }

    /* Filters collapsible */
    .filters-section {
        position: static;
        padding: 1rem 0;
    }
    
    .filters-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 1rem 1.5rem;
        background: var(--color-primary);
        color: white;
        border: none;
        border-radius: 10px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(1, 157, 244, 0.3);
    }
    
    .filters-toggle:hover {
        background: var(--color-dark-blue);
    }
    
    .filters-toggle i {
        font-size: 1.2rem;
        transition: transform 0.3s ease;
    }
    
    .filters-toggle.active i {
        transform: rotate(180deg);
    }
    
    .filters-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.4s ease;
        opacity: 0;
        flex-direction: column;
        gap: 1rem;
        margin-top: 0;
    }
    
    .filters-content.active {
        max-height: 500px;
        opacity: 1;
        margin-top: 1rem;
    }
    
    .filters-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-label {
        display: none;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   FEATURES SECTION - BASE STYLES
   ======================================== */

.features-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
    margin-top: 80px;
}

.feature-card {
    text-align: center;
    padding: 32px 20px;
    background: white;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.feature-card i {
    font-size: 3rem;
    color: #019df4;
    margin-bottom: 16px;
    display: block;
}

.feature-card h5 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.feature-card p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

@media (max-width: 768px) {
    .features-section {
        padding: 56px 0;
        margin-top: 56px;
    }
    .feature-card {
        padding: 24px 16px;
    }
    .feature-card i {
        font-size: 2.5rem;
    }
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 1.05rem;
    color: #999;
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Styles */
@media print {
    .filters-section,
    .product-actions,
    .hero-stats,
    .features-section {
        display: none;
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus states for keyboard navigation */
.filter-select:focus-visible,
.btn-buy:focus-visible,
.btn-details:focus-visible,
.btn-clear-filters:focus-visible,
.filters-toggle:focus-visible {
    outline: 3px solid #019df4;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #000;
    }
    
    .btn-buy {
        border: 2px solid #000;
    }
}

