/* YekanBakh fallback برای سازگاری با کدهای قدیمی */
@font-face { font-family:'YekanBakh'; src:url('/assets/fonts/YekanBakhFaNum-Regular.woff2') format('woff2'); font-weight:400; font-display:swap }
@font-face { font-family:'YekanBakh'; src:url('/assets/fonts/YekanBakhFaNum-Bold.woff2') format('woff2'); font-weight:700 800; font-display:swap }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.header-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }

.store-logo {
    width: 44px; height: 44px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary-light, #EEF0FF);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800;
    color: var(--primary);
    border: 1.5px solid rgba(var(--border-rgb,229,231,235),0.8);
    box-shadow: 0 2px 12px rgba(0,0,0,0.1), 0 0 0 3px rgba(var(--primary-rgb,108,99,255),0.08);
}
.store-logo img { width: 100%; height: 100%; object-fit: cover; }

.store-meta { flex: 1; min-width: 0; }
.store-name {
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}
.store-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}
.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #22C55E;
    animation: pulse 2s infinite;
}
.status-dot.closed { background: #EF4444; animation: none; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }



.cart-btn {
    position: relative;
    width: 44px; height: 44px;
    border-radius: 14px;
    background: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(var(--primary-rgb,108,99,255),0.35);
}
.cart-btn:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb,108,99,255),0.25);
}
.cart-btn svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cart-badge {
    position: absolute;
    top: -6px; left: -6px;
    background: #EF4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 19px;
    height: 19px;
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    transition: transform 0.2s;
    border: 2px solid var(--bg);
}
.cart-badge.show { display: flex; }

/* دکمه همبرگر */
.menu-btn {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--bg); border: 1.5px solid var(--border);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; flex-direction: column; gap: 4px; padding: 9px;
    transition: all 0.2s;
}
.menu-btn:hover { background: var(--border) }
.menu-btn span {
    display: block; width: 16px; height: 1.5px;
    background: var(--text); border-radius: 2px; transition: all 0.2s;
}
.menu-btn span:nth-child(2) { width: 12px; }

/* پنل کشویی */
.side-panel { position: fixed; inset: 0; z-index: 300; display: none; }
.side-panel.open { display: block; }
.side-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
.side-drawer {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: min(320px, 85vw); background: var(--bg);
    display: flex; flex-direction: column;
    animation: slideInRight 0.3s ease; overflow-y: auto;
}
@keyframes slideInRight { from{transform:translateX(100%)} to{transform:translateX(0)} }

.drawer-tabs {
    display: flex; border-bottom: 1px solid var(--border);
    background: var(--card); position: sticky; top: 0; z-index: 10;
}
.drawer-tab {
    flex: 1; padding: 14px 8px; text-align: center;
    font-size: 12px; font-weight: 700; color: var(--muted);
    cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s;
}
.drawer-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.drawer-panel { display: none; padding: 20px; }
.drawer-panel.active { display: block; }

.about-logo {
    width: 72px; height: 72px; border-radius: 16px; overflow: hidden;
    background: var(--card); display: flex; align-items: center;
    justify-content: center; font-size: 28px; font-weight: 800;
    color: var(--primary); margin: 0 auto 14px; border: 2px solid var(--border);
}
.about-logo img { width: 100%; height: 100%; object-fit: cover; }
.about-name { font-size: 18px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.about-type { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 16px; }
.about-desc {
    font-size: 13px; line-height: 1.8; color: var(--muted);
    background: var(--card); border-radius: 10px; padding: 12px; margin-bottom: 16px;
}
.about-info-row {
    display: flex; align-items: center; gap: 10px; padding: 10px 0;
    border-bottom: 1px solid var(--border); font-size: 13px;
}
.about-info-row:last-child { border-bottom: none; }
.about-info-icon { width: 32px; text-align: center; font-size: 16px; flex-shrink: 0; }
.about-info-val  { flex: 1; font-weight: 600; }
.about-socials { display: flex; gap: 10px; margin-top: 16px; }
.social-btn {
    flex: 1; padding: 10px; border-radius: 10px; border: none;
    font-family: 'MenuFont', 'YekanBakh', sans-serif; font-size: 12px; font-weight: 700;
    cursor: pointer; text-decoration: none; display: flex;
    align-items: center; justify-content: center; gap: 6px;
}
.social-btn.instagram { background: #E1306C; color: #fff; }
.social-btn.telegram  { background: #0088cc; color: #fff; }

/* فوتر */
.store-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 20px 16px 16px;
    margin-top: 8px;
}
.footer-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.footer-logo {
    width: 44px; height: 44px; border-radius: 11px; overflow: hidden;
    background: var(--bg); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800; color: var(--primary);
    border: 1px solid var(--border);
}
.footer-logo img { width: 100%; height: 100%; object-fit: cover; }
.footer-info { flex: 1; min-width: 0; text-align: right; }
.footer-name  { font-size: 14px; font-weight: 800; }
.footer-hours { font-size: 11px; color: var(--muted); margin-top: 2px; }
.footer-social {
    display: flex; gap: 8px; margin-top: 0; flex-shrink: 0;
}
.footer-social a {
    width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; color: var(--text); background: var(--bg);
    transition: background 0.15s;
}
.footer-social a:hover { background: var(--border) }
.footer-divider { height: 1px; background: var(--border); margin-bottom: 12px; }
.footer-powered { font-size: 10px; color: var(--muted); text-align: center; }
.footer-powered a { color: var(--primary); text-decoration: none; font-weight: 700; }
.cats-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.cats-scroll::-webkit-scrollbar { display: none; }
.layout-right .cats-scroll { display: none; }

/* ===== استایل ۱: کارت با آیکن (پیش‌فرض) ===== */
.cat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    border-radius: 18px;
    border: 1.5px solid var(--border);
    background: var(--card);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
    min-width: 68px;
    font-family: 'MenuFont', 'YekanBakh', sans-serif;
}
.cat-chip:active { transform: scale(0.93); }
.cat-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb,108,99,255),0.3);
    transform: translateY(-1px);
}
.cat-chip.active .cat-chip-label { color: #fff; }

.cat-chip-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; overflow: hidden;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
}
.cat-chip.active .cat-chip-icon { background: rgba(255,255,255,0.2); }
.cat-chip-icon img { width: 100%; height: 100%; object-fit: contain; }
.cat-chip-label { font-size: 11px; font-weight: 700; color: var(--text); }

