/* DAEDAL Cart Builder — صفحه سبد خرید (v2.0) */

.dcb-cart-wrapper, .dcb-cart-empty-wrapper { margin-bottom: 34px; }

/* ---------- عنوان ---------- */
.dcb-scope .dcb-cart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.dcb-scope .dcb-cart-title { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; font-size: 1.3em; font-weight: 800; color: var(--dcb-text); --dcb-lh: 1.4; }
.dcb-scope .dcb-cart-title__icon { width: 1.3em; height: 1.3em; color: var(--dcb-primary); }
.dcb-scope .dcb-count-pill { min-width: 30px; height: 30px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-size: .62em; font-weight: 800; background: var(--dcb-primary); color: var(--dcb-on-primary); box-shadow: 0 8px 16px -8px var(--dcb-primary-ring); }

/* ---------- چیدمان ---------- */
.dcb-scope .dcb-cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.dcb-scope.dcb-cart-summary-start .dcb-cart-grid { grid-template-columns: 380px minmax(0, 1fr); }
.dcb-scope.dcb-cart-summary-start .dcb-cart-summary-col { order: -1; }
.dcb-scope.dcb-cart-layout-stacked .dcb-cart-grid { grid-template-columns: minmax(0, 1fr); }
.dcb-scope .dcb-cart-summary-col.is-sticky { position: sticky; top: 24px; }
body.admin-bar .dcb-scope .dcb-cart-summary-col.is-sticky { top: 56px; }

/* ---------- کارت محصول ---------- */
.dcb-scope .dcb-cart-items-list { display: flex; flex-direction: column; gap: 14px; }
.dcb-scope .dcb-item {
	display: grid; grid-template-columns: var(--dcb-img, 120px) minmax(0, 1fr); gap: 18px; align-items: start;
	padding: calc(16px * var(--dcb-space, 1)); overflow: hidden;
	transition: opacity .4s var(--dcb-ease), transform .4s var(--dcb-ease), box-shadow .35s var(--dcb-ease), border-color .25s ease;
}
.dcb-scope .dcb-item:hover { transform: translateY(-2px); border-color: var(--dcb-primary-ring); }
.dcb-scope.dcb-cart-img-sm { --dcb-img: 84px; }
.dcb-scope.dcb-cart-img-md { --dcb-img: 132px; }
.dcb-scope.dcb-cart-img-lg { --dcb-img: 168px; }
.dcb-scope .dcb-item__media { position: relative; border-radius: max(10px, calc(var(--dcb-radius, 16px) - 6px)); overflow: hidden; background: var(--dcb-surface-2); aspect-ratio: 1; }
.dcb-scope .dcb-item__media a { display: block; height: 100%; }
.dcb-scope .dcb-item__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--dcb-ease); }
.dcb-scope .dcb-item:hover .dcb-item__media img { transform: scale(1.07); }
.dcb-scope .dcb-item__badge { position: absolute; top: 8px; inset-inline-start: 8px; }
.dcb-scope .dcb-item__main { min-width: 0; display: flex; flex-direction: column; gap: 8px; min-height: 100%; }
.dcb-scope .dcb-item__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dcb-scope .dcb-item__title { margin: 0; padding: 0; font-size: 1.02em; font-weight: 800; --dcb-lh: 1.7; color: var(--dcb-text); }
.dcb-scope .dcb-item__title a { text-decoration: none !important; color: inherit !important; transition: color .2s; }
.dcb-scope .dcb-item__title a:hover { color: var(--dcb-primary) !important; }
.dcb-scope .dcb-item__attrs { font-size: .89em; color: var(--dcb-muted); }
.dcb-scope .dcb-item__attrs dl, .dcb-scope .dcb-item__attrs .variation { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; }
.dcb-scope .dcb-item__attrs dt, .dcb-scope .dcb-item__attrs dd { display: inline; margin: 0; padding: 0; float: none; }
.dcb-scope .dcb-item__attrs dd p { display: inline; margin: 0; }
.dcb-scope .dcb-item__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.dcb-scope .dcb-item__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.dcb-scope .dcb-item__prices { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; margin-inline-start: auto; }
.dcb-scope .dcb-item__unit { font-size: .83em; color: var(--dcb-muted); }
.dcb-scope .dcb-item__unit small { font-size: 1em; }
.dcb-scope .dcb-item__old { font-size: .85em; color: var(--dcb-muted); opacity: .85; }
.dcb-scope .dcb-item__total { font-size: 1.12em; font-weight: 800; color: var(--dcb-primary); }
.dcb-scope .dcb-item .amount, .dcb-scope .dcb-item bdi { color: inherit; }
.dcb-scope .dcb-qty-fixed { font-size: .90em; color: var(--dcb-muted); font-weight: 700; }

