/* ════════════════════════════════════════════════════════════
   TOPIN — Figma design system (light + dark)
   Applies to public pages: index, shops, store, product
   ════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root,
[data-theme="light"] {
    --bg: #FFFFFF;
    --bg2: #F7F7F8;
    --surface: #F2F2F3;          /* main gray card */
    --surface2: #F2F2F3;
    --white-box: #FFFFFF;        /* white boxes sitting on gray cards */
    --border: rgba(0, 0, 0, 0.06);
    --border2: rgba(0, 0, 0, 0.12);
    --text: #0F0F10;
    --text2: #8E8E93;
    --text3: #AEAEB2;
    --dark: #2F2F31;             /* dark pills / featured cards */
    --dark-2: #3D3D40;
    --dark-text: #FFFFFF;
    --accent: #0A84FF;
    --blue: #0A84FF;
    --tg: #2AABEE;
    --green: #34C759;
    --green-bg: #E9F9EF;
    --red: #FF453A;
    --gold: #f59e0b;
    --radius-sm: 14px;
    --radius: 20px;
    --radius-lg: 28px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
    --bg: #0B0C0E;
    --bg2: #121316;
    --surface: #1C1D22;
    --surface2: #25272E;
    --white-box: #2C2E38;
    --border: rgba(255, 255, 255, 0.08);
    --border2: rgba(255, 255, 255, 0.14);
    --text: #F5F5F7;
    --text2: #98989E;
    --text3: #636366;
    --dark: #F2F2F3;             /* inverted: featured/active turns light */
    --dark-2: #E4E4E8;
    --dark-text: #101012;
    --accent: #0A84FF;
    --blue: #0A84FF;
    --tg: #2AABEE;
    --green: #30D158;
    --green-bg: rgba(48, 209, 88, 0.14);
    --red: #FF453A;
    --gold: #fbbf24;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body,
input,
button,
textarea,
select {
    font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    -webkit-appearance: none;
    appearance: none;
}

input,
textarea,
select {
    font-size: 16px;
    color: var(--text);
}

*:focus {
    outline: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 3px;
}

/* ─── Keyframes ─────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInBottom {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes slideOutBottom {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
    background: var(--bg);
    position: relative;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 12px;
    max-width: 1128px;
    margin: 0 auto;
    padding: 0 20px;
}

.home-logo {
    display: inline-flex;
    align-items: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    user-select: none;
}

.logo-text-top { color: var(--text); }
.logo-text-in { color: var(--blue); }

.header-search-icon,
.desktop-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text);
    transition: background 0.2s;
    flex-shrink: 0;
}

.header-search-icon:hover,
.desktop-search-icon:hover {
    background: var(--surface);
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: -8px;
    color: var(--blue);
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s;
}

.back-btn:hover {
    background: var(--surface);
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text);
    transition: background 0.2s;
    flex-shrink: 0;
}

.header-icon-btn:hover {
    background: var(--surface);
}

/* ─── Home category grid ─────────────────────────────────── */
.home-layout {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 84px;
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-grid {
    display: grid;
    width: 100%;
    max-width: 848px;
    margin: 0 auto;
    padding: 12px 15px 24px;
    gap: 4px;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 90px;
    grid-template-areas:
        "lighting furniture"
        "walls furniture"
        "art-decor plants"
        "art-decor bathroom"
        "stone floor"
        "real-estate floor"
        "other specialists";
}

@media (min-width: 768px) {
    .home-grid {
        margin: auto;
        padding: 24px;
        gap: 14px;
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 140px;
        grid-template-areas:
            "lighting art-decor plants furniture"
            "walls art-decor bathroom furniture"
            "floor stone other specialists"
            "floor real-estate other specialists";
    }
}

.home-card {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease, border-radius 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    background: var(--surface);
}

.home-card:hover {
    transform: scale(0.985);
}

.home-card.tapped {
    transform: scale(0.96);
}

.home-card-hidden {
    opacity: 0;
    transform: translateY(16px);
}

.home-card-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.home-card-content {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.home-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #000;
    line-height: normal;
    white-space: nowrap;
    margin: 0;
}

.home-card-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border: 1px solid rgba(56, 56, 56, 0.3);
    border-radius: 40px;
    color: #000;
}

