/* Terrace Interior — Keranjang Saya */
body.t-cart-page { background: #f4f3f0; }
body.t-cart-page .t-content { padding-top: 0; padding-bottom: 0; }
body.t-cart-page .t-content > .t-wrap { max-width: 1120px; }
html.tc-lock, html.tc-lock body { overflow: hidden; }

.tc { font-family: var(--t-font); color: var(--t-ink); padding-bottom: 48px; }
.tc *, .tc *::before, .tc *::after { box-sizing: border-box; }
.tc.is-busy .tc-grid { opacity: .7; transition: opacity .15s .1s; }
.tc button { font: inherit; cursor: pointer; }
.tc-show-m { display: none !important; }

/* Kepala halaman */
.tc-top { display: flex; align-items: center; gap: 8px; padding: 24px 0 20px; }
.tc-back { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: -10px; border-radius: 999px; color: var(--t-ink); }
.tc-back:hover { background: #fff; color: var(--t-ink); }
.tc-title { margin: 0; font: 700 24px/32px var(--t-font); }
.tc-title span { color: var(--t-muted); font-weight: 500; }
.tc-notices:empty { display: none; }
.tc-notices .woocommerce-message, .tc-notices .woocommerce-error, .tc-notices .woocommerce-info { margin: 0 0 16px !important; }

.tc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }

/* Daftar produk */
.tc-list { display: grid; gap: 12px; min-width: 0; }
.tc-allrow { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border-radius: var(--t-r-md); font-weight: 600; cursor: pointer; }
.tc-check { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid #b9b6b0; border-radius: 6px; background: #fff; display: inline-grid; place-content: center; cursor: pointer; transition: background .15s, border-color .15s; }
.tc-check::after { content: ""; width: 11px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .12s; }
.tc-check:checked { background: var(--t-em); border-color: var(--t-em); }
.tc-check:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.tc-check:focus-visible { outline: 2px solid var(--t-em-text); outline-offset: 2px; }

.tc-item { background: #fff; border-radius: var(--t-r-md); overflow: hidden; transition: opacity .2s; }
.tc-item.is-leaving { opacity: .35; }
.tc-item-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px 0; }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.tc-chip { display: inline-block; max-width: 100%; padding: 3px 10px; border-radius: 999px; background: var(--t-warm); font: 500 12px/18px var(--t-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-del { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 8px; margin-right: -8px; border: 0; border-radius: var(--t-r-sm); background: none; color: var(--t-muted); font-size: 13px !important; }
.tc-del:hover { color: var(--t-danger); background: #fdf0ee; }

.tc-item-body { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 12px 16px 14px 50px; }
.tc-thumb { display: block; width: 88px; height: 88px; border-radius: var(--t-r-sm); background: var(--t-warm); overflow: hidden; }
.tc-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tc-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 600 15px/21px var(--t-font); color: var(--t-ink); }
.tc-name:hover { color: var(--t-em-text); }
.tc-variant { margin: 2px 0 0; font: 400 13px/18px var(--t-font); color: var(--t-muted); }
.tc-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.tc-price strong { display: block; font: 700 16px/22px var(--t-font); color: var(--t-em-text); }
.tc-price del { font: 400 12px/16px var(--t-font); color: var(--t-muted); }
.tc-qty { display: inline-flex; align-items: center; border: 1px solid var(--t-line); border-radius: var(--t-r-sm); overflow: hidden; }
.tc-qty button { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: #fff; color: var(--t-ink); }
.tc-qty button:hover:not(:disabled) { background: var(--t-warm); }
.tc-qty button:disabled { color: #c9c6c0; cursor: default; }
.tc-qty input { width: 44px; height: 36px; border: 0; border-left: 1px solid var(--t-line); border-right: 1px solid var(--t-line); text-align: center; font: 600 14px/20px var(--t-font); color: var(--t-ink); -moz-appearance: textfield; padding: 0; }
.tc-qty input::-webkit-outer-spin-button, .tc-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tc-save { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 16px 9px 50px; background: var(--t-em-tint); color: var(--t-em-text); font: 500 13px/18px var(--t-font); }
.tc-save strong { font-weight: 700; }
.tc-item:not(.is-on) .tc-save { opacity: .7; }

/* Ringkasan */
.tc-sum { position: sticky; top: 24px; background: #fff; border-radius: var(--t-r-lg); padding: 20px; display: grid; gap: 16px; }
.tc-sum-title { margin: 0; font: 700 18px/24px var(--t-font); }
.tc-coupon-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px dashed var(--t-em); border-radius: var(--t-r-md); background: #f6fcfa; color: var(--t-em-text); text-align: left; }
.tc-coupon-row:disabled { border-color: var(--t-line); background: var(--t-warm); color: var(--t-muted); cursor: default; }
.tc-coupon-label { font-weight: 600; color: var(--t-ink); }
.tc-coupon-val { flex: 1; min-width: 0; text-align: right; font-size: 14px; color: var(--t-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-coupon-val.has { color: var(--t-em-text); font-weight: 600; }

.tc-break { margin: 0; display: grid; gap: 6px; font: 400 14px/20px var(--t-font); }
.tc-br { display: flex; justify-content: space-between; gap: 12px; }
.tc-br dt, .tc-br dd { margin: 0; }
.tc-br dd { white-space: nowrap; }
.tc-br-head { font-weight: 700; color: var(--t-em-text); }
.tc-br-head + .tc-br, .tc-br-head ~ .tc-br:not(.tc-br-head):not(.tc-br-total):not(.tc-br-save) { color: #4a4844; }
.tc-br-coupon { color: var(--t-danger); margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--t-line); }
.tc-br-total { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--t-line); font-weight: 700; font-size: 16px; color: var(--t-em-text); }
.tc-br-save { color: var(--t-danger); font-size: 13px; }
.tc-break-note { margin: 6px 0 0; font-size: 12px; line-height: 17px; color: var(--t-muted); }

.tc-bar { display: grid; gap: 12px; }
.tc-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; padding: 0; border: 0; background: none; text-align: left; color: var(--t-ink); cursor: default !important; }
.tc-total-label { font-weight: 600; }
.tc-total strong { font: 700 22px/28px var(--t-font); color: var(--t-ink); }
.tc-total-save { flex-basis: 100%; text-align: right; font-size: 13px; color: var(--t-danger); font-weight: 600; }
.tc-checkout { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: var(--t-r-md); background: var(--t-em); color: var(--t-on-em, #0b2a22); font: 700 16px/20px var(--t-font); text-decoration: none !important; }
.tc-checkout:hover { background: var(--t-em-hover); color: var(--t-on-em, #0b2a22); }
.tc-checkout.is-off { background: #d9d6d0; color: #77746e; cursor: not-allowed; }

/* Kosong */
.tc-empty { display: grid; justify-items: center; gap: 8px; padding: 64px 16px; background: #fff; border-radius: var(--t-r-lg); text-align: center; color: var(--t-muted); }
.tc-empty h2 { margin: 8px 0 0; font: 700 20px/28px var(--t-font); color: var(--t-ink); }
.tc-empty p { margin: 0 0 12px; }

/* Pop-up: modal di desktop, bottom sheet di HP */
.tc-sheet { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(17,17,17,0); transition: background .2s; }
.tc-sheet[hidden] { display: none; }
.tc-sheet.is-open { background: rgba(17,17,17,.45); }
.tc-sheet-panel { width: 100%; max-width: 440px; max-height: 85vh; overflow: auto; background: #fff; border-radius: var(--t-r-lg); padding: 20px; transform: translateY(16px); opacity: 0; transition: transform .2s, opacity .2s; }
.tc-sheet.is-open .tc-sheet-panel { transform: none; opacity: 1; }
.tc-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tc-sheet-head h2 { margin: 0; font: 700 18px/24px var(--t-font); }
.tc-x { width: 40px; height: 40px; margin: -8px -8px -8px 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: none; color: var(--t-ink); }
.tc-x:hover { background: var(--t-warm); }

.tc-coupon-form { display: grid; gap: 12px; }
.tc-coupon-form input[type="text"] { width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--t-line); border-radius: var(--t-r-md); background: var(--t-warm); font: 600 15px/20px var(--t-font); letter-spacing: .04em; text-transform: uppercase; color: var(--t-ink); }
.tc-coupon-form input[type="text"]::placeholder { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--t-muted); }
.tc-coupon-form input[type="text"]:focus { outline: none; border-color: var(--t-ink); background: #fff; }
.tc-coupon-form input[aria-invalid="true"] { border-color: var(--t-danger); }
.tc-coupon-msg { margin: -4px 0 0; font: 500 13px/18px var(--t-font); color: var(--t-danger); }
.tc-coupon-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tc-coupon-chips li { display: inline-flex; align-items: center; gap: 2px; padding: 0 2px 0 12px; border: 1px solid var(--t-em); border-radius: 999px; background: var(--t-em-tint); color: var(--t-em-text); font: 700 12px/18px var(--t-font); letter-spacing: .03em; }
.tc-coupon-chips button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: none; color: var(--t-em-text); }
.tc-coupon-chips button:hover { background: rgba(0,120,90,.12); }
.tc-apply { justify-self: end; min-height: 44px; padding: 0 22px; border: 0; border-radius: var(--t-r-md); background: var(--t-em); color: var(--t-on-em, #0b2a22); font-weight: 700 !important; }
.tc-apply:hover { background: var(--t-em-hover); }
.tc-apply:disabled { opacity: .6; }
.tc-coupon-ok { display: grid; justify-items: center; gap: 6px; padding: 8px 0 4px; text-align: center; }
.tc-coupon-ok[hidden], .tc-coupon-form[hidden] { display: none; }
.tc-ok-art { animation: tcPop .35s cubic-bezier(.2,.9,.3,1.3) both; }
.tc-coupon-ok h3 { margin: 6px 0 0; font: 700 20px/28px var(--t-font); }
.tc-ok-text { margin: 0 0 12px; color: var(--t-muted); font-size: 14px; }
.tc-coupon-ok .tc-apply { justify-self: stretch; }
@keyframes tcPop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- HP ---------- */
@media (max-width: 900px) {
	.tc-hide-m { display: none !important; }
	.tc-show-m { display: revert !important; }
	body.t-cart-page .t-content > .t-wrap { padding-left: 0; padding-right: 0; }
	.tc { padding-bottom: 150px; }
	.tc-top { position: sticky; top: 0; z-index: 20; background: #fff; padding: 6px 16px; border-bottom: 1px solid var(--t-line); }
	.tc-title { font-size: 17px; line-height: 24px; }
	.tc-notices { padding: 12px 16px 0; }
	.tc-grid { display: block; }
	.tc-list { gap: 8px; padding: 8px 0; }
	.tc-item { border-radius: 0; }
	.tc-item-head { padding: 12px 12px 0; gap: 10px; }
	.tc-item-body { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 10px 12px 12px 44px; }
	.tc-thumb { width: 72px; height: 72px; }
	.tc-name { font-size: 14px; line-height: 20px; }
	.tc-save { padding-left: 44px; }
	.tc-del span { display: none; }
	.tc-del { padding: 0 10px; min-width: 40px; justify-content: center; }

	.tc-sum { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50; gap: 0; padding: 0; border-radius: 0; box-shadow: 0 -4px 16px rgba(17,17,17,.08); padding-bottom: env(safe-area-inset-bottom); }
	.tc-coupon-row { border: 0; border-bottom: 1px solid var(--t-line); border-radius: 0; background: #fff; min-height: 44px; padding: 8px 16px; }
	.tc-coupon-row:disabled { background: #fff; }
	.tc-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 16px; }
	.tc-all { display: inline-flex !important; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
	.tc-total { flex: 1; min-width: 0; flex-direction: column; flex-wrap: nowrap; align-items: flex-end; justify-content: center; gap: 0; position: relative; padding-right: 22px; cursor: pointer !important; }
	.tc-total:disabled { cursor: default !important; }
	.tc-total strong { font-size: 17px; line-height: 22px; color: var(--t-em-text); }
	.tc-total-save { flex-basis: auto; font-size: 12px; line-height: 16px; }
	.tc-total-caret { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: inline-flex !important; color: var(--t-ink); }
	.tc-checkout { min-height: 44px; padding: 0 16px; font-size: 15px; white-space: nowrap; }

	.tc-sheet { align-items: flex-end; padding: 0; }
	.tc-sheet-panel { max-width: none; border-radius: 16px 16px 0 0; transform: translateY(100%); opacity: 1; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
	.tc-sheet, .tc-sheet-panel, .tc-ok-art { transition: none; animation: none; }
}
.tc a { text-decoration: none; }
.tc-notices .wc-forward, .tc-notices .button { display: none !important; }
@media (min-width: 901px) {
	.tc-sum .tc-break .tc-br-total, .tc-sum .tc-break .tc-br-save { display: none; }
	.tc-sum .tc-bar { padding-top: 14px; border-top: 1px solid var(--t-line); }
}

/* Konfirmasi keluar dari keranjang */
.tc-dialog { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(17,17,17,0); transition: background .2s; font-family: var(--t-font); }
.tc-dialog[hidden] { display: none; }
.tc-dialog.is-open { background: rgba(17,17,17,.45); }
.tc-dialog-box { width: 100%; max-width: 360px; padding: 24px 20px 20px; border-radius: var(--t-r-lg); background: #fff; text-align: center; transform: scale(.94); opacity: 0; transition: transform .18s, opacity .18s; }
.tc-dialog.is-open .tc-dialog-box { transform: none; opacity: 1; }
.tc-dialog-t { margin: 0 0 20px; font: 700 17px/24px var(--t-font); color: var(--t-ink); }
.tc-dialog-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tc-dialog-btns button, .tc-dialog-btns a { box-sizing: border-box; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 12px; border-radius: var(--t-r-md); font: 700 15px/20px var(--t-font); text-align: center; text-decoration: none; cursor: pointer; }
.tc-dialog-btns a:hover { text-decoration: none; }
.tc-dialog-go { border: 1.5px solid var(--t-line); background: #fff; color: var(--t-ink); }
.tc-dialog-go:hover { border-color: var(--t-ink); }
.tc-dialog-stay { border: 0; background: var(--t-em); color: var(--t-on-em, #0b2a22); }
.tc-dialog-stay:hover { background: var(--t-em-hover); }
.tc-dialog button:focus-visible, .tc-dialog a:focus-visible { outline: 2px solid var(--t-em-text); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tc-dialog, .tc-dialog-box { transition: none; } }
