/* ===== Search Page Styles (Page-Specific) ===== */
/* Common styles (nav, body, etc.) are in common.css */

/* Search Section */
.search-section {
    flex: 1;
    padding: 2rem;
    background: #f8f9fa;
}

.search-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    height: fit-content;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
}

.filters-sidebar h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.filter-checkbox:hover {
    background: #f5f5f5;
}

.filter-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.subcategory-filters {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid #667eea;
    margin-top: 0.5rem;
}

.subcategory-checkbox {
    font-size: 0.95rem;
    color: #555;
    padding: 0.3rem 0.5rem;
}

.price-filter {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.price-input-row {
    display: flex;
    gap: 0.5rem;
}

.price-filter input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.price-filter button {
    padding: 0.6rem 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
    width: 100%;
}

.price-filter button:hover {
    background: #5568d3;
}

#sortBy {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.clear-filters-btn {
    width: 100%;
    padding: 0.8rem;
    margin-top: 1rem;
    background: #999;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-filters-btn:hover {
    background: #777;
}

/* Products Main */
.products-main {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

.results-header h1 {
    font-size: 2rem;
    color: #333;
}

.results-count {
    font-size: 1.1rem;
    color: #666;
    font-weight: 600;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f3f7 100%);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.product-emoji {
    font-size: 4rem;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.image-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.product-image-nav {
    position: absolute;
    bottom: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.5rem;
    transform: translateY(50%);
}

.image-nav-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1rem;
}

.product-button {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.product-button:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Footer */
footer {
    background: #222;
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #667eea;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 2rem;
    text-align: center;
    color: #999;
}

.footer-contact-info {
    line-height: 1.8;
}

.footer-contact-info a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.footer-contact-info a:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-content {
        text-align: center;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .search-container {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: relative;
        top: 0;
    }

    .dropdown-menu {
        min-width: 600px;
    }
}

@media (max-width: 768px) {
    .search-section {
        padding: 1rem;
    }

    .search-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .filters-sidebar {
        position: relative;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .dropdown-menu {
        min-width: 100%;
        max-width: 90vw;
        grid-template-columns: 1fr;
    }

    .dropdown-column:not(:last-child) {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #eee;
        padding-bottom: 1rem;
    }

    .dropdown-column:not(:first-child) {
        padding-left: 0;
        padding-top: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
    }
    
    nav {
        padding: 0.5rem 0;
        overflow: visible;
    }
    
    .nav-container {
        gap: 0.25rem;
        padding: 0 1rem;
    }
    
    .nav-logo-section {
        width: 100%;
        margin-bottom: 0;
    }
    
    .nav-logo-section img {
        height: 150px !important;
        margin: 0 0 -50px 0 !important;
        width: auto;
    }
    
    .nav-controls {
        width: 100%;
        justify-content: space-between;
        z-index: 20;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .results-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .filter-checkbox {
        font-size: 0.9rem;
    }

    .dropdown-menu {
        min-width: 100vw;
        grid-template-columns: 1fr;
    }
}

/* Mobile Filter Toggle Styles */
.filter-toggle-btn {
    display: none;
}

@media (max-width: 768px) {
    .filter-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 1rem;
        background: white;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-weight: bold;
        color: #333;
        cursor: pointer;
        margin-bottom: 1rem;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    
    .filter-toggle-btn.active {
        background: #f0f3f7;
        border-color: #667eea;
        color: #667eea;
    }

    .filters-sidebar {
        display: none;
    }

    .filters-sidebar.active {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