.home-card-chip svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Per-card image crop/zoom, matched to the exact Figma fill transforms
   (plain center-cover is correct for walls/furniture/plants/bathroom/stone/floor —
   only these four need a custom pan or an extra zoom factor beyond cover) */
.home-card--lighting .home-card-bg {
    object-position: center 70%;
}

.home-card--art-decor .home-card-bg {
    object-position: 15% center;
}

.home-card--real-estate .home-card-bg {
    object-position: 21% 0%;
    transform: scale(1.08);
}

.home-card--other .home-card-bg {
    object-position: 24% 50%;
    transform: scale(1.02);
}

/* dark-photo cards: light text + light chip */
.home-card--dark .home-card-title {
    color: #F1F1F1;
}

.home-card--dark .home-card-chip {
    border-color: rgba(241, 241, 241, 0.3);
    color: #F1F1F1;
}

/* per-category grid areas */
.home-card--furniture   { grid-area: furniture; }
.home-card--lighting    { grid-area: lighting; }
.home-card--art-decor   { grid-area: art-decor; }
.home-card--walls       { grid-area: walls; }
.home-card--floor       { grid-area: floor; }
.home-card--stone       { grid-area: stone; }
.home-card--real-estate { grid-area: real-estate; }
.home-card--plants      { grid-area: plants; }
.home-card--bathroom    { grid-area: bathroom; }
.home-card--specialists { grid-area: specialists; }
.home-card--other       { grid-area: other; }

/* Big cards (tall or wide) — applied dynamically by JS */
.home-card--big {
    border-radius: 38px;
}
.home-card--big .home-card-title {
    font-size: 17px;
    white-space: normal;
    max-width: 140px;
}

.home-card--other .home-card-content {
    gap: 8px;
}

.home-card--other .home-card-title {
    font-size: 14px;
}

.home-card--other .home-card-chip {
    padding: 8px;
    border-color: #F1F1F1;
}

.home-card--other .home-card-chip svg {
    width: 20px;
    height: 20px;
}

/* skeletons for home grid */
.skeleton-home-card {
    background: var(--surface);
    border-radius: 28px;
    min-height: 90px;
    animation: pulse 1.5s infinite;
}

/* ─── Floating footer controls (UZ + theme) ──────────────── */
.site-footer {
    pointer-events: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 22px;
}

.footer-controls {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.lang-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 18px;
    border-radius: 50px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.5px;
}

.lang-toggle-btn:active {
    transform: scale(0.93);
}

.lang-toggle-btn:hover {
    background: var(--bg2);
}

[data-theme="dark"] .lang-toggle-btn:hover {
    background: var(--white-box);
}

/* ─── Theme Toggle Switch ──────────────────────────── */
.theme-switch {
    position: relative;
    display: flex;
    align-items: center;
    width: 68px;
    height: 34px;
    border-radius: 50px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 0;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
}

[data-theme="dark"] .theme-switch {
    background: var(--surface2);
}

.theme-switch-thumb {
    position: absolute;
    left: 3px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .theme-switch-thumb {
    left: 37px;
    background: #2c2c2e;
}

.theme-switch-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.theme-switch-sun {
    color: #f5a623;
}

.theme-switch-moon {
    color: var(--text3);
}

[data-theme="dark"] .theme-switch-sun {
    color: var(--text3);
}

[data-theme="dark"] .theme-switch-moon {
    color: #a78bfa;
}

.footer-copyright {
    display: none;
}

/* ─── Footer info (support) button + popup ───────────────── */
.footer-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
}

.footer-info-btn:active {
    transform: scale(0.93);
}

.footer-info-btn:hover {
    background: var(--bg2);
}

[data-theme="dark"] .footer-info-btn:hover {
    background: var(--white-box);
}