/* انیمیشن حذف */
.dcb-scope .dcb-item.is-removing { opacity: 0; transform: translateX(calc(var(--dcb-dx) * -40px)) scale(.94); pointer-events: none; }

/* شمارنده تعداد */
.dcb-scope .dcb-qty { display: inline-flex; align-items: center; padding: 4px; gap: 2px; border-radius: 999px; background: var(--dcb-surface-2); border: 1.5px solid var(--dcb-border); transition: border-color .2s, box-shadow .25s; }
.dcb-scope .dcb-qty:focus-within { border-color: var(--dcb-primary); box-shadow: 0 0 0 4px var(--dcb-primary-ring); }
.dcb-scope .dcb-qty__btn {
	width: 34px; height: 34px; padding: 0; margin: 0; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
	border: 0 !important; border-radius: 50% !important; background: var(--dcb-surface) !important; color: var(--dcb-text) !important; --dcb-lh: 1;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .12) !important; transition: transform .3s var(--dcb-spring), background-color .2s, color .2s;
}
.dcb-scope .dcb-qty__btn .dcb-icon { width: 16px; height: 16px; }
.dcb-scope .dcb-qty__btn:hover { background: var(--dcb-primary) !important; color: var(--dcb-on-primary) !important; transform: scale(1.1); }
.dcb-scope .dcb-qty__btn:active { transform: scale(.85); }
.dcb-scope .dcb-qty__input { width: 46px !important; min-height: 34px !important; height: 34px; padding: 0 !important; text-align: center; font-weight: 800; font-size: 1em; border: 0 !important; background: transparent !important; box-shadow: none !important; -moz-appearance: textfield; appearance: textfield; }
.dcb-scope .dcb-qty__input::-webkit-inner-spin-button, .dcb-scope .dcb-qty__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.dcb-scope .dcb-qty__input:focus { box-shadow: none !important; }

/* سبک‌های آیتم: فشرده / مینیمال */
.dcb-scope.dcb-cart-card-compact .dcb-item { gap: 14px; padding: calc(10px * var(--dcb-space, 1)); }
.dcb-scope.dcb-cart-card-compact { --dcb-img: 72px; }
.dcb-scope.dcb-cart-card-compact .dcb-item__meta, .dcb-scope.dcb-cart-card-compact .dcb-item__attrs { display: none; }
.dcb-scope.dcb-cart-card-minimal .dcb-item { background: transparent; box-shadow: none; border-width: 0 0 1px; border-radius: 0; }
.dcb-scope.dcb-cart-card-minimal .dcb-item:hover { transform: none; }
.dcb-scope.dcb-cart-card-minimal .dcb-cart-items-list { gap: 0; }

