/* =====================================================================
   Cart, checkout, account — grey ground, white boxes
   ===================================================================== */
body.tm-gray { background: var(--soft); }
.tm-store { padding-top: 20px; padding-bottom: 48px; }
.tm-store__t { font-size: 28px; font-weight: 800; margin-bottom: 18px; }
.tm-box { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }

/* Notices */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-error, .woocommerce-message, .woocommerce-info,
.wc-block-components-notice-banner {
  position: relative; list-style: none;
  margin: 0 0 16px; padding: 14px 18px 14px 48px;
  border-radius: var(--r); border: 1px solid var(--line);
  background: #fff; font-size: 15px; line-height: 1.5;
}
.woocommerce-error::before, .woocommerce-message::before, .woocommerce-info::before {
  content: ""; position: absolute; left: 16px; top: 15px; width: 20px; height: 20px; border-radius: 50%;
}
.woocommerce-error { border-color: #f1c4c0; background: var(--bad-bg); }
.woocommerce-error::before { background: var(--bad) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E") center / 14px no-repeat; }
.woocommerce-message { border-color: #bfe3cf; background: var(--ok-bg); }
.woocommerce-message::before { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 13px no-repeat; }
.woocommerce-info { border-color: var(--tint-2); background: var(--tint); }
.woocommerce-info::before { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 11v6M12 7h.01'/%3E%3C/svg%3E") center / 14px no-repeat; }
.woocommerce-error li + li { margin-top: 4px; }
.woocommerce-message a, .woocommerce-info a, .woocommerce-error a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.woocommerce-message .button, .woocommerce-info .button { float: right; margin-left: 12px; text-decoration: none; }

/* Generic Woo buttons on these pages */
.tm-store .button, .tm-store button.button, .tm-store a.button, .tm-store input.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 1.5px solid var(--brand); border-radius: var(--pill);
  background: var(--brand); color: #fff;
  font-size: 15px; font-weight: 700; line-height: 1.1; text-decoration: none; cursor: pointer;
}
.tm-store .button:hover { background: var(--brand-h); border-color: var(--brand-h); color: #fff; }

/* ---------- Cart ---------- */
.tm-cart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tm-cart-head__t { font-size: 28px; font-weight: 800; }
.tm-cart-head__t span { font-size: 18px; font-weight: 500; color: var(--muted); }
.tm-cart-head__back { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.tm-cart { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.tm-cart__main { min-width: 0; }
.tm-cart__side { position: sticky; top: calc(var(--mast-h) + 16px); }

.tm-cart__ship { display: flex; align-items: center; gap: 14px; }
.tm-cart__ship-ico { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: var(--tint); display: grid; place-items: center; }
.tm-cart__ship-t { font-size: 17px; font-weight: 800; }
.tm-cart__ship-d { font-size: 14px; color: var(--muted); }

.tm-meter { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--gold-soft); border: 1px solid var(--tint-2); }
.tm-meter__t { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14.5px; }
.tm-meter__bar { margin-top: 8px; height: 8px; border-radius: 4px; background: #efe2bf; overflow: hidden; }
.tm-meter__bar span { display: block; height: 100%; border-radius: inherit; background: var(--gold-2); transition: width .4s ease; }
.tm-meter.is-done { background: var(--ok-bg); border-color: #bfe3cf; }
.tm-meter.is-done .tm-meter__t { color: var(--ok); }
.tm-meter.is-done .tm-meter__bar { background: #cdebd9; }
.tm-meter.is-done .tm-meter__bar span { background: var(--ok); }

.tm-lines { list-style: none; margin-top: 8px; }
.tm-line { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line-2); }
.tm-line:first-child { border-top: 0; }
.tm-line__img { display: block; width: 112px; height: 112px; border-radius: var(--r); background: var(--soft); overflow: hidden; }
.tm-line__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.tm-line__name { font-size: 16px; font-weight: 600; line-height: 1.35; }
a.tm-line__name:hover { text-decoration: underline; text-underline-offset: 2px; }
.tm-line__spec, .tm-line__sku { margin-top: 3px; font-size: 13.5px; color: var(--muted); }
.tm-line__links { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--line-3); }
.tm-line__links a { color: var(--ink-2); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.tm-line__links a:hover { color: var(--ink); }
.tm-line__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.tm-line__price { font-size: 18px; font-weight: 800; }
.tm-line__each { font-size: 13px; color: var(--muted); }
.tm-line__qty { margin-top: auto; }
.tm-line__qty .quantity { height: 40px; }
.tm-line__qty .qty-btn { width: 34px; }
.tm-line__one { font-size: 14px; color: var(--muted); }
.tm-cart__tools { display: flex; justify-content: flex-end; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.js .tm-cart__update { display: none; }

.tm-summary .checkout-button { height: 54px; font-size: 17px; }
.tm-summary__rows { margin-top: 18px; }
.tm-summary__row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; }
.tm-summary__row strong { font-weight: 700; }
.tm-summary__row .is-free { color: var(--ok); }
.tm-summary__row.is-save strong { color: var(--ok); }
.tm-summary__row--total { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 18px; }
.tm-summary__row--total strong { font-weight: 800; }
.tm-summary__note { margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.tm-code { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.tm-code > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; font-size: 14.5px; font-weight: 600; }
.tm-code > summary::-webkit-details-marker { display: none; }
.tm-code > summary span { flex: 1; }
.tm-code[open] > summary .tm-i:last-child { transform: rotate(180deg); }
.tm-code__form { display: flex; gap: 8px; margin-top: 10px; }
.tm-code__form input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--line-3); border-radius: var(--pill); font-size: 16px; }
.tm-code__form .tm-btn { height: 44px; }

.tm-summary__assure { list-style: none; display: grid; gap: 8px; margin: 16px 0 14px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); }
.tm-summary__assure li { display: flex; gap: 8px; align-items: center; }
.tm-summary__assure .tm-i { color: var(--muted); }

.tm-emptycart { max-width: 640px; margin: 8px auto 0; text-align: center; display: grid; justify-items: center; gap: 10px; padding: 36px 24px; }
.tm-emptycart__ico { width: 84px; height: 84px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; }
.tm-emptycart h1 { font-size: 26px; font-weight: 800; }
.tm-emptycart p { color: var(--muted); }
.tm-emptycart__btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.cart-empty.woocommerce-info, .return-to-shop { display: none; }

@media (max-width: 1000px) {
  .tm-cart { grid-template-columns: 1fr; }
  .tm-cart__side { position: static; }
}
@media (max-width: 600px) {
  .tm-box { padding: 16px; border-radius: var(--r); }
  .tm-cart-head__t { font-size: 23px; }
  .tm-cart-head__back { display: none; }
  .tm-line { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .tm-line__img { width: 84px; height: 84px; }
  .tm-line__side {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "qty price" "qty each";
    align-items: center; column-gap: 12px; row-gap: 0; text-align: right;
  }
  .tm-line__qty { grid-area: qty; margin-top: 0; }
  .tm-line__price { grid-area: price; }
  .tm-line__each { grid-area: each; }
}

/* ---------- Checkout ---------- */
.tm-co-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.tm-co-head__t { font-size: 28px; font-weight: 800; }
.tm-co-head__secure { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--pill); background: var(--ok-bg); color: var(--ok); font-size: 13.5px; font-weight: 700; }
.tm-co-head__back { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.tm-store .woocommerce-form-coupon-toggle .woocommerce-info,
.tm-store .woocommerce-form-login-toggle .woocommerce-info { background: #fff; border-color: var(--line); }
.tm-store form.checkout_coupon, .tm-store form.woocommerce-form-login {
  margin: 0 0 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff;
}

form.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  grid-template-rows: auto 1fr;
  column-gap: 24px; align-items: start;
}
form.checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; }
form.checkout #customer_details { grid-column: 1; grid-row: 1 / span 2; }
form.checkout #order_review_heading { grid-column: 2; grid-row: 1; margin: 0; padding: 20px 22px 0; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; background: #fff; font-size: 19px; font-weight: 800; }
form.checkout #order_review { grid-column: 2; grid-row: 2; padding: 6px 22px 22px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); background: #fff; }
.woocommerce form.checkout .col2-set, .woocommerce-page form.checkout .col2-set { width: 100%; }
.woocommerce form.checkout .col2-set .col-1, .woocommerce form.checkout .col2-set .col-2,
.woocommerce-page form.checkout .col2-set .col-1, .woocommerce-page form.checkout .col2-set .col-2 { float: none; width: 100%; }
#customer_details .col-1, #customer_details .col-2 { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
#customer_details .col-2 { margin-top: 16px; }
#customer_details h3 { font-size: 19px; font-weight: 800; margin-bottom: 14px; }
#ship-to-different-address { font-size: 16px; }
#ship-to-different-address label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }

.tm-store .form-row { margin: 0 0 14px; padding: 0; }
.tm-store .form-row label { display: block; margin-bottom: 5px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.tm-store .form-row .required { color: var(--bad); text-decoration: none; }
.tm-store .form-row .optional { font-weight: 400; color: var(--faint); }
.tm-store .input-text, .tm-store select, .tm-store textarea,
.tm-store .woocommerce-Input {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line-3); border-radius: var(--r-sm);
  background: #fff; font-size: 16px; line-height: 1.3;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tm-store textarea { min-height: 96px; }
.tm-store .input-text:focus, .tm-store select:focus, .tm-store textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(25, 24, 22, .12); }
.tm-store .form-row.woocommerce-invalid.tm-touched .input-text,
.tm-store .form-row.woocommerce-invalid.tm-touched select { border-color: var(--bad); }
.tm-store .form-row.woocommerce-validated .input-text { border-color: var(--line-3); }
.tm-store input[type="checkbox"], .tm-store input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand); vertical-align: -3px; }

.tm-store .select2-container .select2-selection--single { height: 48px; border: 1px solid var(--line-3); border-radius: var(--r-sm); }
.tm-store .select2-container .select2-selection--single .select2-selection__rendered { line-height: 46px; padding-left: 14px; font-size: 16px; color: var(--ink); }
.tm-store .select2-container .select2-selection--single .select2-selection__arrow { height: 46px; right: 8px; }
.select2-dropdown { border-color: var(--line-3); border-radius: var(--r-sm); overflow: hidden; }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--ink); }
.select2-search--dropdown .select2-search__field { min-height: 40px; border-radius: 8px; font-size: 16px; }

/* Order review table */
.tm-store table.shop_table { width: 100%; border-collapse: collapse; border: 0; margin: 0 0 6px; font-size: 14.5px; }
.tm-store table.shop_table th, .tm-store table.shop_table td { padding: 11px 0; border: 0; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; background: none; }
.tm-store table.shop_table td:last-child, .tm-store table.shop_table th:last-child { text-align: right; }
.tm-store table.shop_table thead th { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tm-store table.shop_table .product-name { padding-right: 12px; }
.tm-store table.shop_table .product-quantity { font-weight: 700; }
.tm-store table.shop_table tfoot th { font-weight: 600; }
.tm-store table.shop_table .order-total th, .tm-store table.shop_table .order-total td { font-size: 18px; font-weight: 800; border-bottom: 0; padding-top: 14px; }
.tm-store #shipping_method { list-style: none; margin: 0; padding: 0; }
.tm-store #shipping_method li { margin: 0 0 4px; display: flex; justify-content: flex-end; gap: 6px; align-items: center; }
.tm-store #shipping_method li label { font-weight: 600; }

/* Payment */
.tm-store #payment { background: transparent; border-radius: 0; margin-top: 10px; }
.tm-store #payment ul.payment_methods { list-style: none; margin: 0; padding: 0; border: 0; }
.tm-store #payment ul.payment_methods li {
  margin: 0 0 10px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: var(--r);
  background: #fff; line-height: 1.4; list-style: none;
}
.tm-store #payment ul.payment_methods li:has(input:checked) { border-color: var(--ink); }
.tm-store #payment ul.payment_methods li > label { font-size: 15.5px; font-weight: 700; cursor: pointer; display: inline; }
.tm-store #payment ul.payment_methods li img { display: inline-block; max-height: 24px; width: auto; margin: 0 0 0 6px; vertical-align: middle; }
.tm-store #payment div.payment_box {
  position: relative; margin: 12px 0 0; padding: 14px;
  border-radius: var(--r-sm); background: var(--soft); color: var(--ink-2); font-size: 14px;
}
.tm-store #payment div.payment_box::before { display: none; }
.tm-store #payment div.form-row { padding: 0; }
.tm-store #payment .place-order { margin-top: 16px; padding: 0; }
.tm-store .woocommerce-terms-and-conditions-wrapper { font-size: 13.5px; color: var(--muted); }
.tm-store .woocommerce-privacy-policy-text p { margin-bottom: 12px; }
.tm-store .woocommerce-privacy-policy-text a { text-decoration: underline; }
.tm-store #place_order {
  float: none; width: 100%; height: 56px;
  border: 0; border-radius: var(--pill);
  background: var(--brand); color: #fff;
  font-size: 17.5px; font-weight: 800; cursor: pointer;
}
.tm-store #place_order:hover { background: var(--brand-h); }
.blockUI.blockOverlay { border-radius: var(--r); }

