/* ==========================================================
   DressPeru Mini-Cart Drawer
   ========================================================== */

/* ── Wrapper & Trigger ────────────────────────────────────── */
.dp-mc-wrapper {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.dp-mc-trigger {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	color: inherit;
	line-height: 0;
	width: 28px;
	height: 28px;
}

.dp-mc-trigger svg {
	width: 22px;
	height: 22px;
	display: block;
}

.dp-mc-trigger img {
	width: 22px;
	height: 22px;
	display: block;
	object-fit: contain;
}

/* ── Badge ────────────────────────────────────────────────── */
.dp-mc-badge {
	position: absolute;
	top: -7px;
	right: -9px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	background: #d85a67;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 18px;
	border-radius: 100px;
	text-align: center;
	pointer-events: none;
	transition: transform .2s;
	box-sizing: border-box;
}

.dp-mc-badge--empty {
	display: none;
}

/* ── Overlay ──────────────────────────────────────────────── */
.dp-mc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	z-index: 2147483645;
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s ease;
}

.dp-mc-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}

/* ── Drawer ───────────────────────────────────────────────── */
.dp-mc-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(420px, 92vw);
	background: #fff;
	z-index: 2147483646;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.4, 0, .2, 1);
	box-shadow: -4px 0 28px rgba(0, 0, 0, .12);
}

.dp-mc-drawer.is-open {
	transform: translateX(0);
}

/* Admin bar offsets */
body.admin-bar .dp-mc-drawer {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .dp-mc-drawer {
		top: 46px;
	}
}

/* Desktop: 20% of viewport */
@media (min-width: 1024px) {
	.dp-mc-drawer {
		width: clamp(320px, 20vw, 520px);
	}
}

/* ── Head ─────────────────────────────────────────────────── */
.dp-mc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 18px;
	border-bottom: 1px solid #f0eeec;
	flex-shrink: 0;
}

.dp-mc-title {
	font-size: 15px;
	font-weight: 700;
	color: #1a1a1a;
	letter-spacing: .01em;
}

.dp-mc-title-count {
	font-weight: 400;
	color: #888;
}

.dp-mc-close {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: #666;
	line-height: 0;
	border-radius: 4px;
	transition: color .15s, background .15s;
}

.dp-mc-close:hover {
	color: #1a1a1a;
	background: #f5f5f5;
}

.dp-mc-close svg {
	width: 16px;
	height: 16px;
	display: block;
}

/* ── Body (scrollable) ────────────────────────────────────── */
.dp-mc-body {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 0 18px;
	-webkit-overflow-scrolling: touch;
}

/* ── Items list ───────────────────────────────────────────── */
.dp-mc-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dp-mc-item {
	display: flex;
	gap: 12px;
	padding: 16px 0;
	border-bottom: 1px solid #f5f3f1;
	transition: opacity .2s;
}

.dp-mc-item:last-child {
	border-bottom: none;
}

.dp-mc-item__img {
	flex-shrink: 0;
	width: 80px;
	height: 80px;
	overflow: hidden;
	border-radius: 6px;
	background: #f5f5f5;
}

.dp-mc-item__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dp-mc-item__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.dp-mc-item__row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
}

.dp-mc-item__name {
	font-size: 13px;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.35;
	flex: 1;
}

.dp-mc-item__price {
	font-size: 13px;
	font-weight: 700;
	color: #1a1a1a;
	white-space: nowrap;
	flex-shrink: 0;
}

.dp-mc-item__meta {
	font-size: 11px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.dp-mc-sep {
	color: #ccc;
}

.dp-mc-item__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 4px;
}

/* ── Quantity controls ────────────────────────────────────── */
.dp-mc-qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid #e0dcd8;
	border-radius: 100px;
	overflow: hidden;
	height: 32px;
	background: #fff;
}

.dp-mc-qty__btn {
	background: none;
	border: none;
	cursor: pointer;
	width: 30px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	color: #444;
	line-height: 1;
	padding: 0;
	flex-shrink: 0;
	transition: background .15s;
}

.dp-mc-qty__btn:hover {
	background: #f5f5f5;
}

.dp-mc-qty__val {
	min-width: 24px;
	text-align: center;
	font-size: 13px;
	font-weight: 500;
	color: #1a1a1a;
	user-select: none;
}

/* ── Remove button ────────────────────────────────────────── */
.dp-mc-item__remove {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 11px;
	color: #999;
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color .15s;
}

.dp-mc-item__remove:hover {
	color: #d85a67;
}