/* ---------- ارسال رایگان ---------- */
.dcb-scope .dcb-free-shipping-bar-wrap:empty { display: none; }
.dcb-scope .dcb-free-shipping-bar-wrap { margin-bottom: 20px; }
.dcb-scope .dcb-free-shipping-card { display: grid; grid-template-columns: auto 1fr minmax(220px, 300px); align-items: center; gap: 18px; padding: calc(16px * var(--dcb-space, 1)) calc(20px * var(--dcb-space, 1)); overflow: hidden; }
.dcb-scope .dcb-free-shipping-icon { width: 50px; height: 50px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--dcb-primary-soft); color: var(--dcb-primary); }
.dcb-scope .dcb-free-shipping-icon .dcb-icon { width: 26px; height: 26px; }
.dcb-scope .dcb-free-shipping-card:not(.is-reached) .dcb-free-shipping-icon .dcb-icon { animation: dcb-float 2.8s ease-in-out infinite; }
.dcb-scope .dcb-free-shipping-title { display: block; font-size: 1em; font-weight: 800; color: var(--dcb-text); }
.dcb-scope .dcb-free-shipping-sub { margin: 2px 0 0; font-size: .91em; color: var(--dcb-muted); }
.dcb-scope .dcb-free-shipping-sub b { color: var(--dcb-primary); }
.dcb-scope .dcb-free-shipping-card.is-reached { border-color: rgba(5, 150, 105, .5); }
.dcb-scope .dcb-free-shipping-card.is-reached .dcb-free-shipping-icon { background: rgba(5, 150, 105, .14); color: var(--dcb-success); animation: dcb-pop .6s var(--dcb-spring); }
.dcb-scope .dcb-free-shipping-card.is-reached .dcb-progress__fill { background: linear-gradient(90deg, #22c55e, #059669); }

/* ---------- خلاصه سفارش ---------- */
.dcb-scope .dcb-order-summary-card { padding: calc(20px * var(--dcb-space, 1)); }
.dcb-scope .dcb-summary-title { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; flex: none; }
.dcb-scope .dcb-summary-title .dcb-icon { color: var(--dcb-primary); width: 1.4em; height: 1.4em; }
.dcb-scope .dcb-summary-rows { display: flex; flex-direction: column; gap: 11px; margin-bottom: 12px; }
.dcb-scope .dcb-summary-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .93em; color: var(--dcb-muted); }
.dcb-scope .dcb-summary-row strong { color: var(--dcb-text); font-weight: 800; }
.dcb-scope .dcb-summary-row--discount, .dcb-scope .dcb-summary-row--discount strong { color: var(--dcb-success); }
.dcb-scope .dcb-summary-row--muted strong { color: var(--dcb-muted); font-weight: 600; }
.dcb-scope .dcb-summary-coupon { display: inline-flex; align-items: center; gap: 7px; }
.dcb-scope .dcb-summary-coupon > .dcb-icon { width: 16px; height: 16px; }
.dcb-scope .dcb-remove-coupon { display: inline-flex; width: 22px; height: 22px; padding: 0; align-items: center; justify-content: center; border: 0 !important; border-radius: 50% !important; background: rgba(225, 29, 72, .12) !important; color: var(--dcb-danger) !important; cursor: pointer; transition: transform .3s var(--dcb-spring), background .2s, color .2s; }
.dcb-scope .dcb-remove-coupon .dcb-icon { width: 12px; height: 12px; }
.dcb-scope .dcb-remove-coupon:hover { background: var(--dcb-danger) !important; color: #fff !important; transform: rotate(90deg); }
.dcb-scope .dcb-summary-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 16px; margin-top: 6px; border-top: 2px dashed var(--dcb-border); font-weight: 800; font-size: 1.1em; }
.dcb-scope .dcb-summary-total strong { color: var(--dcb-primary); font-size: 1.12em; }
.dcb-scope .dcb-summary-tax-note { font-size: .81em; color: var(--dcb-muted); margin: 4px 0 0; }

.dcb-scope .dcb-coupon-box { margin: 18px 0; padding: 14px; border-radius: max(12px, calc(var(--dcb-radius, 16px) - 4px)); background: var(--dcb-surface-2); }
.dcb-scope .dcb-coupon-label { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 800; font-size: .92em; }
.dcb-scope .dcb-coupon-label .dcb-icon { width: 17px; height: 17px; color: var(--dcb-primary); }
.dcb-scope .dcb-coupon-input-row input { background: var(--dcb-surface) !important; }
.dcb-scope .dcb-coupon-feedback { margin-top: 8px; font-size: .89em; min-height: 1.2em; font-weight: 600; }
.dcb-scope .dcb-coupon-feedback.is-success { color: var(--dcb-success); animation: dcb-pop .4s var(--dcb-ease); }
.dcb-scope .dcb-coupon-feedback.is-error { color: var(--dcb-danger); animation: dcb-shake .45s ease; }

.dcb-scope .dcb-trust-badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 10px; margin: 18px 0; }
.dcb-scope .dcb-trust-badge { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; font-size: .79em; --dcb-lh: 1.5; color: var(--dcb-muted); font-weight: 600; }
.dcb-scope .dcb-trust-badge__icon { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--dcb-primary-soft); color: var(--dcb-primary); transition: transform .4s var(--dcb-spring); }
.dcb-scope .dcb-trust-badge:hover .dcb-trust-badge__icon { transform: translateY(-3px) scale(1.08); }
.dcb-scope .dcb-trust-badge__icon .dcb-icon { width: 21px; height: 21px; }