/* The store's own dispatch / returns / warranty lines under the button */
.tm-cotrust { display: grid; gap: 8px; margin-top: 14px; padding: 14px; border-radius: var(--r-sm); background: var(--soft); font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.tm-cotrust span { display: flex; gap: 8px; align-items: flex-start; }
.tm-cotrust b { color: var(--ok); }

@media (max-width: 1000px) {
  form.checkout { grid-template-columns: 1fr; grid-template-rows: none; }
  form.checkout #customer_details, form.checkout #order_review_heading, form.checkout #order_review { grid-column: 1; grid-row: auto; }
  form.checkout #order_review_heading { margin-top: 16px; }
  .tm-co-head__back { margin-left: 0; }
}
@media (max-width: 600px) {
  .tm-co-head__t { font-size: 24px; }
  #customer_details .col-1, #customer_details .col-2 { padding: 16px; border-radius: var(--r); }
  form.checkout #order_review_heading { padding: 16px 16px 0; }
  form.checkout #order_review { padding: 4px 16px 16px; }
  .woocommerce form .form-row-first, .woocommerce form .form-row-last,
  .woocommerce-page form .form-row-first, .woocommerce-page form .form-row-last { float: none; width: 100%; }
}

/* Thank-you page */
.woocommerce-order { display: grid; gap: 18px; }
.woocommerce-thankyou-order-received { padding: 18px 22px; border-radius: var(--r-lg); background: var(--ok-bg); color: var(--ok); font-size: 18px; font-weight: 800; }
ul.woocommerce-order-overview { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0; padding: 0; }
ul.woocommerce-order-overview li { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; font-size: 13px; color: var(--muted); }
ul.woocommerce-order-overview li strong { display: block; margin-top: 2px; font-size: 15.5px; color: var(--ink); }
.woocommerce-order-details, .woocommerce-customer-details { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.woocommerce-order-details__title, .woocommerce-column__title { font-size: 19px; font-weight: 800; margin-bottom: 10px; }

/* ---------- My account ---------- */
.woocommerce-account .tm-store .woocommerce { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.woocommerce-account .tm-store .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.woocommerce-account .woocommerce-MyAccount-navigation, .woocommerce-account .woocommerce-MyAccount-content { float: none; width: auto; }
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.woocommerce-MyAccount-navigation a { display: block; padding: 11px 14px; border-radius: var(--r-sm); font-weight: 600; color: var(--ink-2); }
.woocommerce-MyAccount-navigation a:hover { background: var(--soft); }
.woocommerce-MyAccount-navigation .is-active a { background: var(--ink); color: #fff; }
.woocommerce-MyAccount-content { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.woocommerce-MyAccount-content p { margin-bottom: 12px; }
.woocommerce-MyAccount-content a { text-decoration: underline; text-underline-offset: 2px; }
.woocommerce-MyAccount-content mark { background: var(--tint); padding: 0 4px; border-radius: 4px; }

/* Logged-out: login + register side by side */
.woocommerce-account:not(.logged-in) .tm-store .woocommerce { display: block; }
.tm-store .u-columns.col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tm-store .u-columns .u-column1, .tm-store .u-columns .u-column2 { float: none; width: auto; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.tm-store .u-columns h2 { font-size: 21px; font-weight: 800; margin-bottom: 14px; }
.tm-store form.login, .tm-store form.register { margin: 0; padding: 0; border: 0; }
.tm-store .woocommerce-form-login__rememberme { display: inline-flex; align-items: center; gap: 8px; margin-right: 12px; font-size: 14px; }
.tm-store .woocommerce-LostPassword { margin-top: 12px; font-size: 14px; }
.tm-store .woocommerce-LostPassword a { text-decoration: underline; }
.tm-store .woocommerce-form-login__submit, .tm-store .woocommerce-form-register__submit { min-width: 160px; }
.tm-store .lost_reset_password, .tm-store .woocommerce-ResetPassword { max-width: 520px; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }

@media (max-width: 900px) {
  .woocommerce-account .tm-store .woocommerce { grid-template-columns: 1fr; }
  .tm-store .u-columns.col2-set { grid-template-columns: 1fr; }
  .woocommerce-MyAccount-navigation ul { display: flex; overflow-x: auto; gap: 4px; }
  .woocommerce-MyAccount-navigation a { white-space: nowrap; }
}

/* The quantity box is an .input-text too — keep it out of the form-field rule */
.tm-store .quantity .qty, .woocommerce .quantity .qty { width: 46px; min-height: 0; height: 100%; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.js .tm-cart__tools { display: none; }
/* PayPal's own box holds only hidden inputs; the button renders below the form */
.tm-store #payment div.payment_box.payment_method_mecom_paypal { margin: 0; padding: 0; background: none; }
