/**
 * VDuma cart page — checkout summary layout (Duma Official style).
 * Scoped to body.rwot-vduma-cart
 */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600&display=swap");

body.rwot-vduma-cart {
	--vduma-cart-gutter: clamp(16px, 4vw, 48px);
	--vduma-cart-border: #e3e3e3;
	--vduma-cart-muted: #8a8a8a;
	--vduma-cart-text: #1a1a1a;
	--vduma-cart-accent: #9a7b4f;
	--vduma-cart-serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

body.rwot-vduma-cart .vduma-cart-checkout-wrap {
	width: 100%;
	max-width: 100%;
	padding: 48px var(--vduma-cart-gutter) 72px;
	border-top: 1px solid var(--vduma-cart-border);
	box-sizing: border-box;
}

body.rwot-vduma-cart .cart-collaterals,
body.rwot-vduma-cart .cart_totals.vduma-cart-totals {
	float: none;
	width: 100%;
}

/* ── Top row: note/coupon | total + checkout ── */
body.rwot-vduma-cart .vduma-cart-checkout-top {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
	gap: clamp(24px, 5vw, 72px);
	align-items: start;
	padding-bottom: 48px;
	border-bottom: 1px solid var(--vduma-cart-border);
}

body.rwot-vduma-cart .vduma-cart-checkout-left {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

body.rwot-vduma-cart .vduma-cart-field-label {
	display: block;
	margin: 0 0 10px;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 13px;
	font-weight: 400;
	color: var(--vduma-cart-text);
}

body.rwot-vduma-cart .vduma-cart-coupon-block .vduma-cart-coupon-hint {
	margin: 0 0 10px;
	font-size: 13px;
	color: var(--vduma-cart-muted);
}

body.rwot-vduma-cart .vduma-cart-coupon-row {
	display: flex;
	align-items: stretch;
	gap: 10px;
}

body.rwot-vduma-cart .vduma-cart-coupon-row input[name="coupon_code"] {
	flex: 1 1 auto;
	min-height: 44px;
	padding: 10px 14px;
	border: 1px solid var(--vduma-cart-border);
	border-radius: 0;
	font-size: 14px;
	background: #fff;
}

body.rwot-vduma-cart .vduma-cart-coupon-row button[name="apply_coupon"] {
	flex: 0 0 auto;
	min-width: 88px;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var(--vduma-cart-text);
	border-radius: 0;
	background: var(--vduma-cart-text);
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
}

body.rwot-vduma-cart .vduma-cart-checkout-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
}

body.rwot-vduma-cart .vduma-cart-grand-total {
	margin: 0 0 8px;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: clamp(1rem, 2.2vw, 1.125rem);
	font-weight: 400;
	color: var(--vduma-cart-text);
	line-height: 1.4;
}

body.rwot-vduma-cart .vduma-cart-grand-total .amount,
body.rwot-vduma-cart .vduma-cart-grand-total .woocommerce-Price-amount {
	font-weight: 400;
}

body.rwot-vduma-cart .vduma-cart-checkout-sub {
	margin: 0 0 20px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--vduma-cart-muted);
}

body.rwot-vduma-cart .vduma-cart-mini-summary {
	width: 100%;
	margin: 0 0 16px;
}

body.rwot-vduma-cart .vduma-cart-mini-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 6px 0;
	font-size: 13px;
	color: var(--vduma-cart-muted);
}

body.rwot-vduma-cart .vduma-cart-mini-row .amount {
	color: var(--vduma-cart-text);
	font-weight: 400;
}

body.rwot-vduma-cart .vduma-cart-mini-row--discount .vduma-cart-mini-label {
	color: var(--vduma-cart-muted);
}

body.rwot-vduma-cart .woocommerce-remove-coupon {
	margin-left: 6px;
	font-size: 12px;
	color: #b04a3c;
	text-decoration: none;
}

body.rwot-vduma-cart .vduma-cart-checkout-right .wc-proceed-to-checkout {
	width: 100%;
	max-width: 220px;
	padding: 0;
}