/* ── Empty state ──────────────────────────────────────────── */
.dp-mc-empty {
	padding: 40px 0;
	text-align: center;
	color: #aaa;
	font-size: 14px;
}

/* ── Trending Now ─────────────────────────────────────────── */
.dp-mc-trending {
	flex-shrink: 0;
	border-top: 1px solid #f0eeec;
	padding: 14px 0 0;
}

.dp-mc-trending__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 26px 10px;
}

.dp-mc-trending__title {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #1a1a1a;
}

.dp-mc-trending__nav {
	display: flex;
	gap: 4px;
}

.dp-mc-trending__prev,
.dp-mc-trending__next {
	background: none;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	color: #666;
	padding: 0;
	transition: border-color .15s, color .15s;
}

.dp-mc-trending__prev:hover,
.dp-mc-trending__next:hover {
	border-color: #1a1a1a;
	color: #1a1a1a;
}

.dp-mc-trending__prev:disabled,
.dp-mc-trending__next:disabled,
.dp-mc-trending__prev.is-disabled,
.dp-mc-trending__next.is-disabled {
	border-color: #e7e5e3;
	color: #c8c5c2;
	cursor: default;
	pointer-events: none;
	background: #fafafa;
}

.dp-mc-trending__track {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding: 0 26px 14px;
	-webkit-overflow-scrolling: touch;
}

.dp-mc-trending__track::-webkit-scrollbar {
	display: none;
}

.dp-mc-trending__loading {
	font-size: 12px;
	color: #aaa;
	padding: 16px 0;
}

/* ── Trending card ────────────────────────────────────────── */
.dp-mc-tc {
	flex-shrink: 0;
	width: 120px;
	scroll-snap-align: start;
}

.dp-mc-tc__img {
	display: block;
	width: 120px;
	height: 120px;
	border-radius: 6px;
	overflow: hidden;
	background: #f5f5f5;
}

.dp-mc-tc__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s;
}

.dp-mc-tc__img:hover img {
	transform: scale(1.04);
}

.dp-mc-tc__body {
	padding: 6px 0 0;
}

.dp-mc-tc__name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 11px;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.3;
	text-decoration: none;
}

.dp-mc-tc__name:hover {
	text-decoration: underline;
}

.dp-mc-tc__price {
	display: block;
	font-size: 11px;
	color: #666;
	margin-top: 2px;
}

/* ── Footer (sticky) ──────────────────────────────────────── */
.dp-mc-foot {
	flex-shrink: 0;
	border-top: 1px solid #f0eeec;
	padding: 14px 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* ── Coupon ───────────────────────────────────────────────── */
.dp-mc-coupon {
	display: flex;
	align-items: center;
	border: 1px solid #e0dcd8;
	border-radius: 100px;
	padding: 0 0 0 16px;
	overflow: hidden;
	height: 44px;
	background: #fff;
}

.dp-mc-coupon__input {
	flex: 1;
	border: none;
	background: none;
	font-size: 13px;
	color: #1a1a1a;
	outline: none;
	padding: 0;
	min-width: 0;
}

.dp-mc-coupon__input::placeholder {
	color: #bbb;
}

.dp-mc-coupon__btn {
	height: 44px;
	padding: 0 20px;
	background: #d85a67;
	color: #fff;
	border: none;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	border-radius: 100px;
	transition: background .15s;
	flex-shrink: 0;
}

.dp-mc-coupon__btn:hover {
	background: #c44e5a;
}

.dp-mc-coupon__btn:disabled {
	opacity: .6;
	cursor: wait;
}

.dp-mc-coupon__error {
	font-size: 11px;
	color: #d85a67;
	margin: -4px 0 0;
}

/* ── Summary ──────────────────────────────────────────────── */
.dp-mc-foot__note {
	font-size: 11px;
	color: #999;
	margin: 0;
	line-height: 1.4;
}

.dp-mc-foot__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.dp-mc-foot__label {
	font-size: 14px;
	font-weight: 600;
	color: #1a1a1a;
}

.dp-mc-foot__price {
	font-size: 14px;
	font-weight: 700;
	color: #1a1a1a;
}

/* ── Checkout button ──────────────────────────────────────── */
.dp-mc-checkout {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #1a1a1a;
	color: #fff !important;
	text-decoration: none;
	border-radius: 100px;
	padding: 0 22px;
	height: 52px;
	font-size: 14px;
	font-weight: 600;
	transition: background .15s;
	gap: 12px;
}

.dp-mc-checkout:hover {
	background: #333;
	color: #fff !important;
}

.dp-mc-checkout__price {
	font-weight: 700;
}
