/* افزونهٔ درخواست — صفحهٔ محصول */

.dkh-wrap {
	--dkh-accent: #7c3aed;
	--dkh-soft: color-mix(in srgb, var(--dkh-accent) 9%, #fff);
	--dkh-ring: color-mix(in srgb, var(--dkh-accent) 22%, transparent);
	--dkh-ink: #1f1d2b;
	--dkh-muted: #8b889b;
	--dkh-line: #e7e4ef;
	--dkh-danger: #e11d48;
	direction: rtl;
	text-align: right;
	clear: both;
	width: 100%;
	margin: 0 0 22px;
	padding: 20px;
	border: 1px solid var(--dkh-line);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(31, 29, 43, .04), 0 12px 32px -18px rgba(31, 29, 43, .22);
	font-family: inherit;
	color: var(--dkh-ink);
	box-sizing: border-box;
}
.dkh-wrap *, .dkh-wrap *::before, .dkh-wrap *::after { box-sizing: border-box; }

/* فرم ووکامرس معمولاً flex است؛ باکس باید یک ردیف کامل بگیرد */
form.cart .dkh-wrap { flex: 1 1 100%; }

.dkh-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px dashed var(--dkh-line); }
.dkh-head-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--dkh-soft); color: var(--dkh-accent); }
.dkh-head-ico svg { width: 19px; height: 19px; }
.dkh-head-title { font-weight: 800; font-size: 15px; }

.dkh-field { margin-bottom: 18px; }
.dkh-field:last-of-type { margin-bottom: 4px; }
.dkh-label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; font-weight: 700; font-size: 14px; }
.dkh-label label { margin: 0; font: inherit; cursor: default; }
.dkh-req { color: var(--dkh-danger); font-weight: 800; }
.dkh-tag { font-size: 12px; font-weight: 600; color: var(--dkh-accent); background: var(--dkh-soft); padding: 2px 10px; border-radius: 99px; }
.dkh-tag .woocommerce-Price-amount, .dkh-pill-price .woocommerce-Price-amount, .dkh-check-price .woocommerce-Price-amount { font-weight: inherit; color: inherit; }
.dkh-desc { margin: 8px 0 0 !important; font-size: 12.5px; color: var(--dkh-muted); line-height: 1.8; }
.dkh-err { margin: 8px 0 0 !important; font-size: 12.5px; color: var(--dkh-danger); font-weight: 600; }

/* ---------- دکمه‌ها ---------- */
.dkh-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.dkh-pill { position: relative; margin: 0 !important; cursor: pointer; }
.dkh-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.dkh-pill-in {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	min-width: 76px; min-height: 48px; padding: 9px 16px; border-radius: 13px;
	border: 1.5px solid var(--dkh-line); background: #fff; text-align: center;
	transition: border-color .15s, background .15s, box-shadow .15s, transform .15s;
}
.dkh-pill:hover .dkh-pill-in { border-color: color-mix(in srgb, var(--dkh-accent) 45%, var(--dkh-line)); transform: translateY(-1px); }
.dkh-pill-text { font-size: 14px; font-weight: 600; line-height: 1.5; }
.dkh-pill-price { font-size: 11.5px; color: var(--dkh-muted); line-height: 1.5; }
.dkh-pill input:checked + .dkh-pill-in {
	border-color: var(--dkh-accent); background: var(--dkh-soft);
	box-shadow: 0 0 0 3px var(--dkh-ring);
}
.dkh-pill input:checked + .dkh-pill-in .dkh-pill-text, .dkh-pill input:checked + .dkh-pill-in .dkh-pill-price { color: var(--dkh-accent); }
.dkh-pill input:focus-visible + .dkh-pill-in { box-shadow: 0 0 0 4px var(--dkh-ring); }

