/* ══════════════════════════════════════════════════════════════════════════
   woocommerce.css — restyles WooCommerce's own markup into the Daylight
   idiom. The theme overrides loop/product templates in /woocommerce/, but
   cart, checkout and My Account keep core markup (shortcode AND block) so
   they survive Woo upgrades — they are styled here instead of templated.
   ══════════════════════════════════════════════════════════════════════════ */

.woocommerce-page .tv-shell { padding-block: var(--tv-s-10) var(--tv-s-16); }

/* ── NOTICES ───────────────────────────────────────────────────────────── */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
  list-style: none;
  margin: 0 0 var(--tv-s-6);
  padding: 15px 20px;
  border: 1px solid var(--tv-hair-2);
  border-left: 3px solid var(--brand);
  border-radius: var(--tv-r-sm);
  background: var(--tv-glass);
  font-size: 14.5px;
  color: var(--tv-ink-2);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.woocommerce-message { border-left-color: var(--tv-signal-ok); }
.woocommerce-info   { border-left-color: var(--tv-signal-info); }
.woocommerce-error  { border-left-color: var(--tv-signal-err); }
.woocommerce-error li { margin: 0; }
.woocommerce-message .button,
.woocommerce-info .button { margin-left: auto; }

/* ── BUTTONS — map every Woo button onto .tv-btn ───────────────────────── */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.wc-block-components-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 52px; padding-inline: 26px;
  border: 1px solid transparent;
  border-radius: var(--tv-r-pill);
  background: var(--brand);
  color: #fff;
  font-family: var(--tv-font-display);
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--tv-dur-fast) var(--tv-ease), box-shadow var(--tv-dur-base);
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.wc-block-components-button:hover {
  background: var(--brand);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--brand) 75%, transparent);
}
/* Secondary actions (Update cart, Continue shopping) read as ghost buttons. */
.woocommerce button[name="update_cart"],
.woocommerce a.button.wc-backward,
.woocommerce .return-to-shop .button {
  background: var(--tv-glass);
  color: var(--tv-ink);
  border-color: var(--tv-hair-2);
}
.woocommerce button[name="update_cart"]:hover,
.woocommerce a.button.wc-backward:hover,
.woocommerce .return-to-shop .button:hover {
  background: var(--tv-glass); color: var(--tv-ink); border-color: var(--tv-ink);
}
.woocommerce button[name="update_cart"][disabled] { opacity: .4; pointer-events: none; }

/* ── FORM FIELDS ───────────────────────────────────────────────────────── */
.woocommerce form .form-row { margin-bottom: var(--tv-s-4); padding: 0; }
.woocommerce form .form-row label,
.wc-block-components-text-input label {
  display: block;
  font-family: var(--tv-font-mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--tv-ink-3);
  margin-bottom: 7px;
}
.woocommerce form .form-row .required { color: var(--tv-signal-err); border: 0; text-decoration: none; }

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page .select2-container .select2-selection--single,
.wc-block-components-text-input input,
.wc-blocks-components-select__container {
  width: 100%;
  height: 48px;
  border: 1px solid var(--tv-hair-2);
  border-radius: var(--tv-r-sm);
  background: var(--tv-paper);
  padding-inline: 14px;
  font: 500 15px var(--tv-font-body);
  color: var(--tv-ink);
  box-shadow: none;
}
.woocommerce form .form-row textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.wc-block-components-text-input input:focus {
  outline: 2px solid var(--brand);
  outline-offset: -1px;
  border-color: transparent;
}
.woocommerce-page .select2-container .select2-selection--single { display: flex; align-items: center; }
.woocommerce-page .select2-container .select2-selection__rendered { padding: 0; line-height: inherit; color: var(--tv-ink); }
.woocommerce-page .select2-container .select2-selection__arrow { height: 46px; right: 8px; }
.woocommerce-page .select2-dropdown {
  border-color: var(--tv-hair-2);
  border-radius: var(--tv-r-sm);
  background: var(--tv-paper);
  box-shadow: var(--tv-elev-2);
}

