:root {
    --nearby-green: #1B4FD8;
    /* primary */
    --nearby-green-dark: #153aa8;
    /* primary dark */
    --nearby-pink: #F72585;
    /* secondary */
    --nearby-bg: #FAF7F2;
    /* background */
    --nearby-ink: #080d1f;
    --nearby-muted: #5e6472;
    --nearby-line: #edf0ef;
    --nearby-soft: rgba(27, 79, 216, .06);
}

body {
    background: var(--nearby-bg);
    color: var(--nearby-ink);
}

.ends-soon {
    color: var(--nearby-pink);
    font-weight: 700;
}

.header-section,
.slicknav_menu,
#scroll-to-top {
    display: none !important;
}

.footer-section {
    background-color: rgba(255, 253, 250, 1) !important;
}

.nearby-deals-page {
    min-height: 100vh;
    font-family: "Inter", "Nunito", Arial, sans-serif;
    background: linear-gradient(180deg, rgba(250, 247, 242, 1) 0%, rgba(250, 247, 242, 1) 62%, rgba(250, 247, 242, 1) 100%);
}

.deals-container {
    width: min(100%, 1512px);
    margin: 0 auto;
    padding: 0 28px;
}

.deals-header {
    position: sticky;
    top: 0;
    z-index: 20;
    /* background: var(--nearby-bg); */
    border-bottom: none;
    backdrop-filter: none;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.deals-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-left: 1.5%;
    margin-right: 1.5%;
    min-height: 86px;
    transition: min-height 0.3s ease;
}

.deals-logo img {
    width: 126px;
    max-width: 100%;
    transition: width 0.3s ease;
}

.deals-search {
    width: 55%;
    position: relative;
}

.deals-search-wrapper {
    display: flex;
    align-items: center;
    height: 60px;
    background-color: #fefcfa;
    border: 1px solid #e7e4dc;
    border-radius: 999px;
    padding: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: height 0.3s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.deals-search-wrapper:focus-within {
    border-color: rgba(27, 79, 216, 0.36);
    box-shadow: 0 10px 30px rgba(27, 79, 216, 0.08);
}

.deals-search-categories-container {
    position: relative;
    display: inline-block;
    height: 100%;
}

.deals-search-categories-trigger {
    height: 100%;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 700;
    color: #0f1734;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    white-space: nowrap;
    user-select: none;
    outline: none;
    transition: font-size 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
}

.deals-search-categories-trigger:hover {
    opacity: 0.8;
}

.deals-search-categories-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 8px;
    background: rgba(65, 66, 70, 0.98);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    padding: 8px 0;
    min-width: 200px;
    z-index: 100;
    display: none;
    backdrop-filter: blur(8px);
}

.deals-search-categories-dropdown.is-open {
    display: block;
}

.deals-search-categories-item {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #eceae4;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    outline: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.deals-search-categories-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.deals-search-categories-item.is-selected {
    color: #ffffff;
}

.deals-search-categories-item .check-icon {
    width: 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    font-size: 12px;
}

.deals-search-categories-item.is-selected .check-icon {
    visibility: visible;
}

.deals-search-divider {
    width: 1px;
    height: 24px;
    background-color: #e7e4dc;
    flex-shrink: 0;
}

.deals-search input {
    flex: 1;
    height: 100% !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 16px !important;
    color: #0b162c !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

.deals-search input::placeholder {
    color: #969594 !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}

.deals-search-button {
    height: 52px;
    background-color: #1b4fd8;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 0 32px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: height 0.3s ease, padding 0.3s ease, font-size 0.3s ease, background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.deals-search-button:hover {
    background-color: #113495;
}

/* Scroll Shrink Classes */
.deals-header.header-shrink {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    background: var(--nearby-bg);
}

.deals-header.header-shrink .deals-nav {
    min-height: 64px;
}

.deals-header.header-shrink .deals-logo img {
    width: 106px;
}

.deals-header.header-shrink .deals-search-wrapper {
    height: 48px;
}

.deals-header.header-shrink .deals-search-categories-trigger {
    font-size: 14px;
    padding: 0 16px;
}

.deals-header.header-shrink .deals-search-button {
    height: 40px;
    padding: 0 24px;
    font-size: 14px;
}

.deals-search-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: none;
    max-height: 520px;
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--nearby-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(8, 13, 31, .16);
    z-index: 110;
}

.deals-search-panel.is-open {
    display: block;
}

.deals-search-title {
    margin: 0 0 10px;
    color: var(--nearby-muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.deals-search-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
}

.deals-search-row:hover {
    background: var(--nearby-soft);
}

.deals-search-row img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 12px;
    background: #eef4f1;
}

.deals-search-row strong,
.deals-search-row span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.deals-search-row span {
    color: var(--nearby-muted);
    font-size: 13px;
}

.deals-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 34px;
}

.deals-links a {
    color: var(--nearby-pink);
    font-weight: 600;
    white-space: nowrap;
}

