/* ============================================================
   Path: src/RichRich.Web/wwwroot/css/public-page.css
   Session: J-168 (D48)
   LastModified: 2026-10-05
   Module: M12 POS (Frontend) — a branch's public page
   ============================================================
   🆕 NEW FILE — J-168 (D48) «صفحة عامّة لكلّ فرع»
   الملفّ الوحيد الذي يحمّله المستند العامّ (sul.ae/r/{رابط}) — ويُحمَّل في النظام كذلك لمعاينة الإعدادات.
   كلّ صنفٍ يبدأ بـ.pub- فلا يمسّ شيئاً من النظام. تصميمٌ للهاتف أوّلاً (يزوره الناس من رمز QR على الطاولة).
   ============================================================ */

.pub-body {
    margin: 0;
    background: #f6f4ef;
}

.pub-page {
    --pub-accent: #1f6b3a;
    --pub-accent-soft: #e7f2ea;
    --pub-ink: #1d2a22;
    --pub-muted: #5f6b63;
    --pub-line: #e3e0d8;
    --pub-card: #ffffff;
    --pub-paper: #f6f4ef;
    font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--pub-ink);
    background: var(--pub-paper);
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: 32px;
    line-height: 1.6;
}

.pub-page a { color: inherit; }

.pub-preview-banner {
    background: #fff4d6;
    color: #7a5600;
    text-align: center;
    font-weight: 700;
    font-size: .9rem;
    padding: 8px 12px;
}

/* ── Header ── */
.pub-hero {
    position: relative;
    text-align: center;
    padding: 44px 20px 24px;
    background: linear-gradient(180deg, var(--pub-accent-soft), var(--pub-paper));
}

.pub-lang {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--pub-card);
    border: 1px solid var(--pub-line);
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
}

.pub-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--pub-card);
    box-shadow: 0 6px 18px rgba(29, 42, 34, .12);
    color: var(--pub-accent);
    font-size: 40px;
}

.pub-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pub-name {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 12px 0 4px;
    color: var(--pub-ink);
}

.pub-about {
    max-width: 520px;
    margin: 0 auto 10px;
    color: var(--pub-muted);
    white-space: pre-line;
}

.pub-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 0;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 700;
}

.pub-status.is-open { background: #e3f5e8; color: #17663a; }
.pub-status.is-closed { background: #fdecea; color: #a3302a; }

.pub-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.pub-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 10px;
    max-width: 480px;
    margin: 18px auto 0;
}

.pub-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: 14px;
    background: var(--pub-card);
    border: 1px solid var(--pub-line);
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
}

.pub-action i { font-size: 1.25rem; color: var(--pub-accent); }
.pub-action-wa i { color: #1fa855; }

/* ── Menu ── */
.pub-cats {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 16px;
    background: rgba(246, 244, 239, .95);
    border-bottom: 1px solid var(--pub-line);
    scrollbar-width: none;
}

.pub-cats::-webkit-scrollbar { display: none; }

.pub-cat {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--pub-card);
    border: 1px solid var(--pub-line);
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.pub-menu { padding: 4px 16px 0; }

.pub-menu-title {
    margin: 16px 0 4px;
    font-size: 1.25rem;
    font-weight: 800;
}

.pub-section {
    margin-top: 18px;
    scroll-margin-top: 64px;
}

.pub-section h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--pub-accent);
}

.pub-items {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--pub-card);
    border: 1px solid var(--pub-line);
    border-radius: 16px;
    overflow: hidden;
}

.pub-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-top: 1px solid var(--pub-line);
}

.pub-item:first-child { border-top: 0; }

.pub-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #f0ede6;
}

.pub-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b9b3a6;
    font-size: 1.4rem;
}

.pub-item-name { font-weight: 600; }

.pub-price {
    font-weight: 800;
    white-space: nowrap;
}

.pub-price small {
    font-size: .75em;
    font-weight: 600;
    color: var(--pub-muted);
}

.pub-note {
    margin: 10px 2px 0;
    font-size: .85rem;
    color: var(--pub-muted);
}

.pub-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--pub-muted);
    background: var(--pub-card);
    border: 1px dashed var(--pub-line);
    border-radius: 16px;
}

/* ── Hours · visit · follow ── */
.pub-info {
    display: grid;
    gap: 12px;
    padding: 20px 16px 0;
}

@media (min-width: 640px) {
    .pub-info { grid-template-columns: 1fr 1fr; }
}

.pub-card {
    padding: 14px 16px;
    background: var(--pub-card);
    border: 1px solid var(--pub-line);
    border-radius: 16px;
}

.pub-card h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 800;
}

.pub-card h2 i { color: var(--pub-accent); }
.pub-card p { margin: 0 0 6px; }

.pub-hours {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

.pub-hours th {
    padding: 4px 0;
    text-align: start;
    font-weight: 600;
}

.pub-hours td {
    padding: 4px 0;
    text-align: end;
    color: var(--pub-muted);
}

.pub-hours tr.is-today th,
.pub-hours tr.is-today td {
    color: var(--pub-accent);
    font-weight: 800;
}

.pub-link {
    font-weight: 700;
    color: var(--pub-accent) !important;
}

.pub-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pub-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pub-accent-soft);
    color: var(--pub-accent);
    font-size: 1.25rem;
    text-decoration: none;
}

.pub-footer {
    padding: 24px 16px 0;
    text-align: center;
    font-size: .8rem;
    color: var(--pub-muted);
}

/* ── Missing / unavailable ── */
.pub-missing {
    max-width: 480px;
    margin: 15vh auto 0;
    padding: 0 20px;
    text-align: center;
    font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: #1d2a22;
}

.pub-missing i { font-size: 3rem; color: #1f6b3a; }
.pub-missing h1 { margin: 12px 0 6px; font-size: 1.4rem; font-weight: 800; }
.pub-missing p { color: #5f6b63; }

/* ── Inside the settings screen (preview) ── */
.pub-preview-frame {
    max-height: 78vh;
    overflow: auto;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 16px;
    background: #f6f4ef;
}

.pub-qr {
    width: 180px;
    height: 180px;
    image-rendering: pixelated;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 12px;
    background: #ffffff;
}