body.rwot-vduma-cart .vduma-cart-checkout-right .checkout-button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 12px 24px;
	border: 1px solid var(--vduma-cart-border) !important;
	border-radius: 0 !important;
	background: #fff !important;
	color: var(--vduma-cart-accent) !important;
	font-family: var(--vduma-cart-serif) !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: none !important;
}

body.rwot-vduma-cart .vduma-cart-checkout-right .checkout-button:hover:not(.disabled):not(:disabled) {
	background: #fafafa !important;
	color: var(--vduma-cart-accent) !important;
}

body.rwot-vduma-cart .vduma-cart-checkout-right .checkout-button.disabled,
body.rwot-vduma-cart .vduma-cart-checkout-right .checkout-button:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

body.rwot-vduma-cart .vduma-cart-checkout-right .btn-whatsapp-order {
	width: 100%;
	max-width: 220px;
	min-height: 46px;
	margin-top: 12px !important;
	border-radius: 0 !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	letter-spacing: 0;
	text-transform: none;
}

/* ── Estimate shipping box ── */
body.rwot-vduma-cart .vduma-cart-estimate-shipping {
	position: relative;
	margin-top: 48px;
	padding: 36px clamp(16px, 3vw, 40px) 32px;
	border: 1px solid var(--vduma-cart-border);
}

body.rwot-vduma-cart .vduma-cart-estimate-title {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -50%);
	margin: 0;
	padding: 0 18px;
	background: #fff;
	font-family: var(--vduma-cart-serif);
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--vduma-cart-text);
	white-space: nowrap;
}

body.rwot-vduma-cart .vduma-cart-estimate-body {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

body.rwot-vduma-cart .vduma-cart-shipping-wrap .woocommerce-shipping-destination {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--vduma-cart-muted);
}

body.rwot-vduma-cart .vduma-cart-shipping-wrap .shipping-calculator-button {
	display: none !important;
}

body.rwot-vduma-cart .vduma-cart-shipping-wrap .shipping-calculator-form {
	display: block !important;
}

body.rwot-vduma-cart .vduma-cart-estimate-fields {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
	gap: 16px;
	align-items: end;
}

body.rwot-vduma-cart .vduma-cart-estimate-fields .form-row {
	margin: 0;
	padding: 0;
}

body.rwot-vduma-cart .vduma-cart-estimate-fields label {
	display: none;
}

body.rwot-vduma-cart .vduma-cart-estimate-fields select,
body.rwot-vduma-cart .vduma-cart-estimate-fields input.input-text {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--vduma-cart-border);
	border-radius: 0;
	background: #fff;
	font-size: 13px;
	color: var(--vduma-cart-text);
	box-sizing: border-box;
}

body.rwot-vduma-cart .vduma-cart-estimate-fields #calc_shipping_postcode_field input.input-text {
	border: none;
	border-bottom: 1px solid var(--vduma-cart-border);
	padding-left: 0;
	padding-right: 0;
	background: transparent;
}

body.rwot-vduma-cart .vduma-cart-estimate-fields #calc_shipping_city_field input.input-text {
	border: 1px solid var(--vduma-cart-border);
	background: #fff;
}

body.rwot-vduma-cart .vduma-cart-estimate-fields p:has(> button[name="calc_shipping"]) {
	display: flex;
	align-items: flex-end;
	margin: 0;
}

body.rwot-vduma-cart .vduma-cart-estimate-fields button[name="calc_shipping"] {
	min-width: 120px;
	min-height: 44px;
	padding: 10px 20px;
	border: 1px solid var(--vduma-cart-border) !important;
	border-radius: 0 !important;
	background: #fff !important;
	color: var(--vduma-cart-accent) !important;
	font-family: var(--vduma-cart-serif) !important;
	font-size: 12px !important;
	font-weight: 400 !important;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: none !important;
}

body.rwot-vduma-cart .vduma-cart-shipping-methods {
	margin: 0;
	padding: 0;
}

body.rwot-vduma-cart .vduma-cart-shipping-methods .vduma-shipping-options-label {
	margin: 0 0 10px;
	font-size: 13px;
	color: var(--vduma-cart-muted);
}

body.rwot-vduma-cart .vduma-cart-shipping-methods ul#shipping_method {
	margin: 0;
	padding: 0;
	list-style: none;
}