.deals-main {
    padding: 28px 0 48px;
}

.deals-section {
    margin-bottom: 18px;
    padding: 0% 1% 1% 1%;
}

.deal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(210px, 1fr));
    gap: 24px;
}

.deal-empty {
    grid-column: 1 / -1;
    padding: 34px;
    color: var(--nearby-muted);
    border: 1px dashed #dfe4e2;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

@media (max-width: 900px) {
    .deals-header {
        position: relative;
    }

    .deals-container {
        padding: 0 16px;
    }

    .deals-nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
        min-height: auto;
    }

    .deals-search {
        width: 100%;
        margin: 4px 0;
    }

    .deals-links {
        justify-content: center;
        gap: 24px;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .deals-section {
        padding: 20px 0 28px;
    }

    .deals-search-wrapper {
        height: 50px;
        padding: 2px;
    }

    .deals-search-categories-trigger {
        padding: 0 10px;
        font-size: 13px;
        max-width: 110px;
    }

    .deals-search input {
        padding: 0 8px !important;
        font-size: 13px !important;
    }

    .deals-search-button {
        height: 44px;
        padding: 0 16px;
        font-size: 13px;
    }

    .deals-search-categories-dropdown {
        top: calc(100% + 6px);
        left: 0;
        min-width: 180px;
    }

    .deals-header.header-shrink .deals-nav {
        min-height: auto;
    }

    .deals-header.header-shrink .deals-search-wrapper {
        height: 46px;
    }

    .deals-header.header-shrink .deals-search-categories-trigger {
        font-size: 12px;
        padding: 0 8px;
    }

    .deals-header.header-shrink .deals-search-button {
        height: 40px;
        padding: 0 12px;
        font-size: 12px;
    }
}

.module-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: capitalize;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
    color: #1B4FD8;
    background: linear-gradient(135deg, rgba(27, 79, 216, .12), rgba(255, 255, 255, .9));
    border: 1px solid rgba(27, 79, 216, .18);
    box-shadow: 0 10px 30px rgba(27, 79, 216, .08);
}

/* Category Detail Section Styles */
.category-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-circle-btn {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(12, 20, 37, 0.1);
    background: #fff;
    box-shadow: 0 4px 12px rgba(8, 13, 31, 0.05);
    cursor: pointer;
    color: #0f1734;
    font-size: 16px;
    transition: all 0.2s ease;
}

.back-circle-btn:hover {
    background: #faf7f2;
    transform: scale(1.05);
}

.category-detail-icon-wrap {
    display: grid;
    place-items: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ffe3ec;
    box-shadow: 0 8px 20px rgba(27, 79, 216, 0.05);
}

.category-detail-icon-wrap img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.category-detail-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.category-detail-title {
    margin: 0;
    font-size: 26px;
    font-weight: 850;
    color: #0f1734;
}

.category-detail-tagline {
    margin: 0;
    font-size: 15px;
    color: #5e6472;
    font-weight: 500;
}

.category-detail-count {
    font-size: 13px;
    font-weight: 700;
    color: #e81d63;
}



/* Grid head row */
.grid-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 28px;
}

.grid-section-title {
    margin: 0;
    font-size: 20px;
    font-weight: 850;
    color: #0f1734;
}

.grid-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-label {
    font-size: 14px;
    font-weight: 600;
    color: #5e6472;
}

.sort-select {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(12, 20, 37, 0.1);
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    color: #0f1734;
    cursor: pointer;
    outline: none;
}

/* Pagination & Stats */
.pagination-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(12, 20, 37, 0.08);
    padding-top: 24px;
    margin-top: 36px;
}

.pagination-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn {
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    color: #5e6472;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: rgba(12, 20, 37, 0.04);
    color: #0f1734;
}

.pagination-btn.is-active {
    background: #ffe3ec;
    color: #e81d63;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-stats {
    font-size: 14px;
    font-weight: 600;
    color: #5e6472;
}

/* Unified Category Details Grid Layout */
.deals-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 40px;
    margin-top: 28px;
}

.offers-column {
    min-width: 0;
}

.stores-column {
    background: #fff;
    border: 1px solid rgba(12, 20, 37, 0.06);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(8, 13, 31, 0.04);
    align-self: start;
}

.column-title {
    font-size: 20px;
    font-weight: 850;
    color: #0f1734;
    margin: 0;
}

.view-all-stores-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--nearby-pink);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.view-all-stores-link:hover {
    opacity: 0.8;
}

/* Category Pill Styles (Horizontal scroll selector) */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: .5% 2.5% .5% 1%;
    border-radius: 999px;
    border: 1px solid rgba(12, 20, 37, 0.08);
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    color: #333947;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category-pill:hover {
    border-color: rgba(27, 79, 216, 0.2);
    background: #faf7f2;
}

.category-pill.is-active {
    border-color: transparent;
    background: #ffe3ec;
    color: #e81d63;
}