/* ── QUANTITY ──────────────────────────────────────────────────────────── */
.woocommerce .quantity input.qty {
  width: 72px; height: 48px;
  border: 1px solid var(--tv-hair-2);
  border-radius: var(--tv-r-pill);
  background: var(--tv-glass);
  text-align: center;
  font-family: var(--tv-font-display); font-weight: 700; font-size: 15px;
  color: var(--tv-ink);
}

/* ── CART ──────────────────────────────────────────────────────────────── */
.woocommerce table.shop_table {
  border: 1px solid var(--tv-hair);
  border-radius: var(--tv-r-lg);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--tv-glass);
  margin-bottom: var(--tv-s-8);
}
.woocommerce table.shop_table th {
  font-family: var(--tv-font-mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 400;
  color: var(--tv-ink-3);
  padding: 14px 16px;
  border-bottom: 1px solid var(--tv-hair);
  background: var(--tv-glass-deep);
}
.woocommerce table.shop_table td {
  padding: 18px 16px;
  border-bottom: 1px solid var(--tv-hair);
  vertical-align: middle;
  font-size: 14.5px;
  color: var(--tv-ink-2);
}
.woocommerce table.shop_table tbody tr:last-child td { border-bottom: 0; }
.woocommerce table.shop_table .product-name a { font-family: var(--tv-font-display); font-weight: 700; font-size: 15px; color: var(--tv-ink); }
.woocommerce table.shop_table .product-name a:hover { color: var(--brand-ink); }
.woocommerce table.shop_table img { width: 62px; border-radius: var(--tv-r-sm); background: #fff; }
.woocommerce table.shop_table .amount { font-family: var(--tv-font-display); font-weight: 700; color: var(--tv-ink); font-variant-numeric: tabular-nums; }
.woocommerce a.remove {
  width: 26px; height: 26px; line-height: 24px;
  border-radius: 50%;
  color: var(--tv-ink-3) !important;
  font-size: 16px; text-align: center;
  border: 1px solid var(--tv-hair-2);
}
.woocommerce a.remove:hover { background: var(--tv-signal-err); color: #fff !important; border-color: transparent; }

.woocommerce .cart-collaterals { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: var(--tv-s-8); align-items: start; }
@media (max-width: 860px) { .woocommerce .cart-collaterals { grid-template-columns: 1fr; } }
.woocommerce .cart_totals { width: 100%; float: none; }
.woocommerce .cart_totals h2 { font-size: var(--tv-fs-h3); margin-bottom: var(--tv-s-4); }
.woocommerce .cart_totals .order-total .amount { font-size: 22px; color: var(--brand-ink); }
.woocommerce .wc-proceed-to-checkout { padding: 0; margin-top: var(--tv-s-4); }
.woocommerce .wc-proceed-to-checkout a.checkout-button { width: 100%; }

.woocommerce .coupon { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.woocommerce .coupon input.input-text { width: auto; min-width: 200px; flex: 1; }

/* ── CHECKOUT ──────────────────────────────────────────────────────────── */
.woocommerce-checkout .col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: var(--tv-s-8); width: 100%; }
/* Woo's float clearfix is a pair of `display: table` pseudo-elements. Once the
   wrapper is a grid they are grid items in their own right, and the four boxes
   fill the two columns as ::before | .col-1 / .col-2 | ::after — which pushes
   billing and shipping onto separate rows at every width. They have nothing
   left to clear here, so they opt out. */
.woocommerce-checkout .col2-set::before,
.woocommerce-checkout .col2-set::after { display: none; }
@media (max-width: 760px) { .woocommerce-checkout .col2-set { grid-template-columns: 1fr; } }
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 { width: 100%; float: none; }
.woocommerce-checkout h3 { font-size: var(--tv-fs-h3); margin-bottom: var(--tv-s-4); }
#order_review_heading { margin-top: var(--tv-s-10); }

.woocommerce-checkout #payment {
  background: var(--tv-glass);
  border: 1px solid var(--tv-hair);
  border-radius: var(--tv-r-lg);
  padding: var(--tv-s-6);
}
.woocommerce-checkout #payment ul.payment_methods { border-bottom: 1px solid var(--tv-hair); padding: 0 0 var(--tv-s-4); list-style: none; }
.woocommerce-checkout #payment ul.payment_methods li { margin-bottom: 12px; }
.woocommerce-checkout #payment div.payment_box {
  background: var(--tv-paper-deep);
  border-radius: var(--tv-r-sm);
  color: var(--tv-ink-2);
  font-size: 13.5px;
}
.woocommerce-checkout #payment div.payment_box::before { display: none; }
.woocommerce-checkout #payment .form-row.place-order { padding: var(--tv-s-4) 0 0; margin: 0; }
.woocommerce-checkout #place_order { width: 100%; height: 56px; font-size: 17px; }

/* Block checkout / cart. */
.wc-block-components-title, .wp-block-woocommerce-checkout-order-summary-block h2 { font-family: var(--tv-font-display); }
.wc-block-components-panel__button, .wc-block-cart__submit-container { font-family: var(--tv-font-display); }
.wc-block-cart-items__row .wc-block-components-product-name { font-family: var(--tv-font-display); font-weight: 700; color: var(--tv-ink); }
.wc-block-components-totals-item__value, .wc-block-components-formatted-money-amount { font-family: var(--tv-font-display); font-variant-numeric: tabular-nums; }
.wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button { width: 100%; height: 56px; }

/* ── MY ACCOUNT ────────────────────────────────────────────────────────── */
.woocommerce-account .woocommerce-MyAccount-navigation {
  width: 240px; float: left; margin-right: var(--tv-s-10);
}
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.woocommerce-account .woocommerce-MyAccount-navigation li { margin: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 11px 14px;
  border-radius: var(--tv-r-sm);
  font-size: 14px; font-weight: 600;
  color: var(--tv-ink-2);
}
.woocommerce-account .woocommerce-MyAccount-navigation a:hover { background: var(--tv-paper-deep); color: var(--tv-ink); }
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a { background: var(--brand-soft); color: var(--brand-ink); }
.woocommerce-account .woocommerce-MyAccount-content { width: calc(100% - 280px); float: left; }
@media (max-width: 760px) {
  .woocommerce-account .woocommerce-MyAccount-navigation,
  .woocommerce-account .woocommerce-MyAccount-content { width: 100%; float: none; margin-right: 0; }
  .woocommerce-account .woocommerce-MyAccount-navigation { margin-bottom: var(--tv-s-8); }
  .woocommerce-account .woocommerce-MyAccount-navigation ul { flex-direction: row; flex-wrap: wrap; }
}
.woocommerce-account .woocommerce-form-login,
.woocommerce-account .woocommerce-form-register {
  border: 1px solid var(--tv-hair);
  border-radius: var(--tv-r-lg);
  background: var(--tv-glass);
  padding: var(--tv-s-8);
  margin: 0;
}

/* Login + Register.
   Both columns only exist when WooCommerce → Settings → Accounts & Privacy →
   "Allow customers to create an account on the My account page" is on; with
   it off Woo omits the register column and the login card stands alone.

   theme.js turns the two columns into one tabbed card (.tv-acct-tabbed);
   the grid below is the no-JS fallback. */
.woocommerce-account #customer_login {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--tv-s-8);
  align-items: start;
}
.woocommerce-account #customer_login > div {
  width: 100%;
  float: none;
  min-width: 0;
}
.woocommerce-account #customer_login h2 {
  font-size: var(--tv-fs-h3);
  margin-bottom: var(--tv-s-4);
}
@media (max-width: 760px) {
  .woocommerce-account #customer_login { grid-template-columns: 1fr; }
}