/* ===== استایل ۲: فقط متن با خط زیر ===== */
.cat-style-underline .cat-chip {
    position: relative;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: max-content;
    min-height: 52px;
    padding: 7px 15px 10px;
    border-radius: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    transform: none;
}
.cat-style-underline .cat-chip::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
    transform: translateX(50%);
    transition: width .2s ease;
}
.cat-style-underline .cat-chip.active {
    background: transparent;
    border: none;
    box-shadow: none;
    transform: none;
}
.cat-style-underline .cat-chip.active::after { width: 28px; }
.cat-style-underline .cat-chip.active .cat-chip-label { color: var(--text); }
.cat-style-underline .cat-chip-icon { display: none; }
.cat-style-underline .cat-chip-label {
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    overflow: visible;
    color: var(--text);
    line-height: 1.35;
    text-overflow: clip;
}
.cat-style-underline .cat-chip-title {
    display: block;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.cat-style-underline .cat-chip-subtitle {
    display: block;
    max-width: 116px;
    overflow: hidden;
    color: var(--muted);
    font-size: 9px;
    font-weight: 500;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cat-style-underline .cat-chip.active .cat-chip-title { color: var(--text); }
.cat-style-underline .cat-chip.active .cat-chip-subtitle { color: var(--muted); }
.cats-scroll.cat-style-underline {
    gap: 2px;
    padding-top: 5px;
    padding-bottom: 0;
    border-bottom: 1px solid var(--border);
}

/* ===== استایل ۳: آیکن مستطیلی سمت راست ===== */
.cat-style-rect .cat-chip {
    flex-direction: row-reverse;
    padding: 7px 10px;
    border-radius: 10px;
    gap: 7px;
    min-width: unset;
}
.cat-style-rect .cat-chip-icon {
    width: 28px; height: 28px;
    border-radius: 7px;
    flex-shrink: 0;
}
.cat-style-rect .cat-chip-label { font-size: 12px; }

/* آیکن سمت چپ */
.cat-style-rect.icon-left .cat-chip { flex-direction: row; }

/* ===== استایل ۴: دایره آیکن‌دار ===== */
.cats-scroll.cat-style-circle {
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 16px;
}
.cat-style-circle .cat-chip {
    position: relative;
    width: 84px;
    min-width: 84px;
    height: 84px;
    min-height: 84px;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px 7px;
    border-width: 2px;
    border-radius: 50%;
    box-shadow: 0 7px 18px color-mix(in srgb, var(--text) 8%, transparent);
    transform: none;
}
.cat-style-circle .cat-chip::before {
    content: '';
    position: absolute;
    inset: -5px;
    border: 1px solid transparent;
    border-radius: 50%;
    pointer-events: none;
    transition: border-color .2s ease, transform .2s ease;
}
.cat-style-circle .cat-chip.active::before {
    border-color: color-mix(in srgb, var(--primary) 58%, transparent);
    transform: scale(1.01);
}
.cat-style-circle .cat-chip:active { transform: scale(.95); }
.cat-style-circle .cat-chip-icon {
    width: 40px;
    height: 40px;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}
.cat-style-circle .cat-chip.active .cat-chip-icon { background: transparent; }
.cat-style-circle .cat-chip-icon img {
    width: auto;
    height: auto;
    max-width: 38px;
    max-height: 38px;
    filter: drop-shadow(0 4px 6px color-mix(in srgb, var(--text) 16%, transparent));
}
.cat-style-circle .cat-chip-label {
    max-width: 66px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.35;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== محتوا ===== */
.content { padding: 0 16px; }

.section { margin-top: 24px; }

.section-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, transparent, var(--border));
}

.subsection-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    margin: 16px 0 10px;
    padding-right: 10px;
    border-right: 3px solid var(--primary);
}

.subsection-wrap { margin-top: 8px; }

/* تگ تخفیف */
.disc-tag {
    position: absolute;
    top: 8px; right: 8px;
    background: #EF4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    z-index: 2;
    font-family: 'MenuFont', 'YekanBakh', sans-serif;
    pointer-events: none;
}

/* counter سبد */
.item-counter {
    display: flex; align-items: center;
    border-radius: 10px; overflow: hidden;
    border: 1.5px solid var(--primary);
    height: 30px; flex-shrink: 0;
}
.item-counter button {
    width: 26px; height: 100%; border: none;
    background: var(--primary); color: #fff;
    font-size: 16px; font-weight: 700; cursor: pointer;
    font-family: 'MenuFont', 'YekanBakh', sans-serif;
    display: flex; align-items: center; justify-content: center;
}
.item-counter .counter-num {
    min-width: 22px; text-align: center;
    font-size: 12px; font-weight: 800;
    color: var(--primary); background: var(--card);
    height: 100%; display: flex; align-items: center; justify-content: center;
}
.item-action-wrap {
    display: flex; align-items: center; justify-content: flex-end;
    min-height: 30px; flex-shrink: 0;
}

/* ===== آیتم‌ها - تم لیستی ===== */
