/*
 * صفحهٔ عمومی کسب‌وکار جمیاب کافه (business-page).
 * طراحی متحرک (mobile-first)، RTL و هم‌راستا با زبان بصری جمیاب کافه.
 */

:root {
    --bp-bg: #f5f5f0;
    --bp-card: #ffffff;
    --bp-text: #22242a;
    --bp-muted: #6b7280;
    --bp-line: #e6e6df;
    --bp-primary: #c0392b;
    --bp-primary-dark: #992b20;
    --bp-gold: #e0a800;
    --bp-green: #1f9d63;
    --bp-radius: 16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bp-bg);
    color: var(--bp-text);
    font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
    line-height: 1.8;
    font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.bp-container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

.bp-hero {
    background: linear-gradient(135deg, var(--bp-primary) 0%, var(--bp-primary-dark) 100%);
    color: #fff;
    padding: 22px 0;
}

/* وقتی گالری عکس دارد، تصویر اول به‌عنوان کاور با پوشش تیرهٔ خوانا استفاده می‌شود. */
.bp-hero-cover {
    position: relative;
    background-image:
        linear-gradient(135deg, rgba(146, 32, 22, 0.92) 0%, rgba(70, 18, 12, 0.84) 100%),
        var(--bp-cover);
    background-size: cover, cover;
    background-position: center, center;
}

.bp-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bp-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bp-logo {
    width: 68px;
    height: 68px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
}

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

.bp-brand-text h1 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
}

.bp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bp-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12.5px;
    white-space: nowrap;
}

.bp-chip-gold { color: #ffe6a3; }

.bp-chip.bp-open {
    background: rgba(31, 157, 99, 0.35);
    color: #d6ffe9;
}

.bp-chip.bp-closed {
    background: rgba(0, 0, 0, 0.28);
    color: #ffd9d3;
}

/* نشان سیاست جنسیتی (بانوان/آقایان) روی سرصفحهٔ تیرهٔ صفحهٔ عمومی. */
.bp-chip-gender-women {
    background: rgba(224, 82, 148, 0.35);
    color: #ffd7ea;
}

.bp-chip-gender-men {
    background: rgba(52, 120, 214, 0.38);
    color: #d6e6ff;
}

/* کارت هشدار «ویترین محدود» برای بینندهٔ ناهمخوان. */
.bp-restricted {
    border-color: #f0c2d6;
    background: #fff6fb;
}

.bp-restricted .bp-card-title {
    color: #b03a72;
}

.bp-restricted-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.9;
    color: #7a4560;
}

.bp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* «مشاهده روی نقشه» و «صفحه اصلی» همیشه کنار هم می‌مانند و با هم می‌شکنند تا
   در موبایل هم «صفحه اصلی» دقیقاً سمت چپ دکمهٔ نقشه قرار بگیرد. */
.bp-actions-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
}

.bp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 14px;
    transition: background 0.15s ease;
}

.bp-btn:hover { background: rgba(255, 255, 255, 0.26); }
.bp-btn-primary {
    background: #fff;
    color: var(--bp-primary-dark);
    border-color: #fff;
    font-weight: 600;
}
.bp-btn-primary:hover { background: #ffece9; }

/* در موبایل هر چهار دکمهٔ اقدام در یک ردیف چهارستونه می‌نشینند تا کاربر
   بدون اسکرول افقی به همهٔ کارها دسترسی داشته باشد. */
@media (max-width: 639px) {
    .bp-actions {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    /* گروه «نقشه/صفحه اصلی» با display:contents خانه‌های خود را به گرید می‌دهد. */
    .bp-actions-group { display: contents; }

    .bp-actions .bp-btn {
        flex-direction: column;
        gap: 4px;
        min-width: 0;
        padding: 8px 4px;
        font-size: 11.5px;
        line-height: 1.25;
        text-align: center;
    }
}

.bp-main { padding: 20px 16px 40px; }

.bp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.bp-col-main,
.bp-col-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bp-card {
    background: var(--bp-card);
    border: 1px solid var(--bp-line);
    border-radius: var(--bp-radius);
    padding: 18px;
    box-shadow: 0 1px 3px rgba(20, 20, 20, 0.04);
}

.bp-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 16px;
    color: var(--bp-primary-dark);
}

.bp-count {
    margin-inline-start: auto;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--bp-muted);
    white-space: nowrap;
}

