/* پلاس ابر باران - ویجت دکمه سبد خرید سایدباری */

.abrbaran-cart-wrapper {
	position: relative;
	display: inline-block;
}

.abrbaran-cart-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 48px;
	height: 48px;
	padding: 0 12px;
	border: none;
	background-color: #f2f2f2;
	cursor: pointer;
	transition: background-color .25s ease, color .25s ease;
	line-height: 1;
}

.abrbaran-cart-toggle i,
.abrbaran-cart-toggle svg {
	line-height: 1;
}

/* نشان تعداد */
.abrbaran-cart-badge {
	position: absolute;
	top: -4px;
	inset-inline-end: -4px;
	min-width: 20px;
	height: 20px;
	padding: 0 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background-color: #e63946;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.abrbaran-badge-pos-top-start .abrbaran-cart-badge {
	inset-inline-end: auto;
	inset-inline-start: -4px;
}

/* اورلی */
.abrbaran-cart-overlay {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, .5);
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease, visibility .35s ease;
	z-index: 999998;
}

.abrbaran-cart-wrapper.abrbaran-open .abrbaran-cart-overlay {
	opacity: 1;
	visibility: visible;
}

/* سایدبار */
.abrbaran-cart-sidebar {
	position: fixed;
	top: 0;
	bottom: 0;
	width: 380px;
	max-width: 92vw;
	background-color: #fff;
	z-index: 999999;
	transition: transform .35s ease;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.abrbaran-side-right .abrbaran-cart-sidebar {
	right: 0;
	transform: translateX(100%);
}

.abrbaran-side-right.abrbaran-open .abrbaran-cart-sidebar {
	transform: translateX(0);
}

.abrbaran-side-left .abrbaran-cart-sidebar {
	left: 0;
	transform: translateX(-100%);
}

.abrbaran-side-left.abrbaran-open .abrbaran-cart-sidebar {
	transform: translateX(0);
}

/* هدر سایدبار */
.abrbaran-cart-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background-color: #f7f7f7;
	flex-shrink: 0;
}

.abrbaran-cart-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #222;
}

.abrbaran-cart-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: #666;
	cursor: pointer;
	border-radius: 50%;
	flex-shrink: 0;
	transition: background-color .2s ease;
}

.abrbaran-cart-close:hover {
	background-color: rgba(0, 0, 0, .06);
}

/* بدنه سایدبار */
.abrbaran-cart-body {
	overflow-y: auto;
	flex-grow: 1;
	position: relative;
	min-height: 120px;
}

.abrbaran-cart-spinner {
	width: 28px;
	height: 28px;
	margin: 30px auto;
	border: 3px solid rgba(0, 0, 0, .1);
	border-top-color: #e63946;
	border-radius: 50%;
	animation: abrbaran-cart-spin .7s linear infinite;
}

@keyframes abrbaran-cart-spin {
	to { transform: rotate(360deg); }
}

.abrbaran-cart-items-list {
	display: flex;
	flex-direction: column;
}

.abrbaran-cart-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 20px;
	border-bottom: 1px solid #eeeeee;
	position: relative;
}

.abrbaran-cart-item-image {
	width: 70px;
	height: 70px;
	object-fit: cover;
	border-radius: 6px;
	flex-shrink: 0;
	background-color: #f2f2f2;
}

.abrbaran-cart-item-info {
	flex-grow: 1;
	min-width: 0;
}

.abrbaran-cart-item-title {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: #222;
	text-decoration: none;
	margin-bottom: 4px;
}

.abrbaran-cart-item-meta {
	font-size: 11.5px;
	color: #888;
	margin-bottom: 6px;
	line-height: 1.6;
}

.abrbaran-cart-item-meta span {
	display: block;
}

.abrbaran-cart-item-price {
	display: block;
	font-size: 13px;
	color: #e63946;
	margin-bottom: 8px;
}

.abrbaran-cart-item-price bdi,
.abrbaran-cart-item-price ins,
.abrbaran-cart-item-price del {
	all: unset;
}

.abrbaran-cart-item-footer-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

/* کنترل تعداد */
.abrbaran-cart-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	color: #333;
	overflow: hidden;
}

.abrbaran-cart-qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: none;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font-size: 13px;
	line-height: 1;
	transition: background-color .2s ease;
}

.abrbaran-cart-qty-btn:hover {
	background-color: rgba(0, 0, 0, .05);
}

.abrbaran-cart-qty-input {
	width: 34px;
	height: 26px;
	border: none;
	border-inline-start: 1px solid #e2e2e2;
	border-inline-end: 1px solid #e2e2e2;
	text-align: center;
	font-size: 12.5px;
	color: inherit;
	background: transparent;
	-moz-appearance: textfield;
}

.abrbaran-cart-qty-input::-webkit-outer-spin-button,
.abrbaran-cart-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.abrbaran-cart-item-subtotal {
	font-size: 12.5px;
	font-weight: 600;
	color: #222;
}

.abrbaran-cart-item-remove {
	position: absolute;
	top: 12px;
	inset-inline-end: 14px;
	background: transparent;
	border: none;
	color: #999;
	cursor: pointer;
	font-size: 13px;
	padding: 4px;
	line-height: 1;
	transition: color .2s ease;
}

.abrbaran-cart-item-remove:hover {
	color: #e63946;
}

.abrbaran-cart-item.abrbaran-cart-item-loading {
	opacity: .5;
	pointer-events: none;
}

/* حالت خالی */
.abrbaran-cart-empty {
	text-align: center;
	padding: 50px 24px;
}

.abrbaran-cart-empty i {
	font-size: 48px;
	color: #cccccc;
	margin-bottom: 14px;
	display: inline-block;
}

.abrbaran-cart-empty-text {
	margin: 0 0 18px;
	font-size: 13.5px;
	color: #888;
}

.abrbaran-cart-empty-btn {
	display: inline-block;
	padding: 10px 22px;
	border-radius: 6px;
	background-color: #222;
	color: #fff;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}

/* فوتر */
.abrbaran-cart-footer {
	flex-shrink: 0;
	padding: 16px 20px;
	background-color: #fafafa;
	border-top: 1px solid #eee;
}

.abrbaran-cart-subtotal-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
	font-size: 14px;
}

.abrbaran-cart-subtotal-label {
	color: #333;
	font-weight: 600;
}

.abrbaran-cart-subtotal-value {
	color: #e63946;
	font-weight: 700;
}

.abrbaran-cart-subtotal-value bdi,
.abrbaran-cart-subtotal-value ins,
.abrbaran-cart-subtotal-value del {
	all: unset;
}

.abrbaran-cart-buttons {
	display: flex;
	gap: 10px;
}

.abrbaran-cart-btn {
	flex: 1;
	text-align: center;
	padding: 11px 10px;
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 600;
	border-radius: 6px;
	transition: background-color .2s ease, color .2s ease;
	border: 1px solid transparent;
}

.abrbaran-cart-btn-view {
	background-color: #ffffff;
	color: #222222;
	border-color: #e2e2e2;
}

.abrbaran-cart-btn-view:hover {
	background-color: #f2f2f2;
	color: #222222;
}

.abrbaran-cart-btn-checkout {
	background-color: #e63946;
	color: #ffffff;
}

.abrbaran-cart-btn-checkout:hover {
	background-color: #c1121f;
	color: #ffffff;
}

body.abrbaran-cart-locked {
	overflow: hidden;
}

@media (max-width: 480px) {
	.abrbaran-cart-sidebar {
		width: 90vw;
	}
}
