/* ========================================
   SEARCH PAGE STYLES
   ======================================== */

.search-container {
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    min-height: calc(100vh - 260px);
}

.search-header {
    background: #ffffff;
    border-bottom: 2px solid #e5e7eb;
    padding: 24px 0;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#search-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
    text-align: center;
}

.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: #2576E6;
    box-shadow: 0 0 0 3px rgba(37, 118, 230, 0.1);
}

.search-btn-icon {
    background: #2576E6;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
}

.search-btn-icon:hover {
    background: #1a5bb8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 118, 230, 0.3);
}

.search-filters {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filter-select:hover {
    border-color: #2576E6;
}

.filter-select:focus {
    outline: none;
    border-color: #2576E6;
    box-shadow: 0 0 0 3px rgba(37, 118, 230, 0.1);
}

.search-content {
    display: block;
}

.search-results {
    margin-bottom: 48px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.results-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.result-count {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 24px;
    }
}

/* Product Card in Search */
.product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 3px 14px rgba(55, 71, 90, 0.08);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: #2563eb;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f5;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #134fe5, #23a6f1);
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card:hover .product-title {
    color: #1a56d8;
}

.product-rating {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #6b7280;
}

.product-stars {
    color: #fbbf24;
}

.product-review-count {
    font-size: 12px;
    color: #6b7280;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #003089;
}

.product-price-original {
    text-decoration: line-through;
    color: #94a3b8;
    margin-left: 8px;
    font-size: 14px;
}

.product-discount {
    margin-left: 8px;
    font-size: 13px;
    color: #dc2626;
    font-weight: 700;
    background: #fee2e2;
    padding: 2px 6px;
    border-radius: 4px;
}

.product-button {
    background: #2576E6;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-decoration: none;
    margin-top: 8px;
}

.product-button:hover {
    background: #1a5bb8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 118, 230, 0.3);
}

/* Related Products Section */
.related-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #e5e7eb;
}

.related-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 24px;
    text-align: center;
}

/* No Results */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
}

.no-results-icon {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.no-results h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.no-results p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 24px;
    max-width: 400px;
}

.btn-browse {
    background: #2576E6;
    color: #ffffff;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-browse:hover {
    background: #1a5bb8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 118, 230, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-header {
        padding: 16px 0;
        margin-bottom: 20px;
    }

    #search-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .search-box {
        margin-bottom: 16px;
    }

    .search-input {
        padding: 10px 12px;
        font-size: 16px;
    }

    .search-filters {
        gap: 8px;
    }

    .filter-select {
        padding: 6px 10px;
        font-size: 13px;
    }

    .results-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .results-header h2 {
        font-size: 18px;
    }

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

    .no-results {
        padding: 40px 20px;
    }

    .no-results-icon {
        font-size: 48px;
    }

    .no-results h2 {
        font-size: 20px;
    }

    .no-results p {
        font-size: 14px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #2576E6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Product Badge Variants */
.badge-new {
    background: linear-gradient(135deg, #047857, #10b981);
}

.badge-sale {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.badge-popular {
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
}