/* Layout cycle button */
.footer-layout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
}
.footer-layout-btn:active {
    transform: scale(0.93);
}

.footer-info-panel {
    position: fixed;
    left: 50%;
    bottom: 78px;
    transform: translateX(-50%);
    width: min(260px, calc(100vw - 32px));
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 16px;
    z-index: 250;
    display: none;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
}

.footer-info-panel.show {
    display: flex;
}

.footer-info-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 2px;
}

.footer-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
}

.footer-info-row svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--accent);
}

/* ─── Search takeover (index) ────────────────────────────── */
.search-view {
    width: 100%;
    max-width: 852px;
    margin: 0 auto;
    padding: 24px 15px 120px;
}

.search-fullpage-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    background: var(--surface);
    border-radius: 50px;
    padding: 0 8px 0 20px;
}

.search-fullpage-bar input {
    flex: 1;
    min-width: 0;
    font-weight: 500;
    border: none;
    background: none;
    font-size: 16px;
    color: var(--text);
}

.search-fullpage-bar input::placeholder {
    color: var(--text2);
}

.search-close-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border2);
    color: var(--text);
    flex-shrink: 0;
    transition: background 0.2s;
}

.search-close-circle:hover {
    background: var(--text3);
}

.search-stores-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 20px 0 0;
    padding: 0 4px;
}

.search-stores-row {
    display: flex;
    gap: 18px;
    margin-top: 12px;
    padding: 4px 4px 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.search-stores-row::-webkit-scrollbar {
    display: none;
}

.search-store-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 62px;
    flex-shrink: 0;
    cursor: pointer;
}

.search-store-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--white-box);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.search-store-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    max-width: 62px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-results-count {
    font-size: 16px;
    font-weight: 500;
    color: var(--text2);
    margin: 24px 0 16px;
}

.search-results-count b {
    color: var(--text);
    font-weight: 700;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border-radius: 28px;
    padding: 6px;
    transition: transform 0.2s;
}

.search-result-item:hover {
    transform: scale(0.995);
}

.search-result-img {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    background: var(--white-box);
    object-fit: cover;
    flex-shrink: 0;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.search-result-shop {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text2);
}

.search-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.search-result-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-price {
    font-size: 14px;
    color: var(--text2);
}

.no-results-msg {
    text-align: center;
    padding: 48px 20px;
    color: var(--text3);
    font-size: 15px;
}

/* ─── Search section labels & store cards ────────────────── */
.search-section-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 20px 0 10px;
    letter-spacing: -0.01em;
}

.search-shops-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}

.search-shop-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s;
}

.search-shop-card:hover {
    transform: scale(0.995);
}

.search-shop-card-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--white-box);
    border: 1px solid var(--border);
    object-fit: cover;
    flex-shrink: 0;
    overflow: hidden;
}

.search-shop-card-logo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

.search-shop-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.search-shop-card-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-shop-card-cat {
    font-size: 13px;
    color: var(--text2);
}

.search-shop-card-arrow {
    flex-shrink: 0;
    color: var(--text3);
}

/* ─── Shops (category) page ──────────────────────────────── */
.shops-page {
    flex: 1;
    width: 100%;
    max-width: 968px;
    margin: 0 auto;
    padding: 0 15px 130px;
}

.shops-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0 4px;
}

.shops-title-row .page-title {
    flex: 1;
}

