/* DCL Vânzări: butoanele de sub card, previzualizarea, alegerea din card, setul, barele, cadourile, modul catalog.
   Culorile vin din tema activă (--c-*); valorile de rezervă sunt pentru o temă fără ele. */

.dcl-v-i { flex: none; width: 20px; height: 20px; }
.dcl-v-msg:empty { display: none; }
.dcl-v-msg { margin: 10px 0 0; font-size: .92rem; line-height: 1.45; color: var(--c-text, #333); }
.dcl-v-msg.is-err { color: var(--c-ink, #111); border-left: 3px solid #e5484d; padding-left: 10px; }
.dcl-v-msg.is-ok { border-left: 3px solid var(--c-accent, #0a7d72); padding-left: 10px; }
.dcl-v-msg a, .dcl-v-toast a { color: var(--c-accent-text, #0a6b62); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- rândul de sub card ---------- */
.dcl-v-cb { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* Învelișul cardului din builder e un rând flex (butoanele de liste din dcl-liste): rândul nostru trece dedesubt, pe toată lățimea. */
.dclb-pcard-w:has(> .dcl-v-cb) { flex-wrap: wrap; align-content: flex-start; }
.dclb-pcard-w > .dcl-v-cb { flex: 0 0 100%; }
.dclb-pcard-w:has(> .dcl-v-cb) > .product-card { height: auto; }
.dcl-v-cbb {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 40px; padding: 8px 12px; margin: 0;
	border: 1px solid var(--c-line, #d0d0d0); border-radius: var(--c-radius, 8px);
	background: var(--c-panel, #fff); color: var(--c-ink, #111);
	font: inherit; font-size: .88rem; font-weight: 600; line-height: 1.2; cursor: pointer;
	transition: border-color .15s, background-color .15s;
}
.dcl-v-cbb:hover { border-color: var(--c-accent, #0a7d72); }
.dcl-v-cbb:focus-visible, .dcl-v-x:focus-visible, .dcl-v-set-f input:focus-visible, .dcl-v-set-f select:focus-visible,
.dcl-v-f-q:focus-visible, .dcl-v-pv-l:focus-visible, .dcl-v-gt-b:focus-visible {
	outline: 2px solid var(--c-accent, #0a7d72); outline-offset: 2px;
}
.dcl-v-cbb[disabled] { opacity: .65; cursor: progress; }
.dcl-v-cbb.is-adaugat { border-color: var(--c-accent, #0a7d72); }
.dcl-v-qv { flex: 0 0 auto; }
.dcl-v-qs { flex: 1 1 auto; }
.dcl-v-cbb-t { white-space: nowrap; }

.dcl-v-qs-p { flex-basis: 100%; }
.dcl-v-qs-in {
	position: relative; margin-top: 4px; padding: 14px; padding-top: 44px;
	border: 1px solid var(--c-line, #d0d0d0); border-radius: var(--c-radius, 8px); background: var(--c-panel, #fff);
}
.dcl-v-qs-in .dcl-v-x { position: absolute; top: 6px; right: 6px; }
.dcl-v-qs-in .dclb-btn-lg { padding: 12px 18px; font-size: 1rem; }

.dcl-v-x {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; padding: 0; margin: 0;
	border: 1px solid var(--c-line, #d0d0d0); border-radius: 999px;
	background: var(--c-bg, #fff); color: var(--c-ink, #111); cursor: pointer;
}
.dcl-v-x:hover { border-color: var(--c-accent, #0a7d72); }

/* ---------- previzualizarea rapidă ---------- */
html.dcl-v-blocat { overflow: hidden; }
.dcl-v-dlg {
	box-sizing: border-box; width: min(960px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px);
	margin: auto; padding: 0; overflow: auto;
	border: 1px solid var(--c-line, #d0d0d0); border-radius: calc(var(--c-radius, 8px) + 4px);
	background: var(--c-bg, #fff); color: var(--c-text, #333);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.dcl-v-dlg::backdrop { background: rgba(0, 0, 0, .62); }
.dcl-v-dlg:has(.dcl-v-pv-vertical) { width: min(600px, calc(100vw - 32px)); }
.dcl-v-dlg-x { position: sticky; top: 10px; float: right; margin: 10px 10px -50px 0; z-index: 2; }
.dcl-v-dlg-l, .dcl-v-dlg-e { margin: 0; padding: 48px 24px; text-align: center; color: var(--c-muted, #555); }
.dcl-v-dlg-e { color: var(--c-ink, #111); }

.dcl-v-pv { display: grid; gap: 28px; padding: 24px; }
.dcl-v-pv-orizontal { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.dcl-v-pv-vertical { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.dcl-v-pv-m { min-width: 0; }
.dcl-v-pv-m img { display: block; width: 100%; height: auto; border-radius: var(--c-radius, 8px); }
.dcl-v-pv-i { min-width: 0; padding-right: 36px; }
.dcl-v-pv-vertical .dcl-v-pv-i { padding-right: 0; }
.dcl-v-pv-t { margin: 0 0 8px; font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.2; color: var(--c-ink, #111); }
.dcl-v-pv-p { margin: 0 0 12px; font-size: 1.25rem; font-weight: 700; color: var(--c-ink, #111); }
.dcl-v-pv-p del { font-size: 1rem; font-weight: 400; color: var(--c-muted, #555); }
.dcl-v-pv-p ins { text-decoration: none; }
.dcl-v-pv-r { margin: 0 0 14px; line-height: 1.6; }
.dcl-v-pv-r > :last-child { margin-bottom: 0; }
.dcl-v-pv-i .stock { margin: 0 0 14px; font-size: .92rem; }
.dcl-v-pv-f { margin: 0 0 6px; }
.dcl-v-pv-l { display: inline-block; margin-top: 16px; color: var(--c-accent-text, #0a6b62); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Formularul simplu (cantitate + butoane), din previzualizare și de sub card. */
.dcl-v-f-c { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.dcl-v-f-q {
	box-sizing: border-box; width: 84px; min-height: 48px; padding: 8px 10px;
	border: 1px solid var(--c-line, #d0d0d0); border-radius: var(--c-radius, 8px);
	background: var(--c-panel, #fff); color: var(--c-ink, #111); font: inherit; text-align: center;
}
.dcl-v-f-x { margin: 0; color: var(--c-muted, #555); }
.dcl-v-f-c .dclb-btn, .dcl-v-pv-f .dclb-btn { flex: 1 1 auto; text-align: center; }

/* „Cumpără acum”: același gabarit ca butonul de coș, dar contur, ca să nu concureze cu el. */
.dclb-btn.dcl-v-acum, .dcl-v-acum {
	display: inline-flex; align-items: center; justify-content: center; text-align: center;
	background: transparent; color: var(--c-ink, #111);
	border: 2px solid var(--c-ink, #111); border-radius: var(--c-radius, 8px);
	font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.dclb-btn.dcl-v-acum:hover, .dcl-v-acum:hover { border-color: var(--c-accent, #0a7d72); color: var(--c-ink, #111); }
.dcl-v-acum:focus-visible { outline: 2px solid var(--c-accent, #0a7d72); outline-offset: 2px; }
.dclb-buy .dcl-v-acum { margin-top: 10px; width: 100%; box-sizing: border-box; }
.dcl-pm-vf .dcl-v-acum { margin-top: 10px; width: 100%; box-sizing: border-box; padding: 14px 24px; }
.dcl-v-f-c .dcl-v-acum { flex: 1 1 100%; padding: 12px 18px; }

/* Mesajul de după adăugarea din card. */
.dcl-v-toast {
	position: fixed; left: 50%; bottom: 20px; z-index: 99990;
	box-sizing: border-box; width: max-content; max-width: calc(100vw - 32px); padding: 12px 16px;
	border: 1px solid var(--c-accent, #0a7d72); border-radius: var(--c-radius, 8px);
	background: var(--c-panel, #fff); color: var(--c-ink, #111); box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
	transform: translate(-50%, 140%); opacity: 0; transition: transform .2s, opacity .2s;
}
.dcl-v-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.dcl-v-toast.is-err { border-color: #e5484d; }

/* ---------- cumpărate des împreună ---------- */
.dcl-v-set {
	margin: 0 0 32px; padding: 20px;
	border: 1px solid var(--c-line, #d0d0d0); border-radius: var(--c-radius, 8px); background: var(--c-panel, #fff);
}
.dcl-v-set-t { margin: 0 0 14px; font-size: 1.25rem; line-height: 1.25; color: var(--c-ink, #111); }
.dcl-v-set-l { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.dcl-v-set-r { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; transition: opacity .15s; }
.dcl-v-set-r.is-off { opacity: .6; }
.dcl-v-set-i img { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: calc(var(--c-radius, 8px) - 2px); }
.dcl-v-set-c { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.dcl-v-set-c input[type="checkbox"] { width: 20px; height: 20px; margin: 0; accent-color: var(--c-accent, #0a7d72); }
.dcl-v-set-n { flex: 1 1 200px; min-width: 0; color: var(--c-ink, #111); line-height: 1.35; }
.dcl-v-set-n a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.dcl-v-set-tag {
	display: inline-block; padding: 2px 8px; margin-right: 4px; border-radius: 999px;
	background: var(--c-soft, #f0f0f0); color: var(--c-ink, #111); font-size: .75rem; font-weight: 700;
}
.dcl-v-set-v {
	min-height: 36px; padding: 4px 8px; border: 1px solid var(--c-line, #d0d0d0); border-radius: calc(var(--c-radius, 8px) - 2px);
	background: var(--c-bg, #fff); color: var(--c-ink, #111); font: inherit; font-size: .9rem;
}
.dcl-v-set-p { margin-left: auto; white-space: nowrap; color: var(--c-ink, #111); font-weight: 600; }
.dcl-v-set-p del { color: var(--c-muted, #555); font-weight: 400; }
.dcl-v-set-p ins { text-decoration: none; }
.dcl-v-set-red { display: block; text-align: right; color: var(--c-accent-text, #0a6b62); font-weight: 600; }
.dcl-v-set-s { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--c-line, #d0d0d0); }
.dcl-v-set-tot { margin: 0; color: var(--c-text, #333); }
.dcl-v-set-tot-v { color: var(--c-ink, #111); font-size: 1.2rem; }
.dcl-v-set-tot-o { color: var(--c-muted, #555); }
.dcl-v-set-b.dclb-btn-lg { padding: 12px 22px; font-size: 1rem; }

/* ---------- bara de livrare și bara de stoc ---------- */
.dcl-v-livrare, .dcl-v-stoc { margin: 14px 0; }
.dcl-v-livrare[hidden] { display: none; }
.dcl-v-bar-t { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 8px; font-size: .95rem; line-height: 1.45; color: var(--c-text, #333); }
.dcl-v-bar-t strong, .dcl-v-bar-t .amount { color: var(--c-ink, #111); }
.dcl-v-bar { position: relative; height: 8px; border-radius: 999px; background: var(--c-soft, #eee); overflow: hidden; box-shadow: inset 0 0 0 1px var(--c-line, #ddd); }
.dcl-v-bar-f { display: block; height: 100%; border-radius: inherit; background: var(--c-accent, #0a7d72); transition: width .4s ease; }
.dcl-v-livrare.is-gata .dcl-v-bar-t { color: var(--c-ink, #111); font-weight: 600; }
.dcl-v-stoc .dcl-v-bar-f { background: #f0a43a; }

.dcl-v-cos { margin: 0 0 20px; }
.dcl-v-cos:empty { display: none; }
.dcl-v-cos .dcl-v-livrare { margin-top: 0; padding: 14px 16px; border: 1px solid var(--c-line, #d0d0d0); border-radius: var(--c-radius, 8px); background: var(--c-panel, #fff); }

/* ---------- reduceri ---------- */
.dcl-v-red { margin: 16px 0; }
.dcl-v-red-t { width: 100%; border-collapse: collapse; font-size: .92rem; }
.dcl-v-red-t caption { text-align: left; font-weight: 700; margin-bottom: 8px; color: var(--c-ink, #111); }
.dcl-v-red-t th, .dcl-v-red-t td { padding: 8px 10px; border: 1px solid var(--c-line, #d0d0d0); text-align: left; }
.dcl-v-red-t thead th { background: var(--c-soft, #f4f4f4); color: var(--c-ink, #111); }
.dcl-v-red-n { margin: 6px 0 0; font-size: .85rem; color: var(--c-muted, #555); }
.dcl-v-pc del { color: var(--c-muted, #555); }
.dcl-v-pc ins { text-decoration: none; font-weight: 600; }

/* ---------- cadouri ---------- */
.dcl-v-cms { display: grid; gap: 8px; margin: 0 0 16px; }
.dcl-v-cm {
	display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px;
	border: 1px dashed var(--c-accent, #0a7d72); border-radius: var(--c-radius, 8px); color: var(--c-text, #333);
}
.dcl-v-cm .dcl-v-i { color: var(--c-accent-text, #0a6b62); }
.dcl-v-gts { margin: 16px 0; }
.dcl-v-gt { width: 100%; border-collapse: collapse; }
.dcl-v-gt caption { display: flex; align-items: center; gap: 8px; text-align: left; font-weight: 700; padding-bottom: 8px; color: var(--c-ink, #111); }
.dcl-v-gt th, .dcl-v-gt td { padding: 10px; border-bottom: 1px solid var(--c-line, #d0d0d0); text-align: left; vertical-align: middle; }
.dcl-v-gt-i img { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: calc(var(--c-radius, 8px) - 2px); }
.dcl-v-gt del { color: var(--c-muted, #555); }
.dcl-v-gr { color: var(--c-accent-text, #0a6b62); font-weight: 700; }
.dcl-v-gt-b.dclb-btn { padding: 8px 16px; font-size: .9rem; }
.dcl-v-gt-ok { font-weight: 700; color: var(--c-ink, #111); }

/* ---------- modul catalog ---------- */
.dcl-v-cat { margin: 12px 0; padding: 14px 16px; border: 1px solid var(--c-line, #d0d0d0); border-radius: var(--c-radius, 8px); background: var(--c-panel, #fff); }
.dcl-v-cat-m { margin: 0; color: var(--c-text, #333); line-height: 1.5; }
.dcl-v-cat-b { margin-top: 12px; }

/* ---------- telefon ---------- */
@media (max-width: 767px) {
	.dcl-v-pv-orizontal { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.dcl-v-pv { padding: 16px; }
	.dcl-v-pv-i { padding-right: 0; }
	.dcl-v-dlg { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
	.dcl-v-cbb-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.dcl-v-qv { padding: 8px; min-width: 40px; }
	/* Pe cardul îngust (două pe rând), „Adaugă în coș” rămâne cu textul întreg, fără icon, iar „Vezi rapid” (doar iconul) stă alături. */
	.dcl-v-cb { gap: 6px; }
	.dcl-v-qs { flex: 1 1 0; min-width: 0; padding: 8px 6px; font-size: .84rem; }
	.dcl-v-qs > .dcl-v-i { display: none; }
	.dcl-v-qs > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.dcl-v-set { padding: 14px; }
	.dcl-v-set-r { grid-template-columns: 48px minmax(0, 1fr); }
	.dcl-v-set-i img { width: 48px; height: 48px; }
	.dcl-v-set-p { margin-left: 0; }
	.dcl-v-set-b { width: 100%; }
	.dcl-v-gt-i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.dcl-v-cbb, .dcl-v-bar-f, .dcl-v-toast, .dcl-v-set-r { transition: none; }
}