/* ---------- چک‌باکس ---------- */
.dkh-checks { display: grid; gap: 8px; }
.dkh-check {
	position: relative; display: flex; align-items: center; gap: 12px; margin: 0 !important;
	padding: 12px 14px; border-radius: 13px; border: 1.5px solid var(--dkh-line); background: #fff;
	cursor: pointer; transition: border-color .15s, background .15s;
}
.dkh-check:hover { border-color: color-mix(in srgb, var(--dkh-accent) 45%, var(--dkh-line)); }
.dkh-check input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.dkh-box {
	flex: none; position: relative; width: 22px; height: 22px; border-radius: 7px;
	border: 1.8px solid #cdc9da; background: #fff; transition: .15s;
}
.dkh-box::after {
	content: ""; position: absolute; top: 3px; left: 7px; width: 5px; height: 10px;
	border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: rotate(45deg) scale(0); transition: transform .18s cubic-bezier(.3, 1.5, .6, 1);
}
.dkh-check-text { flex: 1; font-size: 14px; font-weight: 600; }
.dkh-check-price { font-size: 12px; color: var(--dkh-muted); white-space: nowrap; }
.dkh-check input:checked ~ .dkh-box { background: var(--dkh-accent); border-color: var(--dkh-accent); }
.dkh-check input:checked ~ .dkh-box::after { transform: rotate(45deg) scale(1); }
.dkh-check:has(input:checked) { border-color: var(--dkh-accent); background: var(--dkh-soft); }
.dkh-check:has(input:checked) .dkh-check-price { color: var(--dkh-accent); }
.dkh-check input:focus-visible ~ .dkh-box { box-shadow: 0 0 0 4px var(--dkh-ring); }

/* ---------- لیست‌باکس ---------- */
.dkh-select { position: relative; }
.dkh-select::after {
	content: ""; position: absolute; left: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
	border: solid var(--dkh-muted); border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none;
}
.dkh-wrap .dkh-select select, .dkh-wrap .dkh-input {
	width: 100%; height: 50px; margin: 0; padding: 0 16px; border-radius: 13px;
	border: 1.5px solid var(--dkh-line); background: #fff; color: var(--dkh-ink);
	font: inherit; font-size: 14px; box-shadow: none; outline: 0; transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none; appearance: none;
}
.dkh-wrap .dkh-select select { padding-left: 40px; cursor: pointer; background-image: none; }
.dkh-wrap .dkh-select select:focus, .dkh-wrap .dkh-input:focus { border-color: var(--dkh-accent); box-shadow: 0 0 0 4px var(--dkh-ring); }
.dkh-wrap .dkh-select.is-filled select { border-color: var(--dkh-accent); background: var(--dkh-soft); }
.dkh-wrap .dkh-input.is-filled { border-color: var(--dkh-accent); }
.dkh-wrap .dkh-input::placeholder { color: #aaa6b8; }

/* ---------- خطا ---------- */
.dkh-field.has-error .dkh-pill-in, .dkh-field.has-error .dkh-check,
.dkh-field.has-error select, .dkh-field.has-error .dkh-input { border-color: var(--dkh-danger) !important; }
.dkh-field.has-error { animation: dkhShake .32s ease 2; }
@keyframes dkhShake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- خلاصهٔ قیمت ---------- */
.dkh-summary {
	margin-top: 18px; padding: 14px 16px; border-radius: 14px;
	background: linear-gradient(135deg, var(--dkh-soft), #fff 80%);
	border: 1px solid color-mix(in srgb, var(--dkh-accent) 16%, var(--dkh-line));
}
.dkh-sum-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13.5px; color: #5c5970; }
.dkh-sum-row b { font-weight: 700; color: var(--dkh-ink); font-variant-numeric: tabular-nums; transition: color .2s; }
.dkh-sum-row.is-extra b { color: var(--dkh-muted); }
.dkh-wrap.has-extra .dkh-sum-row.is-extra b { color: var(--dkh-accent); }
.dkh-sum-row.is-total { margin-top: 6px; padding-top: 11px; border-top: 1px dashed color-mix(in srgb, var(--dkh-accent) 25%, var(--dkh-line)); color: var(--dkh-ink); font-weight: 700; }
.dkh-sum-row.is-total b { font-size: 19px; font-weight: 900; color: var(--dkh-accent); }
.dkh-sum-qty { font-weight: 500; color: var(--dkh-muted); font-size: 12px; }
.dkh-bump { animation: dkhBump .35s ease; display: inline-block; }
@keyframes dkhBump { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }

.dkh-cart-price { color: #8b889b; }

@media (max-width: 480px) {
	.dkh-wrap { padding: 16px; border-radius: 16px; }
	.dkh-pill { flex: 1 1 calc(33.333% - 10px); }
	.dkh-pill-in { min-width: 0; padding: 9px 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.dkh-wrap * { animation: none !important; transition: none !important; }
}
