/* ---- platform home (index.html when no store matches) --------------- */
.platform {
    max-width: 1120px;
    margin-inline: auto;
    padding: 0 16px 80px;
}

.platform-header {
    display: flex;
    align-items: center;
    padding: 20px 4px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .5px;
}

.brand span {
    background: linear-gradient(135deg, var(--ember), var(--ember-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero {
    padding: 40px 0 24px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(28px, 6vw, 46px);
    font-weight: 800;
    line-height: 1.1;
}

.hero p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 18px;
}

.section-title {
    margin: 32px 0 16px;
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.section-title::after {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    margin-top: 6px;
    background: linear-gradient(90deg, var(--ember), var(--ember-2));
    border-radius: 2px;
}

/* ==== HOME (redesigned) ============================================= */
.ph-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 4px;
}
.ph-search { flex: 1; max-width: 560px; }
.ph-search input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
}

/* featured promo carousel — 2-up desktop, 1 mobile, native scroll-snap */
.promo-wrap { position: relative; margin: 6px 0 8px; }
.promo-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(50% - 8px);
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.promo-row::-webkit-scrollbar { display: none; }
.promo-card {
    position: relative;
    scroll-snap-align: start;
    aspect-ratio: 21 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    background: linear-gradient(135deg, var(--b1, var(--ember)), var(--b2, var(--ember-2)));
    border: 1px solid var(--line);
}
.promo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-label {
    position: absolute;
    left: 16px;
    bottom: 12px;
    color: #fff;
    font-weight: 900;
    font-size: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
}
.promo-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: var(--text);
    font-size: 20px;
    z-index: 2;
}
.promo-nav.prev { left: -6px; }
.promo-nav.next { right: -6px; }
.promo-row.dragging { cursor: grabbing; scroll-snap-type: none; }
.promo-row.dragging .promo-card { pointer-events: none; }

/* banner dots */
.promo-dots { display: flex; justify-content: center; gap: 7px; margin-top: 10px; }
.promo-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--line);
    transition: width .2s ease, background .2s ease;
}
.promo-dot.active { width: 22px; border-radius: 999px; background: linear-gradient(90deg, var(--ember), var(--ember-2)); }

/* ---- banner strip in edit mode -------------------------------------- */
.promo-card.is-editing { cursor: default; }
.promo-card.is-editing .card-tools { top: 10px; right: 10px; }

/* the trailing "add a banner" slide */
.promo-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--surface);
    border: 1px dashed var(--ember);
    color: var(--ember);
    text-align: center;
    padding: 12px;
}
.promo-new:hover { background: var(--gold-soft); }
.pn-plus { font-size: 30px; font-weight: 900; line-height: 1; }
.pn-text { font-size: 14px; font-weight: 800; }
.pn-sub { color: var(--muted); font-size: 11px; font-weight: 600; }

/* ---- cuisine chips (square: emoji over label) ----------------------- */
.cuisine-row {
    display: flex;
    gap: 10px;
    margin: 20px 0 4px;
    padding-bottom: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.cuisine-row::-webkit-scrollbar { display: none; }
.cuisine-chip {
    flex: 0 0 auto;
    width: 86px;
    padding: 12px 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    transition: transform .12s ease, border-color .2s ease, background .2s ease;
}
.cuisine-chip:hover { transform: translateY(-2px); border-color: var(--ember); }
.cuisine-chip.active { border-color: var(--ember); background: var(--gold-soft); }
.cc-ic { font-size: 26px; line-height: 1; }
.cc-label { font-size: 12px; font-weight: 700; text-align: center; }

/* store cards */
.stores-section { margin-top: 24px; }
.store-cards {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.store-card {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease;
}
.store-card:not(.is-editing):hover {
    transform: translateY(-3px);
    border-color: var(--ember);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .4);
}
.sc-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: radial-gradient(120% 120% at 50% 20%, var(--surface-2), #0d0b09);
    display: grid;
    place-items: center;
}
.sc-img { width: 100%; height: 100%; object-fit: cover; }
.sc-logo { width: 72px; height: 72px; object-fit: contain; }
.sc-letter { font-size: 44px; font-weight: 900; color: var(--muted); }

/* product thumbnails overlaid on the bottom of the cover, with a scrim behind
   them so they stay legible on a busy banner image. The scrim is scoped to
   covers that actually carry thumbnails, so image-only cards stay untouched. */
.sc-cover:has(.sc-thumbs)::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 58%;
    background: linear-gradient(to top, rgba(0, 0, 0, .72), transparent);
    pointer-events: none;
}
.sc-thumbs {
    position: absolute;
    left: 12px;
    bottom: 10px;
    display: flex;
    gap: 8px;
    z-index: 1;
}
.sc-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, .85);
    background: var(--surface-2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
}

