:root {
    --ink: #172033;
    --ink-soft: #596174;
    --paper: #ffffff;
    --canvas: #f5f6f8;
    --line: #e4e7ec;
    --brand: #f4512c;
    --brand-dark: #d83c1b;
    --accent: #12715b;
    --accent-soft: #e7f4ef;
    --display: 'Manrope', sans-serif;
    --body: 'DM Sans', sans-serif;
    --shadow: 0 14px 40px rgba(23, 32, 51, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--canvas) !important;
    color: var(--ink);
    font-family: var(--body) !important;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(#d9dde4 0.7px, transparent 0.7px);
    background-size: 18px 18px;
    opacity: 0.35;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ink);
    font-family: var(--display) !important;
    letter-spacing: 0;
}

a {
    color: inherit;
}

.modern-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(228, 231, 236, 0.9);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
}

.modern-header__bar {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 20px;
    min-height: 76px;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

.modern-logo img {
    display: block;
    width: 154px;
    height: auto;
}

.modern-search {
    position: relative;
}

.modern-search i {
    position: absolute;
    top: 50%;
    left: 17px;
    color: var(--ink-soft);
    font-size: 20px;
    transform: translateY(-50%);
}

.modern-search input {
    width: 100%;
    height: 46px;
    padding: 0 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8f9fb;
    color: var(--ink);
    font: 500 15px var(--body);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.modern-search input:focus {
    border-color: var(--brand);
    background: var(--paper);
    box-shadow: 0 0 0 3px rgba(244, 81, 44, 0.12);
}

.country-dropdown {
    position: relative;
    user-select: none;
}

.country-dropdown__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
    font: 600 13px var(--body);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.country-dropdown__btn:hover,
.country-dropdown.is-open .country-dropdown__btn {
    border-color: var(--brand);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.country-flag {
    font-size: 17px;
    line-height: 1;
}

.country-name {
    font-weight: 700;
    color: var(--ink);
    font-size: 13px;
}

.country-dropdown__btn i {
    font-size: 16px;
    color: var(--ink-soft);
    transition: transform 0.2s ease;
}

.country-dropdown.is-open .country-dropdown__btn i {
    transform: rotate(180deg);
}

.country-dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    padding: 8px 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.country-dropdown.is-open .country-dropdown__menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.country-dropdown__header {
    padding: 6px 16px 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line);
    margin-bottom: 4px;
}

.country-dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: var(--ink);
    text-decoration: none !important;
    font-size: 13px;
    transition: background 0.15s ease;
}

.country-dropdown__item:hover {
    background: var(--surface);
    color: var(--brand) !important;
}

.country-dropdown__item.is-active {
    background: rgba(244, 81, 44, 0.08);
    color: var(--brand) !important;
    font-weight: 700;
}

.country-item__text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.country-item__name {
    font-size: 13px;
    line-height: 1.2;
}

.country-item__curr {
    font-size: 11px;
    color: var(--ink-soft);
}

.country-item__check {
    margin-left: auto;
    color: var(--brand);
    font-size: 16px;
}

.modern-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.modern-nav a {
    padding: 10px 12px;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 700;
}

.modern-nav a:hover,
.modern-nav a:focus {
    color: var(--brand) !important;
}

.modern-nav__cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--paper);
}

.modern-mobile-search {
    display: none;
}

.wrapper {
    float: none !important;
    width: auto !important;
    padding-top: 0 !important;
}

.deal-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: min(440px, 52vw);
    max-width: 1440px;
    margin: 0 auto;
    overflow: hidden;
    isolation: isolate;
    background-position: center;
    background-size: cover;
}

.deal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(12, 18, 28, 0.56);
}

.deal-hero__content {
    width: min(720px, 100%);
    padding: 68px max(24px, calc((100vw - 1280px) / 2));
    color: #fff;
}

.deal-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.deal-hero__eyebrow::before {
    content: '';
    width: 26px;
    height: 3px;
    background: var(--brand);
}

.deal-hero h1 {
    max-width: 650px;
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    line-height: 1.02;
}

.deal-hero p {
    max-width: 560px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 17px;
    line-height: 1.6;
}

.deal-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.deal-hero__button,
.deal-hero__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 800;
}

.deal-hero__button {
    background: var(--brand);
    color: #fff;
}

.deal-hero__button:hover {
    background: var(--brand-dark);
    color: #fff !important;
}

.deal-hero__link {
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: #fff;
}

.deal-hero__link:hover {
    border-color: #fff;
    color: #fff !important;
}

.storefront-section {
    padding: 64px 0 4px;
}

.storefront-section:last-child {
    padding-bottom: 80px;
}

.storefront-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.storefront-heading__label {
    display: block;
    margin-bottom: 5px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.storefront-heading h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.15;
}

.storefront-heading p {
    margin: 8px 0 0;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.5;
}

.storefront-heading__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.storefront-heading__link:hover {
    color: var(--brand) !important;
}

