/* Hero Section */
.hero {

    color: white;
    text-align: center;
    padding: 60px 0;
}

.hero-bg-1 {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url(
        'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%23e8f4f8" width="1200" height="400"/><path fill="%23b8dce8" d="M0,200 Q300,100 600,200 T1200,200 L1200,400 Z"/></svg>'
    );
    background-size: cover;
    background-position: center;
}

.hero-bg-2 {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url(
        'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%23ffe5cc" width="1200" height="400"/><path fill="%23ff9966" d="M0,250 Q150,150 300,250 T600,250 T900,250 T1200,250 L1200,400 L0,400 Z"/></svg>'
    );
    background-size: cover;
    background-position: center;
}

.hero-bg-3 {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url(
        'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%23e6e0ff" width="1200" height="400"/><path fill="%23c2b3ff" d="M0,250 Q400,150 800,250 T1200,250 L1200,400 L0,400 Z"/><path fill="%23a799ff" opacity="0.6" d="M0,300 Q400,200 800,300 T1200,300 L1200,400 L0,400 Z"/></svg>'
    );
    background-size: cover;
    background-position: center;
}

.hero-bg-4 {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url(
        'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%23d9f0d9" width="1200" height="400"/><path fill="%2399cc99" d="M0,250 Q400,150 800,250 T1200,250 L1200,400 L0,400 Z"/><path fill="%2366b366" opacity="0.6" d="M0,300 Q400,200 800,300 T1200,300 L1200,400 L0,400 Z"/></svg>'
    );
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filters-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-filters {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-label {
    font-weight: bold;
    margin-bottom: 1rem;
    color: #2c3e50;
    display: block;
}

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

.filter-option input {
    margin-right: 0.5rem;
}

.filter-option label {
    cursor: pointer;
    flex: 1;
}

.filter-group.conf .filter-option label,
.filter-group.conf .filter-count {
    font-size: 12px;
}

.filter-count {
    color: #666;
    font-size: 0.9rem;
}

/* Price Range Slider */
.price-range {
    margin: 1rem 0;
}

.price-inputs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.price-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

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

/* Products Section */
.products-section {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-info {
    color: #666;
}

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

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

.view-toggle {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: white;
    cursor: pointer;
    transition: background 0.3s;
}

.view-btn.active {
    background: #3498db;
    color: white;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
}

.product-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.product-card.sale {
    background: radial-gradient(rgb(255, 234, 238) 0%, rgb(255, 198, 207) 100%);
}

.product-card.bestseller {
    background: radial-gradient(rgb(234, 255, 236) 0%, rgb(174, 255, 194) 100%);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: #3498db;
}

.products-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 1rem;
    align-items: center;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.product-badge.bestseller {
    background: #22af0f;
}

.product-badge.sale {
    background: #e9209a;
}

.product-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #3498db;
    position: relative;
}

.product-image img {
    object-fit: contain;
    height: 100%;
    width: 100%;
    padding: 16px;
}

.products-grid.list-view .product-image {
    height: 120px;
    font-size: 2rem;
}

.product-info {
    padding: 1.5rem;
}

.products-grid.list-view .product-info {
    padding: 1rem;
}

.product-brand {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.product-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.product-conf {
    color: #008cff;
    font-size: 0.9rem;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feature-tag {
    background: #e8f4f8;
    color: #2c3e50;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #f39c12;
}

.rating-count {
    color: #666;
    font-size: 0.9rem;
}

.product-pricing {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: #27ae60;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 1rem;
}

.price-per-month {
    color: #666;
    font-size: 0.9rem;
}

.product-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
}

.products-grid.list-view .product-actions {
    border-top: none;
    padding: 1rem;
    flex-direction: column;
    min-width: 150px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-primary {
    background: #3498db;
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e9ecef;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s;
    z-index: 1000;
    overflow-y: auto;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    background: #2c3e50;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.cart-content {
    padding: 1rem;
}

.cart-item {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.cart-total {
    background: #f8f9fa;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.total-row.final {
    font-weight: bold;
    font-size: 1.2rem;
    border-top: 2px solid #ddd;
    padding-top: 0.5rem;
}

.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;
}

/* Mobile Filters */
.mobile-filters-btn {
    display: none;
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .mobile-filters-btn {
        display: block;
    }

    .filters-sidebar {
        display: none;
    }

    .filters-sidebar.show {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .search-bar {
        margin: 1rem 0;
        order: 3;
        flex-basis: 100%;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .products-grid.list-view .product-card {
        grid-template-columns: 1fr;
    }

    .product-image {
        height: min(calc(60vw - 40px), 200px);
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .products-header {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-controls {
        justify-content: space-between;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-results h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}