/* Compact cart drawer. All rules are scoped to the cart. */
.tm-cart-is-open { overflow:hidden; }
.tm-side-cart { position:fixed; inset:0 0 0 auto; margin:0; width:min(580px,100%); height:100dvh; max-height:100dvh; max-width:100%; padding:0; border:0; color:#202b2a; background:#fff; box-shadow:-16px 0 64px #142a2629; font-size:14px; line-height:1.5; }
.tm-side-cart *, .tm-side-cart *::before, .tm-side-cart *::after { box-sizing:border-box; }
.tm-side-cart::backdrop { background:#17292370; backdrop-filter:blur(2px); }
.tm-cart-shell { height:100%; display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; }
.tm-cart-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 20px; border-bottom:1px solid #e2e8e5; }
.tm-cart-heading-title { display:flex; align-items:center; gap:10px; min-width:0; }
.tm-side-cart .tm-cart-heading h2 { margin:0; font-size:22px; font-weight:650; line-height:1.2; letter-spacing:-.5px; }
.tm-cart-heading-count { display:inline-grid; place-items:center; min-width:28px; height:28px; padding:0 7px; border-radius:8px; background:#edf2ef; color:#476157; font-size:12px; font-weight:600; }
.tm-side-cart .tm-cart-close { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; padding:0; border:1px solid #e2e8e5; border-radius:50%; background:#fff; color:#273d34; font-size:27px; line-height:1; cursor:pointer; }
.tm-side-cart .tm-cart-close:hover { background:#eef3f0; }
.tm-cart-feedback { max-height:24dvh; overflow-y:auto; overscroll-behavior:contain; padding:0 20px; background:#f5f7f6; color:#557065; font-size:12px; }
.tm-cart-feedback p { margin:0; padding:8px 0; line-height:1.4; }
.tm-cart-feedback p:empty { display:none; }
.tm-cart-feedback [role=alert] { color:#8a1c17; overflow-wrap:anywhere; }
.tm-cart-refresh { min-height:36px; margin:0 0 8px; padding:4px 10px; border:1px solid #d9e1dd; border-radius:6px; background:#fff; color:#273d34; cursor:pointer; font:inherit; }
.tm-side-cart [hidden] { display:none !important; }
.tm-cart-items { overflow-y:auto; overscroll-behavior:contain; padding:14px 16px; background:#f5f7f6; scrollbar-width:thin; scrollbar-color:#bbc9c1 transparent; }
.tm-cart-item { position:relative; display:grid; grid-template-columns:48px minmax(0,1fr); gap:4px 8px; padding:10px; margin:0 0 10px; border:1px solid #e0e7e3; border-radius:12px; background:#fff; }
.tm-cart-item:last-child { margin-bottom:0; }
.tm-cart-item-heading { display:contents; }
.tm-cart-image { grid-column:1; grid-row:1; width:48px; height:52px; object-fit:contain; background:#f3f5f4; border:1px solid #edf0ee; border-radius:7px; }
.tm-side-cart .tm-cart-item h3 { grid-column:2; grid-row:1; align-self:center; margin:0; font-size:14px; font-weight:600; letter-spacing:-.2px; line-height:1.4; overflow-wrap:anywhere; }
.tm-cart-item h3 a { color:inherit; text-decoration:none; }
.tm-cart-item h3 a:hover { text-decoration:underline; text-underline-offset:3px; }
.tm-cart-choices { display:grid; gap:4px; margin:0; font-size:12px; line-height:1.4; }
.tm-cart-choices>div { display:flex; align-items:baseline; flex-wrap:wrap; gap:0 5px; }
.tm-cart-choices dt { color:#68766f; }
.tm-cart-choices dt::after { content:':'; }
.tm-cart-choices dd { margin:0; color:#344b40; font-weight:500; overflow-wrap:anywhere; white-space:pre-wrap; }
.tm-cart-item-controls { grid-column:1 / -1; grid-row:2; display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:0; }
.tm-cart-quantity { display:flex; align-items:center; flex:0 0 auto; height:40px; border:1px solid #ced9d2; border-radius:7px; overflow:hidden; margin:0; background:#fff; }
.tm-side-cart .tm-cart-quantity input { width:42px; min-width:0; height:38px; min-height:0; margin:0; padding:0 2px; border:0; border-radius:0; color:#202b2a; background:transparent; text-align:center; font-size:14px; font-weight:500; line-height:1.2; box-shadow:none; appearance:textfield; -moz-appearance:textfield; }
.tm-cart-quantity input::-webkit-inner-spin-button, .tm-cart-quantity input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.tm-side-cart .tm-cart-step { display:grid; place-items:center; width:36px; height:38px; min-height:0; padding:0; border:0; border-radius:0; background:#f5f7f6; color:#2d493b; font-size:21px; font-weight:400; line-height:1; cursor:pointer; }
.tm-side-cart .tm-cart-step:hover { background:#e4ede7; }
.tm-side-cart .tm-cart-line-price { margin:0; color:#203c2f; font-size:19px; font-weight:650; letter-spacing:-.4px; line-height:1.2; white-space:nowrap; font-variant-numeric:tabular-nums; }
.tm-side-cart .tm-cart-remove { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:44px; margin:2px 0 0; padding:8px 12px; border:1px solid #dec8c4; border-radius:7px; background:#fff; color:#8a3028; font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.tm-cart-remove svg { width:17px; height:17px; flex:none; }
.tm-side-cart .tm-cart-remove:hover { color:#76261f; background:#faf0ef; border-color:#b9837b; }
.tm-cart-item-invalid { border-color:#c78a71; }
.tm-cart-row-error { grid-column:1 / -1; padding:10px 12px; border-radius:7px; color:#873d26; background:#fff4ec; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.tm-cart-row-error strong { display:block; margin-bottom:3px; font-weight:650; }
.tm-cart-row-error p { margin:0; }
.tm-cart-empty { display:flex; flex-direction:column; justify-content:center; align-items:center; min-height:100%; padding:32px 16px; text-align:center; }
.tm-side-cart .tm-cart-empty-image { display:block; flex:none; width:min(270px,100%); height:auto; max-height:190px; object-fit:contain; margin:0 0 18px; }
.tm-side-cart .tm-cart-empty h3 { margin:0 0 8px; font-size:20px; font-weight:600; }
.tm-cart-empty p { margin:0; max-width:280px; color:#67786e; font-size:14px; }
/* Keep the cart contents prominent; detailed costs expand only on request. */
.tm-cart-footer { padding:10px 20px max(6px,env(safe-area-inset-bottom)); border-top:1px solid #dce5df; background:#fff; box-shadow:0 -5px 18px #183c2405; max-height:55dvh; overflow-y:auto; overscroll-behavior:contain; }
.tm-cart-total { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:42px; margin:0 0 4px; font-size:15px; font-weight:700; }
.tm-cart-total>span { min-width:0; line-height:1.3; }
.tm-cart-total-price { display:flex; flex-direction:column; align-items:flex-end; gap:1px; flex:none; }
.tm-side-cart .tm-cart-total strong { color:#203c2f; font-size:28px; font-weight:700; line-height:1.15; letter-spacing:-.6px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.tm-cart-total-price small { color:#627469; font-size:11px; line-height:1.3; font-weight:400; white-space:nowrap; }
.tm-cart-shipping-total,.tm-cart-fees-total,.tm-cart-payable { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:0; padding:3px 0; font-size:14px; line-height:1.4; }
.tm-cart-shipping-total>span,.tm-cart-fees-total>span,.tm-cart-payable>span { min-width:0; }
.tm-cart-shipping-total strong,.tm-cart-fees-total strong,.tm-cart-payable strong { flex:none; font-weight:650; white-space:nowrap; font-variant-numeric:tabular-nums; }
.tm-cart-payable { color:#52685b; font-size:13px; }
.tm-cart-payable strong { font-size:15px; }
.tm-cart-cost-details { margin:0 0 6px; border:0; }
.tm-cart-cost-details>summary { display:flex; align-items:center; justify-content:flex-start; gap:7px; width:fit-content; max-width:100%; min-height:44px; padding:5px 0; cursor:pointer; list-style:none; color:#365b45; font-size:14px; font-weight:700; line-height:1.3; }
.tm-cart-cost-details>summary::-webkit-details-marker { display:none; }
.tm-cart-cost-details[open]>summary>.tm-cart-more-icon { transform:rotate(180deg); }
.tm-cart-cost-content { padding:5px 0 8px; }
.tm-cart-breakdown { display:grid; gap:4px; margin:0 0 6px; color:#344b40; font-size:12px; line-height:1.4; }
.tm-cart-breakdown:empty { display:none; }
.tm-cart-breakdown>div { display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
.tm-cart-breakdown dt { min-width:0; }
.tm-cart-breakdown dt small { display:block; margin-top:1px; color:#6b7971; font-size:10px; overflow-wrap:anywhere; }
.tm-cart-breakdown dd { flex-shrink:0; margin:0; font-weight:600; font-variant-numeric:tabular-nums; }
.tm-side-cart .tm-cart-delivery { margin:4px 0 0; font-size:11px; font-weight:400; line-height:1.4; color:#6b7971; }
.tm-cart-footer-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.tm-side-cart .tm-cart-checkout,.tm-side-cart .tm-cart-continue { display:flex; align-items:center; justify-content:space-between; gap:6px; min-height:44px; width:100%; margin:0; padding:9px 12px; border:1px solid transparent; border-radius:7px; font:inherit; font-size:14px; line-height:1.3; font-weight:600; text-decoration:none; cursor:pointer; }
.tm-side-cart .tm-cart-checkout { background:#204f3c; color:#fff; }
.tm-side-cart .tm-cart-checkout:hover { background:#173e2e; color:#fff; }
.tm-side-cart .tm-cart-checkout[aria-disabled=true] { opacity:.5; cursor:not-allowed; }
.tm-side-cart .tm-cart-continue { border-color:#cbdad0; background:#e8f0eb; color:#244b36; }
.tm-side-cart .tm-cart-continue:hover { background:#dbe8df; border-color:#adc5b5; }
.tm-cart-checkout span,.tm-cart-continue span { font-size:18px; font-weight:400; line-height:1; }
.tm-cart-footer-links { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:2px 0 0; }
.tm-side-cart .tm-cart-footer-links .tm-side-cart__review,.tm-side-cart .tm-cart-footer-links .tm-cart-full { display:inline-flex; align-items:center; justify-content:center; min-height:34px; width:auto; margin:0; padding:5px 2px; border:0; border-radius:3px; background:transparent; color:#476353; font:inherit; font-size:12px; font-weight:500; line-height:1.3; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.tm-side-cart .tm-cart-footer-links .tm-side-cart__review:hover,.tm-side-cart .tm-cart-footer-links .tm-cart-full:hover { color:#203c2f; background:#f4f7f5; }
.tm-side-cart button:disabled, .tm-side-cart input:disabled { opacity:.45; cursor:default; }
.tm-side-cart :focus-visible { outline:2px solid #367553; outline-offset:3px; }
.tm-side-cart .tm-cart-quantity :focus-visible { outline-offset:-3px; }
.tm-cart-trigger { display:inline-flex; align-items:center; gap:10px; text-decoration:none; min-height:48px; padding:8px 0; color:#20262b; }
.tm-cart-trigger svg { width:25px; height:25px; fill:none; stroke:currentColor; stroke-width:1.8; }
.tm-cart-trigger [data-tm-cart-count] { display:inline-grid; place-items:center; min-width:28px; height:28px; padding:0 5px; background:#293239; color:white; border-radius:50%; font-size:15px; }
.tm-cart-trigger [hidden] { display:none; }
@media(max-width:480px) {
 .tm-cart-heading { padding:10px 14px; }
 .tm-side-cart .tm-cart-heading h2 { font-size:21px; }
 .tm-cart-feedback { padding-inline:14px; }
 .tm-cart-items { padding:10px; }
 .tm-cart-item { grid-template-columns:44px minmax(0,1fr); gap:4px 8px; padding:8px; border-radius:10px; }
 .tm-cart-image { width:44px; height:52px; }
 .tm-side-cart .tm-cart-item h3 { font-size:13px; }
 .tm-cart-choices { font-size:11px; gap:4px; }
 .tm-cart-item-controls { grid-column:1 / -1; padding-top:0; }
 .tm-cart-quantity { height:44px; }
 .tm-side-cart .tm-cart-quantity input { width:44px; height:42px; font-size:16px; }
 .tm-side-cart .tm-cart-step { width:44px; height:42px; }
 .tm-side-cart .tm-cart-remove { min-height:44px; }
 .tm-cart-footer { padding:8px 14px max(6px,env(safe-area-inset-bottom)); }
 .tm-side-cart .tm-cart-total strong { font-size:26px; }
 .tm-side-cart .tm-cart-checkout,.tm-side-cart .tm-cart-continue { padding-inline:9px; font-size:13px; }
}
@media(max-height:540px) {
 .tm-cart-heading { padding-block:6px; }
 .tm-cart-footer { padding-top:6px; padding-bottom:4px; }


}

@media(max-height:640px) {
 .tm-side-cart .tm-cart-empty { padding:18px 12px; }
 .tm-side-cart .tm-cart-empty-image { width:200px; max-height:135px; margin-bottom:12px; }
}

.tm-cart-item-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.tm-side-cart .tm-cart-edit { display:inline-flex; align-items:center; justify-content:center; min-height:44px; margin:2px 0 0; padding:8px 12px; border:1px solid #98b5a5; border-radius:7px; color:#224e39; background:#edf4ef; font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.tm-side-cart .tm-cart-edit:hover { background:#dfede4; border-color:#537d65; }

/* Each row starts with the essentials; native details reveal its full selection. */
.tm-cart-row-tools { grid-column:1 / -1; position:relative; min-height:36px; }
.tm-cart-item-details { width:100%; border:0; margin:0; padding:0; }
.tm-cart-item-details>summary { display:flex; align-items:center; justify-content:space-between; gap:6px; width:calc(100% - 120px); min-height:36px; padding:5px 0; list-style:none; color:#456452; cursor:pointer; font-size:12px; font-weight:550; line-height:1.3; }
.tm-cart-item-details>summary::-webkit-details-marker { display:none; }
.tm-side-cart .tm-cart-more-icon { display:block; width:14px; height:14px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; transition:transform .15s; }
.tm-cart-item-details[open] .tm-cart-more-icon { transform:rotate(180deg); }
.tm-cart-item-detail-content { padding:10px 0 2px; border-top:1px solid #e5ebe7; }
.tm-cart-item-detail-content>.tm-cart-item-actions { margin-top:10px; }
.tm-cart-item-detail-content>.tm-cart-row-error { margin-top:8px; }
.tm-side-cart .tm-cart-row-tools>.tm-cart-remove { position:absolute; top:0; right:0; min-width:112px; margin:0; padding:5px 8px; min-height:36px; border-color:transparent; font-size:12px; }
.tm-cart-row-tools>.tm-cart-remove svg { width:15px; height:15px; }
.tm-cart-row-notice { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px 8px; padding:4px 8px; border-radius:7px; color:#873d26; background:#fff4ec; font-size:11px; line-height:1.35; }
.tm-side-cart .tm-cart-row-notice .tm-cart-edit { margin:0; padding:6px 9px; font-size:12px; }

/* A cabinet and its linked doors remain separate priced rows in one visual group. */
.tm-cart-bundle { margin:0 0 14px; }
.tm-cart-bundle:last-child { margin-bottom:0; }
.tm-cart-bundle>.tm-cart-item { margin-bottom:6px; }
.tm-cart-bundle>.tm-cart-linked-item { margin-left:10px; border-left:3px solid #9ab6a5; background:#fcfdfc; }
.tm-side-cart .tm-cart-linked-label { display:block; margin:0 0 3px; color:#55715e; font-size:11px; font-weight:500; letter-spacing:0; }
.tm-cart-linked-quantity { min-width:0; flex:1 1 auto; padding:2px 0; }
.tm-cart-linked-quantity strong { display:block; font-size:14px; color:#344b40; }
.tm-cart-linked-quantity small { display:block; margin-top:1px; font-size:11px; line-height:1.35; color:#68766f; }

/* Linked doors: visible image/name/quantity/price, other information in details. */
.tm-cart-bundle>.tm-cart-linked-compact{grid-template-columns:40px minmax(0,1fr) auto;gap:3px 8px;padding:8px}
.tm-cart-linked-compact .tm-cart-image{width:40px;height:48px}
.tm-side-cart .tm-cart-linked-compact h3{font-size:12px;line-height:1.35}
.tm-cart-linked-compact .tm-cart-item-controls{display:contents}
.tm-side-cart .tm-cart-linked-compact .tm-cart-line-price{grid-column:3;grid-row:1;align-self:center;font-size:16px;white-space:nowrap}
.tm-cart-linked-compact .tm-cart-row-tools{grid-row:2}
.tm-side-cart .tm-cart-linked-compact .tm-cart-linked-label{font-size:10px;line-height:1.3}
.tm-cart-linked-quantity-help{margin:8px 0 2px;color:#68766f;font-size:11px;line-height:1.4}

/* Keep the disclosure arrow beside its label and removal in a separate grid cell. */
.tm-side-cart .tm-cart-row-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;column-gap:8px}
.tm-side-cart .tm-cart-item-details{grid-column:1/-1;grid-row:1;min-width:0}
.tm-side-cart .tm-cart-item-details>summary{display:inline-flex;align-items:center;justify-content:flex-start;width:auto;max-width:calc(100% - 126px);gap:7px;padding:5px 2px;font-size:13px;font-weight:700}
.tm-side-cart .tm-cart-more-icon{flex:none;margin:0}
.tm-side-cart .tm-cart-row-tools>.tm-cart-remove{position:relative;grid-column:2;grid-row:1;top:auto;right:auto;min-width:0;justify-self:end}
@media(max-width:350px){.tm-side-cart .tm-cart-row-tools{grid-template-columns:1fr}.tm-side-cart .tm-cart-item-details>summary{max-width:100%}.tm-side-cart .tm-cart-row-tools>.tm-cart-remove{grid-column:1;grid-row:2;justify-self:end}}
