/* Gaming Page Specific Styles */

/* Main layout */
body > div {
    display: flex;
    max-width: 80%;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}

/* Filter section */
body > div > div:first-child {
    flex: 1;
    max-width: 800px;
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

body > div > div:first-child h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #1e90ff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Filter form */
form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

form input, form select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

form input[type="range"] {
    width: 93%;
}

#price-value {
    display: block;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 500;
}

form button {
    background-color: #1e90ff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: 500;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: #0066cc;
}

/* Products section */
body > div > div:last-child {
    flex: 3;
}

body > div > div:last-child h2 {
    color: #333;
    border-bottom: 2px solid #1e90ff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Product grid */
.grid.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* Product cards */
.grid.products > div {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    padding-bottom: 15px;
}

.grid.products > div:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.grid.products > div img {
    width: 50%;
    object-fit: cover;
    margin: 0 auto;
    margin-top: 20px;
}

.grid.products > div h3 {
    margin: 15px 15px 10px;
    color: #222;
    border-bottom: 1px solid #eee;
}

.grid.products > div h4 {
    margin: 0 15px 10px;
    color: #1e90ff;
    font-weight: 600;
}

.grid.products > div p {
    margin: 0 15px 10px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
}

.grid.products > div ul {
    margin: 0 15px 15px 35px;
    padding: 0;
    color: #555;
    font-size: 0.9rem;
}

.grid.products > div ul li {
    margin-bottom: 5px;
}

.product-link {
    margin: 10px 15px 0;
    background-color: #1e90ff;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    transition: background-color 0.3s;
    display: block;
    margin-top: auto;
}

.product-link:hover {
    background-color: #0066cc;
}

/* Price range slider container */
.price-slider-container {
    position: relative;
    width: 100%;
    height: 5px;
    margin: 20px 0 40px 0;
}

/* Slider track styling */
.slider-track {
    position: absolute;
    width: 100%;
    height: 5px;
    background: #ddd;
    border-radius: 5px;
    z-index: 1;
}

/* Style for both sliders */
.price-slider-container input[type="range"] {
    position: absolute;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: transparent;
    pointer-events: none;
    z-index: 2;
    top: 2px;
    margin: 0;
    padding: 0;
    border: none;
}

/* Active thumb area needs pointer events */
.price-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1e90ff;
    cursor: pointer;
    pointer-events: auto;
    border: none;
    margin-top: -6px;
    z-index: 3;
}

.price-slider-container input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1e90ff;
    cursor: pointer;
    pointer-events: auto;
    border: none;
    z-index: 3;
}

/* Value display */
.price-range-values {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5px;
    margin-bottom: 15px;
    font-weight: 500;
    color: #333;
}

.price-range-values span {
    margin: 0 5px;
}

.no-results , .placeholder {
    text-align: center;
    box-shadow: none !important;
    background-color: none !important;
}

/* Give min slider slightly darker thumb to differentiate when they overlap */
#price-range-min::-webkit-slider-thumb {
    background: #0066cc;
    z-index: 4;
}

#price-range-min::-moz-range-thumb {
    background: #0066cc;
    z-index: 4;
}

/* Remove default focus styling */
.price-slider-container input[type="range"]:focus {
    outline: none;
}

/* Responsive design */
@media (max-width: 900px) {
    body > div {
        flex-direction: column;
    }
    
    body > div > div:first-child {
        max-width: none;
        position: static;
    }
    
    .grid.products {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 600px) {
    .grid.products {
        grid-template-columns: 1fr;
    }
    
    body > div {
        padding: 15px 10px;
    }
}
