/* لیست قیمت عابد — از متغیرهای رنگ قالب عابد استفاده می‌کند (با مقدار پیش‌فرض).
   انتخابگرها عمداً با .abpl شروع می‌شوند تا قواعد متنی برگه (.ab-prose: عرض ۷۸ حرف، جدول، details، لینک) را خنثی کنند. */
.ab-prose > .abpl, .abpl { max-width: none !important; width: 100%; line-height: 1.7; }
.abpl a { text-decoration: none !important; }
.abpl table { display: table !important; margin: 0 !important; font-size: inherit !important; }
.abpl details { margin: 0; border: 0; background: none; max-width: none; }
.abpl details > :not(summary) { padding: 0 !important; margin: 0 !important; }
.abpl details > summary::after { content: none; }
.abpl .abpl__group { margin-top: 10px; border: 1px solid var(--ab-line, #e6e2d6); background: #fff; }
.abpl .abpl__share > summary { padding: 0 14px; color: #fff; font-weight: 700; display: inline-flex; }
.abpl { --pl-green: var(--ab-green, #283618); --pl-gold: var(--ab-gold, #b2964c); --pl-line: var(--ab-line, #e6e2d6); --pl-muted: var(--ab-muted, #6b6b6b); --pl-bg: var(--ab-bg, #f6f4ee); --pl-red: var(--ab-red, #9d0000); font-size: 14px; }
.abpl__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: 14px; background: var(--pl-green); color: #fff; }
.abpl__kicker { margin: 0; font-weight: 800; font-size: 17px; color: #fff; }
.abpl__meta { margin: 4px 0 0; font-size: 13px; color: rgba(255, 255, 255, .82); }
.abpl__meta strong { color: #fff; }
.abpl__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.abpl__btn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 10px; background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none; list-style: none; }
.abpl__btn:hover { background: var(--pl-gold); border-color: var(--pl-gold); color: #fff; }
.abpl__share { position: relative; }
.abpl__share summary::-webkit-details-marker { display: none; }
.abpl__sharemenu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 20; display: grid; min-width: 150px; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .3); }
.abpl__sharemenu a, .abpl__sharemenu button { display: block; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: #222; font: inherit; font-weight: 700; text-align: start; cursor: pointer; text-decoration: none; }
.abpl__sharemenu a:hover, .abpl__sharemenu button:hover { background: var(--pl-bg); }
.abpl__bar { position: sticky; top: var(--ab-sticky-top, 0px); z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 0; background: var(--ab-surface, #fff); }
.abpl__search { flex: 1 1 240px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--pl-line); border-radius: 10px; font: inherit; background: #fff; }
.abpl__search:focus { outline: none; border-color: var(--pl-green); }
.abpl__toggle { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; }
.abpl__link { border: 0; background: none; color: var(--pl-green); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.abpl__cats { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.abpl__cats::-webkit-scrollbar { display: none; }
.abpl__cats a { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--pl-bg); color: #333; font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; }
.abpl__cats a span { color: var(--pl-muted); font-weight: 400; }
.abpl__cats a:hover { background: var(--pl-green); color: #fff; }
.abpl__group { margin-top: 10px; border: 1px solid var(--pl-line); border-radius: 12px; background: #fff; overflow: hidden; scroll-margin-top: 90px; }
.abpl .abpl__group > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; cursor: pointer; font-weight: 800; font-size: 15px; list-style: none; background: var(--pl-bg); }
.abpl__group > summary::-webkit-details-marker { display: none; }
.abpl .abpl__group > summary::after { content: ''; width: 9px; height: 9px; border-inline-start: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; }
.abpl .abpl__group[open] > summary::after { transform: rotate(135deg); }
.abpl__gn { margin-inline-start: auto; color: var(--pl-muted); font-weight: 400; font-size: 12px; }
.abpl__tablewrap { overflow-x: auto; }
.abpl__table { width: 100%; border-collapse: collapse; }
.abpl__table th { padding: 8px 12px; background: #fff; border-bottom: 2px solid var(--pl-line); color: var(--pl-muted); font-size: 12px; text-align: start; white-space: nowrap; }
.abpl__table td { padding: 9px 12px; border-bottom: 1px solid var(--pl-line); vertical-align: middle; }
.abpl__table tbody tr:nth-child(even) td { background: #fcfbf8; }
.abpl__table tbody tr:hover td { background: #f3f6ee; }
.abpl__table td a { color: #1d1d1d; font-weight: 700; text-decoration: none; }
.abpl__table td a:hover { color: var(--pl-green); }
.abpl__table small { display: block; margin-top: 2px; color: var(--pl-muted); font-size: 12px; font-weight: 400; }
.abpl__price { white-space: nowrap; font-weight: 800; color: var(--pl-green); }
.abpl__price.is-inq { color: var(--pl-red); font-weight: 700; }
.abpl__tiers { color: #444; font-size: 13px; }
.abpl__date { color: var(--pl-muted); font-size: 12px; white-space: nowrap; }
.abpl__tiers-sm { color: var(--pl-green) !important; }
.abpl tr.is-out td a { color: #666; }
.abpl__empty { padding: 24px; text-align: center; color: var(--pl-muted); }
.abpl__foot { margin-top: 16px; color: var(--pl-muted); font-size: 12px; }
.abpl .abpl__foot a { text-decoration: underline !important; text-underline-offset: 3px; } /* لینک داخل متن: زیرخط (دسترس‌پذیری) */
.abpl[data-only-stock] tr.is-out, .abpl tr.is-hidden, .abpl__group.is-hidden { display: none; }
@media (min-width: 760px) { .abpl__tiers-sm { display: none !important; } }
@media (max-width: 759px) { .abpl__hide-sm { display: none; } .abpl__table td { padding: 9px 10px; } }

/* ---------- خرید از لیست ---------- */
.abpl__buyh, .abpl__buy { width: 1%; white-space: nowrap; text-align: center !important; }
.abpl:not(.can-buy) .abpl__buyh, .abpl:not(.can-buy) .abpl__buy { display: none; }
.abpl-q { display: inline-flex; align-items: center; border: 1.5px solid var(--pl-line); border-radius: 10px; background: #fff; overflow: hidden; }
.abpl-q__btn { width: 34px; height: 36px; border: 0; background: none; color: var(--pl-green); font: inherit; font-size: 19px; font-weight: 800; line-height: 1; cursor: pointer; touch-action: manipulation; }
.abpl-q__btn:hover:not(:disabled) { background: var(--pl-bg); }
.abpl-q__btn:disabled { color: #c9c6ba; cursor: default; }
.abpl-q input { width: 44px; height: 36px; border: 0 !important; border-inline: 1px solid var(--pl-line) !important; border-radius: 0 !important; padding: 0 !important; background: #fff; font: inherit; font-weight: 800; text-align: center; color: #1d1d1d; -moz-appearance: textfield; box-shadow: none !important; }
.abpl-q input::-webkit-outer-spin-button, .abpl-q input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.abpl-q input:focus { outline: 2px solid var(--pl-gold); outline-offset: -2px; }
.abpl-q__line { position: relative; min-height: 0; font-size: 11.5px; color: var(--pl-muted); }
.abpl-q__line:empty { display: none; }
.abpl-line { display: block; margin-top: 4px; white-space: nowrap; }
.abpl-line b { color: var(--pl-green); }
.abpl-line.is-tier b { color: var(--ab-ok, #2f6b2a); }
.abpl-q__hint { position: absolute; inset-inline-end: 0; top: 100%; z-index: 3; margin-top: 2px; padding: 3px 8px; border-radius: 6px; background: #2b2b2b; color: #fff; font-size: 11.5px; white-space: nowrap; }
.abpl tr.is-picked td { background: #f6f9ef !important; }
.abpl tr.is-picked .abpl-q { border-color: var(--pl-green); }
.abpl__inq { display: inline-block; padding: 6px 12px; border-radius: 9px; border: 1.5px solid var(--pl-line); color: var(--pl-red) !important; font-weight: 700; font-size: 12.5px; }
.abpl__inq:hover { border-color: var(--pl-red); }

/* تصاویر */
.abpl__img { float: inline-start; width: 48px; height: 48px; margin-inline-end: 10px; border-radius: 8px; object-fit: cover; background: var(--pl-bg); }
.abpl__name::after { content: ""; display: table; clear: both; }
.abpl:not(.has-img) .abpl__img { display: none; }

/* نوار پایین انتخاب‌ها */
.abpl-cartbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 72; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--pl-line); box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .35); animation: abpl-up .22s ease; }
.ab-has-bottom-nav .abpl-cartbar { bottom: calc(var(--ab-bnav-h, 62px) + env(safe-area-inset-bottom)); padding-bottom: 10px; }
@keyframes abpl-up { from { transform: translateY(100%); opacity: 0; } }
.abpl-cartbar__in { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 1100px; margin: 0 auto; flex-wrap: wrap; }
.abpl-cartbar__sum { display: flex; flex-direction: column; line-height: 1.5; }
.abpl-cartbar__sum strong { font-size: 15px; color: var(--pl-green); }
.abpl-cartbar__sum span { font-size: 12.5px; color: var(--pl-muted); }
.abpl-cartbar__sum b { color: #1d1d1d; }
.abpl-cartbar__acts { display: flex; gap: 6px; flex-wrap: wrap; }
.abpl-cartbar__ghost, .abpl-cartbar__add { min-height: 42px; padding: 0 14px; border-radius: 10px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.abpl-cartbar__ghost { border: 1.5px solid var(--pl-line); background: #fff; color: #333; }
.abpl-cartbar__ghost[aria-pressed=true] { border-color: var(--pl-green); color: var(--pl-green); background: var(--pl-bg); }
.abpl-cartbar__add { border: 0; background: var(--pl-green); color: #fff; padding: 0 20px; }
.abpl-cartbar__add:hover { filter: brightness(1.15); }
.abpl-cartbar__add.is-loading { opacity: .6; cursor: progress; }
body.abpl-picking .ab-float { display: none; }
body.abpl-picking .abpl__foot { padding-bottom: 90px; }
@media (min-width: 900px) {
	.abpl-cartbar, .ab-has-bottom-nav .abpl-cartbar { left: 50%; right: auto; transform: translateX(-50%); bottom: 18px; width: min(960px, calc(100% - 48px)); border: 1px solid var(--pl-line); border-radius: 16px; padding: 10px 16px; animation: none; }
}
@media screen and (max-width: 759px) {
	/* هر ردیف دو خط: نام (و تصویر) بالا، قیمت و تعداد پایین */
	.abpl .abpl__table { display: block !important; }
	.abpl__table thead { display: none; }
	.abpl__table tbody { display: block; }
	.abpl__table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n n" "p b"; align-items: center; gap: 6px 10px; padding: 10px 12px; border-bottom: 1px solid var(--pl-line); }
	.abpl__table tbody tr:nth-child(even) { background: #fcfbf8; }
	.abpl__table tbody tr td, .abpl__table tbody tr:nth-child(even) td, .abpl__table tbody tr:hover td { display: block; padding: 0; border: 0; background: none !important; }
	.abpl__table td.abpl__name { grid-area: n; }
	.abpl__table td.abpl__price { grid-area: p; }
	.abpl__table td.abpl__buy { grid-area: b; width: auto; text-align: end !important; }
	.abpl__table tbody tr td.abpl__hide-sm { display: none; }
	.abpl tr.is-picked { background: #f6f9ef !important; }
	.abpl:not(.can-buy) .abpl__table tbody tr { grid-template-areas: "n n" "p p"; }
	.abpl-q__btn { width: 34px; height: 36px; }
	.abpl-q input { width: 42px; height: 36px; }
	.abpl-cartbar__sum { flex: 1 1 100%; flex-direction: row; justify-content: space-between; align-items: baseline; }
	.abpl-cartbar__acts { flex: 1 1 100%; flex-wrap: nowrap; }
	.abpl-cartbar__ghost { padding: 0 10px; font-size: 12px; white-space: nowrap; }
	.abpl-cartbar__add { flex: 1; white-space: nowrap; padding: 0 12px; }
	.abpl-cartbar__in { gap: 8px; }
	.abpl__img { width: 40px; height: 40px; margin-inline-end: 8px; }
}

/* چاپ / PDF — برگه A4 تمیز، همه دسته‌ها باز */
@media print {
	@page { size: A4; margin: 12mm; }
	body * { visibility: hidden; }
	.abpl, .abpl * { visibility: visible; }
	.abpl { position: absolute; inset: 0 0 auto 0; font-size: 11px; }
	.abpl__actions, .abpl__bar, .abpl__cats, .abpl__group > summary::after, .abpl__buyh, .abpl__buy, .abpl-cartbar, .abpl__img { display: none !important; }
	.abpl__head { background: none; color: #000; border: 2px solid #000; }
	.abpl__kicker, .abpl__meta, .abpl__meta strong { color: #000; }
	.abpl__group { border: 0; break-inside: auto; }
	.abpl__group > summary { background: #eee; }
	.abpl__group:not([open]) > :not(summary) { display: block !important; }
	.abpl__hide-sm { display: table-cell !important; }
	.abpl__tiers-sm { display: none !important; }
	.abpl__table td, .abpl__table th { padding: 4px 6px; }
	.abpl__table tr { break-inside: avoid; }
	.abpl__table td a { color: #000; }
}