/* ── Tabbed variant ────────────────────────────────────────────────────── */
.woocommerce-account #customer_login.tv-acct-tabbed {
  display: block;
  max-width: 560px;
  margin-inline: auto;
  border: 1px solid var(--tv-hair);
  border-radius: var(--tv-r-lg);
  background: var(--tv-glass);
  overflow: hidden;
}
.woocommerce-account #customer_login.tv-acct-tabbed > div { width: 100%; }

/* Inside the card the forms lose their own frame — the card is the frame. */
.woocommerce-account #customer_login.tv-acct-tabbed .woocommerce-form-login,
.woocommerce-account #customer_login.tv-acct-tabbed .woocommerce-form-register {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 28px 24px;
}

.tv-acct-tabs { display: flex; border-bottom: 1px solid var(--tv-hair); }
.tv-acct-tab {
  flex: 1;
  padding: 18px 12px;
  border: 0;
  border-right: 1px solid var(--tv-hair);
  background: var(--tv-paper-deep);
  color: var(--tv-ink-2);
  font-family: var(--tv-font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--tv-dur-fast), color var(--tv-dur-fast);
}
.tv-acct-tab:last-child { border-right: 0; }
.tv-acct-tab:hover { color: var(--tv-ink); }
.tv-acct-tab.is-active { background: var(--tv-ink); color: var(--tv-paper); }