.cat-tabs-scroll {
    margin: 14px -15px 0;
    padding: 0 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.cat-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.markets-categories {
    display: flex;
    gap: 4px;
    width: max-content;
}

@media (min-width: 768px) {
    .cat-tabs-scroll {
        margin: 14px 0 0;
        padding: 0;
        overflow: visible;
    }

    .markets-categories {
        flex-wrap: wrap;
        width: auto;
    }
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 15px;
    border-radius: 50px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    user-select: none;
}

.cat-pill:hover {
    background: var(--bg2);
}

[data-theme="dark"] .cat-pill:hover {
    background: var(--white-box);
}

.cat-pill.active {
    background: var(--dark);
    color: var(--dark-text);
    font-weight: 600;
}

.cat-pill.tapped {
    transform: scale(0.96);
}

.found-count {
    font-size: 16px;
    font-weight: 500;
    color: var(--text2);
    margin: 16px 0 14px;
    text-align: left;
}

.found-count b {
    color: var(--text);
    font-weight: 700;
}

/* store rows (list layout) */
.shops-grid {
    display: grid;
    gap: 4px;
}

.shops-grid.list-layout {
    grid-template-columns: 1fr;
}

.shops-grid.grid-layout {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .shops-grid.list-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 18px;
    }

    .shops-grid.grid-layout {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

.market-card {
    background: var(--surface);
    border-radius: 28px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.4s ease;
}

.market-card:hover {
    transform: scale(0.99);
}

.market-card.tapped {
    transform: scale(0.97);
}

.market-card-hidden {
    opacity: 0;
    transform: translateY(14px);
}

.market-card.list-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px;
}

.market-logo-box {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--white-box);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.market-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.market-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.market-desc {
    font-size: 14px;
    line-height: 1.35;
    color: var(--text2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.market-chevron {
    color: var(--text);
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
}

.market-card.grid-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    padding: 15px;
}

.market-card.grid-card .market-info {
    align-items: center;
}

.market-card.grid-card .market-name {
    white-space: normal;
    font-size: 18px;
}

.market-card.grid-card .market-desc {
    -webkit-line-clamp: 3;
    font-size: 13px;
}

/* skeleton store cards */
.skeleton-card {
    background: var(--surface);
    border-radius: 28px;
    min-height: 90px;
    animation: pulse 1.5s infinite;
}

.skeleton-logo,
.skeleton-info,
.skeleton-line {
    display: none;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text3);
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 6px;
    font-size: 17px;
}

.empty-state p {
    font-size: 14px;
}

.loader {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border2);
    border-top-color: var(--text);
    border-radius: 50%;
    margin: 60px auto;
    animation: spin 0.8s linear infinite;
    grid-column: 1 / -1;
}

/* ─── Floating mobile search (shops page) ────────────────── */
.floating-search-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    padding: 12px 15px calc(14px + env(safe-area-inset-bottom));
    pointer-events: none;
}

.floating-search-bar:focus-within,
.floating-search-bar.keyboard-active {
    z-index: 999999 !important;
}

.floating-search-inner {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 560px;
    margin: 0 auto;
}

.floating-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 49px;
    background: var(--dark);
    border-radius: 50px;
    padding: 0 15px;
    box-shadow: var(--shadow);
}

.floating-search-icon {
    color: var(--dark-text);
    opacity: 0.7;
    display: flex;
}

.floating-search-input-wrap input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    color: var(--dark-text);
    font-size: 16px !important;
    font-weight: 500;
}

.floating-search-input-wrap input::placeholder {
    color: var(--dark-text);
    opacity: 0.55;
}

.clear-search-btn {
    color: var(--dark-text);
    opacity: 0.7;
    font-size: 15px;
}

.back-circle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--dark);
    color: var(--dark-text);
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .floating-search-bar {
        display: none;
    }
}

/* ─── Shop modal (store info) ────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000000 !important;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}

.modal-overlay.closing {
    animation: fadeOut 0.28s ease forwards;
}

.modal-sheet {
    background: var(--bg);
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 28px 28px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: slideInBottom 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.closing .modal-sheet {
    animation: slideOutBottom 0.28s ease forwards;
}

@media (min-width: 768px) {
    .modal-overlay {
        align-items: center;
        padding: 32px 20px;
    }

    .modal-sheet {
        max-width: 600px;
        border-radius: 28px;
        max-height: 92vh;
        animation: slideUp 0.3s ease;
    }
}

.modal-header {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-modal-share,
.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: background 0.2s;
}

.btn-modal-share:hover,
.modal-close:hover {
    background: var(--surface);
}

.modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 60px 20px 20px;
}

@media (min-width: 768px) {
    .modal-body {
        padding: 64px 24px 24px;
    }
}

/* carousel */
.shop-carousel {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--surface);
    margin-bottom: 20px;
}

