/* DeeToo cart / checkout / order confirmation */

.dtc {
	max-width: 100%; margin: 0 auto; padding: 18px 26px 44px;
	color: var(--dt-ink); box-sizing: border-box;
}
.dtc * { box-sizing: border-box; }

.dtc-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 6px 0 18px; }
.dtc-title { margin: 0; font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dtc-title__n { font-size: 14px; font-weight: 500; color: var(--dt-muted); }
.dtc-pill { font-size: 11px; font-weight: 600; color: #15803d; background: #f0fdf4; border: 1px solid #dcfce7; padding: 5px 10px; border-radius: 999px; }
.dtc-nudge { margin: -8px 0 16px; font-size: 12.5px; color: var(--dt-muted); }
.dtc-login { font-size: 12.5px; color: var(--dt-muted); }
.dtc-login a { color: var(--dt-orange); font-weight: 600; text-decoration: none; }
.dtc-muted { font-size: 12.5px; color: var(--dt-muted); }

/* ---------- Step tracker ---------- */
.dtc-steps { list-style: none; margin: 0 0 26px; padding: 0; display: flex; align-items: flex-start; }
.dtc-steps li { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; text-align: center; }
.dtc-steps li::before {
	content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 2px;
	background: var(--dt-line); z-index: 0;
}
.dtc-steps li:first-child::before { display: none; }
.dtc-steps li.is-done::before, .dtc-steps li.is-active::before { background: var(--dt-orange); }
.dtc-steps__n {
	position: relative; z-index: 1;
	width: 34px; height: 34px; border-radius: 50%;
	display: grid; place-items: center;
	background: #fff; border: 2px solid var(--dt-line);
	font-size: 13px; font-weight: 700; color: var(--dt-muted);
}
.dtc-steps li.is-done .dtc-steps__n { background: var(--dt-orange); border-color: var(--dt-orange); color: #fff; }
.dtc-steps li.is-active .dtc-steps__n { background: var(--dt-orange); border-color: var(--dt-orange); color: #fff; }
.dtc-steps__l { font-size: 12px; color: var(--dt-muted); }
.dtc-steps li.is-active .dtc-steps__l { color: var(--dt-ink); font-weight: 600; }

/* ---------- Layout ---------- */
.dtc-grid { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
.dtc-card { background: #fff; border: 1px solid var(--dt-line); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.dtc-card__h { margin: 0 0 14px; font-size: 15px; font-weight: 700; }
.dtc-card__sub { margin: 16px 0 10px; font-size: 13px; font-weight: 700; }
.dtc-card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dtc-side { position: sticky; top: 16px; }

/* ---------- Cart items ---------- */
.dtc-items { background: #fff; border: 1px solid var(--dt-line); border-radius: 12px; overflow: hidden; }
.dtc-thead {
	display: grid; grid-template-columns: 1fr 140px 140px 130px; gap: 12px;
	padding: 13px 18px; background: var(--dt-soft);
	font-size: 12px; font-weight: 600; color: var(--dt-muted);
}
.dtc-thead span:not(:first-child) { text-align: center; }
.dtc-row {
	display: grid; grid-template-columns: 1fr 140px 140px 130px; gap: 12px;
	padding: 18px; border-top: 1px solid var(--dt-line); align-items: start;
}
.dtc-row__prod { display: flex; gap: 14px; min-width: 0; }
.dtc-row__img { flex: 0 0 96px; line-height: 0; }
.dtc-row__img img { width: 96px; height: 96px; object-fit: contain; background: var(--dt-soft); border-radius: 8px; }
.dtc-row__info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dtc-row__name { font-size: 14px; font-weight: 600; color: var(--dt-ink); text-decoration: none; line-height: 1.35; }
.dtc-row__name:hover { color: var(--dt-orange); }
.dtc-row__meta { font-size: 12px; color: var(--dt-muted); }
.dtc-row__acts { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 4px; }
.dtc-row__acts a { color: var(--dt-muted); text-decoration: none; }
.dtc-row__acts a:hover { color: var(--dt-orange); }
.dtc-row__sep { color: #d1d5db; }
.dtc-row__badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.dtc-badge { font-size: 10.5px; color: #15803d; background: #f0fdf4; padding: 3px 8px; border-radius: 5px; }

.dtc-row__price, .dtc-row__qty, .dtc-row__sub { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dtc-now { font-size: 15px; font-weight: 700; }
.dtc-row__price del { font-size: 12px; color: var(--dt-muted); }
.dtc-off { font-size: 11px; font-weight: 700; color: var(--dt-orange); }
.dtc-row__sub strong { font-size: 15px; }
.dtc-stock { font-size: 11px; color: #15803d; }
.dtc-stock.is-out { color: #dc2626; }

.dtc .quantity { display: inline-flex; align-items: center; }
.dtc .quantity input.qty {
	width: 62px !important; height: 36px !important; text-align: center;
	border: 1px solid var(--dt-line) !important; border-radius: 7px !important;
	font-size: 13px; padding: 0 6px !important; background: #fff;
}
.dtc-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 18px; border-top: 1px solid var(--dt-line); }

/* ---------- Summary ---------- */
.dtc-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; }
.dtc-line--save { color: #15803d; }
.dtc-free { color: #15803d; font-weight: 600; }
.dtc-total {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 14px 0 6px; margin-top: 8px; border-top: 1px solid var(--dt-line);
	font-size: 15px; font-weight: 700;
}
.dtc-total strong { font-size: 20px; color: var(--dt-orange); }
.dtc-savemsg { margin: 2px 0 14px; font-size: 12px; color: #15803d; }
.dtc-checkout {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	width: 100%; height: 50px; margin-top: 6px;
	background: var(--dt-orange); color: #fff; font-size: 15px; font-weight: 700;
	border-radius: 9px; text-decoration: none;
}
.dtc-checkout:hover { background: var(--dt-orange-dark); color: #fff; }
.dtc-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; font-size: 11.5px; color: #15803d; }

.dtc-coupon__form { display: flex; gap: 8px; }
.dtc-coupon__form input {
	flex: 1 1 auto; height: 40px; padding: 0 12px;
	border: 1px solid var(--dt-line); border-radius: 7px; font-size: 13px;
}
.dtc-coupon__form input:focus { outline: none; border-color: var(--dt-orange); }

.dtc-pay { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--dt-line); flex-wrap: wrap; }
.dtc-pay__l { font-size: 11.5px; color: var(--dt-muted); }
.dtc-pay__c { display: flex; gap: 5px; flex-wrap: wrap; }
.dtc-pay__c em {
	font-style: normal; font-size: 9px; font-weight: 700;
	background: var(--dt-soft); border: 1px solid var(--dt-line);
	color: var(--dt-ink); padding: 4px 7px; border-radius: 4px;
}

/* ---------- Trust strip ---------- */
.dtc-trust {
	list-style: none; margin: 20px 0 0; padding: 16px 18px;
	background: #fff; border: 1px solid var(--dt-line); border-radius: 12px;
	display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px;
}
.dtc-trust li { display: flex; align-items: center; gap: 10px; }
.dtc-trust__i { color: var(--dt-orange); flex: 0 0 auto; line-height: 0; }
.dtc-trust strong { display: block; font-size: 12.5px; font-weight: 700; }
.dtc-trust em { display: block; font-style: normal; font-size: 11px; color: var(--dt-muted); }

/* ---------- Checkout ---------- */
.dtc-sec { background: #fff; border: 1px solid var(--dt-line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.dtc-sec__h { margin: 0 0 16px; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dtc-sec__n {
	width: 24px; height: 24px; border-radius: 50%;
	background: var(--dt-ink); color: #fff;
	display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 auto;
}
.dtc-sec__note { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 400; color: #15803d; }

.dtc-fields, .dtc-shipfields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.dtc-fields--contact { grid-template-columns: 1fr 1fr; }
.dtc .form-row { margin: 0 0 14px; display: flex; flex-direction: column; }
.dtc .form-row-wide, .dtc #billing_address_1_field, .dtc #shipping_address_1_field { grid-column: 1 / -1; }
.dtc .form-row label { font-size: 12.5px; font-weight: 500; margin-bottom: 6px; color: var(--dt-ink); }
.dtc .form-row .required { color: var(--dt-orange); text-decoration: none; }
.dtc .form-row input.input-text,
.dtc .form-row textarea,
.dtc .form-row select,
.dtc .select2-container .select2-selection--single {
	height: 44px !important; min-height: 44px;
	padding: 0 13px !important;
	border: 1px solid var(--dt-line) !important; border-radius: 8px !important;
	font-size: 13.5px; background: #fff; color: var(--dt-ink); width: 100%;
}
.dtc .form-row textarea { height: 90px !important; padding: 11px 13px !important; }
.dtc .form-row input.input-text:focus,
.dtc .form-row textarea:focus,
.dtc .form-row select:focus { outline: none; border-color: var(--dt-orange); }
.dtc .select2-container .select2-selection--single .select2-selection__rendered { line-height: 42px; padding-left: 0; }
.dtc .select2-container .select2-selection--single .select2-selection__arrow { height: 42px; }

/* Delivery + payment */
.dtc-ship ul, .dtc .woocommerce-checkout-payment ul.wc_payment_methods {
	list-style: none; margin: 0; padding: 0; display: grid; gap: 10px;
}
.dtc-ship li, .dtc .wc_payment_method {
	border: 1px solid var(--dt-line); border-radius: 10px; padding: 14px 16px;
	display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap;
}
.dtc-ship li:has(input:checked), .dtc .wc_payment_method:has(input:checked) {
	border-color: var(--dt-orange); background: #fff7f4;
}
.dtc-ship input[type=radio], .dtc .wc_payment_method input[type=radio] { accent-color: var(--dt-orange); margin-top: 2px; }
.dtc-ship label, .dtc .wc_payment_method label { font-size: 13.5px; font-weight: 600; cursor: pointer; margin: 0; }
.dtc .payment_box {
	flex-basis: 100%; margin: 10px 0 0; padding: 12px 14px;
	background: var(--dt-soft); border-radius: 8px; font-size: 12.5px; color: var(--dt-muted);
}
.dtc .payment_box p:last-child { margin-bottom: 0; }
.dtc #place_order {
	width: 100%; height: 52px; margin-top: 6px;
	background: var(--dt-orange) !important; color: #fff !important;
	border: none !important; border-radius: 9px !important;
	font-size: 15px !important; font-weight: 700 !important; cursor: pointer;
}
.dtc #place_order:hover { background: var(--dt-orange-dark) !important; }
.dtc .woocommerce-checkout-review-order-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtc .woocommerce-checkout-review-order-table th,
.dtc .woocommerce-checkout-review-order-table td { padding: 8px 0; text-align: left; border: none; }
.dtc .woocommerce-checkout-review-order-table td { text-align: right; }
.dtc .woocommerce-checkout-review-order-table tfoot .order-total th,
.dtc .woocommerce-checkout-review-order-table tfoot .order-total td {
	padding-top: 14px; border-top: 1px solid var(--dt-line); font-size: 15px;
}
.dtc .woocommerce-checkout-review-order-table tfoot .order-total td { color: var(--dt-orange); font-weight: 700; }

/* ---------- Thank you ---------- */
.dtc-grid--thanks { grid-template-columns: 1fr 380px; }
.dtc-thanks { text-align: center; padding: 34px 24px 26px; }
.dtc-tick {
	width: 68px; height: 68px; margin: 0 auto 16px;
	display: grid; place-items: center; border-radius: 50%;
	background: #16a34a; color: #fff;
}
.dtc-thanks__h { margin: 0 0 4px; font-size: 30px; font-weight: 800; }
.dtc-thanks__s { margin: 0 0 12px; font-size: 20px; font-weight: 700; }
.dtc-thanks__p { margin: 0 0 20px; font-size: 13.5px; color: var(--dt-muted); line-height: 1.7; }

.dtc-orderid {
	display: inline-flex; align-items: center; gap: 12px;
	border: 1px solid var(--dt-line); border-radius: 10px;
	padding: 12px 18px; margin-bottom: 24px;
}
.dtc-orderid span { font-size: 10.5px; color: var(--dt-muted); letter-spacing: .08em; }
.dtc-orderid strong { font-size: 19px; font-weight: 800; color: var(--dt-orange); }
.dtc-copy { background: none; border: none; cursor: pointer; color: var(--dt-muted); padding: 0; }
.dtc-copy:hover { color: var(--dt-orange); }
.dtc-copy.is-copied { color: #16a34a; }

.dtc-track { list-style: none; margin: 0 0 18px; padding: 0; display: flex; }
.dtc-track li { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; text-align: center; }
.dtc-track li::before {
	content: ""; position: absolute; top: 19px; left: -50%; width: 100%; height: 2px; background: var(--dt-line);
}
.dtc-track li:first-child::before { display: none; }
.dtc-track li.is-done::before { background: #16a34a; }
.dtc-track__i {
	position: relative; z-index: 1;
	width: 38px; height: 38px; border-radius: 50%;
	display: grid; place-items: center;
	background: #fff; border: 2px solid var(--dt-line); color: var(--dt-muted);
}
.dtc-track li.is-done .dtc-track__i { border-color: #16a34a; color: #16a34a; }
.dtc-track__n { font-size: 12px; font-weight: 700; }
.dtc-track__s { font-size: 10.5px; color: var(--dt-muted); }

.dtc-wa {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	margin: 0; padding: 12px; border-radius: 9px;
	background: #f0fdf4; color: #15803d; font-size: 12.5px;
}
.dtc-wa strong { color: var(--dt-ink); }

.dtc-oitems { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dtc-oitems li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--dt-line); }
.dtc-oitems li:first-child { border-top: none; }
.dtc-oitem__img { flex: 0 0 66px; line-height: 0; }
.dtc-oitem__img img { width: 66px; height: 66px; object-fit: contain; background: var(--dt-soft); border-radius: 8px; }
.dtc-oitem__info { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dtc-oitem__info strong { font-size: 13.5px; }
.dtc-oitem__info em { font-style: normal; font-size: 11.5px; color: var(--dt-muted); }
.dtc-oitem__price { font-size: 15px; font-weight: 700; white-space: nowrap; }
.dtc-invoice { padding: 8px 14px; font-size: 12px; }

.dtc-addr { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.dtc-addr__t { margin: 0 0 4px; font-size: 12.5px; line-height: 1.6; font-style: normal; }
.dtc-addr__p { margin: 0; font-size: 12px; color: var(--dt-muted); }

.dtc-paid { font-size: 11.5px; font-weight: 600; color: #15803d; background: #f0fdf4; padding: 3px 9px; border-radius: 5px; }
.dtc-paid.is-pending { color: #b45309; background: #fffbeb; }

.dtc-safe { display: flex; gap: 12px; align-items: flex-start; }
.dtc-safe__i { color: #16a34a; flex: 0 0 auto; line-height: 0; }
.dtc-safe strong { display: block; font-size: 13px; margin-bottom: 3px; }
.dtc-safe p { margin: 0; font-size: 12px; color: var(--dt-muted); line-height: 1.55; }

.dtc-help ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.dtc-help li { display: flex; gap: 12px; align-items: flex-start; }
.dtc-help__i { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--dt-soft); color: var(--dt-ink); flex: 0 0 auto; }
.dtc-help__i--wa { background: #f0fdf4; color: #25d366; }
.dtc-help strong { display: block; font-size: 12.5px; }
.dtc-help a { display: block; font-size: 12.5px; color: var(--dt-muted); text-decoration: none; }
.dtc-help a:hover { color: var(--dt-orange); }
.dtc-help em { display: block; font-style: normal; font-size: 11px; color: var(--dt-muted); }

.dtc-failed { text-align: center; }
.dtc-failed h1 { font-size: 22px; margin: 0 0 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.dtc-grid, .dtc-grid--thanks { grid-template-columns: 1fr; }
	.dtc-side { position: static; }
}
@media (max-width: 780px) {
	.dtc-thead { display: none; }
	.dtc-row { grid-template-columns: 1fr; gap: 10px; }
	.dtc-row__price, .dtc-row__qty, .dtc-row__sub {
		flex-direction: row; align-items: center; justify-content: space-between; text-align: left; width: 100%;
	}
	.dtc-row__price::before, .dtc-row__qty::before, .dtc-row__sub::before {
		content: attr(data-label); font-size: 12px; color: var(--dt-muted);
	}
	.dtc-fields, .dtc-shipfields, .dtc-fields--contact, .dtc-addr { grid-template-columns: 1fr; }
	.dtc-trust { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.dtc-track { flex-wrap: wrap; gap: 16px; }
	.dtc-track li { flex: 1 1 40%; }
	.dtc-track li::before { display: none; }
	.dtc-steps__l { font-size: 10.5px; }
	.dtc-title { font-size: 21px; }
	.dtc-thanks__h { font-size: 24px; }
}

/* Shipping rows relocated out of the order-review table. */
.dtc-ship ul#shipping_method { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dtc-ship ul#shipping_method li { margin: 0; }
.dtc-ship__single { margin: 0; font-size: 13.5px; font-weight: 600; }
/* The review table's own shipping row is redundant once moved. */
.dtc .woocommerce-shipping-totals { display: none; }

/* ---------- Order-pay (gateway redirect back, or resuming an unpaid order) ----------
   This renders the real [woocommerce_checkout] shortcode output — see the
   comment in templates/flow-page.php for why. It is not built from our own
   numbered-section markup, so it only gets a card wrapper and a sane reading
   width rather than the full custom grid used on the main checkout form. */
.dtc-pay-wrap { max-width: 640px; margin-left: auto; margin-right: auto; }
.dtc-pay-wrap .woocommerce-info { border-top-color: var(--dt-orange); }