.sc-body { padding: 14px 16px 16px; }
.sc-name { font-size: 18px; font-weight: 800; }
.sc-tag2 { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* what the store sells */
.sc-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sc-kind {
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

/* info badges */
.sc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sc-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 700;
}
.sc-badge.is-rating { color: var(--ember); border-color: var(--gold-soft); }
.sc-badge.is-open { color: #35c46b; }

/* ---- home edit mode: cuisine tags + image slots --------------------- */
.sc-kind.editing { display: inline-flex; align-items: center; gap: 5px; padding-right: 4px; }
.sk-x {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--text);
    font-size: 9px;
    line-height: 1;
}
.sk-x:hover { background: var(--ember); color: var(--on-ember, #1a0f06); }
.sc-kind-add {
    border-style: dashed;
    border-color: var(--ember);
    background: transparent;
    color: var(--ember);
    font-weight: 800;
    cursor: pointer;
}
.sc-kind-add:hover { background: var(--gold-soft); }

/* image slots become obviously clickable while editing */
.sc-thumb.editing { cursor: pointer; }
.sc-thumb.editing:hover { border-color: var(--ember); }
.sc-thumb-new {
    display: grid;
    place-items: center;
    border-style: dashed;
    border-color: var(--ember);
    background: rgba(0, 0, 0, .45);
    color: var(--ember);
    font-size: 20px;
    font-weight: 900;
}
.sc-thumb-new:hover { background: var(--gold-soft); }
.store-card.is-editing .sc-cover { cursor: pointer; }

/* ---- picker modal (choose a store / a category) --------------------- */
.picker-list { display: flex; flex-direction: column; gap: 8px; }
.picker-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    text-align: left;
}
.picker-item:hover { border-color: var(--ember); background: var(--gold-soft); }
.pi-label { font-size: 15px; font-weight: 700; }
.pi-sub { color: var(--muted); font-size: 12px; font-weight: 600; }
.sc-tag {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--ember);
    font-size: 12px;
    font-weight: 800;
}

/* ---- per-cuisine sections ------------------------------------------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-count { color: var(--muted); font-size: 13px; font-weight: 700; }
.cuisine-section { margin-top: 34px; }

/* add-store card (edit mode) */
.add-store-card { border: 1px dashed var(--ember); background: var(--surface); }
.asc-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.asc-title { font-weight: 900; color: var(--ember); }
.asc-body input { width: 100%; }

@media (max-width: 760px) {
    .ph-header { gap: 12px; flex-wrap: wrap; }
    .ph-search { max-width: none; order: 3; flex-basis: 100%; }
    /* one banner per screen on mobile (two side-by-side on desktop) */
    .promo-row { grid-auto-columns: 100%; }
    .promo-nav { display: none; }
    .store-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
    .sc-body { padding: 12px; }
    .sc-name { font-size: 15px; }
    .cuisine-chip { width: 74px; padding: 10px 4px 8px; }
    .cc-ic { font-size: 22px; }
    .sc-thumb { width: 40px; height: 40px; border-radius: 11px; }
    .sc-thumbs { left: 8px; bottom: 8px; gap: 6px; }
    .sc-badge, .sc-kind { font-size: 11px; padding: 3px 8px; }
}

.fatal {
    padding: 80px 16px;
    text-align: center;
    color: var(--muted);
}

/* ---- site footer ---------------------------------------------------- */
.site-footer {
    margin-top: 48px;
    padding: 44px 16px 28px;
    background: var(--surface);
    border-top: 1px solid var(--line);
}

.footer-grid {
    max-width: 1120px;
    margin-inline: auto;
    display: grid;
    gap: 28px 24px;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
}

.footer-logo span {
    background: linear-gradient(135deg, var(--ember), var(--ember-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.footer-brand p {
    margin-top: 10px;
    max-width: 320px;
}

.footer-muted {
    color: var(--muted);
    font-size: 14px;
}

.pay-marks {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.footer-col h4 {
    margin-bottom: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--muted);
}

.footer-col a,
.footer-col span {
    display: block;
    padding: 5px 0;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}

.footer-col a:hover {
    color: var(--ember);
}

.footer-bar {
    max-width: 1120px;
    margin: 28px auto 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---- "შემოგვიერთდი" — footer teaser + modal ------------------------- */
.footer-grid.has-join { grid-template-columns: 1.6fr 1fr 1fr 1.4fr; }

.join-widget {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}
.join-widget h4 {
    margin-bottom: 8px;
    color: var(--ember);
    font-size: 14px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 900;
}
.jw-lead { color: var(--muted); font-size: 13px; line-height: 1.5; }
.jw-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.jw-badge {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--gold-soft);
    color: var(--ember);
    font-size: 11px;
    font-weight: 800;
}
.jw-btn { margin-top: 10px; padding: 10px; font-size: 13px; }

.join-modal { z-index: 220; }
.join-content { max-width: 620px; }
.join-title { font-size: 24px; font-weight: 900; }
.join-lead { margin-top: 8px; color: var(--muted); line-height: 1.6; }
.join-perks {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
    margin: 18px 0;
}
.join-perk {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}
.jp-ic {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--gold-soft);
    color: var(--ember);
    font-size: 16px;
    font-weight: 900;
}
.jp-title { font-size: 13px; font-weight: 800; }
.jp-sub { margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.join-form { display: grid; gap: 10px; }

@media (max-width: 700px) {
    .footer-grid,
    .footer-grid.has-join {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .join-widget { grid-column: 1 / -1; }
    .join-perks { grid-template-columns: 1fr; }
}

/* ---- legal / info pages (?page=…) ----------------------------------- */
.info-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.info-topbar {
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    padding: 16px;
}

.info-back {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
}

.info-back:hover {
    color: var(--ember);
}

.info-content {
    flex: 1;
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    padding: 12px 16px 60px;
}

.info-content h1 {
    margin-bottom: 16px;
    font-size: 28px;
    font-weight: 800;
}

.info-content h2 {
    margin: 24px 0 8px;
    font-size: 18px;
    font-weight: 800;
}

.info-content p,
.info-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.info-content ul {
    padding-left: 20px;
}

.info-content a {
    color: var(--ember);
}