.carousel-inner {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center !important;
    display: block;
}

.carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    transition: background 0.2s;
}

.carousel-dot.active {
    background: #fff;
}

/* profile row */
.modal-profile-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.modal-logo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--white-box);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 34px;
}

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

.modal-profile-info {
    flex: 1;
    min-width: 0;
    padding-top: 6px;
}

.modal-shop-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.modal-shop-desc {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}

.modal-shop-desc.expanded {
    -webkit-line-clamp: unset;
}

/* pills + location */
.modal-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.modal-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 18px;
    border-radius: 50px;
    background: var(--surface);
    font-size: 16px;
    font-weight: 400;
    color: var(--text);
    transition: background 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.modal-row:hover {
    background: var(--bg2);
}

[data-theme="dark"] .modal-row:hover {
    background: var(--white-box);
}

.modal-row-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

[data-theme="dark"] .store-contact-icon {
    filter: invert(1);
}

.modal-row-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.modal-loc-card {
    background: var(--surface);
    border-radius: 22px;
    padding: 16px 18px;
    margin-bottom: 12px;
    cursor: pointer;
}

.modal-loc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.modal-loc-head .modal-loc-icon {
    width: 20px;
    height: 20px;
}

.modal-loc-title {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.modal-loc-directions {
    color: var(--blue);
    display: flex;
    flex-shrink: 0;
}

.modal-loc-text {
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .modal-details-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        align-items: start;
    }

    .modal-details-grid > .modal-pills {
        grid-column: 1 / -1;
    }

    .modal-loc-card {
        margin-bottom: 0;
    }
}

/* products */
.modal-products-section {
    margin-top: 20px;
}

.modal-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.modal-products-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.modal-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 40px;
    padding: 0 10px 0 18px;
    border-radius: 50px;
    background: var(--dark);
    color: var(--dark-text);
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.modal-products-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin: 0 -20px;
    padding: 2px 20px 6px;
}

.modal-products-scroll::-webkit-scrollbar {
    display: none;
}

.modal-products-scroll .product-card {
    width: 168px;
    flex-shrink: 0;
}

/* modal action buttons */
.modal-sticky-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
    background: var(--bg) !important;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 100;
    flex-shrink: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    .modal-sticky-actions {
        padding: 16px 24px 24px;
    }
}

.btn-tg-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    border-radius: 50px;
    background: var(--tg);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    flex: 1;
}

.btn-phone-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    border-radius: 50px;
    background: var(--dark);
    color: var(--dark-text);
    font-size: 16px;
    font-weight: 500;
    flex: 1.2;
}

@media (max-width: 599px) {
    .btn-tg-pill {
        flex: 0 0 52px;
        width: 52px;
        padding: 0;
    }

    .btn-tg-pill .btn-pill-label {
        display: none;
    }
}

/* ─── Product cards (Figma style) ────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 28px;
    padding: 6px 6px 10px;
    text-align: center;
    transition: transform 0.2s ease;
    color: var(--text);
}

.product-card:hover {
    transform: scale(0.985);
}

.product-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--white-box);
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 8px;
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-card-ar-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border-radius: 50px;
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.product-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 6px;
}

.product-card-shop {
    font-size: 13px;
    color: var(--text2);
}

.product-card-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-card-price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.product-card-price {
    font-size: 14px;
    color: var(--text2);
}

.product-card-old-price {
    font-size: 12px;
    color: var(--text3);
    text-decoration: line-through;
}

/* Figma shows no ratings on cards */
.product-card .rating-stars-container,
.market-card .rating-stars-container {
    display: none;
}

.rating-stars-container {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--gold);
    font-size: 13px;
}

.rating-stars-container .rating-count {
    color: var(--text3);
    font-size: 12px;
}

