/* =========================
   Search Results Page
========================= */

.search-results-hero {
    padding: 12px 0 28px;
}

.search-hero-card {
    border-radius: 36px;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #111827, #19346f 58%, #2356d8);
    color: #fff;
    padding: 34px;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 24px;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.search-hero-card::after {
    content: "SEARCH";
    position: absolute;
    left: 26px;
    bottom: -18px;
    font-size: 120px;
    font-weight: 950;
    color: rgba(255, 255, 255, 0.06);
    letter-spacing: -4px;
    pointer-events: none;
}

.search-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.search-hero-card h1 {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.45;
    position: relative;
    z-index: 1;
}

.search-hero-card h1 strong {
    color: #ffd43b;
}

.search-hero-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    line-height: 2;
    position: relative;
    z-index: 1;
}

.search-page-form {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 24px;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    backdrop-filter: blur(12px);
}

.search-page-form input {
    border: 0;
    outline: none;
    min-height: 50px;
    border-radius: 18px;
    padding: 0 14px;
    background: #fff;
    color: #111827;
}

.search-page-form button {
    border: 0;
    border-radius: 18px;
    padding: 0 20px;
    background: linear-gradient(135deg, var(--accent), #ffd43b);
    color: #211500;
    font-weight: 950;
    cursor: pointer;
}

.search-results-section {
    padding: 4px 0 46px;
}

.search-results-head {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(30, 30, 30, 0.08);
    box-shadow: var(--shadow-soft);
    border-radius: 28px;
    padding: 20px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.search-results-head h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.search-results-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.search-count-badge {
    background: #f3f6ff;
    color: var(--primary);
    border-radius: 999px;
    padding: 9px 13px;
    font-size: 13px;
    font-weight: 950;
}

.search-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.search-product-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(30, 30, 30, 0.08);
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.25s ease;
    min-width: 0;
}

.search-product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(35, 86, 216, 0.18);
}

.search-product-image {
    position: relative;
    height: 375px;
    margin: 14px 14px 0;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, var(--primary));
    display: block;
}

.search-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: 0.35s ease;
}

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

.search-image-placeholder {
    height: 100%;
    color: #fff;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 18px;
}

.search-image-placeholder span {
    font-size: 36px;
}

.search-image-placeholder strong {
    font-size: 16px;
    line-height: 1.8;
}

.search-discount-badge,
.search-stock-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 11px;
    font-weight: 950;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.16);
}

.search-discount-badge {
    top: 12px;
    right: 12px;
    background: var(--danger);
    color: #fff;
}

.search-stock-badge {
    top: 12px;
    left: 12px;
}

.search-stock-badge.in-stock {
    background: #eaf7ee;
    color: #15803d;
}

.search-stock-badge.out-stock {
    background: #fff1f2;
    color: #be123c;
}

.search-product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.search-product-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.search-product-meta span {
    background: #f3f6ff;
    color: var(--primary-2);
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 10.5px;
    font-weight: 850;
}

.search-product-title {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.8;
    min-height: 54px;
}

.search-product-title a {
    color: #111827;
}

.search-product-title a:hover {
    color: var(--primary);
}

.search-product-info {
    display: grid;
    gap: 5px;
    margin-bottom: 14px;
}

.search-product-info span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.search-price-row {
    margin-top: auto;
}

.search-price-box {
    display: grid;
    gap: 4px;
}

.search-price-box del {
    color: #9ca3af;
    font-size: 12px;
}

.search-price-box strong {
    color: var(--primary-2);
    font-size: 17px;
    font-weight: 950;
}

.search-product-actions {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 9px;
    margin-top: 14px;
}

.search-view-btn,
.search-cart-btn {
    min-height: 42px;
    border: 0;
    border-radius: 15px;
    font-weight: 950;
    cursor: pointer;
    transition: 0.22s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-view-btn {
    background: #f3f4f6;
    color: #374151;
}

.search-view-btn:hover {
    background: #111827;
    color: #fff;
}

.search-cart-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), #ffd43b);
    color: #211500;
}

.search-cart-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(245, 159, 0, 0.25);
}

.search-cart-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.search-secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 9px;
}

.search-mini-action {
    border: 1px solid rgba(30, 30, 30, 0.08);
    background: #fff;
    color: #374151;
    min-height: 38px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.22s ease;
}

.search-mini-action:hover,
.search-mini-action.active {
    background: #f3f6ff;
    color: var(--primary);
    border-color: rgba(35, 86, 216, 0.18);
}