.category-pill img,
.category-pill i {
    width: 18px;
    height: 18px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Horizontal Offers List Card */
.offer-list-card {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 20px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(12, 20, 37, 0.06);
    box-shadow: 0 10px 30px rgba(8, 13, 31, .03);
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.offer-list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(8, 13, 31, .07);
    border-color: rgba(27, 79, 216, 0.15);
}

.offer-card-media {
    position: relative;
    width: 180px;
    height: 120px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f7fb;
}

.offer-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offer-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    color: #fff;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--nearby-pink), #b10a63);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.offer-card-middle {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.offer-store-logo {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(12, 20, 37, 0.08);
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offer-store-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offer-store-logo-initials {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--nearby-soft);
    color: var(--nearby-green);
    font-weight: 800;
    font-size: 16px;
}

.offer-store-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.offer-store-name {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #0f1734;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offer-store-meta {
    margin: 0;
    font-size: 13px;
    color: #5e6472;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offer-store-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #ffb000;
    margin-top: 4px;
}

.offer-card-right {
    width: 240px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-shrink: 0;
    align-self: stretch;
}

.offer-deal-tag {
    display: flex;
    align-items: center;
    gap: 10%;
    padding: 10px 14px;
    background: #f4faf6;
    border: 1px dashed #a7f3d0;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
}

.offer-deal-tag .tag-icon {
    color: #10b981;
    font-size: 16px;
}

.offer-deal-tag .tag-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.offer-deal-tag strong {
    color: #065f46;
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offer-deal-tag span {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.offer-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1.5px solid #1b4fd8;
    background: #ffffff;
    color: #1b4fd8;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.offer-save-btn:hover {
    background: #eff6ff;
}

/* Vertical Store List Item */
.store-list-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(12, 20, 37, 0.05);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.store-list-item:hover {
    transform: translateX(4px);
    border-color: rgba(27, 79, 216, 0.15);
    box-shadow: 0 8px 20px rgba(8, 13, 31, 0.04);
}

.store-list-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(12, 20, 37, 0.08);
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.store-list-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.store-list-logo-initials {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--nearby-soft);
    color: var(--nearby-green);
    font-weight: 850;
    font-size: 14px;
}

.store-list-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
    min-width: 0;
}

.store-list-name {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f1734;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-list-meta {
    margin: 0;
    font-size: 12px;
    color: #5e6472;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-list-dist {
    font-size: 12px;
    color: #5e6472;
    font-weight: 650;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.btn-browse-all-stores {
    width: 100%;
    margin-top: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1.5px solid #1b4fd8;
    background: #ffffff;
    color: #1b4fd8;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.btn-browse-all-stores:hover {
    background: #eff6ff;
    transform: translateY(-1px);
}

.category-scroll-container {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    margin-bottom: 24px;
}

.category-scroll-track-wrapper {
    flex-grow: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
}

.category-scroll-track-wrapper::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.category-scroll-track {
    display: flex;
    gap: 12px;
    padding: 4px 0;
}

.scroll-arrow {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(12, 20, 37, 0.08);
    background: #fff;
    box-shadow: 0 4px 10px rgba(8, 13, 31, 0.04);
    cursor: pointer;
    color: #333947;
    font-size: 12px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.scroll-arrow:hover {
    background: #faf7f2;
    border-color: rgba(27, 79, 216, 0.2);
}

@media (max-width: 992px) {
    .deals-layout-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .offer-list-card {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 20px;
    }

    .offer-card-media {
        width: 100%;
        height: 200px;
    }

    .offer-card-middle {
        width: 100%;
    }

    .offer-card-right {
        width: 100%;
        align-items: center;
        flex-direction: row;
        gap: 16px;
        align-self: auto;
    }

    .offer-deal-tag {
        width: auto;
        flex: 1;
    }
}

@media (max-width: 768px) {
    .scroll-arrow {
        display: none !important;
    }

    .category-scroll-track-wrapper {
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 576px) {
    .category-detail-header {
        gap: 14px;
    }

    .back-circle-btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .category-detail-icon-wrap {
        width: 60px;
        height: 60px;
    }

    .category-detail-icon-wrap img {
        width: 36px;
        height: 36px;
    }

    .category-detail-title {
        font-size: 20px;
    }

    .category-detail-count {
        font-size: 12px;
    }

    .grid-head-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .pagination-footer-row {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .offer-list-card {
        padding: 10px;
        gap: 12px;
        border-radius: 16px;
    }

    .offer-card-media {
        height: 130px;
        border-radius: 10px;
    }

    .offer-store-logo {
        width: 40px;
        height: 40px;
    }

    .offer-store-name {
        font-size: 15px;
        line-height: 1.3;
    }

    .offer-card-right {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .offer-deal-tag {
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
    }

    .offer-save-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
        font-size: 14px;
    }

    .stores-column {
        padding: 16px;
        border-radius: 16px;
    }
}