.dcb-scope .dcb-proceed-checkout-btn { margin-top: 6px; }
.dcb-scope .dcb-continue-shopping-btn { margin-top: 8px; --_h: 40px; font-weight: 600; }
.dcb-scope .dcb-mobile-bar { display: none; }

/* ---------- محصولات پیشنهادی ---------- */
.dcb-scope .dcb-upsell-section { margin-top: 38px; }
.dcb-scope .dcb-upsell-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 1.1em; font-weight: 800; color: var(--dcb-text); }
.dcb-scope .dcb-upsell-title .dcb-icon { color: var(--dcb-primary); }
.dcb-scope .dcb-upsell-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dcb-scope .dcb-upsell-card { padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.dcb-scope .dcb-upsell-card:hover { transform: translateY(-4px); }
.dcb-scope .dcb-upsell-thumb { display: block; border-radius: max(10px, calc(var(--dcb-radius, 16px) - 6px)); overflow: hidden; aspect-ratio: 1; background: var(--dcb-surface-2); }
.dcb-scope .dcb-upsell-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--dcb-ease); }
.dcb-scope .dcb-upsell-card:hover .dcb-upsell-thumb img { transform: scale(1.08); }
.dcb-scope .dcb-upsell-name { font-size: .9em; font-weight: 700; --dcb-lh: 1.7; text-decoration: none !important; color: var(--dcb-text) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dcb-scope .dcb-upsell-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.dcb-scope .dcb-upsell-price { font-size: .92em; font-weight: 800; color: var(--dcb-primary); }
.dcb-scope .dcb-upsell-price del { opacity: .6; font-weight: 500; margin-inline-end: 4px; }
.dcb-scope .dcb-upsell-price ins { background: none; text-decoration: none; }
.dcb-scope .dcb-upsell-add-btn.is-done { background: var(--dcb-success) !important; animation: dcb-pop .5s var(--dcb-spring); }

/* ---------- سبد خالی ---------- */
.dcb-scope .dcb-cart-empty-card { text-align: center; padding: 56px 24px; display: flex; flex-direction: column; align-items: center; }
.dcb-scope .dcb-empty-art { position: relative; width: 120px; height: 120px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; }
.dcb-scope .dcb-empty-art__ring { position: absolute; inset: 0; border-radius: 50%; background: var(--dcb-primary-soft); animation: dcb-pulse-ring 2.6s ease-out infinite; }
.dcb-scope .dcb-empty-art__icon { position: relative; width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--dcb-primary), var(--dcb-secondary, var(--dcb-primary))); color: var(--dcb-on-primary); box-shadow: 0 20px 36px -14px var(--dcb-primary-ring); animation: dcb-float 3.2s ease-in-out infinite; }
.dcb-scope .dcb-empty-art__icon .dcb-icon { width: 40px; height: 40px; }
.dcb-scope .dcb-cart-empty-title { margin: 0 0 8px; font-size: 1.35em; font-weight: 800; color: var(--dcb-text); }
.dcb-scope .dcb-cart-empty-sub { margin: 0 0 24px; color: var(--dcb-muted); max-width: 440px; }

/* ---------- شکل دکمه‌ها (اختصاصی سبد خرید) ---------- */
.dcb-scope.dcb-cart-btn-pill { --dcb-btn-radius: 999px; }
.dcb-scope.dcb-cart-btn-rounded { --dcb-btn-radius: 14px; }
.dcb-scope.dcb-cart-btn-soft { --dcb-btn-radius: 20px; }

.dcb-demo-img { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--dcb-primary-soft), var(--dcb-surface-2)); }

