/* Coș, checkout, succes și toast. Variabilele --vx-* sunt definite în vx.css (generator); aici nu se redefinește :root. Toate clasele au prefixul cos-. */

.cos-page { max-width: none; margin: 0; padding: 6px 0 24px; color: var(--vx-ink); font-family: var(--vx-font); line-height: 1.5; }
.cos-page *, .cos-page *::before, .cos-page *::after { box-sizing: border-box; }
.cos-root [hidden], .cos-page [hidden] { display: none !important; }
.cos-h1 { font-family: var(--vx-serif); font-size: 1.7rem; line-height: 1.2; margin: 6px 0 18px; color: var(--vx-plum); }
.cos-h2 { font-family: var(--vx-serif); font-size: 1.25rem; margin: 0 0 12px; color: var(--vx-plum); }
.cos-h3 { font-family: var(--vx-serif); font-size: 1.1rem; margin: 0 0 10px; color: var(--vx-plum); }
.cos-loading, .cos-muted { color: var(--vx-muted); }
.cos-small { font-size: .85rem; color: var(--vx-muted); margin: 10px 0 16px; }
.cos-link { display: inline-block; margin-top: 12px; color: var(--vx-plum); text-decoration: underline; }
.cos-link:hover { color: var(--vx-magenta); }
.cos-free { color: var(--vx-ok); font-weight: 700; }
.cos-ok { color: var(--vx-ok); font-weight: 700; }