.bp-about {
    color: #3a3d44;
    white-space: normal;
}

.bp-open-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.bp-open-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 13px;
    font-weight: 600;
}

.bp-open-badge.bp-open { background: #e4f7ee; color: var(--bp-green); }
.bp-open-badge.bp-closed { background: #fdecea; color: var(--bp-primary); }
.bp-open-hint { color: var(--bp-muted); font-size: 13px; }

.bp-hours {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bp-hours-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
}

.bp-hours-row + .bp-hours-row { margin-top: 2px; }

.bp-hours-today {
    background: #fff7f5;
    border: 1px solid #f4d4cf;
    font-weight: 600;
}

.bp-hours-day small { color: var(--bp-muted); font-weight: 400; }
.bp-hours-range { color: #3a3d44; white-space: nowrap; }
.bp-hours-closed { color: var(--bp-primary); }

.bp-contact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bp-contact li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #3a3d44;
    font-size: 14px;
}

.bp-contact a { color: var(--bp-primary-dark); direction: ltr; }

.bp-menu-group + .bp-menu-group { margin-top: 18px; }

.bp-menu-cat {
    margin: 0 0 8px;
    font-size: 15px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f1efe9;
    color: #2b2d33;
}

.bp-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bp-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed #eeece6;
}

.bp-menu-item:last-child { border-bottom: none; }

.bp-menu-thumb {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--bp-line);
}

.bp-menu-name {
    flex: 1;
    font-size: 14.5px;
    display: flex;
    flex-direction: column;
}

.bp-menu-sub { color: var(--bp-muted); font-size: 12px; font-weight: 400; }
.bp-menu-price { color: var(--bp-primary-dark); font-weight: 700; white-space: nowrap; font-size: 14px; }

.bp-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.bp-gallery-item {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--bp-line);
    aspect-ratio: 1 / 1;
    background: #f0efea;
}

/* تصویر نخست به‌صورت شاخص ۲×۲ نمایش داده می‌شود. */
.bp-gallery-featured { grid-column: span 2; grid-row: span 2; }

.bp-gallery-btn {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    color: #fff;
}

.bp-gallery-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.bp-gallery-btn:focus-visible {
    outline: 3px solid var(--bp-primary);
    outline-offset: -3px;
}

.bp-gallery-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.55) 100%);
    opacity: 0;
    transition: opacity .25s ease;
}

.bp-gallery-zoom svg { transform: translateY(6px); transition: transform .25s ease; }

.bp-gallery-btn:hover .bp-gallery-zoom,
.bp-gallery-btn:focus-visible .bp-gallery-zoom { opacity: 1; }

.bp-gallery-btn:hover .bp-gallery-zoom svg,
.bp-gallery-btn:focus-visible .bp-gallery-zoom svg { transform: translateY(0); }

.bp-gallery-btn:hover img { transform: scale(1.06); }

@media (hover: none) {
    /* در دستگاه‌های لمسی پوشش ملایم همیشه دیده می‌شود تا قابل‌کشف بماند. */
    .bp-gallery-zoom {
        opacity: 1;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 58%, rgba(0, 0, 0, 0.35) 100%);
    }
}

/* نمایشگر تمام‌صفحهٔ تصاویر (lightbox) */
.bp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(12, 13, 16, 0.94);
    display: flex;
    flex-direction: column;
    color: #fff;
}

.bp-lightbox[hidden] { display: none; }

.bp-lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
}

.bp-lightbox-count { font-size: 13.5px; color: #d6d8e0; }

.bp-lightbox-btn,
.bp-lightbox-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background .2s ease;
}

