﻿/* ========================================
   ROOT VARIABLES & RESET
   ======================================== */
:root {
    --primary-color: #e74c3c;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    padding-top: 120px;
}

/* ========================================
   HEADER COMPONENTS
   ======================================== */
/* Top Header */
.top-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 0;
    font-size: 14px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001;
}

/* Main Header */
.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 35px;
    width: 100%;
    z-index: 1000;
}

.navbar-brand {
    font-weight: bold;
    font-size: 24px;
    background: linear-gradient(45deg, var(--primary-color), var(--warning-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========================================
   CART COMPONENTS
   ======================================== */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    z-index: 1002;
    transition: right 0.3s;
    overflow-y: auto;
}

    .cart-sidebar.active {
        right: 0;
    }

.cart-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .cart-item:hover {
        background: #f8f9fa;
    }

.cart-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: white;
    border-top: 2px solid #eee;
    padding: 20px;
}

/* ========================================
   SEARCH SECTION
   ======================================== */
.search-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 0;
    margin-bottom: 30px;
}

.search-box {
    max-width: 800px;
    margin: 0 auto;
}

    .search-box input {
        border-radius: 50px;
        padding: 15px 30px;
        font-size: 16px;
        border: none;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }

    .search-box button {
        border-radius: 50px;
        padding: 15px 40px;
        font-weight: bold;
        background: var(--warning-color);
        border: none;
        color: white;
        transition: all 0.3s;
    }

        .search-box button:hover {
            background: #e67e22;
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(0,0,0,0.2);
        }

/* ========================================
   BREADCRUMB
   ======================================== */
.breadcrumb-section {
    background: white;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
    margin-top: 35px;
}

/* ========================================
   CATEGORY CARDS
   ======================================== */
