/* PC Builder Select Page Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #0ea5e9;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Reset Layout Styles */
#content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Layout */
.pcb-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    max-width: 1600px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
}

/* Sidebar */
.pcb-sidebar {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
    box-shadow: 0 1px 3px var(--shadow);
    position: sticky;
    top: 20px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.clear-filters {
    color: var(--primary);
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

.filter-group {
    border-top: 1px solid var(--border);
    padding: 20px 0;
}

.filter-group h4 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 16px;
}

/* Price Range */
.price-slider {
    margin-top: 12px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.price-inputs input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.apply-price {
    width: 100%;
    padding: 8px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.apply-price:hover {
    background: var(--primary-dark);
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
}

.custom-checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
}

.custom-checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox input:checked + .checkmark:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.count {
    color: var(--text-light);
    margin-left: auto;
}

/* Main Content */
.pcb-main {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px var(--shadow);
}

/* Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.breadcrumb-nav a {
    color: var(--text-light);
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    color: var(--primary);
}

.breadcrumb-nav i {
    font-size: 12px;
}

.header-content h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px;
}

.results-count {
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sort-by {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-by label {
    font-size: 14px;
    color: var(--text-light);
}

.form-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
}

/* View Buttons */
.view-switch {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Filter Chips */
.active-filters {
    margin-bottom: 24px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--background);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text);
}

.chip i {
    font-size: 12px;
    cursor: pointer;
    color: var(--text-light);
}

/* Product Grid */
.pcb-main .product-grid,
.product-grid {
    display: grid !important;
    gap: 24px;
    grid-template-columns: repeat(2, 1fr); /* Mobile: 2 columns by default */
}

/* Tablet/Laptop - 4 columns */
@media screen and (min-width: 768px) and (max-width: 1199px) {
    .pcb-main .product-grid:not(.list-view),
    .product-grid:not(.list-view) {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Desktop - 5 columns */
@media screen and (min-width: 1200px) {
    .pcb-main .product-grid:not(.list-view),
    .product-grid:not(.list-view) {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* List View */
.product-grid.list-view {
    grid-template-columns: 1fr;
}

.product-grid.list-view .product-card {
    display: flex;
    flex-direction: row;
    gap: 24px;
    padding: 20px;
}

.product-grid.list-view .card-image {
    flex: 0 0 200px;
    padding: 0;
}

.product-grid.list-view .card-content {
    flex: 1;
    padding: 0;
}

.product-grid.list-view .card-footer {
    flex: 0 0 200px;
    padding: 0;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .product-grid.list-view .product-card {
        flex-direction: column;
    }
    
    .product-grid.list-view .card-image,
    .product-grid.list-view .card-footer {
        flex: 1;
    }
}


/* Product Card */
.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 20px var(--shadow);
    transform: translateY(-2px);
}

.card-header {
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.discount-badge {
    background: var(--danger);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
}

.in-stock {
    background: #dcfce7;
    color: var(--success);
}

.out-stock {
    background: #fee2e2;
    color: var(--danger);
}

.card-image {
    position: relative;
    padding: 20px;
    background: var(--background);
    text-align: center;
}

.card-image img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.product-card:hover .card-image img {
    transform: scale(1.05);
}

.quick-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.product-card:hover .quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.quick-actions button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: white;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px var(--shadow);
}

.quick-actions button:hover {
    background: var(--primary);
    color: white;
}

.card-content {
    padding: 0px 8px 0px 8px;
}

.brand {
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.product-name {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 12px;
    line-height: 1.4;
}

.product-name a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}

.product-specs {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.spec {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.stars {
    color: var(--warning);
}

.rating-count {
    font-size: 13px;
    color: var(--text-light);
}

.price-block {
    margin-bottom: 16px;
}

.special-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
}

.original-price {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}

.regular-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.card-footer {
    padding: 0 20px 20px;
}

.btn-select {
    width: 100%;
    padding: 5px 2px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-select:hover {
    background: var(--primary-dark);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 48px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 20px;
    color: var(--text);
    margin: 0 0 8px;
}

.no-results p {
    color: var(--text-light);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .pcb-wrapper {
        grid-template-columns: 240px 1fr;
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .pcb-wrapper {
        grid-template-columns: 1fr;
    }
    
    .pcb-sidebar {
        position: static;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .sort-by {
        flex: 1;
    }
}



@media (max-width: 480px) {
    .pcb-wrapper {
        padding: 0 12px;
    }
    
    .price-inputs {
        flex-direction: column;
    }
    
    .price-inputs input {
        width: 100%;
    }
}
