/* ===================================================================
   SEARCH FILTERS - Mobile Responsive Fixed
   Note: Search box styles already in product-page.css
   =================================================================== */

/* ===================================================================
   FILTERS SECTION
   =================================================================== */
.filters-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.filters-container {
    max-width: 100%;
    width: 100%;
}

.filters-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #003366;
    font-size: 1.2rem;
    margin-bottom: 0;
    gap: 10px;
}

.filters-title i {
    margin-right: 8px;
}

.btn-toggle-filters {
    background: #0066cc;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-toggle-filters:hover {
    background: #0052a3;
}

.btn-toggle-filters i {
    margin-left: 6px;
}

.filters-form {
    margin-top: 20px;
}

.filters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
    background: white;
    box-sizing: border-box;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #0066cc;
    background: #f8f9fa;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.price-inputs .filter-input {
    flex: 1;
    min-width: 0;
}

.price-separator {
    color: #666;
    font-weight: 600;
    flex-shrink: 0;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 10px;
    width: 100%;
}

.btn-apply-filters,
.btn-clear-filters {
    width: 100%;
    padding: 14px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-sizing: border-box;
}

.btn-apply-filters {
    background: #28a745;
    color: white;
}

.btn-apply-filters:hover {
    background: #218838;
}

.btn-clear-filters {
    background: #6c757d;
    color: white;
}

.btn-clear-filters:hover {
    background: #5a6268;
}

/* ===================================================================
   ACTIVE FILTERS DISPLAY
   =================================================================== */
.active-filters {
    background: #e3f2fd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
}

.active-filters h3 {
    color: #0066cc;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    background: #0066cc;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-tag a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

.filter-tag a:hover {
    color: #ffcc00;
}

/* ===================================================================
   SEARCH RESULTS SECTION
   =================================================================== */
.results-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.results-title {
    color: #003366;
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.phones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.phone-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s;
}

.phone-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    border-color: #0066cc;
}

.phone-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.phone-img {
    width: 100%;
    max-width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 10px;
}

.phone-name {
    color: #003366;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.phone-price {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.phone-price .price {
    display: block;
    font-size: 1rem;
    font-weight: bold;
    color: #ff6b6b;
    margin-bottom: 4px;
}

.phone-price .stores {
    display: block;
    font-size: 0.75rem;
    color: #666;
}

/* Empty States */
.no-results,
.search-prompt {
    text-align: center;
    padding: 50px 20px;
}

.no-results i,
.search-prompt i {
    color: #0066cc;
    margin-bottom: 15px;
    opacity: 0.6;
}

.no-results h3,
.search-prompt h3 {
    color: #003366;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.no-results p,
.search-prompt p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===================================================================
   TABLET RESPONSIVE (600px+)
   =================================================================== */
@media (min-width: 600px) {
    .filters-section {
        padding: 25px;
    }

    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .filter-actions {
        flex-direction: row;
        justify-content: center;
    }

    .btn-apply-filters,
    .btn-clear-filters {
        width: auto;
        min-width: 180px;
    }

    .phones-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 20px;
    }

    .phone-img {
        max-width: 140px;
        height: 140px;
    }

    .phone-name {
        font-size: 0.95rem;
    }

    .results-title {
        font-size: 1.3rem;
    }
}

/* ===================================================================
   DESKTOP RESPONSIVE (1024px+)
   =================================================================== */
@media (min-width: 1024px) {
    .filters-section {
        padding: 30px;
    }

    .filters-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }

    .filter-select,
    .filter-input {
        font-size: 0.95rem;
        padding: 12px 15px;
    }

    .phones-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }

    .phone-img {
        max-width: 150px;
        height: 150px;
    }

    .phone-name {
        font-size: 1rem;
    }

    .phone-price .price {
        font-size: 1.1rem;
    }

    .results-section {
        padding: 25px;
    }
}

/* ===================================================================
   SMALL MOBILE FIX (< 400px)
   =================================================================== */
@media (max-width: 399px) {
    .filters-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .filters-title {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .btn-toggle-filters {
        width: 100%;
        text-align: center;
    }

    .filter-select,
    .filter-input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .price-inputs {
        gap: 8px;
    }

    .price-separator {
        font-size: 0.9rem;
    }

    .btn-apply-filters,
    .btn-clear-filters {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .phones-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .phone-img {
        max-width: 100px;
        height: 100px;
    }

    .phone-name {
        font-size: 0.85rem;
        min-height: 35px;
    }

    .phone-price .price {
        font-size: 0.95rem;
    }

    .results-section {
        padding: 15px;
    }

    .results-title {
        font-size: 1.1rem;
    }
}

/* ===================================================================
   FIX FOR OVERFLOW ISSUES
   =================================================================== */
* {
    box-sizing: border-box;
}

.search-page {
    overflow-x: hidden;
}

.search-page .container {
    max-width: 100%;
    overflow-x: hidden;
}

select,
input,
button {
    max-width: 100%;
}