.search-pagination {
    margin-top: 24px;
}

.search-empty-state {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(30, 30, 30, 0.08);
    box-shadow: var(--shadow-soft);
    border-radius: 30px;
    padding: 44px 20px;
    text-align: center;
}

.search-empty-icon {
    font-size: 54px;
    margin-bottom: 12px;
}

.search-empty-state h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.search-empty-state p {
    margin: 0 auto 18px;
    max-width: 560px;
    color: var(--muted);
    line-height: 2;
}

.search-empty-form {
    max-width: 520px;
    margin: 0 auto 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.search-empty-form input {
    border: 1px solid rgba(30, 30, 30, 0.1);
    border-radius: 18px;
    min-height: 48px;
    padding: 0 14px;
    outline: none;
}

.search-empty-form button,
.search-back-btn {
    border: 0;
    border-radius: 18px;
    min-height: 48px;
    padding: 0 18px;
    font-weight: 950;
    cursor: pointer;
}

.search-empty-form button {
    background: var(--primary);
    color: #fff;
}

.search-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f6ff;
    color: var(--primary);
}

@media (max-width: 1100px) {
    .search-hero-card {
        grid-template-columns: 1fr;
    }

    .search-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 820px) {
    .search-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-results-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-product-image {
        height: 230px;
    }
}

@media (max-width: 560px) {
    .search-hero-card {
        border-radius: 24px;
        padding: 22px;
    }

    .search-hero-card::after {
        font-size: 62px;
        left: 12px;
        bottom: -6px;
    }

    .search-hero-card h1 {
        font-size: 25px;
    }

    .search-page-form,
    .search-empty-form {
        grid-template-columns: 1fr;
    }

    .search-page-form button,
    .search-empty-form button {
        min-height: 46px;
    }

    .search-products-grid {
        grid-template-columns: 1fr;
    }

    .search-product-card {
        border-radius: 22px;
    }

    .search-product-image {
        height: 260px;
        border-radius: 18px;
    }

    .search-product-actions,
    .search-secondary-actions {
        grid-template-columns: 1fr;
    }
}
/* ==========================================
   Search Pagination
========================================== */

.search-pagination {
    direction: rtl;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 42px;
}

.search-pagination-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
}

.search-pagination-link,
.search-pagination-arrow {
    min-width: 42px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 13px;

    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    background: #ffffff;

    box-shadow:
        0 5px 15px rgba(15, 23, 42, 0.05);

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.search-pagination-link:hover,
.search-pagination-arrow:hover {
    color: #ffffff;
    text-decoration: none;

    border-color: #1d4ed8;
    background: #1d4ed8;

    transform: translateY(-2px);

    box-shadow:
        0 10px 22px rgba(29, 78, 216, 0.2);
}

.search-pagination-link.active {
    color: #ffffff;

    border-color: #1d4ed8;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    box-shadow:
        0 10px 24px rgba(29, 78, 216, 0.24);

    cursor: default;
}

.search-pagination-arrow {
    min-width: 78px;
}

.search-pagination-arrow.disabled {
    color: #94a3b8;

    border-color: #e5e7eb;
    background: #f8fafc;

    box-shadow: none;
    cursor: not-allowed;
}

.search-pagination-arrow.disabled:hover {
    color: #94a3b8;
    border-color: #e5e7eb;
    background: #f8fafc;
    transform: none;
}

.search-pagination-dots {
    min-width: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #94a3b8;
    font-size: 14px;
    font-weight: 900;
}

.search-pagination-info {
    margin-top: 15px;

    color: #64748b;
    font-size: 12px;
    line-height: 1.9;
    text-align: center;
}

.search-pagination-info strong {
    color: #1e293b;
    font-weight: 900;
}

.search-pagination-info span {
    margin: 0 6px;
    color: #cbd5e1;
}

@media (max-width: 575px) {
    .search-pagination {
        gap: 7px;
        margin-top: 30px;
    }

    .search-pagination-link {
        min-width: 37px;
        height: 37px;
        padding: 0 9px;

        font-size: 11px;
        border-radius: 10px;
    }

    .search-pagination-arrow {
        min-width: 65px;
        height: 37px;
        padding: 0 10px;

        font-size: 11px;
        border-radius: 10px;
    }

    .search-pagination-pages {
        gap: 5px;
    }

    .search-pagination-info {
        padding: 0 10px;
        font-size: 10px;
    }
}