.deal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.deal-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 1px 0 rgba(23, 32, 51, 0.02);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.deal-card:hover {
    border-color: #d4d8df;
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.deal-card__image {
    position: relative;
    display: grid;
    width: 100%;
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
    background: #f7f8fa;
}

.deal-card__image img {
    width: 100%;
    height: 100%;
    padding: 16px;
    object-fit: contain;
    transition: transform 240ms ease;
}

.deal-card:hover .deal-card__image img {
    transform: scale(1.035);
}

.deal-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 9px;
    border-radius: 5px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.deal-card__body {
    padding: 16px;
}

.deal-card__title {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--ink);
    font: 700 15px/1.45 var(--body) !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.deal-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.deal-card__price {
    min-width: 0;
    color: var(--ink);
    font: 800 18px var(--display);
    overflow-wrap: anywhere;
}

.deal-card__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    font-size: 19px;
}

.deal-card__action:hover {
    background: var(--brand-dark);
    color: #fff !important;
}

.empty-deals {
    grid-column: 1 / -1;
    padding: 36px;
    border: 1px dashed var(--line);
    color: var(--ink-soft);
    text-align: center;
}

.modern-footer {
    margin-top: 76px;
    background: #172033;
    color: #fff;
}

.modern-footer__main {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(150px, 0.7fr));
    gap: 64px;
    padding: 56px 0 42px;
}

.modern-footer__brand img {
    width: 150px;
    padding: 8px;
    background: #fff;
}

.modern-footer__brand p {
    max-width: 410px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.7;
}

.modern-footer h3 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.modern-footer ul {
    display: grid;
    gap: 11px;
}

.modern-footer li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.modern-footer li a:hover {
    color: #fff !important;
}

.modern-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
}

.modern-footer__bottom a {
    color: rgba(255, 255, 255, 0.72);
}

.search-empty {
    display: none;
    max-width: 1320px;
    margin: 36px auto 0;
    padding: 28px 24px;
    color: var(--ink-soft);
    text-align: center;
}

.category-page {
    min-height: 70vh;
    padding: 34px 0 80px;
}

.category-breadcrumb {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 42px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
}

.category-breadcrumb a:hover {
    color: var(--brand) !important;
}

.category-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 28px;
}

.category-heading h1 {
    margin: 0;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
}

.category-heading p {
    margin: 8px 0 0;
    color: var(--ink-soft);
}

.category-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.category-sort select {
    height: 42px;
    min-width: 190px;
    padding: 0 36px 0 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background-color: var(--paper);
    color: var(--ink);
    font: 600 14px var(--body);
}

.category-pills {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font: 600 13px var(--body);
    white-space: nowrap;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.category-pill:hover,
.category-pill.is-active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff !important;
}

.category-pill__count {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 11px;
    font-weight: 700;
}

.category-pill.is-active .category-pill__count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Dedicated Categories Index Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px 22px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    border-color: var(--brand);
}

.category-card__icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--surface);
    overflow: hidden;
}

.category-card__icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.category-card__title {
    margin: 0 0 6px;
    color: var(--ink);
    font: 700 16px/1.3 var(--display);
}

.category-card__count {
    color: var(--ink-soft);
    font: 500 13px var(--body);
}

.category-card__arrow {
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.category-card:hover .category-card__arrow {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 991.98px) {
    .modern-header__bar {
        grid-template-columns: auto 1fr auto;
        gap: 14px;
    }

    .modern-header__bar > .modern-search {
        display: none;
    }

    .modern-nav a:not(.modern-nav__cta) {
        display: none;
    }

    .modern-mobile-search {
        display: block;
        padding: 0 20px 14px;
    }

    .deal-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .modern-header__bar {
        min-height: 64px;
        padding: 0 16px;
    }

    .country-name {
        display: none;
    }

    .country-dropdown__btn {
        padding: 0 9px;
    }

    .modern-logo img {
        width: 126px;
    }

    .modern-nav__cta {
        padding: 8px 10px !important;
    }

    .deal-hero {
        min-height: 390px;
        background-position: center;
    }

    .deal-hero__content {
        padding: 46px 20px;
    }

    .deal-hero h1 {
        font-size: 38px;
    }

    .deal-hero p {
        font-size: 15px;
    }

    .storefront-section {
        padding-top: 46px;
    }

    .storefront-heading {
        align-items: flex-start;
    }

    .storefront-heading p {
        display: none;
    }

    .deal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .deal-card__image img {
        padding: 10px;
    }

    .deal-card__body {
        padding: 12px;
    }

    .deal-card__title {
        min-height: 40px;
        margin-bottom: 10px;
        font-size: 13px !important;
        line-height: 1.4;
    }

    .deal-card__price {
        font-size: 15px;
    }

    .deal-card__action {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .modern-footer__main {
        grid-template-columns: 1fr 1fr;
        gap: 36px 24px;
    }

    .modern-footer__brand {
        grid-column: 1 / -1;
    }

    .modern-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-page {
        padding-top: 24px;
    }

    .category-breadcrumb {
        margin-bottom: 28px;
    }

    .category-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .category-sort {
        justify-content: space-between;
    }

    .category-sort select {
        min-width: 0;
        width: 68%;
    }
}

@media (max-width: 380px) {
    .deal-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .deal-card__action {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