/* ─── Store page ─────────────────────────────────────────── */
.store-page {
    flex: 1;
    width: 100%;
    max-width: 968px;
    margin: 0 auto;
    padding: 0 15px 130px;
}

.store-hero-card {
    background: var(--surface);
    border-radius: 28px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.store-hero-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--white-box);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 36px;
    margin-bottom: 8px;
}

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

.store-hero-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.store-hero-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.store-hero-chip {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border-radius: 50px;
    background: var(--white-box);
    color: var(--text);
    font-size: 16px;
    font-weight: 400;
}

.store-hero-desc {
    font-size: 14px;
    line-height: 1.45;
    color: var(--text2);
    max-width: 620px;
}

.store-hero-contacts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.store-count-row {
    font-size: 16px;
    color: var(--text2);
    margin: 22px 0 14px;
}

.store-count-row b {
    color: var(--text);
    font-weight: 700;
}

/* ─── Product detail page ────────────────────────────────── */
.pd-page {
    flex: 1;
    width: 100%;
    max-width: 968px;
    margin: 0 auto;
    padding: 0 15px 130px;
}

.breadcrumb {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--text2);
    padding: 4px 0 20px;
}

.breadcrumb a:hover {
    color: var(--text);
}

@media (min-width: 768px) {
    .breadcrumb {
        display: flex;
    }
}

.pd-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .pd-layout {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px 24px;
        align-items: start;
    }
}

.pd-media {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pd-image-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--surface);
    border-radius: 28px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .pd-image-box {
        aspect-ratio: 1 / 1;
        max-height: 460px;
    }
}

.pd-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Catalog photos are often PNGs padded with transparent bands (e.g. the
   OpenCart image cache) — a white backing hides those bands so the photo
   visually fills its rounded box in both themes */
.pd-image-box img,
.product-card-img,
.search-result-img,
.thumb-item img,
.carousel-slide img {
    background: #fff;
}

.pd-3d-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    display: none;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: 50px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.pd-3d-badge.visible {
    display: inline-flex;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px;
}

.thumbnail-gallery::-webkit-scrollbar {
    display: none;
}

.thumb-item {
    width: 76px;
    height: 76px;
    border-radius: 16px;
    background: var(--surface);
    border: 2px solid transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: border-color 0.2s;
}

.thumb-item.active {
    border-color: var(--blue);
    background: var(--white-box);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-info {
    display: flex;
    flex-direction: column;
}

.pd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.chip {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 15px;
    border-radius: 50px;
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    font-weight: 400;
}

.chip-green {
    background: var(--green-bg);
    color: var(--green);
}

.chip-red {
    background: rgba(255, 69, 58, 0.12);
    color: var(--red);
}

.chip-amber {
    background: rgba(245, 158, 11, 0.14);
    color: var(--gold);
}

.pd-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    margin-bottom: 6px;
}

.pd-price {
    font-size: 20px;
    font-weight: 500;
    color: var(--text2);
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.pd-price .original-price-strikethrough {
    font-size: 14px;
    color: var(--text3);
    text-decoration: line-through;
}

.pd-store-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border-radius: 28px;
    padding: 15px;
    margin-top: 15px;
    color: var(--text);
    transition: transform 0.2s;
}

.pd-store-card:hover {
    transform: scale(0.99);
}

.pd-store-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--white-box);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 22px;
}

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

.pd-store-info {
    flex: 1;
    min-width: 0;
}

.pd-store-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.pd-store-desc {
    font-size: 14px;
    line-height: 1.35;
    color: var(--text2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pd-store-chevron {
    color: var(--text2);
    flex-shrink: 0;
}

.pd-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.btn-phone-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    border-radius: 50px;
    background: var(--bg);
    border: 1px solid var(--border2);
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-phone-outline:hover {
    background: var(--surface);
}

.pd-cta-row {
    display: flex;
    gap: 10px;
}

.btn-tg-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--tg);
    flex-shrink: 0;
}