body.rwot-vduma-cart .vduma-cart-shipping-methods ul#shipping_method li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	font-size: 13px;
	color: var(--vduma-cart-text);
}

body.rwot-vduma-cart .vduma-cart-shipping-methods ul#shipping_method label {
	margin: 0;
	font-weight: 400;
}

body.rwot-vduma-cart .vduma-cart-shipping-wrap .vduma-shipping-notice {
	margin: 0;
	font-size: 13px;
	color: var(--vduma-cart-muted);
}

/* Hide legacy sidebar chrome on VDuma cart (keep checkout wrap gutter) */
body.rwot-vduma-cart .rwot-cart-info-section:not(.vduma-cart-checkout-wrap) {
	width: 100%;
	max-width: 100%;
	padding: 0 !important;
}

body.rwot-vduma-cart .rwot-cart-section-heading,
body.rwot-vduma-cart .cart_totals.vduma-cart-totals > .shop_table {
	display: none !important;
}

@media (max-width: 991.98px) {
	body.rwot-vduma-cart #title-cart {
		padding-left: var(--vduma-cart-gutter) !important;
		padding-right: var(--vduma-cart-gutter) !important;
	}

	body.rwot-vduma-cart .container-list-produk {
		padding-left: var(--vduma-cart-gutter) !important;
		padding-right: var(--vduma-cart-gutter) !important;
	}

	body.rwot-vduma-cart .vduma-cart-checkout-top {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	body.rwot-vduma-cart .vduma-cart-checkout-right {
		align-items: stretch;
		text-align: left;
	}

	body.rwot-vduma-cart .vduma-cart-checkout-right .wc-proceed-to-checkout,
	body.rwot-vduma-cart .vduma-cart-checkout-right .btn-whatsapp-order {
		max-width: none;
	}

	body.rwot-vduma-cart .vduma-cart-estimate-fields {
		grid-template-columns: 1fr 1fr;
	}

	body.rwot-vduma-cart .vduma-cart-estimate-fields p:has(> button[name="calc_shipping"]) {
		grid-column: 1 / -1;
	}

	body.rwot-vduma-cart .vduma-cart-estimate-fields button[name="calc_shipping"] {
		width: 100%;
	}
}

@media (max-width: 575.98px) {
	body.rwot-vduma-cart .vduma-cart-estimate-fields {
		grid-template-columns: 1fr;
	}

	body.rwot-vduma-cart .vduma-cart-coupon-row {
		flex-direction: column;
	}

	body.rwot-vduma-cart .vduma-cart-coupon-row button[name="apply_coupon"] {
		width: 100%;
	}
}

/* ── Recently Viewed (match product page PDP carousel) ── */
body.rwot-vduma-cart .vduma-cart-recently-viewed-wrap {
	width: 100%;
	max-width: 100%;
	padding: 0 var(--vduma-cart-gutter) 72px;
	box-sizing: border-box;
}

body.rwot-vduma-cart .vduma-recently-viewed {
	display: block !important;
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 64px 0 0 !important;
	padding: 0 !important;
	position: relative;
}

body.rwot-vduma-cart .vduma-recently-viewed-title {
	font-family: var(--vduma-cart-serif) !important;
	font-size: clamp(1.15rem, 2vw, 1.5rem) !important;
	font-weight: 400 !important;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-align: center !important;
	color: var(--vduma-cart-text) !important;
	margin: 0 0 28px !important;
	line-height: 1.3 !important;
	width: 100%;
}

body.rwot-vduma-cart .vduma-carousel-viewport {
	position: relative;
	width: 100%;
}

body.rwot-vduma-cart ul.products.rwot-vduma-image-grid {
	display: flex !important;
	flex-wrap: nowrap !important;
	grid-template-columns: none !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	gap: 24px !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	width: 100% !important;
	max-width: 100% !important;
	cursor: grab;
	touch-action: pan-x;
}

body.rwot-vduma-cart ul.products.rwot-vduma-image-grid.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
	-webkit-user-select: none;
}

body.rwot-vduma-cart ul.products.rwot-vduma-image-grid.is-dragging a {
	pointer-events: none;
}

