﻿
.card-link {
    text-decoration: none;
    color: inherit;
}

.card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* ===== SEARCH PAGE ===== */

.search-page {
    padding: 80px 40px;
    background: radial-gradient(circle at 20% 20%, rgba(30,143,74,0.05), transparent 40%), radial-gradient(circle at 80% 80%, rgba(0,0,0,0.03), transparent 50%), #f5f7f9;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== HEADER ===== */

.search-header {
    background: linear-gradient(135deg, rgba(30,143,74,0.9), rgba(15,95,47,0.9));
    backdrop-filter: blur(14px);
    padding: 60px;
    border-radius: 28px;
    margin-bottom: 70px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.12);
    position: relative;
    overflow: hidden;
}

    .search-header::after {
        content: "";
        position: absolute;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
        top: -120px;
        right: -120px;
    }

/* ===== SEARCH FORM ===== */

.search-form {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.search-input-wrap {
    position: relative;
    min-width: 405px;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .7;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 42px;
    border-radius: 14px;
    border: none;
    font-size: 15px;
}

.search-btn {
    background: #0b3e1d;
    color: white;
    padding: 16px 26px;
    border-radius: 14px;
    border: none;
    font-weight: 600;
    transition: 0.2s;
}

    .search-btn:hover {
        background: #062c14;
    }

/* ===== SORT ===== */

.search-sort-wrap {
    position: relative;
}

.search-sort-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .6;
}

.search-sort {
    appearance: none;
    padding: 14px 42px 14px 36px;
    border-radius: 14px;
    border: none;
    font-size: 14px;
    background: white;
    min-width: 210px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.search-results-count {
    margin-top: 14px;
    color: white;
    font-size: 14px;
    opacity: .9;
}

/* ===== SECTION HEADERS ===== */

.section-head {
    margin-bottom: 34px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #1d1d1d;
    margin-bottom: 6px;
}

.section-subtitle {
    font-size: 14px;
    color: #6b6b6b;
}

/* ===== SECTION SPACING ===== */

.search-section {
    margin-bottom: 110px;
}

/* ===== RESULTS GRID ===== */

.restaurants-grid,
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px,1fr));
    gap: 28px;
}

/* ===== OFFERS PAGINATION (compact) ===== */

.offers-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    flex-wrap: wrap;
}

    .offers-pagination .page-link {
        height: 38px;
        padding: 0 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        font-size: 14px;
        font-weight: 500;
        color: #374151;
        background: white;
        cursor: pointer;
        transition: 0.2s;
        text-decoration: none;
    }

        .offers-pagination .page-link:hover {
            border-color: #16a34a;
            color: #16a34a;
        }

    .offers-pagination .page-item.active .page-link {
        border: 2px solid #16a34a !important;
        color: #16a34a !important;
        font-weight: 700;
        background: #f0fdf4 !important;
        box-shadow: none !important;
    }

    .offers-pagination .page-item.disabled .page-link {
        color: #9ca3af;
        border-color: #e5e7eb;
        cursor: not-allowed;
        pointer-events: none;
    }

    .offers-pagination .page-link:focus {
        outline: none;
        box-shadow: none;
    }

    .offers-pagination .prev-next {
        font-weight: 600 !important;
        border-radius: 8px !important;
    }

    .offers-pagination .page-input-wrap {
        background: white;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        padding: 0 8px;
        height: 38px;
        display: flex;
        align-items: center;
    }

    .offers-pagination .page-input {
        width: 44px;
        border: none;
        outline: none;
        font-size: 14px;
        font-weight: 600;
        color: #16a34a;
        text-align: center;
    }

        .offers-pagination .page-input::-webkit-outer-spin-button,
        .offers-pagination .page-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .offers-pagination .page-input[type=number] {
            -moz-appearance: textfield;
        }

/* =========================
   OFFER CARD (SITE.CSS VERSION)
========================= */

.offer-card {
    width: 100%;
    background: white;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
    transition: transform .2s ease;
    margin: 0 !important;
}

    .offer-card:hover {
        transform: translateY(-4px);
    }

.offer-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

    .offer-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.offer-rating {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #3e8e55;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
}

.offer-body {
    padding: 16px 18px 18px;
}

.offer-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.offer-restaurant {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 14px;
}

.offer-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.offer-price {
    font-size: 20px;
    font-weight: 700;
    color: #3e8e55;
}

.offer-stock {
    font-size: 13px;
    color: #6b7280;
}

.offer-timer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

/* =========================
   RESTAURANT CARD (SITE.CSS VERSION)
========================= */

.restaurant-card {
    width: 100%;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 20px 50px rgba(0,0,0,.08);
    transition: .35s;
    margin: 0 !important;
}

    .restaurant-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 35px 80px rgba(0,0,0,.15);
    }

.restaurant-image {
    height: 210px;
    position: relative;
    overflow: hidden;
}

.restaurant-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.restaurant-rating {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #16a34a;
    color: white;
    padding: 7px 14px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.restaurant-body {
    padding: 70px 24px 26px;
    position: relative;
}

.restaurant-logo {
    position: absolute;
    top: -40px;
    left: 24px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    padding: 6px;
    object-fit: cover;
    box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

.restaurant-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.restaurant-tags {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 10px;
}

.restaurant-meta {
    display: flex;
    gap: 18px;
    font-size: 14px;
    color: #475569;
}

    .restaurant-meta i {
        color: #16a34a;
        margin-right: 4px;
    }

/* ===== TIMER BADGE ===== */

.countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff3cd;
    color: #8a5a00;
}

    .countdown.expired {
        background: #f8d7da;
        color: #842029;
    }

/*
    =================
    RESPONSIVE
    =================
*/

@media (max-width: 935px) {
    .search-form {
        flex-wrap: wrap;
        justify-content: center;
    }
    .search-results-count {
        text-align: center;
    }
}

@media (max-width: 710px) {
    .search-input-wrap {
        min-width: 250px;
    }
}

@media (max-width: 640px) {
    .search-form {
        flex-direction: column;
    }
    .search-btn, .search-input-wrap, .search-sort-wrap, #sortSelect {
        width: 100%;
    }
    .search-header {
        padding:60px 30px;
    }
    .search-input-wrap {
        min-width: 150px;
    }
    .search-section-header {
        text-align: center;
    }
}