.btn-tg-circle img,
.btn-tg-circle svg {
    filter: brightness(0) invert(1);
}

/* Full-width Telegram button (mobile only, per Figma) */
.btn-tg-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    border-radius: 50px;
    background: var(--tg);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-tg-full:hover {
    opacity: 0.9;
}

@media (min-width: 768px) {
    .btn-tg-full {
        display: none;
    }
}

.btn-dark-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    flex: 1;
    border-radius: 50px;
    background: var(--dark);
    color: var(--dark-text);
    font-size: 16px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-dark-pill:hover {
    opacity: 0.9;
}

/* Tavsif collapsible card */
.pd-desc-card {
    background: var(--surface);
    border-radius: 28px;
    padding: 15px;
    margin-top: 15px;
}

.pd-desc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.pd-desc-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.pd-desc-toggle {
    color: var(--blue);
    display: flex;
    transition: transform 0.25s;
}

.pd-desc-card.collapsed .pd-desc-toggle {
    transform: rotate(180deg);
}

.pd-desc-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    margin-top: 12px;
    white-space: pre-line;
}

.pd-desc-card.collapsed .pd-desc-body {
    display: none;
}

/* Mobile sticky AR bar */
.pd-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 250;
    background: var(--bg);
    padding: 12px 15px calc(14px + env(safe-area-inset-bottom));
    display: flex;
    gap: 4px;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.06);
}

.pd-sticky-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border2);
    color: var(--text);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .pd-sticky-bar {
        display: none;
    }
}

/* ─── Info / reviews (shared) ────────────────────────────── */
.reviews-section {
    margin-top: 24px;
    background: var(--surface);
    border-radius: 28px;
    padding: 15px;
}

.reviews-title,
.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-item {
    background: var(--white-box);
    border-radius: 18px;
    padding: 14px 16px;
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.review-author {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.review-phone {
    font-size: 11px;
    font-weight: 400;
    color: var(--text3);
    margin-left: 4px;
}

.review-date {
    font-size: 12px;
    color: var(--text3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.review-delete-btn {
    background: none;
    border: none;
    color: var(--red, #e53e3e);
    font-size: 13px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    opacity: 0.5;
    transition: opacity 0.2s, background 0.2s;
    line-height: 1;
}
.review-delete-btn:hover {
    opacity: 1;
    background: rgba(229, 62, 62, 0.1);
}

.review-stars {
    color: var(--gold);
    font-size: 13px;
    margin-bottom: 6px;
}

.review-comment {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text2);
}

.empty-reviews {
    text-align: center;
    padding: 20px;
    color: var(--text3);
    font-size: 14px;
}

.review-form-container {
    margin-top: 16px;
    background: var(--white-box);
    border-radius: 18px;
    padding: 14px 16px;
}

.review-form-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text);
}

.review-form {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
}

.form-input,
.form-textarea {
    background: var(--surface);
    border: none;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 15px;
    color: var(--text);
    width: 100%;
}

.form-textarea {
    min-height: 90px;
    resize: vertical;
}

.star-rating-selector {
    display: flex;
    gap: 6px;
    font-size: 24px;
    color: var(--text3);
    cursor: pointer;
}

.star-rating-selector span.selected,
.star-rating-selector span.hovered {
    color: var(--gold);
}

.btn-submit-review {
    height: 48px;
    border-radius: 50px;
    background: var(--dark);
    color: var(--dark-text);
    font-size: 15px;
    font-weight: 600;
}

/* ─── 3D viewer / download overlays ──────────────────────── */
.viewer-container-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.viewer-modal-content {
    background: var(--bg);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    height: 550px;
    max-height: 86vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.viewer-modal-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.viewer-modal-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.viewer-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font-size: 16px;
}

model-viewer {
    width: 100%;
    height: 100%;
    background-color: var(--surface);
}

.download-file-card {
    padding: 16px;
    border-radius: 18px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-primary-ar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--dark);
    color: var(--dark-text);
    border-radius: 50px;
    padding: 10px 18px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

.btn-secondary-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border2);
    color: var(--text);
    border-radius: 50px;
    padding: 10px 18px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

/* ─── Toast ──────────────────────────────────────────────── */
.toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%) translateY(20px);
    background: var(--dark);
    color: var(--dark-text);
    padding: 12px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 1200;
    max-width: calc(100vw - 40px);
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─── Share menu ─────────────────────────────────────────── */
.custom-share-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
}

