/* ============================================================
   Public store directory — polished, photo-first, responsive.
   Built on the Setu brand tokens from rewardhub.css.
   ============================================================ */

/* ---------- Hero ---------- */
.dir-hero {
    position: relative;
    overflow: hidden;
    background: var(--rh-grad, linear-gradient(135deg, #061b42 0%, #0a2f73 52%, #1e50a8 100%));
    color: #fff;
}
.dir-hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 193, 7, .16) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .5;
    pointer-events: none;
}
.dir-hero::after {
    content: "";
    position: absolute; left: 50%; top: -160px; width: 760px; height: 380px;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(255, 193, 7, .22), transparent);
    filter: blur(30px);
    pointer-events: none;
}
.dir-hero-inner { position: relative; z-index: 1; }
.dir-hero h1 { font-weight: 800; letter-spacing: -.02em; }
.dir-hero .accent {
    background: var(--rh-grad-accent, linear-gradient(135deg, #ffc107, #ff7a1a));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.dir-eyebrow {
    display: inline-flex; align-items: center; gap: .4rem;
    border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .08);
    padding: .35rem .8rem; border-radius: 999px; font-size: .74rem; font-weight: 600;
    color: rgba(255, 255, 255, .8); backdrop-filter: blur(4px);
}

/* Search card */
.dir-search {
    background: #fff; border-radius: 18px; padding: .5rem;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55);
    display: flex; flex-direction: column; gap: .35rem;
}
.dir-search .field { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; }
.dir-search input, .dir-search select {
    border: 0; outline: 0; background: transparent; width: 100%;
    font-size: .95rem; color: #1f2637;
}
.dir-search .sep { height: 1px; background: #eef0f6; }
.dir-search .btn { border-radius: 12px; }
@media (min-width: 576px) {
    .dir-search { flex-direction: row; align-items: center; }
    .dir-search .field.grow { flex: 1; }
    .dir-search .field.city { width: 190px; }
    .dir-search .sep { width: 1px; height: 30px; }
}

.dir-trust {
    display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.6rem;
    color: rgba(255, 255, 255, .55); font-size: .78rem;
}
.dir-pop { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; }
.dir-pop a {
    border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .72); padding: .28rem .7rem; border-radius: 999px;
    font-size: .76rem; font-weight: 500; text-decoration: none; transition: .18s;
}
.dir-pop a:hover { border-color: var(--rh-accent, #ffc107); background: rgba(255, 193, 7, .15); color: #fff; }

/* ---------- Chip rails ---------- */
.dir-rail {
    display: flex; gap: .75rem; overflow-x: auto; scroll-behavior: smooth;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px;
}
.dir-rail::-webkit-scrollbar { display: none; }
.dir-rail > * { flex: 0 0 auto; }

.dir-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    border: 1px solid var(--rh-border, #eaecf5); background: var(--rh-surface, #fff);
    color: var(--rh-muted, #6e7891); padding: .4rem .85rem; border-radius: 999px;
    font-size: .82rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: .16s;
}
.dir-chip:hover, .dir-chip.active {
    border-color: var(--rh-primary, #0a2f73); color: var(--rh-primary, #0a2f73);
    background: var(--rh-primary-soft, #e8eef9);
}
.dir-chip.active { background: var(--rh-primary, #0a2f73); color: #fff; }
.dir-rail-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--rh-muted); white-space: nowrap; }

/* ---------- Explore section ---------- */
.sec-eyebrow {
    display: inline-flex; align-items: center; font-size: .72rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .08em; color: var(--rh-secondary, #ff7a1a);
}
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .6rem; }
@media (min-width: 576px) { .cat-grid { gap: .8rem; } }
.cat-tile {
    display: flex; flex-direction: column; align-items: center; gap: .55rem;
    padding: 1.1rem .55rem; text-decoration: none; color: var(--rh-text, #1f2937);
    background: var(--rh-surface, #fff); border: 1px solid var(--rh-border, #eaecf5);
    border-radius: 16px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cat-tile:hover {
    transform: translateY(-4px); border-color: rgba(10, 47, 115, .28);
    box-shadow: 0 18px 34px -20px rgba(10, 47, 115, .45);
}
.cat-tile-ic {
    width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
    font-size: 1.45rem; transition: transform .2s ease;
}
.cat-tile:hover .cat-tile-ic { transform: scale(1.08) rotate(-3deg); }
.cat-tile-name { font-size: .82rem; font-weight: 700; text-align: center; line-height: 1.2; }
.cat-tile-ic.c1 { background: #e8eef9; color: #0a2f73; }
.cat-tile-ic.c2 { background: #fff0e3; color: #ff7a1a; }
.cat-tile-ic.c3 { background: #e4f7ec; color: #16a34a; }
.cat-tile-ic.c4 { background: #efe9fb; color: #7c3aed; }
.cat-tile-ic.c5 { background: #fce7f0; color: #db2777; }
.cat-tile-ic.c6 { background: #e2f6f5; color: #0d9488; }
.cat-tile-ic.c7 { background: #fef3d6; color: #b7791f; }
.cat-tile-all .cat-tile-ic { background: var(--rh-grad, linear-gradient(135deg, #061b42, #1e50a8)); color: #fff; }

/* ---------- Shop photo card ---------- */
.shop-card {
    display: flex; flex-direction: column; height: 100%;
    background: var(--rh-surface, #fff); border: 1px solid var(--rh-border, #eaecf5);
    border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 42px -22px rgba(10, 47, 115, .5);
    border-color: rgba(10, 47, 115, .28);
}
.shop-card .img {
    position: relative; aspect-ratio: 16 / 10; overflow: hidden;
    background: linear-gradient(150deg, #ffffff 0%, var(--rh-surface-2, #f4f7fe) 100%);
    border-bottom: 1px solid var(--rh-border, #eaecf5);
    display: flex; align-items: center; justify-content: center; padding: 18px;
}
/* Logos come in every shape/size. Sizing the image with max-width/height + auto
   (padding on the CONTAINER, not the img) fits the whole mark inside a clean frame
   — never cropped, always centred, whatever the source aspect ratio. */
.shop-card .img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform .4s ease; }
.shop-card:hover .img img { transform: scale(1.06); }
.shop-card .img .ph {
    width: 100%; height: 100%; display: grid; place-items: center; border-radius: 10px;
    background: var(--rh-grad, linear-gradient(135deg, #061b42, #1e50a8));
    color: #fff; font-weight: 800; font-size: 2rem;
}
.shop-card .badge-partner {
    position: absolute; top: .55rem; left: .55rem; z-index: 2;
    display: inline-flex; align-items: center; gap: .25rem;
    background: linear-gradient(135deg, #16a34a, #0c8a3c); color: #fff;
    font-size: .64rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
    padding: .22rem .5rem; border-radius: 999px; box-shadow: 0 4px 12px rgba(22, 163, 74, .45);
}
.shop-card .rating-pill {
    position: absolute; top: .55rem; right: .55rem; z-index: 2;
    display: inline-flex; align-items: center; gap: .22rem;
    background: #fff; color: #1f2937; font-weight: 800; font-size: .74rem;
    padding: .18rem .46rem; border-radius: 999px; box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
}
.shop-card .rating-pill i { color: #f5a623; font-size: .72rem; }
.shop-card .body { padding: .8rem .85rem .9rem; display: flex; flex-direction: column; gap: .45rem; }
.shop-card .name {
    font-weight: 800; font-size: .96rem; line-height: 1.25; letter-spacing: -.01em;
    color: var(--rh-text, #1f2937); transition: color .18s ease;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.shop-card:hover .name { color: var(--rh-primary, #0a2f73); }
.shop-card .cat-chip {
    align-self: flex-start; display: inline-flex; align-items: center; gap: .3rem; max-width: 100%;
    background: var(--rh-primary-soft, #e8eef9); color: var(--rh-primary, #0a2f73);
    font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.shop-card .loc { display: flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--rh-muted, #6e7891); }
.shop-card .loc .city { display: inline-flex; align-items: center; gap: .25rem; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shop-card .loc .view {
    margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: .2rem;
    color: var(--rh-primary, #0a2f73); font-weight: 800;
    opacity: 0; transform: translateX(-5px); transition: opacity .2s ease, transform .2s ease;
}
.shop-card:hover .loc .view { opacity: 1; transform: translateX(0); }

/* Compact card for horizontal rails */
.shop-card.rail-card { width: 232px; }
@media (max-width: 480px) { .shop-card.rail-card { width: 200px; } }

/* ---------- Section heads ---------- */
/* Phones: title on its own full-width line, action button below (compact).
   From sm up: title + action side by side. */
.dir-sec-head { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; margin-bottom: .9rem; }
.dir-sec-head h2 { font-weight: 800; font-size: 1.15rem; margin: 0; letter-spacing: -.01em; }
@media (min-width: 576px) {
    .dir-sec-head { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
    .dir-sec-head h2 { font-size: 1.25rem; }
}

/* ---------- How it works ---------- */
.dir-step-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; }

/* ---------- Homepage promo row (left carousel + right image cards) ---------- */
.promo-carousel .carousel-inner { height: 100%; border-radius: 16px; }
.promo-carousel .carousel-item { height: 100%; }
.promo-carousel .carousel-item img { width: 100%; height: 100%; object-fit: cover; }

.promo-cards { display: grid; gap: .4rem; }
.promo-tile {
    position: relative; overflow: hidden; border-radius: 14px; text-decoration: none;
    color: #fff; display: block;
    /* Match the portrait category art (~0.79) so the whole image — including the
       name baked into it — is shown, never cropped, at every screen size. */
    aspect-ratio: 79 / 100;
    transition: transform .18s ease, box-shadow .18s ease;
}
/* Anchor left so the name baked into the top-left of the art is never cropped —
   any overflow is trimmed from the right (the subject) instead. */
.promo-tile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.promo-tile-tint { position: absolute; inset: 0; }
.promo-tile-body { position: absolute; inset: 0; z-index: 2; padding: .65rem .7rem; display: flex; flex-direction: column; }
.promo-tile-title { font-weight: 800; font-size: .92rem; line-height: 1.08; text-transform: uppercase; letter-spacing: .01em; }
.promo-tile-sub { font-size: .74rem; opacity: .92; margin-top: .12rem; max-width: 8.5em; }
.promo-tile-arrow { margin-top: auto; width: 24px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, .24); display: grid; place-items: center; font-size: .8rem; }
.promo-tile:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5); }

@media (min-width: 992px) {
    /* Short, wide banner (matches the reference proportions). */
    .promo-carousel { height: 232px; }
    /* Cards fill the FULL banner height (no top/bottom gaps). The image covers &
       crops to fill — a little side-crop is fine so the row lines up with the banner. */
    .promo-cards { grid-auto-flow: column; grid-auto-columns: 1fr; height: 100%; }
    .promo-tile { height: 100%; aspect-ratio: auto; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
    .promo-carousel { aspect-ratio: 3 / 1; }
    .promo-cards { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 575.98px) {
    /* Phones: show the FULL wide banner (~3:1) — never crop its sides/text. */
    .promo-carousel { aspect-ratio: 3 / 1; }
    .promo-carousel .carousel-item img { object-fit: contain; }
    .promo-cards { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Map ---------- */
.dir-map { width: 100%; height: 72vh; min-height: 420px; border-radius: 16px; overflow: hidden; background: var(--rh-surface-2); }
@media (max-width: 576px) { .dir-map { height: 62vh; } }