/* butoane */
.cos-btn { display: inline-block; border: 2px solid var(--vx-plum); background: var(--vx-plum); color: #fff; font: inherit; font-weight: 700; padding: 12px 22px; border-radius: var(--vx-radius); cursor: pointer; text-align: center; text-decoration: none; min-height: 46px; line-height: 1.3; }
.cos-btn:hover { background: var(--vx-magenta); border-color: var(--vx-magenta); color: #fff; }
.cos-btn:focus-visible, .cos-link-btn:focus-visible, .cos-qty button:focus-visible, .cos-qty input:focus-visible { outline: 2px solid var(--vx-ink); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
.cos-btn-outline { background: #fff; color: var(--vx-plum); }
.cos-btn-outline:hover { background: var(--vx-blush); color: var(--vx-plum); border-color: var(--vx-plum); }
.cos-btn-block { display: block; width: 100%; margin-top: 14px; }
.cos-btn[disabled], .cos-btn.is-disabled { opacity: .5; cursor: not-allowed; background: var(--vx-muted); border-color: var(--vx-muted); pointer-events: none; }
.cos-link-btn { background: none; border: 0; padding: 10px 6px; min-height: 44px; min-width: 44px; font: inherit; font-size: .85rem; color: var(--vx-muted); text-decoration: underline; cursor: pointer; }
.cos-link-btn:hover { color: var(--vx-err); }

/* mesaje */
.cos-notice { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--vx-radius); background: var(--vx-blush); border: 1px solid var(--vx-line); }
.cos-notice-warn { border-color: var(--vx-rose); }
.cos-nudge { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--vx-blush); font-size: .92rem; }
.cos-nudge.is-ok { background: #e6f3ea; color: var(--vx-ok); font-weight: 600; }
.cos-err { margin: 6px 0 0; font-size: .86rem; color: var(--vx-err); font-weight: 600; }
.cos-err-form { padding: 10px 12px; border: 1px solid var(--vx-err); border-radius: 10px; background: #fdecea; margin: 12px 0 0; }
.cos-empty { text-align: center; padding: 36px 12px; border: 1px dashed var(--vx-line); border-radius: var(--vx-radius); background: var(--vx-paper); }
.cos-empty p { margin: 0 0 16px; font-size: 1.05rem; }
.cos-test-banner { margin: 0 0 18px; padding: 16px; text-align: center; font-size: 1.1rem; background: #fff3cd; border: 3px solid #e0a800; border-radius: var(--vx-radius); color: #5c4400; }

/* aranjare */
.cos-layout { display: block; }
.cos-main { min-width: 0; }
.cos-side, .cos-sum { margin-top: 20px; padding: 16px; border: 1px solid var(--vx-line); border-radius: var(--vx-radius); background: var(--vx-paper); }
@media (min-width: 860px) {
	.cos-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
	.cos-side, .cos-sum { margin-top: 0; position: sticky; top: 16px; }
}

/* linii de coș */
.cos-lines { list-style: none; margin: 0; padding: 0; }
.cos-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--vx-line); }
.cos-thumb { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--vx-blush); border: 1px solid var(--vx-line); }
.cos-thumb-s { width: 48px; height: 48px; flex: 0 0 48px; }
.cos-line-name { font-weight: 600; word-break: break-word; }
.cos-line-name a { color: var(--vx-ink); text-decoration: none; }
.cos-line-name a:hover { color: var(--vx-magenta); text-decoration: underline; }
.cos-line-unit { font-size: .85rem; color: var(--vx-muted); margin: 2px 0 8px; }
.cos-line-side { text-align: right; }
.cos-line-total { font-weight: 700; color: var(--vx-plum); white-space: nowrap; }
.cos-qty { display: inline-flex; align-items: stretch; border: 1px solid var(--vx-line); border-radius: 10px; overflow: hidden; background: #fff; }
.cos-qty button { width: 44px; min-height: 44px; border: 0; background: var(--vx-blush); color: var(--vx-plum); font-size: 1.2rem; cursor: pointer; }
.cos-qty button:hover { background: var(--vx-rose); }
.cos-qty input { width: 48px; border: 0; text-align: center; font: inherit; -moz-appearance: textfield; appearance: textfield; padding: 0; min-height: 44px; }
.cos-qty button:focus-visible, .cos-qty input:focus-visible { outline-offset: -2px; box-shadow: inset 0 0 0 2px #fff; }
.cos-qty input::-webkit-outer-spin-button, .cos-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* sumar */
.cos-sum-list { list-style: none; margin: 0 0 8px; padding: 0; max-height: 260px; overflow: auto; }
.cos-sum-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--vx-line); font-size: .92rem; }
.cos-sum-name { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.cos-sum-name small { color: var(--vx-muted); }
.cos-sum-price { white-space: nowrap; font-weight: 600; }
.cos-totals { margin: 8px 0 0; }
.cos-totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.cos-totals dt { margin: 0; }
.cos-totals dd { margin: 0; text-align: right; font-weight: 600; }
.cos-totals .is-total { border-top: 2px solid var(--vx-line); margin-top: 6px; padding-top: 10px; font-size: 1.15rem; color: var(--vx-plum); }
.cos-totals .is-disc dd { color: var(--vx-ok); }

/* formular */
.cos-form { margin: 0; }
.cos-box { margin: 0 0 18px; padding: 14px 14px 6px; border: 1px solid var(--vx-line); border-radius: var(--vx-radius); background: #fff; min-width: 0; }
.cos-box legend { padding: 0 8px; font-family: var(--vx-serif); font-weight: 700; color: var(--vx-plum); font-size: 1.05rem; }
.cos-field { margin: 0 0 14px; }
.cos-field label { display: block; margin: 0 0 5px; font-weight: 600; font-size: .94rem; }
.cos-opt, .cos-req { font-weight: 400; color: var(--vx-muted); font-size: .85rem; }
.cos-req { color: var(--vx-err); }
.cos-field input[type="text"], .cos-field input[type="tel"], .cos-field input[type="email"], .cos-field select {
	display: block; width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--vx-ink);
	background: #fff; border: 1px solid var(--vx-line); border-radius: 10px; -webkit-appearance: none; appearance: none;
}
.cos-field select { background-image: linear-gradient(45deg, transparent 50%, var(--vx-plum) 50%), linear-gradient(135deg, var(--vx-plum) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.cos-field input:focus, .cos-field select:focus { outline: 2px solid var(--vx-ink); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; border-color: var(--vx-magenta); }
.cos-field.has-err input, .cos-field.has-err select, .cos-locker.has-err { border-color: var(--vx-err); }
.cos-inline { display: flex; gap: 8px; }
.cos-inline input { flex: 1 1 auto; min-width: 0; }
.cos-inline .cos-btn { flex: 0 0 auto; padding: 10px 16px; }
.cos-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.cos-check input { flex: 0 0 22px; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--vx-plum); }
.cos-terms { padding: 0 2px; }

/* curieri */
.cos-carriers { margin: 0 0 12px; }
.cos-radio { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 12px; border: 1px solid var(--vx-line); border-radius: 12px; cursor: pointer; background: #fff; }
.cos-radio:hover { border-color: var(--vx-rose); }
.cos-radio input { flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--vx-plum); }
.cos-radio:has(input:checked) { border-color: var(--vx-plum); background: var(--vx-blush); }
.cos-radio-body { flex: 1 1 auto; min-width: 0; display: block; }
.cos-radio-body small { display: block; color: var(--vx-muted); font-size: .83rem; font-weight: 400; }
.cos-radio-price { flex: 0 0 auto; font-weight: 700; color: var(--vx-plum); white-space: nowrap; }
.cos-radio.is-static { cursor: default; margin-bottom: 12px; }
.cos-pay { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; }
.cos-pay small { display: block; color: var(--vx-muted); font-size: .83rem; font-weight: 400; }
.cos-pay-ok { flex: 0 0 auto; color: var(--vx-ok); font-weight: 700; font-size: 1.2rem; line-height: 1.3; }
.cos-locker { margin: 0 0 14px; padding: 12px; border: 1px dashed var(--vx-rose); border-radius: 12px; background: var(--vx-paper); }
.cos-locker-card { margin: 10px 0 0; font-size: .92rem; }

/* capcana pentru boti: scoasa din ecran, nu display:none */
.cos-hp { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px; height: 1px; overflow: hidden; }

/* succes */
.cos-thanks { position: relative; overflow: hidden; margin: 0 0 18px; padding: 26px 18px 18px; border: 1px solid var(--vx-line); border-radius: var(--vx-radius); background: var(--vx-blush); text-align: center; }
.cos-thanks p { margin: 0 0 8px; }
.cos-thanks .cos-h2 { font-style: italic; font-size: 1.45rem; margin: 0 0 10px; }
.cos-ref { font-size: 1.1em; color: var(--vx-plum); word-break: break-all; }
.cos-tick { position: relative; width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%; background: var(--vx-plum); box-shadow: 0 0 0 8px var(--vx-blush), 0 0 0 9px var(--vx-rose); }
.cos-tick svg { position: absolute; left: 19px; top: 19px; width: 38px; height: 38px; }
.cos-petals { position: absolute; left: 0; right: 0; top: 0; height: 0; pointer-events: none; z-index: 2; }
.cos-petals i { position: absolute; top: 30px; width: 12px; height: 16px; border-radius: 60% 0 60% 0; background: var(--vx-rose); opacity: 0; }
.cos-petals i:nth-child(3n) { background: var(--vx-magenta); }
.cos-tl { list-style: none; margin: 18px auto 4px; padding: 0; max-width: 420px; text-align: left; }
.cos-tl li { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 0 12px; padding-bottom: 16px; }
.cos-tl li::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--vx-line); }
.cos-tl li:last-child { padding-bottom: 0; }
.cos-tl li:last-child::before { display: none; }
.cos-dot { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid var(--vx-rose); display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 700; color: var(--vx-plum); }
.cos-tl .is-done .cos-dot { background: var(--vx-plum); border-color: var(--vx-plum); color: #fff; }
.cos-tl b { display: block; color: var(--vx-plum); }
.cos-tl span.cos-dot + div span { display: block; color: var(--vx-muted); font-size: .92rem; }
.cos-recs { margin-top: 28px; }
.cos-recs .vx-card { text-align: left; }
.cos-root .cos-box + .cos-small { margin-top: 0; }

/* toast */
.cos-toast { position: fixed; left: 12px; right: 12px; bottom: 20px; z-index: 9999; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--vx-radius); background: var(--vx-deep); color: #fff; font: 600 .95rem/1.4 var(--vx-font); box-shadow: 0 6px 24px rgba(42, 20, 32, .35); transform: translateY(140%); opacity: 0; transition: transform .35s cubic-bezier(.2, .9, .2, 1), opacity .2s; pointer-events: none; }
.cos-toast.is-on { transform: none; opacity: 1; pointer-events: auto; }
.cos-toast-img { flex: none; width: 44px; height: 44px; border-radius: 8px; background: #fff; object-fit: contain; }
.cos-toast-t { flex: 1 1 auto; min-width: 0; }
.cos-toast-t b { display: block; font-size: .9rem; }
.cos-toast-t span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; font-size: .85rem; opacity: .9; }
.cos-toast a.cos-toast-a, .cos-toast-a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: rgba(255, 255, 255, .16); color: #fff; font: 700 .85rem var(--vx-font); text-decoration: none; white-space: nowrap; cursor: pointer; }
.cos-toast a.cos-toast-a:hover, .cos-toast-a:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.cos-toast :focus-visible { outline-color: #fff; box-shadow: none; }
@media (min-width: 760px) { .cos-toast { left: auto; right: 20px; width: 420px; } }
@media (max-width: 819px) { .vx-product .cos-toast { bottom: 84px; } }

/* coș: bară de progres spre transport gratuit, coș gol */
.cos-ship { margin: 0 0 12px; padding: 10px 14px; background: #fff; border: 1px solid var(--vx-line); border-radius: var(--vx-radius); font-size: .92rem; }
.cos-bar { height: 8px; border-radius: 4px; background: var(--vx-blush); margin-top: 8px; overflow: hidden; }
.cos-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--vx-rose), var(--vx-magenta)); transition: width .5s cubic-bezier(.2, .9, .2, 1); }
.cos-ship.is-full { border-color: var(--vx-ok); color: var(--vx-ok); font-weight: 600; }
.cos-ship.is-full .cos-bar i { background: var(--vx-ok); }
.cos-empty-warm { max-width: 460px; margin: 10px auto; padding: 34px 14px; }
.cos-bag { display: block; width: 120px; height: 120px; margin: 0 auto 6px; }
.cos-empty-warm .cos-h2 { font-style: italic; margin: .3em 0; }
.cos-chips { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cos-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--vx-plum); border-radius: 22px; background: rgba(255, 255, 255, .6); color: var(--vx-plum); font-weight: 600; font-size: .9rem; text-decoration: none; }
.cos-chips a:hover { background: var(--vx-blush); }

/* finalizare: rezumat pliabil sus, doar pe telefon / tabletă (sub 860px; mai sus rămâne coloana din dreapta) */
.cos-topsum { margin: 0 0 14px; }
.cos-topsum-hd { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; background: #fff; border: 1px solid var(--vx-rose); border-radius: var(--vx-radius); color: var(--vx-plum); font: 700 1rem var(--vx-font); text-align: left; cursor: pointer; }
.cos-topsum-hd svg { flex: none; transition: transform .25s; }
.cos-topsum.is-open .cos-topsum-hd svg { transform: rotate(180deg); }
.cos-topsum-bd { margin-top: 8px; padding: 6px 14px 10px; background: #fff; border: 1px solid var(--vx-line); border-radius: var(--vx-radius); }
@media (min-width: 860px) { .cos-topsum { display: none; } }

@media (max-width: 480px) {
	.cos-h1 { font-size: 1.45rem; }
	.cos-line { grid-template-columns: 60px minmax(0, 1fr); }
	.cos-thumb { width: 60px; height: 60px; }
	.cos-line-side { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
	.cos-box { padding: 12px 12px 4px; }
}
/* mișcare doar fără „reducere mișcare”: bifa se desenează, petalele cad o singură dată; altfel starea finală, statică */
@media (prefers-reduced-motion: no-preference) {
	.cos-tick { animation: cos-tickin .6s cubic-bezier(.2, 1.5, .4, 1) both; }
	.cos-tick path { stroke-dasharray: 30; animation: cos-draw .6s .3s ease-out both; }
	.cos-petals i { animation: cos-fall 2.4s cubic-bezier(.2, .6, .3, 1) forwards; }
	@keyframes cos-tickin { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
	@keyframes cos-draw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
	@keyframes cos-fall { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 15% { opacity: .95; } 100% { opacity: 0; transform: translate(var(--dx), 260px) rotate(var(--r)); } }
}
@media (prefers-reduced-motion: reduce) {
	.cos-toast, .cos-bar i, .cos-topsum-hd svg { transition: none; }
	.cos-tick, .cos-tick path, .cos-petals i { animation: none; }
}