.custom-share-menu-overlay.show {
    opacity: 1;
}

.custom-share-card {
    background: var(--bg);
    border-radius: 28px 28px 0 0;
    width: 100%;
    max-width: 480px;
    padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
    transform: translateY(30px);
    transition: transform 0.25s;
}

.custom-share-menu-overlay.show .custom-share-card {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .custom-share-menu-overlay {
        align-items: center;
    }

    .custom-share-card {
        border-radius: 28px;
    }
}

.share-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.share-card-header h4 {
    font-size: 17px;
    font-weight: 700;
}

.share-card-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font-size: 20px;
    line-height: 1;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-opt-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 52px;
    padding: 0 18px;
    border-radius: 50px;
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.share-opt-btn.telegram { background: var(--tg); color: #fff; }
.share-opt-btn.whatsapp { background: #25D366; color: #fff; }

/* ─── Misc helpers ───────────────────────────────────────── */
.hide-mobile { display: none !important; }

@media (min-width: 768px) {
    .hide-mobile { display: revert !important; }
    .site-footer.hide-mobile { display: flex !important; }
    .hide-desktop { display: none !important; }
}

/* ─── Modern Admin & Dashboard Styles ───────────────────── */
.admin-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
}
.admin-header-inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.admin-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-body {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.admin-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

.admin-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.admin-cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.admin-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--blue);
}
.admin-cat-icon {
    font-size: 24px;
}
.admin-cat-text h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}
.admin-cat-text p {
    font-size: 13px;
    color: var(--text2);
}

.admin-table-wrap, .table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th {
    background: var(--surface2);
    padding: 14px 18px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--text2);
    border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 14px 18px;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.admin-table tr:last-child td {
    border-bottom: none;
}

/* ═══════ Sidebar ═══════ */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--bg);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    overflow-y: auto;
}
.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.sidebar-close-btn {
    background: none;
    border: none;
    color: var(--text2);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.2s;
}
.sidebar-close-btn:hover {
    background: var(--surface);
}

.sidebar-nav {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s;
}
.sidebar-nav-item:hover {
    background: var(--surface);
}
.sidebar-nav-item svg {
    color: var(--blue);
    flex-shrink: 0;
}

.sidebar-section {
    padding: 20px 20px 16px;
}
.sidebar-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.sidebar-company-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
}
.sidebar-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text2);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.sidebar-info-row:hover {
    color: var(--blue);
}
.sidebar-info-row svg {
    flex-shrink: 0;
    color: var(--text3);
}

.sidebar-section-bottom {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-bottom: 24px;
}
.sidebar-privacy-link {
    display: block;
    font-size: 14px;
    color: var(--blue);
    text-decoration: none;
    margin-bottom: 12px;
    font-weight: 500;
}
.sidebar-privacy-link:hover {
    text-decoration: underline;
}
.sidebar-copyright {
    font-size: 12px;
    color: var(--text3);
}

/* ═══════ Privacy Page ═══════ */
.privacy-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px 40px;
}
.privacy-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 10;
}
.privacy-content {
    line-height: 1.7;
    color: var(--text);
    font-size: 15px;
}
.privacy-content h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 16px 0 8px;
}
.privacy-content h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 24px 0 8px;
    color: var(--text);
}
.privacy-content p {
    margin-bottom: 8px;
}
.privacy-content ul {
    padding-left: 20px;
    margin-bottom: 12px;
}
.privacy-content li {
    margin-bottom: 4px;
}
.privacy-content a {
    color: var(--blue);
    text-decoration: none;
}