body.rwot-vduma-cart ul.products.rwot-vduma-image-grid::-webkit-scrollbar {
	display: none;
}

body.rwot-vduma-cart ul.products.rwot-vduma-image-grid::before,
body.rwot-vduma-cart ul.products.rwot-vduma-image-grid::after {
	display: none !important;
	content: none !important;
}

body.rwot-vduma-cart ul.products.rwot-vduma-image-grid li.product.rwot-vduma-image-card {
	float: none !important;
	clear: none !important;
	margin: 0 !important;
	padding: 0 !important;
	flex: 0 0 calc((100% - 48px) / 3) !important;
	width: calc((100% - 48px) / 3) !important;
	max-width: calc((100% - 48px) / 3) !important;
	min-width: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	border: none !important;
	box-sizing: border-box !important;
	scroll-snap-align: start;
}

body.rwot-vduma-cart .rwot-vduma-image-card .vduma-pdp-image-card {
	width: 100%;
	border-radius: 0 !important;
	background: transparent;
	overflow: hidden;
	position: relative;
	display: block;
}

body.rwot-vduma-cart .rwot-vduma-image-card .vduma-pdp-image-card-link {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	height: auto;
	position: relative;
	text-decoration: none;
	background: #f3f1ee;
}

body.rwot-vduma-cart .rwot-vduma-image-card .vduma-pdp-image-card-imgwrap {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
}

body.rwot-vduma-cart .rwot-vduma-image-card .vduma-pdp-image-card-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
	transition: opacity 0.4s ease;
}

body.rwot-vduma-cart .rwot-vduma-image-card .vduma-pdp-image-card-img--primary {
	opacity: 1;
	z-index: 1;
}

body.rwot-vduma-cart .rwot-vduma-image-card .vduma-pdp-image-card-img--hover {
	opacity: 0;
	z-index: 2;
}

body.rwot-vduma-cart .rwot-vduma-image-card:hover .vduma-pdp-image-card-img--hover {
	opacity: 1;
}

body.rwot-vduma-cart .rwot-vduma-image-card:hover .vduma-pdp-image-card-img--primary {
	opacity: 0;
}

body.rwot-vduma-cart .rwot-vduma-image-card .vdouma-sale-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	background: #fff;
	color: #c0392b;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.03em;
	padding: 3px 8px;
	border-radius: 0;
	line-height: 1.3;
}

body.rwot-vduma-cart .vduma-carousel-arrow {
	position: absolute;
	top: 38%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid #e8e8e8;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	color: #1a1a1a;
	cursor: pointer;
	z-index: 10;
	padding: 0;
	transition: opacity 0.2s ease, box-shadow 0.2s ease;
	pointer-events: auto;
}

body.rwot-vduma-cart .vduma-carousel-arrow--prev {
	left: 12px;
}

body.rwot-vduma-cart .vduma-carousel-arrow--next {
	right: 12px;
}

body.rwot-vduma-cart .vduma-carousel-arrow:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

body.rwot-vduma-cart .vduma-carousel-arrow:disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

@media (max-width: 991.98px) {
	body.rwot-vduma-cart .vduma-recently-viewed {
		margin-top: 40px !important;
	}

	body.rwot-vduma-cart ul.products.rwot-vduma-image-grid {
		gap: 16px !important;
		padding-bottom: 4px;
	}

	body.rwot-vduma-cart ul.products.rwot-vduma-image-grid li.product.rwot-vduma-image-card {
		flex: 0 0 calc((100% - 16px) / 2) !important;
		width: calc((100% - 16px) / 2) !important;
		max-width: calc((100% - 16px) / 2) !important;
	}

	body.rwot-vduma-cart .vduma-carousel-arrow {
		display: none;
	}
}

@media (max-width: 575.98px) {
	body.rwot-vduma-cart ul.products.rwot-vduma-image-grid {
		gap: 10px !important;
	}

	body.rwot-vduma-cart ul.products.rwot-vduma-image-grid li.product.rwot-vduma-image-card {
		flex-basis: 78% !important;
		width: 78% !important;
		max-width: 78% !important;
	}
}
