/* Copyright (c) Zhmara X. All rights reserved.
   Proprietary and confidential. Unauthorized copying of this file, via any medium, is prohibited. See LICENSE.txt. */

/* Public shop pages (/shops...). Direction-neutral: logical properties only, so the same file works for LTR and RTL. */
.zx-shop {
    --zx-accent: #1f8fd1;
    --zx-accent-dark: #146a9d;
    --zx-ink: #1d2433;
    --zx-muted: #6b7385;
    --zx-line: #e6e9f0;
    --zx-bg: #f4f6fb;
    --zx-card: #ffffff;
    --zx-radius: 14px;
    --zx-shadow: 0 6px 24px rgba(29, 36, 51, 0.08);
    background: var(--zx-bg);
    color: var(--zx-ink);
    min-height: 100vh;
    padding-block: 24px 48px;
}

.zx-shop .zx-wrap { max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
:where(.zx-shop) .zx-card { background: var(--zx-card); border-radius: var(--zx-radius); box-shadow: var(--zx-shadow); }
.zx-muted { color: var(--zx-muted); }

/* ---- Shops directory hero ---- */
.zx-hero { text-align: center; padding: 32px 16px 24px; }
.zx-hero img.zx-brand { max-height: 64px; margin-block-end: 16px; }
.zx-hero h1 { font-size: 1.9rem; font-weight: 700; margin: 0 0 8px; }
.zx-hero p { color: var(--zx-muted); margin: 0 0 20px; }
.zx-search { position: relative; max-width: 460px; margin-inline: auto; }
.zx-search input { width: 100%; border: 1px solid var(--zx-line); border-radius: 999px; padding: 12px 20px; padding-inline-start: 44px; font-size: 1rem; background: #fff; }
.zx-search input:focus { outline: none; border-color: var(--zx-accent); box-shadow: 0 0 0 3px rgba(31, 143, 209, 0.15); }
.zx-search i { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--zx-muted); }

/* ---- Grids ---- */
:where(.zx-shop) .zx-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.zx-shop-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 16px; color: inherit; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.zx-shop-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(29, 36, 51, 0.14); color: inherit; }
.zx-shop-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--zx-line); margin-block-end: 14px; background: #fff; }
.zx-shop-card h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; word-break: break-word; }
.zx-shop-card span { font-size: .85rem; color: var(--zx-muted); }

.zx-product-card { display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.zx-product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(29, 36, 51, 0.14); color: inherit; }
.zx-product-card .zx-thumb { aspect-ratio: 1 / 1; background: #f0f2f7; display: flex; align-items: center; justify-content: center; }
.zx-product-card .zx-thumb img { width: 100%; height: 100%; object-fit: cover; }
.zx-product-card .zx-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.zx-product-card h3 { font-size: 1rem; font-weight: 600; margin: 0; line-height: 1.35; }
:where(.zx-shop) .zx-price { font-weight: 700; color: var(--zx-accent-dark); }
.zx-product-card .zx-buy { margin-top: auto; }

/* ---- Shop header (shop, product and thank-you pages) ---- */
.zx-shop-header { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-block-end: 20px; flex-wrap: wrap; }
.zx-shop-header img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--zx-line); background: #fff; }
.zx-shop-header .zx-title { flex: 1; min-width: 200px; }
.zx-shop-header h1 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.zx-shop-header h1 a { color: inherit; text-decoration: none; }
.zx-shop-header .zx-contact { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; color: var(--zx-muted); margin-top: 4px; }
.zx-shop-header .zx-contact a { color: inherit; text-decoration: none; }
.zx-shop-header .zx-contact i { margin-inline-end: 4px; }

