/* «خرید اقساطی» (home page) — each company in its own colour (--bn-c, set per card from the settings). */
.bn__head { margin-bottom: 14px; }
.bn__title { margin: 0; font-size: clamp(19px, 2.4vw, 26px); font-weight: 900; color: var(--salmod-primary); }
.bn__sub { margin: 4px 0 0; font-size: 13.5px; color: var(--salmod-muted-fg); }
.bn__cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.bn__cards::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .bn__cards { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.bn-card {
	all: unset; box-sizing: border-box; cursor: pointer; scroll-snap-align: start;
	position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 14px;
	padding: 16px 18px; border-radius: 22px; font-family: inherit; text-align: start;
	background: radial-gradient(130% 120% at 0% 100%, color-mix(in srgb, var(--bn-c) 22%, transparent), transparent 60%), color-mix(in srgb, var(--bn-c) 8%, var(--salmod-surface));
	box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bn-c) 28%, transparent);
	transition: transform .2s ease, box-shadow .2s ease;
}
.bn-card::after { content: ""; position: absolute; inset-inline-end: -36px; top: -36px; width: 110px; height: 110px; border-radius: 50%; background: color-mix(in srgb, var(--bn-c) 14%, transparent); pointer-events: none; }
.bn-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--bn-c), 0 14px 30px color-mix(in srgb, var(--bn-c) 22%, transparent); }
.bn-card:focus-visible { outline: 2px solid var(--bn-c); outline-offset: 3px; }
.bn-card__logo { grid-row: 1 / span 2; width: 52px; height: 52px; padding: 8px; border-radius: 16px; background: var(--salmod-surface); object-fit: contain; box-shadow: 0 6px 16px color-mix(in srgb, var(--bn-c) 22%, transparent); box-sizing: border-box; }
.bn-mono { display: inline-flex; align-items: center; justify-content: center; padding: 0; background: var(--bn-c); color: var(--bn-on); font-size: 22px; font-weight: 900; }
.bn-card__text { display: flex; flex-direction: column; min-width: 0; }
.bn-card__text strong { font-size: 16.5px; font-weight: 900; color: var(--salmod-primary); }
.bn-card__text span { font-size: 13px; font-weight: 600; color: var(--salmod-muted-fg); }
.bn-card__more { grid-column: 2; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12.5px; font-weight: 800; color: color-mix(in srgb, var(--bn-c) 75%, var(--salmod-primary)); }