.bp-lightbox-btn:hover,
.bp-lightbox-nav:hover { background: rgba(255, 255, 255, 0.24); }

.bp-lightbox-btn:focus-visible,
.bp-lightbox-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.bp-lightbox-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px 20px;
    min-height: 0;
}

/* دکمه‌های ناوبری روی لبه‌های تصویر (در RTL: قبلی راست، بعدی چپ). */
.bp-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(0, 0, 0, 0.45);
}

.bp-lightbox-prev { right: 10px; }
.bp-lightbox-next { left: 10px; }

.bp-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 14px;
    background: #1b1c21;
}

.bp-lightbox-nav:disabled { opacity: .35; cursor: default; }

body.bp-lightbox-open { overflow: hidden; }

@media (min-width: 640px) {
    .bp-lightbox-stage { padding: 0 22px 26px; }
    .bp-lightbox-prev { right: 22px; }
    .bp-lightbox-next { left: 22px; }
    .bp-lightbox-img { border-radius: 18px; }
}

.bp-rating-head {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
}

.bp-rating-value { font-size: 26px; font-weight: 800; color: var(--bp-gold); }
.bp-rating-outof { color: var(--bp-muted); font-size: 13px; }
.bp-rating-count { color: var(--bp-muted); font-size: 13px; }

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

.bp-review {
    border: 1px solid var(--bp-line);
    border-radius: 12px;
    padding: 12px;
    background: #fcfcfa;
}

.bp-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}

.bp-review-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--bp-gold);
    font-weight: 700;
}

.bp-review-date { color: var(--bp-muted); }
.bp-review-comment { margin: 0; color: #3a3d44; }

.bp-review-reply {
    margin-top: 8px;
    background: #f2f8ff;
    border: 1px solid #d9e9fb;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13.5px;
    color: #2c4a6b;
}

/* کارت نظرات در انتهای صفحه؛ هنگام دریافت صفحهٔ جدید کمی محو می‌شود. */
.bp-reviews-card { margin-top: 16px; }
.bp-reviews-card .bp-card-title { margin-bottom: 12px; }
.bp-reviews-card.is-loading .bp-reviews { opacity: 0.45; transition: opacity 0.15s ease; }

.bp-ico { display: inline-flex; align-items: center; }

.bp-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.bp-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--bp-line);
    border-radius: 10px;
    background: #fff;
    color: #3a3d44;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.bp-page-btn:hover { background: #f6f4ef; border-color: #d8d3c8; }

.bp-page-btn.is-active {
    background: var(--bp-primary);
    border-color: var(--bp-primary);
    color: #fff;
    cursor: default;
}

.bp-page-gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 36px;
    color: var(--bp-muted);
}

.bp-footer {
    background: #23252b;
    color: #d9dae0;
    padding: 16px 0;
    font-size: 13px;
}

.bp-footer .bp-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bp-footer a { display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.bp-copy { color: #9a9ca6; }

@media (min-width: 640px) {
    body { font-size: 15.5px; }
    .bp-hero { padding: 30px 0; }
    .bp-brand-text h1 { font-size: 26px; }
    .bp-logo { width: 84px; height: 84px; }
    /* گالری در همهٔ عرض‌ها سه‌ستونه می‌ماند تا چیدمان ۲×۲ تصویر شاخص
       بدون خانهٔ خالی تکمیل شود. */
    .bp-gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
    .bp-hero-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .bp-grid {
        grid-template-columns: minmax(0, 1fr) 340px;
        align-items: start;
    }
    /* وقتی ستون اصلی خالی است، ویترین تک‌ستونه و وسط‌چین می‌شود تا فضای
       خالیِ نامتوازنِ سمت راست ایجاد نشود. */
    .bp-grid-solo {
        grid-template-columns: minmax(0, 1fr);
        max-width: 680px;
        margin-inline: auto;
    }
    .bp-col-side { position: sticky; top: 16px; }
    .bp-main { padding: 28px 16px 56px; }
}