/* First / last name pair in the register form. Woo floats `form-row-first`
   and `-last` at 47%; a grid pairs them without the float clearing. */
.woocommerce-account .woocommerce-form-register {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 14px;
}
.woocommerce-account .woocommerce-form-register > * { grid-column: 1 / -1; min-width: 0; }
.woocommerce-account .woocommerce-form-register > .form-row-first { grid-column: 1; }
.woocommerce-account .woocommerce-form-register > .form-row-last { grid-column: 2; }
.woocommerce-account .woocommerce-form-register > .form-row-first,
.woocommerce-account .woocommerce-form-register > .form-row-last { width: 100%; float: none; }
/* Woo drops a float-clearing div between the pair; harmless but it would
   otherwise occupy a whole grid row. */
.woocommerce-account .woocommerce-form-register > .clear { display: none; }

@media (max-width: 480px) {
  .woocommerce-account .woocommerce-form-register { grid-template-columns: 1fr; }
  .woocommerce-account .woocommerce-form-register > .form-row-first,
  .woocommerce-account .woocommerce-form-register > .form-row-last { grid-column: 1 / -1; }
}

/* With registration off Woo drops #customer_login entirely and prints the
   login form on its own; unconstrained it would stretch the full page width. */
.woocommerce-account .woocommerce > h2,
.woocommerce-account .woocommerce > .woocommerce-form-login {
  max-width: 520px;
}
.woocommerce-account .woocommerce > h2 { font-size: var(--tv-fs-h3); margin-bottom: var(--tv-s-4); }

.woocommerce-account .woocommerce-form-login__submit,
.woocommerce-account .woocommerce-form-register__submit { width: 100%; margin-top: var(--tv-s-2); }

.woocommerce-account .woocommerce-form-login__rememberme { font-size: 14px; color: var(--tv-ink-2); }
.woocommerce-account .woocommerce-LostPassword { margin: var(--tv-s-4) 0 0; font-size: 13.5px; }

/* Privacy / account-creation notices inside the register card. */
.woocommerce-account .woocommerce-privacy-policy-text,
.woocommerce-account .woocommerce-form-register p:not(.form-row):not(.woocommerce-LostPassword) {
  font-size: 12.5px;
  color: var(--tv-ink-3);
  line-height: 1.6;
}

/* ── STAR RATINGS & REVIEWS ────────────────────────────────────────────── */
.woocommerce .star-rating span, .woocommerce p.stars a { color: var(--brand-ink); }
.woocommerce #reviews #comments ol.commentlist { list-style: none; padding: 0; margin: 0; }
.woocommerce #reviews #comments ol.commentlist li {
  margin-bottom: var(--tv-s-5);
  padding: var(--tv-s-5);
  border: 1px solid var(--tv-hair);
  border-radius: var(--tv-r-md);
  background: var(--tv-glass);
}
.woocommerce #reviews #comments ol.commentlist li .comment-text { border: 0; padding: 0; margin: 0; border-radius: 0; }
.woocommerce #review_form_wrapper { margin-top: var(--tv-s-8); }