/* Dialog */
.bn-lock { overflow: hidden; }
.bn-dialog { position: fixed; inset: 0; z-index: 100005; display: flex; align-items: flex-end; justify-content: center; font-family: "Vazirmatn", Tahoma, sans-serif; }
.bn-dialog[hidden] { display: none; }
.bn-dialog__scrim { position: absolute; inset: 0; background: rgba(12, 10, 9, .5); opacity: 0; transition: opacity .2s ease; }
.bn-dialog__panel {
	position: relative; display: flex; flex-direction: column; width: 100%; max-height: 90vh; max-height: 90dvh;
	background: var(--salmod-surface); border-radius: 24px 24px 0 0; outline: none; padding-bottom: env(safe-area-inset-bottom);
	transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.bn-dialog.is-open .bn-dialog__scrim { opacity: 1; }
.bn-dialog.is-open .bn-dialog__panel { transform: none; }
@media (min-width: 768px) {
	.bn-dialog { align-items: center; }
	.bn-dialog__panel { width: min(640px, calc(100% - 48px)); max-height: min(86vh, 760px); border-radius: 26px; transform: translateY(16px); opacity: 0; transition: transform .2s ease, opacity .2s ease; }
	.bn-dialog.is-open .bn-dialog__panel { opacity: 1; }
}
.bn-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px 8px; }
.bn-dialog__head h2 { margin: 0; font-size: 17px; font-weight: 900; color: var(--salmod-primary); }
.bn-dialog__x { all: unset; cursor: pointer; display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; background: var(--salmod-field); color: var(--salmod-primary); }
.bn-dialog__x:focus-visible { outline: 2px solid var(--salmod-ring); }
.bn-tabs { display: flex; gap: 6px; padding: 4px 18px 10px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--salmod-line-soft); }
.bn-tab { all: unset; cursor: pointer; flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 800; color: var(--salmod-primary); background: var(--salmod-field); }
.bn-tab[aria-selected="true"] { background: var(--bn-c); color: var(--bn-on); }
.bn-tab:focus-visible { outline: 2px solid var(--bn-c); outline-offset: 2px; }
.bn-dialog__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px; font-size: 14.5px; line-height: 1.95; color: var(--salmod-fg); }
.bn-pane__hero { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--bn-c) 10%, var(--salmod-surface)); }
.bn-pane__logo { width: 56px; height: 56px; padding: 8px; border-radius: 16px; background: var(--salmod-surface); object-fit: contain; box-sizing: border-box; }
.bn-pane__hero h3 { margin: 0; font-size: 18px; font-weight: 900; color: var(--salmod-primary); }
.bn-pane__hero p { margin: 0; color: var(--salmod-muted-fg); font-size: 13.5px; }
.bn-pane h4 { margin: 18px 0 8px; font-size: 15px; font-weight: 900; color: var(--salmod-primary); }
.bn-steps { counter-reset: bn; margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.bn-steps li { counter-increment: bn; position: relative; padding-inline-start: 40px; min-height: 30px; }
.bn-steps li::before { content: counter(bn, persian); position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bn-c); color: var(--bn-on); font-size: 13px; font-weight: 900; }
.bn-pay { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.bn-pay li { position: relative; padding-inline-start: 22px; }
.bn-pay li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .8em; width: 8px; height: 8px; border-radius: 50%; background: var(--bn-c); }
.bn-faq details { border-bottom: 1px solid var(--salmod-line-soft); }
.bn-faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; font-weight: 800; color: var(--salmod-primary); }
.bn-faq summary::-webkit-details-marker { display: none; }
.bn-faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--salmod-field); font-weight: 700; }
.bn-faq details[open] summary::after { content: "−"; background: var(--bn-c); color: var(--bn-on); }
.bn-faq p { margin: 0 0 12px; color: var(--salmod-muted-fg); }
.bn-dialog__foot { padding: 10px 18px 14px; border-top: 1px solid var(--salmod-line-soft); }
.bn-dialog__shop { display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 16px; background: var(--salmod-primary); color: var(--salmod-on-primary) !important; font-weight: 800; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .bn-card, .bn-dialog__panel, .bn-dialog__scrim { transition: none; } }
.bn-tab { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.bn-dialog__x { box-sizing: border-box; }
:is(.bn-card__logo, .bn-pane__logo).bn-mono { background: var(--bn-c); color: var(--bn-on); font-size: 22px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; }
.bn-tabs, .bn-dialog__head, .bn-dialog__foot { flex: none; }

/* Hover: a small lift and the company's colour on the border — the card itself never changes colour
   (also not when a theme styles every <button>:hover). */
.bn .bn-card, .bn .bn-card:hover, .bn .bn-card:focus, .bn .bn-card:active {
	background: radial-gradient(130% 120% at 0% 100%, color-mix(in srgb, var(--bn-c) 16%, transparent), transparent 60%), color-mix(in srgb, var(--bn-c) 6%, var(--salmod-surface)) !important;
	color: var(--salmod-primary) !important; border: 0 !important; min-height: 0; text-transform: none; letter-spacing: 0; line-height: 1.6;
}
.bn .bn-card { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bn-c) 22%, transparent) !important; transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease; }
.bn .bn-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bn-c) 55%, transparent), 0 12px 28px color-mix(in srgb, var(--bn-c) 16%, transparent) !important; }
.bn .bn-card:active { transform: translateY(-1px); }
.bn .bn-card::after { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.bn .bn-card:hover::after { transform: scale(1.15); }
.bn .bn-card:hover .bn-card__more svg { transform: translateX(-3px); }
.bn-card__more svg { transition: transform .25s ease; }
.bn .bn-card__logo:not(.bn-mono) { background: var(--salmod-surface) !important; }
@media (prefers-reduced-motion: reduce) { .bn .bn-card, .bn .bn-card::after, .bn-card__more svg { transition: none; } .bn .bn-card:hover { transform: none; } }

/* Room for the hover lift and shadow (the scroll box would cut them off); no lift at all, just border + glow. */
.bn__cards { padding: 4px 4px 16px; margin: -4px -4px -16px; }
@media (min-width: 900px) { .bn__cards { overflow: visible; } }
.bn .bn-card:hover, .bn .bn-card:active { transform: none; }
.bn .bn-card:hover { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bn-c) 50%, transparent), 0 8px 20px color-mix(in srgb, var(--bn-c) 12%, transparent) !important; }
.bn .bn-card::after { inset-inline-end: -40px; top: -40px; }
.bn { position: relative; z-index: 1; }
