/* Димотика — избор на цвят */
.dcp-panel, .dcp-modal { --dcp-accent: #3b7d0a; --dcp-accent-dark: #2f6605; --dcp-band: #f1f8e9; --dcp-text: #1f2933; --dcp-muted: #6b7280; --dcp-line: #e3e7ec; --dcp-red: #b91c1c; }
.dcp-panel { margin: 14px 0 12px; color: var(--dcp-text); font-size: 15px; }
.dcp-panel[hidden] { display: none !important; }
.dcp-panel--bundle { margin: 8px 0 4px; font-size: 14px; }
.dcp-panel *, .dcp-modal * { box-sizing: border-box; }
.dcp-active .woocommerce-variation-price { display: none !important; }
.dcp-panel__hint { margin: 8px 0 0; padding: 12px 14px; background: #fff7e6; border: 1px solid #f3d19c; border-radius: 10px; color: #7a4b00; }
.dcp-test-badge { margin: 6px 0 10px; padding: 6px 10px; border-radius: 8px; background: #fff4d6; color: #7a5a00; font-size: 13px; }

.dcp-open-button { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; width: 100%; padding: 12px 16px; border: 2px solid var(--dcp-accent); border-radius: 12px; background: var(--dcp-band); color: var(--dcp-accent-dark); text-align: left; cursor: pointer; transition: background .15s, box-shadow .15s; }
.dcp-open-button:hover, .dcp-open-button:focus-visible { background: #e6f4d7; box-shadow: 0 6px 18px -8px rgba(47,102,5,.55); outline: none; }
.dcp-open-button__dots { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(#e53935, #fbc02d, #43a047, #1e88e5, #8e24aa, #e53935); box-shadow: inset 0 0 0 3px #fff; }
.dcp-open-button__text { font-size: 17px; font-weight: 800; line-height: 1.2; }
.dcp-open-button__sub { font-size: 13px; color: var(--dcp-muted); }

.dcp-chosen { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--dcp-line); border-radius: 12px; background: #fff; }
.dcp-chosen__swatch { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 10px; border: 1px solid rgba(0,0,0,.12); }
.dcp-chosen__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.dcp-chosen__code { font-size: 17px; line-height: 1.25; word-break: break-word; }
.dcp-chosen__meta { font-size: 13px; color: var(--dcp-muted); }
.dcp-chosen__change { flex: 0 0 auto; padding: 8px 14px; border: 1.5px solid var(--dcp-accent); border-radius: 999px; background: #fff; color: var(--dcp-accent-dark); font-weight: 700; cursor: pointer; }
.dcp-chosen__change:hover { background: var(--dcp-band); }
.dcp-chosen__actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; }
.dcp-chosen__clear { padding: 6px 14px; border: 1.5px solid #d1d5db; border-radius: 999px; background: #fff; color: #6b7280; font-weight: 600; cursor: pointer; }
.dcp-chosen__clear:hover { border-color: var(--dcp-red); color: var(--dcp-red); background: #fdecec; }

.dcp-price { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--dcp-band); }
.dcp-price.is-unavailable { background: #fdecec; color: var(--dcp-red); }
.dcp-price__row { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; font-size: 14.5px; }
.dcp-price__row span:last-child { white-space: nowrap; font-weight: 600; }
.dcp-price__total { margin-top: 4px; padding-top: 6px; border-top: 1px dashed rgba(47,102,5,.35); font-size: 17px; font-weight: 800; color: var(--dcp-accent-dark); }
.dcp-price__title { font-weight: 700; margin-bottom: 4px; }
.dcp-price__sizes { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14.5px; font-weight: 600; color: var(--dcp-accent-dark); }
.dcp-price__size.is-unavailable { color: var(--dcp-muted); font-weight: 400; text-decoration: line-through; }
.dcp-price__hint { margin-top: 4px; font-size: 13px; color: var(--dcp-muted); }
.dcp-price__cover { margin-top: 4px; font-size: 13px; color: var(--dcp-accent-dark); }

.dcp-shake { animation: dcp-shake .4s; }
@keyframes dcp-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- прозорец ---------- */
html.dcp-lock, html.dcp-lock body { overflow: hidden !important; }
.dcp-modal { position: fixed; inset: 0; z-index: 999999; display: none; color: var(--dcp-text); font-size: 15px; }
.dcp-modal.is-open { display: block; }
.dcp-modal__backdrop { position: absolute; inset: 0; background: rgba(17,24,39,.55); }
.dcp-modal__dialog { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(980px, calc(100vw - 32px)); height: min(820px, calc(100vh - 32px)); display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px -12px rgba(0,0,0,.45); overflow: hidden; animation: dcp-pop .18s ease-out; }
@keyframes dcp-pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
.dcp-modal__head, .dcp-modal__tabs, .dcp-modal__tools, .dcp-modal__count, .dcp-modal__note { flex-shrink: 0; }
.dcp-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 8px; }
.dcp-modal__title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.2; }
.dcp-modal__close { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #f1f3f6; color: #374151; font-size: 26px; line-height: 1; cursor: pointer; }
.dcp-modal__close:hover { background: #e5e8ed; }
.dcp-modal__tabs { display: flex; gap: 6px; padding: 4px 18px 2px; overflow-x: auto; scrollbar-width: none; }
.dcp-modal__tabs::-webkit-scrollbar { display: none; }
.dcp-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1.5px solid var(--dcp-line); border-radius: 999px; background: #fff; color: var(--dcp-text); font-weight: 700; font-size: 14px; cursor: pointer; }
.dcp-tab small { font-weight: 600; color: var(--dcp-muted); font-size: 12px; }
.dcp-tab.is-active { border-color: var(--dcp-accent); background: var(--dcp-accent); color: #fff; }
.dcp-tab.is-active small { color: rgba(255,255,255,.85); }
.dcp-modal__tools { display: flex; gap: 8px; padding: 10px 18px 4px; }
.dcp-modal__search { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 14px; border: 1.5px solid var(--dcp-line); border-radius: 10px; font-size: 16px; background: #fff; color: var(--dcp-text); }
.dcp-modal__search:focus { border-color: var(--dcp-accent); outline: none; box-shadow: 0 0 0 3px rgba(59,125,10,.15); }
.dcp-modal__sort { flex: 0 0 auto; height: 44px; padding: 0 14px; border: 1.5px solid var(--dcp-line); border-radius: 10px; background: #fff; color: var(--dcp-text); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.dcp-modal__count { padding: 2px 18px 6px; font-size: 12.5px; color: var(--dcp-muted); }
.dcp-modal__grid { flex: 1 1 0; min-height: 0; overflow-y: auto; grid-auto-rows: max-content; -webkit-overflow-scrolling: touch; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; align-content: start; padding: 4px 18px 16px; }
.dcp-sw { display: flex; flex-direction: column; padding: 0; border: 1.5px solid var(--dcp-line); border-radius: 10px; background: #fff; overflow: hidden; text-align: left; cursor: pointer; transition: transform .1s, box-shadow .1s, border-color .1s; color: var(--dcp-text); }
.dcp-sw:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -8px rgba(0,0,0,.35); }
.dcp-sw.is-picked { border-color: var(--dcp-accent); box-shadow: 0 0 0 3px rgba(59,125,10,.35); }
.dcp-sw.is-unavailable { opacity: .45; }
.dcp-sw.is-unavailable.is-picked { opacity: 1; }
.dcp-sw__note { display: block; padding: 1px 8px 7px; font-size: 11px; color: var(--dcp-muted); }
.dcp-foot__sizes { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; }
.dcp-sw__color { display: block; flex: 0 0 auto; height: 62px; border-bottom: 1px solid rgba(0,0,0,.06); }
.dcp-sw__code { display: block; padding: 6px 8px 0; font-size: 12.5px; font-weight: 700; line-height: 1.25; word-break: break-word; }
.dcp-sw__price { display: block; padding: 1px 8px 7px; font-size: 12px; color: var(--dcp-accent-dark); font-weight: 600; }
.dcp-sw__code:last-child { padding-bottom: 7px; }
.dcp-modal__foot { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--dcp-line); background: #fafbfc; }
.dcp-foot__empty { margin: 0; color: var(--dcp-muted); }
.dcp-foot__swatch { flex: 0 0 auto; width: 76px; height: 76px; border-radius: 12px; border: 1px solid rgba(0,0,0,.12); }
.dcp-foot__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.dcp-foot__code { font-size: 18px; line-height: 1.2; }
.dcp-foot__meta { font-size: 13px; color: var(--dcp-muted); }
.dcp-foot__info .dcp-price { margin-top: 6px; padding: 6px 10px; }
.dcp-foot__accept { flex: 0 0 auto; padding: 12px 20px; border: 0; border-radius: 10px; background: var(--dcp-accent); color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; }
.dcp-foot__accept:hover { background: var(--dcp-accent-dark); }
.dcp-modal__note { margin: 0; padding: 6px 18px 10px; font-size: 12px; color: var(--dcp-muted); background: #fafbfc; }

/* таблет */
@media (max-width: 900px) {
	.dcp-modal__grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
}

/* телефон: на цял екран, изборът е лепнат отдолу */
@media (max-width: 640px) {
	.dcp-modal__dialog { left: 0; top: 0; transform: none; width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; animation: dcp-slide .2s ease-out; }
	@keyframes dcp-slide { from { opacity: 0; transform: translateY(24px); } }
	.dcp-modal__head { padding: 10px 12px 6px; }
	.dcp-modal__title { font-size: 18px; }
	.dcp-modal__tabs, .dcp-modal__tools, .dcp-modal__count { padding-left: 12px; padding-right: 12px; }
	.dcp-modal__sort { padding: 0 10px; font-size: 12.5px; }
	.dcp-modal__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 4px 12px 12px; }
	.dcp-sw__color { height: 54px; }
	.dcp-sw__code { font-size: 12px; }
	.dcp-modal__foot { flex-wrap: wrap; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
	.dcp-modal__foot { align-items: flex-start; }
	.dcp-foot__swatch { width: 52px; height: 52px; }
	.dcp-foot__code { font-size: 16px; }
	.dcp-modal__foot .dcp-price { margin-top: 4px; padding: 5px 9px; }
	.dcp-modal__foot .dcp-price__row { font-size: 13px; padding: 0; }
	.dcp-modal__foot .dcp-price__total { margin-top: 2px; padding-top: 3px; font-size: 15px; }
	.dcp-foot__info { flex-basis: calc(100% - 70px); }
	.dcp-foot__accept { flex: 1 1 100%; padding: 12px; font-size: 16px; }
	.dcp-foot__sizes { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; }
	.dcp-foot__sizes .dcp-foot__accept { flex: 1 1 40%; }
	.dcp-modal__note { display: none; }
	.dcp-chosen__swatch { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .dcp-modal__dialog, .dcp-shake { animation: none; } }