/* ── PDP ADD-TO-CART FORM ──────────────────────────────────────────────── */
/* Woo renders form.cart; the theme wants qty and button on one row. */
.woocommerce .product form.cart {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: var(--tv-s-8) 0 0;
}
.woocommerce .product form.cart .tv-pdp-qty { flex: 0 0 auto; }
.woocommerce .product form.cart button.button,
.woocommerce .product form.cart .single_add_to_cart_button {
  flex: 1;
  min-width: 200px;
}
/* A variable product stacks its selectors above that row. */
/* `.single_variation_wrap` is the actual flex child of form.cart — the
   add-to-cart row lives two levels down, so the wrapper has to stretch too
   or the whole row collapses to its content width. */
.woocommerce .product form.cart .variations,
.woocommerce .product form.cart .single_variation_wrap,
.woocommerce .product form.cart .woocommerce-variation,
.woocommerce .product form.cart .woocommerce-variation-add-to-cart {
  flex: 1 0 100%;
}
.woocommerce .product form.cart .variations { border: 0; margin: 0; }
.woocommerce .product form.cart .variations td { border: 0; padding: 0 0 var(--tv-s-4); display: block; }
.woocommerce .product form.cart .variations label {
  font-family: var(--tv-font-mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--tv-ink-3);
  margin-bottom: 7px; display: block; font-weight: 400;
}
.woocommerce .product form.cart .variations select {
  width: 100%; height: 48px;
  border: 1px solid var(--tv-hair-2);
  border-radius: var(--tv-r-sm);
  background: var(--tv-paper);
  padding-inline: 14px;
  font: 500 15px var(--tv-font-body);
  color: var(--tv-ink);
}
.woocommerce .product form.cart .reset_variations { font-size: 12.5px; color: var(--tv-ink-3); }
.woocommerce .product form.cart .woocommerce-variation-price .price { font-size: 24px; }
.woocommerce .product form.cart .woocommerce-variation-add-to-cart { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
/* On a variable product the button sits one level deeper, so the `flex: 1`
   given to direct children of form.cart never reaches it. */
.woocommerce .product form.cart .woocommerce-variation-add-to-cart .single_add_to_cart_button { flex: 1; min-width: 200px; }
.woocommerce .product form.cart .group_table td { border: 0; padding: 10px 8px 10px 0; }

/* Product attribute table on the PDP specs section. */
.woocommerce .product .woocommerce-product-attributes th { width: 200px; }

/* ── LOOP FALLBACK ─────────────────────────────────────────────────────── */
/* Woo widgets and shortcodes still emit ul.products; give it the same grid. */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(var(--tv-cols, 4), minmax(0, 1fr));
  gap: var(--tv-s-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.woocommerce ul.products::before, .woocommerce ul.products::after { content: none; }
.woocommerce ul.products li.product { margin: 0; width: auto; float: none; }
@media (max-width: 1024px) { .woocommerce ul.products { grid-template-columns: repeat(var(--tv-cols-md, 3), minmax(0, 1fr)); } }
@media (max-width:  760px) { .woocommerce ul.products { grid-template-columns: repeat(var(--tv-cols-sm, 2), minmax(0, 1fr)); gap: var(--tv-s-3); } }

/* ── MISC ──────────────────────────────────────────────────────────────── */
.woocommerce .woocommerce-breadcrumb { display: none; }   /* the theme draws its own */
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering { display: none; }      /* replaced by .tv-shop-bar */
.woocommerce ins { text-decoration: none; background: none; }
.woocommerce del { color: var(--tv-ink-4); }
.woocommerce .price { font-family: var(--tv-font-display); font-weight: 800; color: var(--brand-ink); }
