/* طراحی یکپارچهٔ فهرست محصولات، کارت محصول و هدر در همهٔ صفحه‌ها */

/* مسیر صفحه */
.content-box:has(> nav[aria-label="breadcrumb"]) { margin: 0; padding: 6px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.breadcrumb { margin: 0; font-size: 10px; font-weight: 400; line-height: 14px; }
.breadcrumb .breadcrumb-item a { color: #7a8aae !important; font-size: inherit !important; }
.breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: #7a8aae; }
.breadcrumb .breadcrumb-item:last-child a { color: #111 !important; }

/* سربرگ صفحه: مسیر، عنوان و دسته‌ها */
.bb-cat-head { padding: 6px 0 0; }
.bb-cat-title { margin: 2px 0 0; color: #111; font-size: 12px; font-weight: 400; line-height: 18px; }
.bb-cat-body { padding-top: 4px; }
.bb-cat-body .content-box { margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.bb-cat-body .sp-chips { gap: 6px; margin: 0 -12px; padding: 4px 12px; background: #f2f4f8; }
.bb-cat-body .sp-chip { gap: 5px; min-height: 28px; padding: 2px 6px 2px 11px; border-radius: 9999px; background: #fff; color: #333; font-size: 10px; font-weight: 400; }
.bb-cat-body .sp-chip img { width: 22px; height: 22px; border-radius: 0; object-fit: contain; }

/* کارت محصول */
.bb-card { position: relative; display: flex; flex-direction: column; gap: 8px; width: 100% !important; height: 100%; min-height: 0; margin: 0; padding: 10px; border: 1px solid #f0f0f0; border-radius: 10px; background: #fff; box-shadow: none !important; color: #212121; text-align: right; }
.bb-card .product-box-item-img, .bb-card .product-box-item-desc { margin-top: 0 !important; }
.bb-card .product-box-item-img { text-align: center; }
.bb-card .img-size { display: block; width: auto; max-width: 100%; height: auto; max-height: 170px; margin: 0 auto; object-fit: contain; }
.bb-card .product-box-item-desc { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; }
.bb-card .stretched-link { min-width: 0; }
.bb-card .product-box-item-title { margin-bottom: 0 !important; }
.bb-card .product-box-item-title p { display: -webkit-box; min-height: 40px; margin: 0; overflow: hidden; color: #111; font-size: 12px; font-weight: 400; line-height: 20px; text-align: right; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.bb-off { padding-bottom: 1px; border-bottom: 1px solid #da1e28; color: #da1e28; font-size: 10px; font-weight: 700; line-height: 14px; text-align: right; }
.bb-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 6px; min-height: 18px; }
.bb-ship { display: inline-flex; align-items: center; gap: 3px; height: 18px; padding: 0 7px; border-radius: 9999px; background: #b2544d; color: #fff; font-size: 10px; line-height: 14px; white-space: nowrap; }
.bb-ship i { font-size: 11px; }
.bb-rate { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: auto; color: #444; font-size: 11px; font-weight: 400; line-height: 16px; white-space: nowrap; }
.bb-rate i { color: #f5b301; font-size: 11px; }
.bb-rate.is-empty { color: #666; font-size: 10px; }
.bb-rate.is-empty i { color: #c9ced6; }
.bb-specs { order: -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.bb-specs li { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; color: #222; font-size: 10px; line-height: 13px; text-align: center; }
.bb-specs i { color: #7a8aae; font-size: 14px; line-height: 1; }
.bb-specs span { display: -webkit-box; max-width: 100%; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.bb-price { margin-top: auto; text-align: left; }
.bb-price-now, .bb-price-was { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.bb-price-now { color: #000; }
.bb-price-now b { font-size: 14px; font-weight: 400; line-height: 18px; }
.bb-price-now small, .bb-price-was small { width: 26px; font-size: 11px; font-weight: 400; }
.bb-percent { margin-inline-end: auto; padding: 0 6px; border-radius: 4px; background: #d32f2f; color: #fff; font-size: 11px; font-weight: 400; line-height: 18px; }
.bb-price-was { margin-top: 2px; color: #919ebc; }
.bb-price-was s { font-size: 11px; line-height: 14px; }
.bb-price-none { color: #444; font-size: 12px; font-weight: 400; }

/* فهرست محصولات در موبایل: عنوان سمت راست، عکس سمت چپ و قیمت زیر عکس */
@media (max-width: 767.98px) {
	#product-list > .col { width: 100%; padding-inline: 0; margin-bottom: 0 !important; }
	#product-list .bb-card { display: grid; grid-template-areas: "off off" "title img" "meta img" "specs img" "price price"; grid-template-columns: minmax(0, 1fr) 96px; grid-template-rows: auto auto auto 1fr auto; column-gap: 10px; row-gap: 5px; height: auto; padding: 8px 2px; border: 0; border-bottom: 1px solid #f0f0f0; border-radius: 0; }
	#product-list .bb-card .bb-off { grid-area: off; }
	#product-list .bb-card .product-box-item-img { grid-area: img; }
	#product-list .bb-card .img-size { max-width: 96px; max-height: 106px; }
	#product-list .bb-card .product-box-item-desc { display: contents; }
	#product-list .bb-card .stretched-link { grid-area: title; }
	#product-list .bb-card .product-box-item-title p { min-height: 0; -webkit-line-clamp: 2; }
	#product-list .bb-card .bb-meta { grid-area: meta; margin-top: 5px; }
	#product-list .bb-card .bb-specs { grid-area: specs; align-self: start; }
	#product-list .bb-card .bb-price { grid-area: price; padding-left: 14px; }
	#product-list .bb-card .bb-percent { margin-inline-end: 4px; }
	#product-list .bb-card .bb-price-was small { visibility: hidden; }
}

/* تبلت و دسکتاپ: کارت عمودی و دسته‌ها به‌شکل بلوک جدا */
@media (min-width: 768px) {
	.breadcrumb { font-size: 12px; line-height: 25px; }
	.bb-cat-head { padding: 11px 0 0; }
	.bb-cat-title { margin: 24px 0 8px; font-size: 14px; line-height: 24px; }
	.bb-cat-body { padding-top: 0; }
	.bb-cat-body .sp-chips { gap: 8px; margin: 0 0 8px; padding: 8px 16px; border-radius: 6px; }
	.bb-cat-body .sp-chip { flex: none; flex-direction: column; justify-content: center; gap: 4px; width: 112px; min-height: 86px; padding: 6px 8px; border-radius: 6px; font-size: 11px; line-height: 16px; text-align: center; }
	.bb-cat-body .sp-chip img { width: 50px; height: 50px; }
	.bb-cat-body .sp-chip span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }

	#column-left:has(.fp-panel) { flex: 0 0 278px; width: 278px; max-width: 278px; padding-inline-end: 12px; }
	#column-left .fp-panel { border: 1px solid #ced0d0; border-radius: 8px; }
	#column-left .fp-head { padding: 12px; border-bottom-color: #ced0d0; }
	#column-left .fp-title { color: #212121; font-size: 13px; }
	#column-left .fp-body { padding: 4px 12px 10px; }
	#column-left .fp-switch, #column-left .fp-group summary { padding: 11px 0; font-size: 12px; }
	#column-left .fp-check { font-size: 12px; }

	.fp-toolbar { position: static; padding: 0 0 2px; }
	.fp-count { display: none; }
	.fp-bar { min-height: 40px; padding: 0 12px; background: #f2f4f8; }
	.fp-bar-count { margin-inline-start: auto; color: #222; font-size: 11px; white-space: nowrap; }

	#product-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 11px; margin: 0; padding-top: 8px; }
	#product-list > .col { display: flex; flex: none; width: auto; max-width: none; margin: 0 !important; padding: 0; }
	#product-list > .col > div { width: 100%; }
	#product-list .bb-card { gap: 12px; padding: 48px 16px 16px; }
	#product-list .bb-card .bb-off { position: absolute; top: 14px; right: 16px; left: 16px; padding-bottom: 4px; border-bottom-width: 3px; font-size: 12px; line-height: 18px; }
	#product-list .bb-card .product-box-item-img { display: flex; align-items: center; justify-content: center; height: 190px; }
	#product-list .bb-card .img-size { max-height: 190px; }
	#product-list .bb-card .product-box-item-desc { gap: 12px; }
	#product-list .bb-card .bb-specs { min-height: 30px; }
	#product-list .bb-card .product-box-item-title p { min-height: 48px; font-size: 13px; line-height: 24px; }
	#product-list .bb-card .bb-meta { flex-wrap: nowrap; }
	#product-list .bb-card .bb-ship { height: 22px; padding: 0 6px; }
	#product-list .bb-card .bb-price-now b { font-size: 16px; line-height: 20px; }
	#product-list .bb-card .bb-price-was s { font-size: 13px; line-height: 20px; }
}

@media (max-width: 767.98px) {
	.fp-bar-count { display: none; }
}

/* هدر دسکتاپ: تبلیغ و لوگو ثابت می‌مانند و منو با اسکرول به پایین محو می‌شود */
@media (min-width: 992px) {
	header { display: contents; }
	.site-alert-image { position: sticky; top: 0; z-index: 1032; }
	header .header-bottom { position: sticky; top: var(--bb-promo-h, 0px); z-index: 1031; background: #fff; }
	header .mega-menu .nav-link { margin: 0; padding-top: 5px; padding-bottom: 5px; }
	header .mega-menu .top-menu-menu { padding: 0; }
	header .mega-menu { position: sticky; top: calc(var(--bb-promo-h, 0px) + var(--bb-logo-h, 0px)); z-index: 1030; margin-bottom: 0; border-bottom: 1px solid #f0f0f0; background: #fff; box-shadow: none; transition: transform .2s, opacity .2s; }
	body.bb-nav-hidden header .mega-menu { opacity: 0; pointer-events: none; transform: translateY(-100%); }
	#column-left:has(.fp-panel) { position: sticky; top: calc(var(--bb-promo-h, 0px) + var(--bb-logo-h, 0px) + var(--bb-menu-h, 0px) + 35px); align-self: flex-start; max-height: calc(100vh - var(--bb-promo-h, 0px) - var(--bb-logo-h, 0px) - var(--bb-menu-h, 0px) - 51px); overflow-y: auto; transition: top .2s; scrollbar-width: thin; }
	body.bb-nav-hidden #column-left:has(.fp-panel) { top: calc(var(--bb-promo-h, 0px) + var(--bb-logo-h, 0px) + 35px); }
}

/* مجله: کارت مقاله جمع‌وجور و نوار دسته بدون هم‌پوشانی با متن */
.card-min-height { height: 100%; min-height: 0 !important; }
.card-min-height .card-body { display: flex; flex-direction: column; padding: 10px; }
.card-min-height .my-card-footer { position: static !important; width: auto !important; margin-top: auto !important; padding-top: 8px !important; }
.card-min-height .image-blog img { width: 100%; height: 190px; object-fit: cover; }
