/* Dena Pack Matrix – frontend */
.dpm-hide-default form.variations_form.cart,
.dpm-hide-default .single_variation_wrap { display: none !important; }

.dpm-wrap {
	--dpm-ac: #d6336c;
	--dpm-ac-soft: color-mix(in srgb, var(--dpm-ac) 10%, #fff);
	--dpm-ac-mid: color-mix(in srgb, var(--dpm-ac) 28%, #fff);
	--dpm-ink: #1f2430;
	--dpm-mute: #6b7280;
	--dpm-line: #e7e9ee;
	--dpm-ok: #16a34a;
	direction: rtl;
	text-align: right;
	color: var(--dpm-ink);
	margin: 16px 0;
	font-size: 14px;
	line-height: 1.7;
	box-sizing: border-box;
}
.dpm-wrap *, .dpm-wrap *::before, .dpm-wrap *::after { box-sizing: border-box; }
.dpm-notice { padding: 12px 14px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; }

.dpm-card {
	background: #fff;
	border: 1px solid var(--dpm-line);
	border-radius: 18px;
	padding: 18px;
	box-shadow: 0 6px 24px rgba(20, 24, 40, .06);
}
.dpm-title { margin: 0 0 2px; font-size: 18px; font-weight: 800; }
.dpm-sub { margin: 0 0 14px; color: var(--dpm-mute); font-size: 13px; }

/* ---------- tier progress ---------- */
.dpm-tiers {
	background: linear-gradient(135deg, var(--dpm-ac-soft), #fff);
	border: 1px solid var(--dpm-ac-mid);
	border-radius: 14px;
	padding: 12px 14px 10px;
	margin-bottom: 14px;
}
.dpm-msgrow { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.dpm-msg { font-size: 13px; font-weight: 600; flex: 1; }
.dpm-msg b { color: var(--dpm-ac); }
.dpm-now { display: none; white-space: nowrap; background: var(--dpm-ac); color: #fff; border-radius: 999px; padding: 2px 12px; font-size: 12px; }
.dpm-now.is-on { display: block; }
.dpm-now b { font-weight: 800; }

.dpm-bar { height: 10px; border-radius: 999px; background: #fff; border: 1px solid var(--dpm-ac-mid); overflow: hidden; }
.dpm-bar i {
	display: block; height: 100%; width: 0;
	background: linear-gradient(270deg, var(--dpm-ac), color-mix(in srgb, var(--dpm-ac) 55%, #ffb454));
	border-radius: 999px; transition: width .35s cubic-bezier(.3, .8, .3, 1);
}
.dpm-chips { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 12), 1fr); gap: 4px; }
.dpm-chips li {
	text-align: center; border-radius: 8px; padding: 3px 0 2px; background: #fff; border: 1px solid var(--dpm-line);
	color: var(--dpm-mute); transition: all .25s; min-width: 0;
}
.dpm-chips b { display: block; font-size: 12px; line-height: 1.3; }
.dpm-chips small { display: block; font-size: 10px; line-height: 1.3; }
.dpm-chips li.is-done { background: var(--dpm-ac); border-color: var(--dpm-ac); color: #fff; }
.dpm-chips li.is-now { transform: translateY(-2px); box-shadow: 0 4px 10px color-mix(in srgb, var(--dpm-ac) 40%, transparent); }
.dpm-chips li.is-next { border: 1px dashed var(--dpm-ac); color: var(--dpm-ac); background: var(--dpm-ac-soft); animation: dpm-pulse 1.4s ease-in-out infinite; }
@keyframes dpm-pulse { 50% { transform: translateY(-2px); } }

/* ---------- size ---------- */
.dpm-size { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.dpm-size-l { font-weight: 700; }
.dpm-pill {
	border: 1px solid var(--dpm-line); background: #fff; color: var(--dpm-ink); border-radius: 999px;
	padding: 4px 14px; cursor: pointer; font: inherit; font-size: 13px;
}
.dpm-pill.is-on { border-color: var(--dpm-ac); background: var(--dpm-ac-soft); color: var(--dpm-ac); font-weight: 700; }
.dpm-pill.is-static { cursor: default; }

/* ---------- grid ---------- */
.dpm-grid { border: 1px solid var(--dpm-line); border-radius: 14px; overflow: hidden; }
.dpm-gh, .dpm-row {
	display: grid;
	grid-template-columns: minmax(150px, 1.3fr) repeat(var(--cols), minmax(0, 1fr));
	align-items: center;
}
.dpm-gh { background: #f8f9fb; border-bottom: 1px solid var(--dpm-line); }
.dpm-th { padding: 10px 12px; text-align: center; line-height: 1.4; }
.dpm-th b { display: block; font-size: 13px; }
.dpm-th small { color: var(--dpm-mute); font-size: 11px; }
.dpm-th-first { text-align: right; font-weight: 700; font-size: 13px; }

.dpm-row { border-bottom: 1px solid var(--dpm-line); transition: background .2s; }
.dpm-row:last-child { border-bottom: 0; }
.dpm-row.is-on { background: var(--dpm-ac-soft); }

.dpm-color { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-width: 0; }
.dpm-sw {
	flex: none; width: 30px; height: 30px; border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .08);
}
.dpm-cn { font-weight: 700; font-size: 14px; word-break: break-word; }
.dpm-badge {
	font-style: normal; font-size: 11px; background: #fff3cd; color: #8a5a00;
	border-radius: 999px; padding: 0 8px; white-space: nowrap;
}

.dpm-cell { padding: 8px 8px; text-align: center; }
.dpm-cell-label { display: none; font-size: 12px; color: var(--dpm-mute); margin-bottom: 4px; }
.dpm-cell-price { font-size: 12px; margin-top: 4px; color: var(--dpm-mute); min-height: 18px; }
.dpm-cell-price span { color: var(--dpm-ink); font-weight: 700; }
.dpm-cell-price del { opacity: .55; margin-inline-end: 4px; }
.dpm-cell.has-qty .dpm-cell-price span { color: var(--dpm-ac); }
.dpm-cell.is-off { color: var(--dpm-mute); }
.dpm-na { font-size: 12px; background: #f1f2f5; border-radius: 999px; padding: 2px 10px; }

.dpm-step {
	display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--dpm-line);
	border-radius: 999px; overflow: hidden; direction: ltr;
}
.dpm-cell.has-qty .dpm-step { border-color: var(--dpm-ac); box-shadow: 0 0 0 3px var(--dpm-ac-soft); }
.dpm-step button {
	appearance: none; border: 0; background: transparent; width: 34px; height: 34px; cursor: pointer;
	font-size: 20px; line-height: 1; color: var(--dpm-ink); padding: 0; transition: background .15s;
}
.dpm-step button:hover { background: var(--dpm-ac-soft); color: var(--dpm-ac); }
.dpm-step input {
	width: 40px; height: 34px; border: 0; background: transparent; text-align: center; padding: 0;
	font: inherit; font-weight: 800; color: var(--dpm-ink); box-shadow: none; outline: none; direction: rtl;
}

/* ---------- summary ---------- */
.dpm-sum {
	margin-top: 14px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.dpm-lines { flex: 1 1 220px; min-width: 0; }
.dpm-l { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; color: var(--dpm-mute); font-size: 13px; }
.dpm-l b { color: var(--dpm-ink); font-weight: 700; }
.dpm-l-save b { color: var(--dpm-ok); }
.dpm-l-total { font-size: 15px; color: var(--dpm-ink); border-top: 1px dashed var(--dpm-line); margin-top: 4px; padding-top: 6px; }
.dpm-l-total b { font-size: 18px; font-weight: 800; color: var(--dpm-ac); }
.dpm-l[hidden] { display: none; }

.dpm-btn {
	appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 15px;
	background: var(--dpm-ac); color: #fff; border-radius: 14px; padding: 14px 26px; flex: 1 1 220px; max-width: 100%;
	box-shadow: 0 8px 20px color-mix(in srgb, var(--dpm-ac) 35%, transparent);
	transition: transform .15s, filter .15s, opacity .15s;
}
.dpm-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.dpm-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.dpm-btn.is-loading { pointer-events: none; opacity: .75; }
.dpm-btn.is-loading .dpm-btn-t::after { content: ' …'; }

.dpm-alert { margin-top: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.dpm-ok { margin-top: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.dpm-ok a { font-weight: 700; color: inherit; text-decoration: underline; }
.dpm-alert[hidden], .dpm-ok[hidden] { display: none; }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
	.dpm-card { padding: 14px; border-radius: 16px; }
	.dpm-gh { display: none; }
	.dpm-row { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); padding-bottom: 6px; }
	.dpm-color { grid-column: 1 / -1; padding-bottom: 4px; }
	.dpm-cell-label { display: block; }
	.dpm-msgrow { flex-direction: column; gap: 6px; }
	.dpm-chips { grid-template-columns: repeat(6, 1fr); }
	.dpm-chips b { font-size: 11px; }
	.dpm-chips small { font-size: 9px; }
	.dpm-sum { position: sticky; bottom: 0; background: #fff; padding: 10px 0 4px; border-top: 1px solid var(--dpm-line); z-index: 5; }
	.dpm-btn { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.dpm-chips li.is-next { animation: none; }
	.dpm-bar i, .dpm-btn { transition: none; }
}

.dpm-why { display:block; margin-top:4px; font-size:10px; color:#b45309; line-height:1.4; }