/* ---- Category pills ---- */
.zx-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-block-end: 18px; }
.zx-pills { display: flex; gap: 8px; overflow-x: auto; padding-block-end: 4px; }
.zx-pill { border: 1px solid var(--zx-line); background: #fff; color: var(--zx-ink); border-radius: 999px; padding: 7px 16px; white-space: nowrap; font-size: .9rem; cursor: pointer; }
.zx-pill.active { background: var(--zx-accent); border-color: var(--zx-accent); color: #fff; }
.zx-toolbar .zx-search { margin-inline: 0; max-width: 280px; flex: 1; min-width: 200px; }
.zx-toolbar .zx-search input { padding-block: 8px; }

/* ---- Product page ---- */
.zx-product { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .zx-product { grid-template-columns: 1fr; } }
.zx-gallery { padding: 16px; }
.zx-gallery .zx-main { aspect-ratio: 1 / 1; border-radius: 10px; background: #f0f2f7; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.zx-gallery .zx-main img { width: 100%; height: 100%; object-fit: contain; }
.zx-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.zx-thumbs button { border: 2px solid transparent; border-radius: 8px; padding: 0; background: #f0f2f7; width: 68px; height: 68px; flex: 0 0 auto; overflow: hidden; cursor: pointer; }
.zx-thumbs button.active { border-color: var(--zx-accent); }
.zx-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.zx-info { padding: 22px; }
.zx-info h2 { font-size: 1.55rem; font-weight: 700; margin: 0 0 8px; }
.zx-info .zx-big-price { font-size: 1.6rem; font-weight: 800; color: var(--zx-accent-dark); margin-block-end: 6px; }
.zx-info .zx-code { font-size: .85rem; color: var(--zx-muted); margin-block-end: 14px; }
:where(.zx-shop) .zx-desc { border-top: 1px solid var(--zx-line); padding-top: 14px; margin-top: 14px; line-height: 1.65; overflow-wrap: anywhere; }
:where(.zx-shop) .zx-desc img { max-width: 100%; height: auto; }

.zx-share { display: flex; flex-wrap: wrap; gap: 8px; }
.zx-share .btn { border-radius: 999px; font-size: .88rem; padding: 6px 14px; }
.zx-btn-fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.zx-btn-fb:hover { background: #0f63d4; border-color: #0f63d4; color: #fff; }

.zx-order { padding: 22px; margin-top: 24px; }
.zx-order h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 16px; }
.zx-order .form-label { font-weight: 600; font-size: .9rem; }
.zx-qty { display: inline-flex; align-items: center; border: 1px solid var(--zx-line); border-radius: 10px; overflow: hidden; }
.zx-qty button { border: 0; background: #f4f6fb; width: 40px; height: 40px; font-size: 1.1rem; }
.zx-qty span { min-width: 48px; text-align: center; font-weight: 700; }

:where(.zx-shop) .zx-summary { background: #f7f9fc; border: 1px solid var(--zx-line); border-radius: 12px; padding: 14px 16px; }
:where(.zx-shop) .zx-summary .zx-row { display: flex; justify-content: space-between; gap: 12px; padding-block: 4px; font-size: .95rem; }
:where(.zx-shop) .zx-summary .zx-total { border-top: 1px dashed var(--zx-line); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 1.1rem; }

/* ---- Payment choice ---- */
.zx-pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-block-end: 16px; }
.zx-pay-option { border: 2px solid var(--zx-line); border-radius: 12px; padding: 14px 10px; text-align: center; cursor: pointer; background: #fff; }
.zx-pay-option i { font-size: 1.5rem; display: block; margin-block-end: 6px; color: var(--zx-muted); }
.zx-pay-option.active { border-color: var(--zx-accent); background: rgba(31, 143, 209, 0.06); }
.zx-pay-option.active i { color: var(--zx-accent); }
.zx-qr { max-width: 220px; margin: 8px auto; display: block; }
.zx-pay-code { font-size: 1.3rem; font-weight: 800; letter-spacing: 2px; text-align: center; }

/* ---- Thank you / empty states ---- */
.zx-center-card { max-width: 560px; margin: 24px auto; padding: 36px 28px; text-align: center; }
.zx-center-card .zx-icon { width: 76px; height: 76px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 2.2rem; margin-block-end: 16px; }
.zx-icon.ok { background: #e3f6ea; color: #1a7f37; }
.zx-icon.warn { background: #fff1e0; color: #b35900; }
.zx-ref { display: inline-block; font-family: monospace; font-size: 1.25rem; font-weight: 700; background: #f4f6fb; border: 1px dashed var(--zx-line); border-radius: 10px; padding: 8px 16px; margin: 8px 0 16px; }
.zx-empty { text-align: center; padding: 48px 16px; color: var(--zx-muted); }
.zx-empty i { font-size: 2.4rem; display: block; margin-block-end: 10px; }

/* ---- Shops directory: city chips and city groups ---- */
.zx-city-pills { justify-content: center; flex-wrap: wrap; margin-block-end: 22px; }
@media (max-width: 600px) { .zx-city-pills { flex-wrap: nowrap; justify-content: flex-start; } }
.zx-count { display: inline-block; min-width: 22px; padding: 0 7px; margin-inline-start: 6px; border-radius: 999px; background: var(--zx-bg); color: var(--zx-muted); font-size: .78rem; font-weight: 700; line-height: 20px; text-align: center; }
.zx-pill.active .zx-count { background: rgba(255, 255, 255, 0.25); color: #fff; }
.zx-city + .zx-city { margin-block-start: 32px; }
.zx-city-title { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 700; margin: 0 0 14px; padding-block-end: 8px; border-block-end: 1px solid var(--zx-line); }
.zx-city-title i { color: var(--zx-accent); }
.zx-city-title .zx-count { margin-inline-start: 0; background: var(--zx-card); }