/* ---------- تبلت/موبایل ---------- */
@media (max-width: 992px) {
	.dcb-scope .dcb-cart-grid, .dcb-scope.dcb-cart-summary-start .dcb-cart-grid { grid-template-columns: minmax(0, 1fr); }
	.dcb-scope .dcb-cart-summary-col.is-sticky { position: static; }
	.dcb-scope .dcb-upsell-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.dcb-scope .dcb-free-shipping-card { grid-template-columns: auto 1fr; }
	.dcb-scope .dcb-free-shipping-progress { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
	.dcb-scope .dcb-item { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; }
	.dcb-scope .dcb-item__bottom { align-items: center; }
	.dcb-scope .dcb-item__prices { align-items: flex-end; }
	.dcb-scope .dcb-cart-title { font-size: 1.12em; }
	.dcb-scope .dcb-upsell-grid { grid-auto-flow: column; grid-auto-columns: 68%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: none; }
	.dcb-scope .dcb-upsell-card { scroll-snap-align: start; }
}
@media (max-width: 782px) {
	/* نوار ثابت پایین: مبلغ + ادامه */
	.dcb-scope .dcb-mobile-bar {
		display: flex; align-items: center; justify-content: space-between; gap: 12px;
		position: fixed; inset-inline: 0; bottom: 0; z-index: 9990; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
		background: var(--dcb-surface); color: var(--dcb-text); border-top: 1px solid var(--dcb-border);
		box-shadow: 0 -16px 40px -12px rgba(0, 0, 0, .3); animation: dcb-rise .6s var(--dcb-ease) both;
	}
	.dcb-scope .dcb-mobile-bar__total { display: flex; flex-direction: column; --dcb-lh: 1.4; }
	.dcb-scope .dcb-mobile-bar__total small { font-size: .79em; color: var(--dcb-muted); }
	.dcb-scope .dcb-mobile-bar__total strong { font-size: 1.05em; color: var(--dcb-primary); }
	.dcb-scope.dcb-has-mobile-bar .dcb-summary-wrap { padding-bottom: 84px; }
	.dcb-scope.dcb-has-mobile-bar .dcb-order-summary-card .dcb-proceed-checkout-btn { display: none; }
}


/* ---------- v2.1 پولیش: بنر ارسال رایگان، قیمت‌ها، تبلت ---------- */
.dcb-scope .dcb-item__prices { align-items: flex-end; gap: 2px; }
.dcb-scope .dcb-item__line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dcb-scope .dcb-item__total { font-size: 1.18em; }
.dcb-scope .dcb-item__old { order: -1; }

.dcb-scope .dcb-free-shipping-card {
	position: relative; isolation: isolate; border-color: var(--dcb-primary-ring);
	background: linear-gradient(120deg, var(--dcb-surface) 0%, var(--dcb-primary-soft) 170%);
	padding: calc(18px * var(--dcb-space, 1)) calc(22px * var(--dcb-space, 1)); gap: 20px;
}
.dcb-scope .dcb-free-shipping-card::before { content: ""; position: absolute; z-index: -1; inset-block: -60% auto; inset-inline-start: -8%; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, var(--dcb-primary-ring), transparent 65%); opacity: .8; pointer-events: none; }
.dcb-scope .dcb-free-shipping-icon { width: 58px; height: 58px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--dcb-primary), var(--dcb-secondary, var(--dcb-primary))); box-shadow: 0 14px 26px -12px var(--dcb-primary), inset 0 1px 0 rgba(255, 255, 255, .35); }
.dcb-scope .dcb-free-shipping-icon .dcb-icon { width: 28px; height: 28px; }
.dcb-scope .dcb-free-shipping-title { font-size: 1.06em; }
.dcb-scope .dcb-free-shipping-card .dcb-progress { height: 12px; background: var(--dcb-surface-2); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .18); }
.dcb-scope .dcb-free-shipping-card.is-reached { background: linear-gradient(120deg, var(--dcb-surface) 0%, rgba(5, 150, 105, .14) 170%); }
.dcb-scope .dcb-free-shipping-card.is-reached .dcb-free-shipping-icon { color: #fff; background: linear-gradient(135deg, #22c55e, #059669); box-shadow: 0 14px 26px -12px #059669; }
.dcb-scope .dcb-progress__labels { font-weight: 600; }

@media (max-width: 992px) and (min-width: 641px) {
	.dcb-scope .dcb-item { grid-template-columns: 120px minmax(0, 1fr); }
	.dcb-scope .dcb-cart-summary-col .dcb-order-summary-card { max-width: none; }
}
@media (max-width: 640px) {
	.dcb-scope .dcb-free-shipping-card { padding: 14px 16px; gap: 12px 14px; }
	.dcb-scope .dcb-free-shipping-icon { width: 46px; height: 46px; border-radius: 14px; }
	.dcb-scope .dcb-free-shipping-icon .dcb-icon { width: 23px; height: 23px; }
	.dcb-scope .dcb-item__line { justify-content: flex-end; }
}


/* تصویر محصول: همیشه کادر مربع ثابت، تصویر با پر کردن مطلق (حتی اگر قالب height:auto بزند) */
.dcb-scope .dcb-item__media { position: relative; width: 100%; max-width: var(--dcb-img, 132px); height: auto; aspect-ratio: 1 / 1; align-self: start; min-width: 0; }
.dcb-scope .dcb-item__media a { position: absolute; inset: 0; display: block; }
.dcb-scope .dcb-item__media img { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover !important; margin: 0 !important; }
.dcb-scope .dcb-upsell-thumb { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.dcb-scope .dcb-upsell-thumb img { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover !important; margin: 0 !important; }
.dcb-scope .dcb-item__meta { align-items: center; align-content: flex-start; }

/* موبایل: چیدمان فشرده و بدون سرریز عرضی */
.dcb-scope.dcb-cart-wrapper, .dcb-scope .dcb-cart-grid, .dcb-scope .dcb-cart-main-col, .dcb-scope .dcb-item { min-width: 0; max-width: 100%; }
.dcb-cart-wrapper { overflow-x: clip; }
@media (max-width: 640px) {
	.dcb-scope .dcb-item { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 12px; }
	.dcb-scope .dcb-item__title { font-size: .95em; }
	.dcb-scope .dcb-item__top { gap: 8px; }
	.dcb-scope .dcb-item__bottom { gap: 10px; }
}


/* ================= v2.4 جمع‌وجور و بدون فضای خالی ================= */
/* خلاصه سفارش: ستون فلکس با gap ثابت؛ هیچ margin ای از قالب/کلاس‌ها فاصله اضافه نمی‌کند */
.dcb-scope .dcb-summary-wrap, .dcb-scope .dcb-cart-summary-col { height: auto; min-height: 0; }
.dcb-scope .dcb-order-summary-card { display: flex; flex-direction: column; gap: 14px; padding: calc(18px * var(--dcb-space, 1)); height: auto; min-height: 0; }
.dcb-scope .dcb-order-summary-card > * { margin: 0 !important; }
.dcb-scope .dcb-summary-title { padding: 0; font-size: 1.08em; }
.dcb-scope .dcb-summary-rows { display: flex; flex-direction: column; gap: 9px; margin: 0; }
.dcb-scope .dcb-summary-row { min-height: 0; font-size: .95em; }
.dcb-scope .dcb-summary-total { margin: 0; padding-top: 13px; }
.dcb-scope .dcb-summary-tax-note { margin: -8px 0 0 !important; }

/* کد تخفیف: یک خط فشرده (لیبل کوچک + فیلد گرد با دکمه داخلش)، نه کادر بزرگ */
.dcb-scope .dcb-coupon-box { display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; background: none; border-radius: 0; }
.dcb-scope .dcb-coupon-label { display: flex; align-items: center; gap: 7px; font-size: .88em; font-weight: 700; color: var(--dcb-muted); }
.dcb-scope .dcb-coupon-box .dcb-coupon-input-row {
	display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 4px; min-height: 0;
	border: 1.5px solid var(--dcb-border); border-radius: 14px; background: var(--dcb-surface-2);
	transition: border-color .2s ease, box-shadow .25s ease;
}
.dcb-scope .dcb-coupon-box .dcb-coupon-input-row:focus-within { border-color: var(--dcb-primary); box-shadow: 0 0 0 4px var(--dcb-primary-ring); }
.dcb-scope .dcb-coupon-box .dcb-coupon-input-row input {
	flex: 1 1 auto; min-width: 0; width: auto; height: 40px !important; min-height: 40px !important; padding: 0 10px !important;
	border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 10px !important; text-align: start; font-weight: 600;
}
.dcb-scope .dcb-coupon-box .dcb-coupon-input-row .dcb-btn { flex: 0 0 auto; height: 40px !important; min-height: 40px !important; border-radius: 10px !important; padding-inline: 18px; }
.dcb-scope .dcb-coupon-feedback { margin: 0; min-height: 0; font-size: .88em; }
.dcb-scope .dcb-coupon-feedback:empty { display: none; }
.dcb-scope .dcb-trust-badges { margin: 0; gap: 8px; }
.dcb-scope .dcb-trust-badge__icon { width: 38px; height: 38px; }

/* کارت محصول: بدون min-height:100% و margin-top:auto (که با والد دارای ارتفاع قطعی کش می‌آمد) */
.dcb-scope .dcb-item { gap: 16px; padding: calc(14px * var(--dcb-space, 1)); height: auto; min-height: 0; align-items: start; }
.dcb-scope .dcb-item__main { min-height: 0; height: auto; display: flex; flex-direction: column; gap: 7px; }
.dcb-scope .dcb-item__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dcb-scope .dcb-item__title { flex: 1 1 auto; min-width: 0; font-size: 1.06em; }
.dcb-scope .dcb-item__title a { display: block; text-align: start; }
.dcb-scope .dcb-item__bottom { margin-top: 4px; padding-top: 0; align-items: center; }
.dcb-scope .dcb-item__attrs { margin: 0; }
.dcb-scope .dcb-cart-head { margin: 0 0 12px; }
.dcb-scope .dcb-free-shipping-bar-wrap { margin-bottom: 14px; }
.dcb-scope .dcb-cart-items-list { gap: 12px; }
.dcb-scope .dcb-cart-grid { gap: 20px; }
.dcb-scope .dcb-stepper--cart { padding: 14px 8px 18px; }
.dcb-scope .dcb-qty__btn[disabled] { opacity: .35; pointer-events: none; }

/* ---- تنظیم نهایی اندازه‌ها (موبایل کمی کوچک‌تر، آپسل کوتاه‌تر) ---- */
.dcb-scope .dcb-upsell-thumb { aspect-ratio: 4 / 3; }
.dcb-scope .dcb-upsell-card { gap: 8px; }
@media (max-width: 640px) {
	.dcb-scope { font-size: var(--dcb-fs, 15px); }
	.dcb-scope .dcb-item { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 12px; }
	.dcb-scope .dcb-item__title { font-size: .98em; }
	.dcb-scope .dcb-cart-title { font-size: 1.1em; white-space: nowrap; }
	.dcb-scope .dcb-summary-total { font-size: 1em; }
	.dcb-scope .dcb-summary-total span { white-space: nowrap; }
	.dcb-scope .dcb-cart-head .dcb-btn { padding-inline: .8em; font-size: .82em; }
	.dcb-scope .dcb-order-summary-card { padding: 16px; }
}


/* ===== v2.5: فضاهای خالی ===== */
.dcb-scope .dcb-free-shipping-bar-wrap.is-empty, .dcb-scope .dcb-free-shipping-bar-wrap:empty { display: none !important; margin: 0 !important; padding: 0 !important; height: 0 !important; }
.dcb-scope .dcb-cart-summary-col { align-self: start; height: auto; min-height: 0; }
.dcb-scope .dcb-cart-form, .dcb-scope .dcb-cart-grid, .dcb-scope .dcb-cart-main-col { margin: 0; padding: 0; min-height: 0; height: auto; }
.dcb-scope .dcb-upsell-section { margin-top: 22px; padding: 0; }
.dcb-cart-wrapper, .dcb-cart-empty-wrapper { margin-bottom: 12px; }
.dcb-scope .dcb-order-summary-card, .dcb-scope .dcb-item { transition-property: opacity, transform, box-shadow, border-color; }
.dcb-scope .dcb-order-summary-card { transition: opacity .2s ease; }
.dcb-scope .is-updating .dcb-order-summary-card, .dcb-scope .dcb-order-summary-card.is-updating, .dcb-scope .dcb-cart-summary-col.is-updating .dcb-summary-total { opacity: .72; }
@media (max-width: 992px) {
	.dcb-scope .dcb-cart-summary-col, .dcb-scope .dcb-cart-summary-col.is-sticky { position: static !important; }
}
@media (max-width: 782px) {
	.dcb-has-mobile-bar .dcb-summary-wrap { padding-bottom: 0 !important; }
	.dcb-scope.dcb-has-mobile-bar { padding-bottom: 76px; }
	.dcb-scope .dcb-upsell-section { margin-top: 16px; }
}