.category-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
    height: 100%;
}

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        border-color: var(--primary-color);
    }

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
    background: linear-gradient(45deg, var(--primary-color), var(--warning-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========================================
   SIM CARDS
   ======================================== */
.sim-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

    .sim-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        border-color: var(--primary-color);
    }

.sim-header {
    padding: 15px 15px 10px;
    position: relative;
}

.sim-body {
    padding: 0 15px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sim-number {
    font-size: 14px;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 10px;
    cursor: pointer;
    transition: color 0.3s;
}

    .sim-number:hover {
        color: var(--primary-color);
    }

.sim-type {
    font-size: 15px;
    color: #666;
    margin-bottom: 10px;
}

.sim-price {
    font-size: 15px;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
}

    .sim-price .old-price {
        font-size: 15px;
        color: #999;
        text-decoration: line-through;
        margin-left: 10px;
    }

.sim-provider {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Provider Colors */
.provider-viettel {
    background: #00a651;
    color: white;
}

.provider-vinaphone {
    background: #004b93;
    color: white;
}

.provider-mobifone {
    background: #f39200;
    color: white;
}

.provider-vietnamobile {
    background: #ec1c24;
    color: white;
}

.sim-badges {
    position: absolute;
    top: 15px;
    right: 15px;
}

.sim-features {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.sim-feature {
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 3px;
}

.sim-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

    .sim-actions button {
        flex: 1;
    }

/* ========================================
   BADGE STYLES
   ======================================== */
.badge-hot {
    background: linear-gradient(45deg, #f93b1d, #ea1e63);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 11px;
    position: absolute;
    top: 10px;
    right: 10px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   PRODUCT DETAIL PAGE
   ======================================== */
.product-images {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sim-display {
    background: linear-gradient(135deg, #667eea 0%, rgba(0,0,0,0.15) 100%);
    border-radius: 20px;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .sim-display::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
        animation: rotate 20s linear infinite;
    }

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.sim-number-display {
    font-size: 48px;
    font-weight: bold;
    color: white;
    letter-spacing: 5px;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.provider-badge-large {
    display: inline-block;
    background: white;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: bold;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.sim-type-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.sim-type-badge {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.product-info {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.price-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--light-gray);
}

.current-price {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
}

.original-price {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
    margin-left: 15px;
}

.discount-badge {
    background: var(--success-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin-left: 15px;
}

/* ========================================
   FILTER COMPONENTS
   ======================================== */
.filter-sidebar {
    background: white;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.filter-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-group {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

    .filter-group:last-child {
        border-bottom: none;
    }

    .filter-group h6 {
        font-weight: 600;
        margin-bottom: 15px;
        color: var(--secondary-color);
    }

.form-check {
    margin-bottom: 10px;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Price Range */
.price-range-inputs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.price-input {
    position: relative;
}

    .price-input input {
        padding-right: 30px;
    }

    .price-input span {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: #999;
        font-size: 12px;
    }

/* Active Filters */
.active-filters {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
}

    .active-filters.show {
        display: block;
    }

.filter-tag {
    display: inline-block;
    padding: 5px 10px;
    background: var(--light-gray);
    border-radius: 20px;
    font-size: 14px;
    margin: 5px 5px 5px 0;
}

    .filter-tag i {
        cursor: pointer;
        margin-left: 5px;
        color: var(--primary-color);
    }

/* ========================================
   PRODUCT GRID & LIST VIEW
   ======================================== */
.products-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.results-count {
    color: #666;
}

.view-options {
    display: flex;
    gap: 10px;
    align-items: center;
}

.view-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

    .view-btn.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

    .view-btn:first-child {
        border-radius: 5px 0 0 5px;
    }

    .view-btn:last-child {
        border-radius: 0 5px 5px 0;
    }

/* List View */
.list-view .sim-card {
    flex-direction: row;
    margin-bottom: 15px;
}

.list-view .sim-header {
    width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-color);
}

.list-view .sim-body {
    flex-direction: row;
    align-items: center;
    padding: 15px;
    gap: 20px;
}

.list-view .sim-number {
    min-width: 150px;
    margin-bottom: 0;
}

.list-view .sim-price {
    min-width: 120px;
    margin-bottom: 0;
    text-align: right;
}

.list-view .sim-actions {
    margin-left: auto;
    width: auto;
}

/* ========================================
   FEATURES & TABS
   ======================================== */
.features-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 0;
    margin: 40px 0;
}

.feature-box {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

    .features-list li {
        padding: 12px 0;
        border-bottom: 1px solid var(--light-gray);
        display: flex;
        align-items: center;
    }

        .features-list li:last-child {
            border-bottom: none;
        }

    .features-list i {
        color: var(--success-color);
        margin-right: 15px;
        font-size: 18px;
    }

/* Product Tabs */
.product-tabs {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-tabs {
    border-bottom: 2px solid var(--light-gray);
}

    .nav-tabs .nav-link {
        color: #666;
        border: none;
        padding: 15px 30px;
        font-weight: 500;
        transition: all 0.3s;
    }

        .nav-tabs .nav-link.active {
            color: var(--primary-color);
            background: transparent;
            border-bottom: 3px solid var(--primary-color);
        }

/* ========================================
   PACKAGE & ACTION BUTTONS
   ======================================== */
.package-selection {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.package-option {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

    .package-option:hover {
        border-color: var(--primary-color);
        transform: translateX(5px);
    }

    .package-option.selected {
        border-color: var(--primary-color);
        background: linear-gradient(to right, rgba(231,76,60,0.05), transparent);
    }

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-buy-now {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--warning-color) 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s;
}

    .btn-buy-now:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        color: white;
    }

/* ========================================
   MODALS & OVERLAYS
   ======================================== */
.auth-modal .nav-tabs {
    border: none;
    margin-bottom: 20px;
}

    .auth-modal .nav-tabs .nav-link {
        border: none;
        color: #666;
        padding: 10px 30px;
        font-weight: 500;
    }

        .auth-modal .nav-tabs .nav-link.active {
            color: var(--primary-color);
            border-bottom: 3px solid var(--primary-color);
        }

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

    .overlay.active {
        display: block;
    }

/* ========================================
   TOAST & NOTIFICATIONS
   ======================================== */
.toast-container {
    position: fixed;
    top: 150px;
    right: 20px;
    z-index: 1003;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    margin-top: 30px;
}

.page-link {
    color: var(--secondary-color);
    border-color: var(--border-color);
    padding: 10px 15px;
}

    .page-link:hover {
        background: var(--light-gray);
        border-color: var(--border-color);
        color: var(--primary-color);
    }

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* ========================================
   UTILITIES
   ======================================== */
.loading-spinner {
    text-align: center;
    padding: 50px;
    color: #999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
}

    .no-results i {
        font-size: 60px;
        color: #ddd;
        margin-bottom: 20px;
    }

.related-products {
    margin-top: 50px;
}

/* Contact Float Button */
.contact-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
}

.contact-float-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--success-color) 0%, #2ecc71 100%);
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    font-size: 24px;
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

    .contact-float-btn:hover {
        transform: scale(1.1);
    }

/* Mobile Filter Button */
.mobile-filter-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 99;
}

/* Mobile Filter Sidebar */
.mobile-filter-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    width: 80%;
    max-width: 350px;
    height: 100%;
    background: white;
    z-index: 1001;
    transition: left 0.3s;
    overflow-y: auto;
}

    .mobile-filter-sidebar.active {
        left: 0;
    }

.mobile-filter-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--secondary-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-links a {
    color: #95a5a6;
    text-decoration: none;
    margin-right: 20px;
    transition: color 0.3s;
}

    .footer-links a:hover {
        color: white;
    }

/* ========================================
   RESPONSIVE MEDIA QUERIES
   ======================================== */
@media (max-width: 991px) {
    body {
        padding-top: 100px;
    }

    .filter-sidebar {
        display: none;
    }

    .mobile-filter-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .products-header {
        flex-direction: column;
        align-items: stretch;
    }

    .view-options {
        justify-content: space-between;
    }

    .sim-number-display {
        font-size: 32px;
        letter-spacing: 2px;
    }

    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .search-section {
        padding: 20px 15px;
    }

    .sim-number {
        font-size: 18px;
    }

    .sim-number-display {
        font-size: 24px;
    }

    .sim-price {
        font-size: 16px;
    }

    .current-price {
        font-size: 28px;
    }

    .sim-card {
        padding: 12px;
    }

    .sim-provider {
        font-size: 10px;
        padding: 3px 10px;
    }

    .sim-card .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .sim-card {
        font-size: 14px;
    }

    .list-view .sim-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .list-view .sim-actions {
        width: 100%;
    }
}
/* ========================================
   SIM CARDS
   ======================================== */
/* New SIM Card Design - Clean and Minimal */
.sim-card-new {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 15px;
    height: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .sim-card-new:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        border-color: #ff4444;
    }

/* Header with network logo */
.sim-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    height: 35px;
}

.network-logo-new {
    width: 35px;
    height: 35px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.network-text-badge {
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #666;
}

/* SIM Number */
.sim-number-new {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
    min-height: 25px;
}

/* SIM Type Badge */
.sim-type-badge-new {
    background: #6c757d;
    color: white;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 15px;
    text-align: center;
    margin: 0 auto 15px;
    display: inline-block;
    width: 100%;
    max-width: 120px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Price Section */
.sim-price-new {
    text-align: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
    margin-top: auto;
}

.original-price-new {
    font-size: 13px;
    color: #999;
    margin-bottom: 3px;
    display: block;
}

.current-price-new {
    font-size: 18px;
    font-weight: bold;
    color: #ff4444;
}

/* Old SIM Card Design - Keep for backward compatibility */
.sim-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

    .sim-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        border-color: var(--primary-color);
    }
