/* ===== TrueFarma side cart (drawer) ===== */
html.tf-dw-lock { overflow: hidden; }

.tf-dw-overlay { position: fixed; inset: 0; z-index: 2147483000; background: rgba(10, 14, 22, .62); }
.tf-dw-overlay[hidden] { display: none; }

.tf-dw {
	--dw-cyan: #12c5ee;
	--dw-blue: #1a8fd1;
	--dw-green: #16c35b;
	--dw-ink: #111827;
	--dw-mute: #6b7280;
	--dw-line: #e3e8ee;
	position: fixed; top: 0; right: 0; z-index: 2147483001;
	display: flex; flex-direction: column;
	width: 420px; max-width: 100vw; height: 100vh; height: 100dvh;
	background: #fff; color: var(--dw-ink);
	font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.4;
	box-shadow: -10px 0 40px rgba(0, 0, 0, .25);
	transform: translateX(105%); transition: transform .28s ease;
}
.tf-dw *, .tf-dw *::before, .tf-dw *::after { box-sizing: border-box; }
.tf-dw.is-open { transform: translateX(0); }
.tf-dw svg { width: 18px; height: 18px; flex: none; }
/* Loading: keep the items readable, only dim the totals + show a thin progress bar */
.tf-dw.is-loading .tf-dw-row, .tf-dw.is-loading .tf-dw-free-note { opacity: .5; transition: opacity .15s; }
.tf-dw::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 5; background: linear-gradient(90deg, transparent, #12c5ee, transparent); background-size: 50% 100%; background-repeat: no-repeat; opacity: 0; pointer-events: none; }
.tf-dw.is-loading::before { opacity: 1; animation: tf-dw-bar 1s linear infinite; }
@keyframes tf-dw-bar { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.tf-dw .tf-dw-item.is-removing { display: none; }

/* header */
.tf-dw-head { display: flex; align-items: center; justify-content: space-between; height: 66px; padding: 0 16px; background: var(--dw-cyan); flex: 0 0 auto; }
.tf-dw-head .tf-logo-img path { fill: #fff !important; }
.tf-dw-head .tf-logo-img { height: 28px !important; }
.tf-dw-close { background: none; border: 0; padding: 0 4px; color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }

/* items */
.tf-dw-items { flex: 1 1 auto; overflow: auto; display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.tf-dw-empty { display: none; margin: 0; padding: 48px 20px; text-align: center; color: var(--dw-mute); flex: 1; }
.tf-dw.is-empty .tf-dw-empty { display: block; }
.tf-dw.is-empty .tf-dw-items { flex: 0 0 0; padding: 0; }

.tf-dw-item { display: grid; grid-template-columns: 110px minmax(0, 1fr) 62px; gap: 12px; align-items: start; padding: 12px; background: #e8f6fc; border: 1px solid #cdeaf6; border-radius: 10px; }
.tf-dw-img { display: flex; align-items: center; justify-content: center; width: 110px; height: 100px; background: #fff; border-radius: 8px; overflow: hidden; }
.tf-dw-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tf-dw-name { font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.tf-dw-rx { display: inline-block; margin-top: 4px; padding: 2px 7px; border-radius: 999px; background: #fff3e0; color: #9a5b00; font-size: 10px; font-weight: 700; }
.tf-dw-old { margin-top: 4px; color: #d64545; text-decoration: line-through; font-size: 12px; }
.tf-dw-price { font-size: 17px; font-weight: 700; }
.tf-dw-del { display: block; margin-top: 6px; padding: 0; background: none; border: 0; color: #f08aa0; cursor: pointer; }
.tf-dw-del:hover { color: #e0245e; }
.tf-dw-qty { width: 100%; padding: 8px 6px; border: 1px solid var(--dw-line); border-radius: 8px; background: #fff; text-align: center; font-size: 14px; }

/* footer */
.tf-dw-foot { flex: 0 0 auto; padding: 16px 18px 18px; border-top: 1px solid var(--dw-line); background: #f7f9fb; }
.tf-dw.is-empty .tf-dw-row { display: none; }
.tf-dw-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 15px; }
.tf-dw-save { color: #12a150; font-size: 14px; }
.tf-dw-total { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--dw-line); font-weight: 800; }

.tf-dw-wa, .tf-dw-card {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	width: 100%; padding: 12px; border-radius: 10px;
	text-decoration: none !important; font-weight: 700; font-size: 15px;
}
.tf-dw-wa { margin-top: 14px; background: var(--dw-green); color: #fff !important; }
.tf-dw-wa:hover { filter: brightness(1.06); }
.tf-dw-wa-main { display: inline-flex; align-items: center; gap: 8px; }
.tf-dw-wa small { font-size: 11px; font-weight: 600; letter-spacing: .04em; opacity: .95; }
.tf-dw-card { flex-direction: row; gap: 8px; margin-top: 10px; background: #1d2430; color: #fff !important; font-size: 14px; }
.tf-dw-card:hover { filter: brightness(1.15); }
.tf-dw-wa.is-disabled, .tf-dw-card.is-disabled { opacity: .45; pointer-events: none; cursor: not-allowed; }

.tf-dw-note { margin: 10px 0; text-align: center; font-size: 11px; color: var(--dw-mute); }
.tf-dw-continue { display: block; width: 100%; padding: 12px; border: 1.5px solid var(--dw-blue); border-radius: 10px; background: #fff; color: var(--dw-blue); font: 700 14px Arial, Helvetica, sans-serif; cursor: pointer; }
.tf-dw-continue:hover { background: #f0f6fc; }

@media (max-width: 480px) {
	.tf-dw-item { grid-template-columns: 84px minmax(0, 1fr) 56px; }
	.tf-dw-img { width: 84px; height: 84px; }
}
.tf-dw .tf-dw-item-save { margin-top: 2px; font-size: 12px; font-weight: 600; color: #16a34a; }
.tf-dw .tf-dw-free-note { margin: 4px 0 8px; padding: 8px 10px; border-radius: 8px; background: #fff7ed; color: #c2410c; font-size: 12px; font-weight: 600; text-align: center; }
.tf-dw .tf-dw-free-note.is-ok { background: #ecfdf5; color: #15803d; }
