/*
 * ULTRA FIT — WooCommerce Premium Redesign
 * Version: 5.0.0
 * Scope: Shop Archive · Single Product · Cart · Checkout
 *
 * CSS Architecture:
 *   body.post-type-archive-product  → Shop/Archive
 *   body.tax-product_cat            → Category archive
 *   body.single-product             → Product detail
 *   body.woocommerce-cart           → Cart
 *   body.woocommerce-checkout       → Checkout
 *   body.woocommerce-order-received → Thank You
 *
 * Do NOT prefix with body.home — homepage is handled in ultrafit-shop.css
 */

/* ─────────────────────────────────────────
   DESIGN TOKENS (inherit from ultrafit-shop.css :root)
   ───────────────────────────────────────── */
:root {
  --uf-blue:        #0057ff;
  --uf-blue-dark:   #0044cc;
  --uf-blue-light:  #e8f0ff;
  --uf-ink:         #090d16;
  --uf-ink-80:      rgba(9,13,22,.80);
  --uf-muted:       #677084;
  --uf-soft:        #f5f7fb;
  --uf-line:        rgba(15,23,42,.10);
  --uf-line-blue:   rgba(0,87,255,.18);
  --uf-card:        #ffffff;
  --uf-shadow:      0 20px 60px rgba(15,23,42,.08);
  --uf-shadow-sm:   0 4px 18px rgba(15,23,42,.06);
  --uf-radius:      16px;
  --uf-radius-sm:   10px;
  --uf-radius-xs:   8px;
  --uf-max:         1240px;
  --uf-font:        Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

/* ─────────────────────────────────────────
   GLOBAL WOOCOMMERCE RESETS
   (affects all WC pages except homepage)
   ───────────────────────────────────────── */
body.woocommerce:not(.home),
body.woocommerce-page:not(.home),
body.single-product:not(.home) {
  background: #fff;
  font-family: var(--uf-font);
  color: var(--uf-ink);
}

/* Normalize breadcrumb */
.woocommerce-breadcrumb {
  font-size: 13px;
  color: var(--uf-muted);
  padding: 20px 0 0;
  letter-spacing: 0;
}
.woocommerce-breadcrumb a {
  color: var(--uf-muted) !important;
  text-decoration: none !important;
}
.woocommerce-breadcrumb a:hover { color: var(--uf-blue) !important; }

/* WC notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-radius: var(--uf-radius-sm) !important;
  font-size: 14px;
}
.woocommerce-message { border-top-color: var(--uf-blue) !important; }

/* ─────────────────────────────────────────
   1. SHOP ARCHIVE — body.post-type-archive-product
                   — body.tax-product_cat
   ───────────────────────────────────────── */

/* Page heading */
body.post-type-archive-product .page-title,
body.tax-product_cat .page-title,
body.post-type-archive-product .woocommerce-products-header__title,
body.tax-product_cat .woocommerce-products-header__title {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.05;
  color: var(--uf-ink);
  margin-bottom: 4px;
}

body.post-type-archive-product .term-description,
body.tax-product_cat .term-description {
  color: var(--uf-muted);
  font-size: 15px;
  margin-bottom: 0;
}

/* ── Toolbar (result count + sort) ── */
.woocommerce-products-header {
  margin-bottom: 28px;
}

nav.woocommerce-breadcrumb { margin-bottom: 20px; }

.woocommerce-result-count {
  font-size: 13px;
  color: var(--uf-muted);
  font-weight: 500;
}

.woocommerce-ordering select {
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 36px 9px 14px;
  border: 1px solid var(--uf-line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--uf-font);
  color: var(--uf-ink);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23677084' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  cursor: pointer;
  outline: none;
  box-shadow: var(--uf-shadow-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
  min-height: 40px;
}
.woocommerce-ordering select:focus {
  border-color: var(--uf-blue);
  box-shadow: 0 0 0 3px rgba(0,87,255,.12);
}

/* ── Filter sidebar (if active) ── */
.widget_price_filter .ui-slider-range,
.widget_price_filter .ui-slider-handle {
  background: var(--uf-blue) !important;
}
.widget_price_filter .price_slider_wrapper .ui-widget-content {
  background: var(--uf-line) !important;
}
.widget.widget_product_categories ul li a,
.widget.widget_product_tag_cloud a {
  color: var(--uf-muted);
  font-size: 13px;
  text-decoration: none !important;
}
.widget.widget_product_categories ul li a:hover { color: var(--uf-blue); }

/* ── Product Grid ── */
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products,
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* ── Product Card ── */
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
.woocommerce ul.products li.product {
  background: var(--uf-card) !important;
  border: 1px solid var(--uf-line) !important;
  border-radius: var(--uf-radius) !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease !important;
  box-shadow: var(--uf-shadow-sm) !important;
}

body.post-type-archive-product ul.products li.product:hover,
body.tax-product_cat ul.products li.product:hover,
.woocommerce ul.products li.product:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--uf-shadow) !important;
  border-color: var(--uf-line-blue) !important;
}

/* Product thumbnail wrapper */
.woocommerce ul.products li.product .woocommerce-loop-product__link {
  display: block;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, var(--uf-soft) 100%);
  text-decoration: none !important;
  padding: 18px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.woocommerce ul.products li.product .attachment-woocommerce_thumbnail {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .3s ease;
  max-height: 200px;
}

.woocommerce ul.products li.product:hover .attachment-woocommerce_thumbnail {
  transform: scale(1.04);
}

/* On-sale badge */
.woocommerce ul.products li.product .onsale {
  top: 10px;
  left: 10px;
  right: auto;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  background: var(--uf-blue) !important;
  color: #fff !important;
  letter-spacing: .04em;
  min-height: auto;
  min-width: auto;
  box-shadow: none;
  line-height: 1.4;
}

/* Product card body */
.woocommerce ul.products li.product .product-info-wrapper,
.woocommerce ul.products li.product > :not(a):not(.onsale) {
  padding: 0 14px 14px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 14px !important;
  font-weight: 750 !important;
  letter-spacing: -.02em !important;
  line-height: 1.3 !important;
  color: var(--uf-ink) !important;
  padding: 12px 14px 4px !important;
  margin: 0 !important;
}

.woocommerce ul.products li.product .price {
  color: var(--uf-ink) !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  padding: 0 14px 10px !important;
  display: block !important;
}
.woocommerce ul.products li.product .price del {
  color: var(--uf-muted) !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  opacity: .7;
}
.woocommerce ul.products li.product .price ins {
  text-decoration: none !important;
  color: var(--uf-blue) !important;
}

/* Add to cart button — product grid */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  margin: 0 14px 14px !important;
  padding: 10px 16px !important;
  border-radius: var(--uf-radius-sm) !important;
  border: 1.5px solid rgba(0,87,255,.25) !important;
  background: #fff !important;
  color: var(--uf-blue) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  font-family: var(--uf-font) !important;
  text-decoration: none !important;
  letter-spacing: 0 !important;
  width: auto !important;
  transition: background .18s ease, border-color .18s ease, color .18s ease !important;
  box-shadow: none !important;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product a.button:hover {
  background: var(--uf-blue) !important;
  color: #fff !important;
  border-color: var(--uf-blue) !important;
}
.woocommerce ul.products li.product .added_to_cart {
  display: none !important;
}

/* ── Pagination ── */
.woocommerce nav.woocommerce-pagination ul {
  border: none !important;
}
.woocommerce nav.woocommerce-pagination ul li {
  border: none !important;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  border: 1px solid var(--uf-line) !important;
  border-radius: var(--uf-radius-xs) !important;
  color: var(--uf-muted) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  transition: border-color .18s, background .18s, color .18s !important;
  min-width: 38px;
  min-height: 38px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
.woocommerce nav.woocommerce-pagination ul li a:hover {
  border-color: var(--uf-blue) !important;
  color: var(--uf-blue) !important;
  background: var(--uf-blue-light) !important;
}
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--uf-blue) !important;
  border-color: var(--uf-blue) !important;
  color: #fff !important;
}


/* ─────────────────────────────────────────
   2. SINGLE PRODUCT — body.single-product
   ───────────────────────────────────────── */

body.single-product .woocommerce-product-gallery {
  margin-bottom: 0;
}

/* Gallery thumbnails */
body.single-product .flex-control-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px !important;
}
body.single-product .flex-control-thumbs li {
  width: 68px !important;
  height: 68px !important;
  flex: none;
}
body.single-product .flex-control-thumbs li img {
  border-radius: var(--uf-radius-xs);
  border: 2px solid var(--uf-line);
  object-fit: contain;
  background: var(--uf-soft);
  padding: 4px;
  transition: border-color .18s;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
body.single-product .flex-control-thumbs li img.flex-active {
  border-color: var(--uf-blue);
}

/* Main gallery image */
body.single-product .woocommerce-product-gallery__image a {
  display: block;
  border-radius: var(--uf-radius);
  overflow: hidden;
  background: var(--uf-soft);
}
body.single-product .woocommerce-product-gallery__image img {
  width: 100%;
  object-fit: contain;
  background: linear-gradient(180deg, #fff, var(--uf-soft));
}

/* ── Summary area ── */
body.single-product .summary {
  padding-left: 0;
}

/* Category label above title */
body.single-product .summary .posted_in {
  font-size: 11px;
  font-weight: 800;
  color: var(--uf-blue);
  text-transform: uppercase;
  letter-spacing: .1em;
  display: block;
  margin-bottom: 8px;
}
body.single-product .summary .posted_in a {
  color: var(--uf-blue) !important;
  text-decoration: none !important;
}

/* Product title */
body.single-product .summary .product_title {
  font-size: clamp(26px, 3.2vw, 44px) !important;
  font-weight: 900 !important;
  letter-spacing: -.045em !important;
  line-height: 1.06 !important;
  color: var(--uf-ink) !important;
  margin-bottom: 16px !important;
}

/* Star rating */
body.single-product .summary .woocommerce-product-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
body.single-product .woocommerce-review-link {
  color: var(--uf-muted) !important;
  font-size: 13px;
  text-decoration: none !important;
}
body.single-product .star-rating {
  color: var(--uf-blue) !important;
}
body.single-product .star-rating::before,
body.single-product .star-rating span::before {
  color: var(--uf-blue) !important;
}

/* Price */
body.single-product .summary .price {
  font-size: clamp(22px, 2.4vw, 30px) !important;
  font-weight: 900 !important;
  color: var(--uf-ink) !important;
  margin-bottom: 18px !important;
  display: block !important;
}
body.single-product .summary .price del {
  color: var(--uf-muted) !important;
  font-weight: 500 !important;
  font-size: 75% !important;
  opacity: .7;
}
body.single-product .summary .price ins {
  text-decoration: none !important;
  color: var(--uf-blue) !important;
}

/* Short description */
body.single-product .summary .woocommerce-product-details__short-description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--uf-muted);
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--uf-line);
}
body.single-product .summary .woocommerce-product-details__short-description p {
  margin-bottom: 8px;
}

/* Variation selects / attributes */
body.single-product .summary .variations td,
body.single-product .summary .variations th {
  padding: 4px 0;
  vertical-align: middle;
}
body.single-product .summary .variations label {
  font-size: 13px;
  font-weight: 700;
  color: var(--uf-ink);
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
  padding-right: 16px;
}

body.single-product .summary .variations select {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 36px 10px 14px;
  border: 1.5px solid var(--uf-line);
  border-radius: var(--uf-radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--uf-font);
  color: var(--uf-ink);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23677084' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) center;
  cursor: pointer;
  outline: none;
  min-height: 44px;
  min-width: 160px;
  transition: border-color .18s;
}
body.single-product .summary .variations select:focus {
  border-color: var(--uf-blue);
  box-shadow: 0 0 0 3px rgba(0,87,255,.10);
}

/* Reset variation link */
body.single-product .summary .reset_variations {
  font-size: 12px;
  color: var(--uf-muted) !important;
  text-decoration: underline !important;
}

/* Quantity */
body.single-product .summary .quantity .qty {
  border: 1.5px solid var(--uf-line);
  border-radius: var(--uf-radius-sm);
  font-size: 15px;
  font-weight: 700;
  color: var(--uf-ink);
  width: 70px;
  height: 44px;
  text-align: center;
  font-family: var(--uf-font);
  background: #fff;
  outline: none;
  transition: border-color .18s;
}
body.single-product .summary .quantity .qty:focus {
  border-color: var(--uf-blue);
  box-shadow: 0 0 0 3px rgba(0,87,255,.10);
}

/* Add to cart button */
body.single-product .summary .single_add_to_cart_button {
  min-height: 52px !important;
  padding: 0 32px !important;
  border-radius: 999px !important;
  background: var(--uf-blue) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  font-family: var(--uf-font) !important;
  letter-spacing: -.01em !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 12px 28px rgba(0,87,255,.25) !important;
  transition: background .18s, transform .18s, box-shadow .18s !important;
  text-decoration: none !important;
}
body.single-product .summary .single_add_to_cart_button:hover {
  background: var(--uf-blue-dark) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 16px 36px rgba(0,87,255,.30) !important;
}
body.single-product .summary .single_add_to_cart_button:active {
  transform: translateY(0) !important;
}

/* ── Trust badges below add-to-cart ── */
.uf-trust-badges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--uf-line);
}
.uf-trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid var(--uf-line);
  border-radius: var(--uf-radius-sm);
  text-align: center;
  background: var(--uf-soft);
  transition: border-color .18s;
}
.uf-trust-badge:hover { border-color: var(--uf-line-blue); }
.uf-trust-badge svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--uf-blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.uf-trust-badge strong {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  color: var(--uf-ink);
  line-height: 1.2;
}

/* ── Product tabs ── */
body.single-product .woocommerce-tabs {
  margin-top: 48px;
}

body.single-product .woocommerce-tabs ul.tabs {
  padding: 0;
  margin: 0 0 0;
  list-style: none;
  border-bottom: 2px solid var(--uf-line);
  display: flex;
  gap: 4px;
  background: none;
}
body.single-product .woocommerce-tabs ul.tabs::before { display: none; }

body.single-product .woocommerce-tabs ul.tabs li {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.single-product .woocommerce-tabs ul.tabs li::before,
body.single-product .woocommerce-tabs ul.tabs li::after { display: none; }

body.single-product .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--uf-muted) !important;
  text-decoration: none !important;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color .18s, border-color .18s;
}
body.single-product .woocommerce-tabs ul.tabs li.active a,
body.single-product .woocommerce-tabs ul.tabs li a:hover {
  color: var(--uf-ink) !important;
  border-bottom-color: var(--uf-blue);
}

body.single-product .woocommerce-tabs .panel {
  padding: 28px 0;
  border: none;
  margin: 0;
  background: none;
}
body.single-product .woocommerce-tabs .panel h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 12px;
  color: var(--uf-ink);
}
body.single-product .woocommerce-tabs .panel p,
body.single-product .woocommerce-tabs .panel li {
  font-size: 14px;
  line-height: 1.65;
  color: var(--uf-muted);
}

/* Reviews */
body.single-product #reviews #comments ol.commentlist li .comment-text {
  border: 1px solid var(--uf-line);
  border-radius: var(--uf-radius-sm);
  padding: 16px;
}

/* ── Related / upsells ── */
body.single-product .related,
body.single-product .upsells {
  margin-top: 52px;
  padding-top: 32px;
  border-top: 1px solid var(--uf-line);
}
body.single-product .related > h2,
body.single-product .upsells > h2 {
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 900;
  letter-spacing: -.04em;
  margin-bottom: 22px;
  color: var(--uf-ink);
}


/* ─────────────────────────────────────────
   3. CART — body.woocommerce-cart
   ───────────────────────────────────────── */

body.woocommerce-cart .page-title,
body.woocommerce-cart h1.entry-title {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--uf-ink);
  margin-bottom: 28px;
}

/* Cart layout */
body.woocommerce-cart .woocommerce {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

/* Cart form (left) */
body.woocommerce-cart .woocommerce-cart-form {
  background: var(--uf-card);
  border: 1px solid var(--uf-line);
  border-radius: var(--uf-radius);
  overflow: hidden;
  box-shadow: var(--uf-shadow-sm);
}

body.woocommerce-cart table.shop_table {
  border-collapse: collapse !important;
  width: 100%;
  background: none;
  border: none !important;
}
body.woocommerce-cart table.shop_table thead th {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--uf-muted);
  padding: 14px 18px;
  border-bottom: 1px solid var(--uf-line);
  background: var(--uf-soft);
  white-space: nowrap;
}
body.woocommerce-cart table.shop_table tbody td {
  padding: 18px;
  border-bottom: 1px solid var(--uf-line);
  vertical-align: middle;
}
body.woocommerce-cart table.shop_table tbody tr:last-child td {
  border-bottom: none;
}

/* Product thumbnail in cart */
body.woocommerce-cart table.shop_table td.product-thumbnail img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--uf-radius-xs);
  border: 1px solid var(--uf-line);
  background: var(--uf-soft);
  padding: 4px;
}

/* Product name in cart */
body.woocommerce-cart table.shop_table td.product-name a {
  font-size: 14px;
  font-weight: 700;
  color: var(--uf-ink) !important;
  text-decoration: none !important;
  letter-spacing: -.01em;
}
body.woocommerce-cart table.shop_table td.product-name a:hover {
  color: var(--uf-blue) !important;
}
body.woocommerce-cart table.shop_table td.product-name .variation {
  font-size: 12px;
  color: var(--uf-muted);
  margin-top: 4px;
}

/* Remove product button */
body.woocommerce-cart table.shop_table td.product-remove a.remove {
  color: var(--uf-muted) !important;
  font-size: 18px;
  line-height: 1;
  text-decoration: none !important;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .18s, color .18s;
}
body.woocommerce-cart table.shop_table td.product-remove a.remove:hover {
  background: rgba(220,38,38,.08);
  color: #dc2626 !important;
}

/* Quantity in cart */
body.woocommerce-cart .qty {
  border: 1.5px solid var(--uf-line) !important;
  border-radius: var(--uf-radius-xs) !important;
  width: 58px !important;
  height: 38px !important;
  text-align: center !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  font-family: var(--uf-font) !important;
  color: var(--uf-ink) !important;
  background: #fff !important;
  outline: none !important;
  transition: border-color .18s !important;
}
body.woocommerce-cart .qty:focus {
  border-color: var(--uf-blue) !important;
}

/* Price */
body.woocommerce-cart table.shop_table td.product-price,
body.woocommerce-cart table.shop_table td.product-subtotal {
  font-size: 14px;
  font-weight: 800;
  color: var(--uf-ink);
}

/* Coupon + update row */
body.woocommerce-cart .actions {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--uf-soft);
  border-top: 1px solid var(--uf-line);
}
body.woocommerce-cart .coupon {
  display: flex;
  gap: 8px;
  align-items: center;
}
body.woocommerce-cart .coupon label { display: none; }
body.woocommerce-cart .coupon #coupon_code {
  border: 1.5px solid var(--uf-line);
  border-radius: var(--uf-radius-xs);
  padding: 9px 14px;
  font-size: 13px;
  font-family: var(--uf-font);
  height: 40px;
  outline: none;
  transition: border-color .18s;
  background: #fff;
}
body.woocommerce-cart .coupon #coupon_code:focus {
  border-color: var(--uf-blue);
}
body.woocommerce-cart .coupon .button {
  height: 40px;
  padding: 0 16px;
  border-radius: var(--uf-radius-xs) !important;
  border: 1.5px solid var(--uf-line) !important;
  background: #fff !important;
  color: var(--uf-ink) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  font-family: var(--uf-font) !important;
  cursor: pointer;
  transition: border-color .18s, background .18s !important;
}
body.woocommerce-cart .coupon .button:hover {
  border-color: var(--uf-blue) !important;
  color: var(--uf-blue) !important;
}
body.woocommerce-cart .actions .button[name="update_cart"] {
  margin-left: auto;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--uf-radius-xs) !important;
  border: 1.5px solid var(--uf-line) !important;
  background: #fff !important;
  color: var(--uf-muted) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: var(--uf-font) !important;
  cursor: pointer;
  transition: border-color .18s, color .18s !important;
}
body.woocommerce-cart .actions .button[name="update_cart"]:hover {
  border-color: var(--uf-ink) !important;
  color: var(--uf-ink) !important;
}

/* ── Cart totals (right sticky) ── */
body.woocommerce-cart .cart-collaterals {
  /* sticks in desktop grid right col */
}
body.woocommerce-cart .cart_totals {
  background: var(--uf-card);
  border: 1px solid var(--uf-line);
  border-radius: var(--uf-radius);
  overflow: hidden;
  box-shadow: var(--uf-shadow-sm);
  position: sticky;
  top: 90px;
}
body.woocommerce-cart .cart_totals h2 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--uf-ink);
  padding: 18px 18px 14px;
  margin: 0;
  border-bottom: 1px solid var(--uf-line);
  background: var(--uf-soft);
}
body.woocommerce-cart .cart_totals table {
  width: 100%;
  border-collapse: collapse;
}
body.woocommerce-cart .cart_totals table th {
  font-size: 13px;
  font-weight: 600;
  color: var(--uf-muted);
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid var(--uf-line);
  background: none;
  width: 45%;
}
body.woocommerce-cart .cart_totals table td {
  font-size: 14px;
  font-weight: 700;
  color: var(--uf-ink);
  padding: 12px 18px;
  text-align: right;
  border-bottom: 1px solid var(--uf-line);
}
body.woocommerce-cart .cart_totals table tr.order-total th,
body.woocommerce-cart .cart_totals table tr.order-total td {
  font-size: 16px;
  font-weight: 900;
  border-bottom: none;
}
body.woocommerce-cart .cart_totals table tr.order-total td {
  color: var(--uf-blue);
}
body.woocommerce-cart .cart_totals .wc-proceed-to-checkout {
  padding: 14px 18px;
}
body.woocommerce-cart .cart_totals .wc-proceed-to-checkout .checkout-button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-radius: 999px !important;
  background: var(--uf-blue) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  font-family: var(--uf-font) !important;
  letter-spacing: -.01em !important;
  text-decoration: none !important;
  border: none !important;
  box-shadow: 0 10px 24px rgba(0,87,255,.24) !important;
  transition: background .18s, transform .18s, box-shadow .18s !important;
}
body.woocommerce-cart .cart_totals .wc-proceed-to-checkout .checkout-button:hover {
  background: var(--uf-blue-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 14px 32px rgba(0,87,255,.30) !important;
}

/* Shipping calc */
body.woocommerce-cart .cart_totals .shipping-calculator-button {
  font-size: 12px;
  color: var(--uf-blue) !important;
  text-decoration: underline !important;
}


/* ─────────────────────────────────────────
   4. CHECKOUT — body.woocommerce-checkout
   ───────────────────────────────────────── */

body.woocommerce-checkout .page-title,
body.woocommerce-checkout h1.entry-title {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--uf-ink);
  margin-bottom: 28px;
}

/* ── Checkout login/coupon notices ── */
body.woocommerce-checkout .woocommerce-info {
  font-size: 14px;
  color: var(--uf-muted);
  background: var(--uf-soft);
  border: 1px solid var(--uf-line);
  border-left: 3px solid var(--uf-blue) !important;
  border-radius: 0 var(--uf-radius-xs) var(--uf-radius-xs) 0 !important;
  padding: 12px 16px;
}

/* ── Two-column layout ── */
body.woocommerce-checkout .woocommerce {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

/* ── Left: customer / billing / shipping / payment ── */
body.woocommerce-checkout .col2-set {
  background: var(--uf-card);
  border: 1px solid var(--uf-line);
  border-radius: var(--uf-radius);
  padding: 28px;
  box-shadow: var(--uf-shadow-sm);
}

body.woocommerce-checkout .col2-set .col-1,
body.woocommerce-checkout .col2-set .col-2 {
  float: none;
  width: 100%;
}

/* Section headings */
body.woocommerce-checkout h3#order_review_heading,
body.woocommerce-checkout h3#ship-to-different-address,
body.woocommerce-checkout .woocommerce-billing-fields h3,
body.woocommerce-checkout .woocommerce-shipping-fields h3,
body.woocommerce-checkout .woocommerce-additional-fields h3,
body.woocommerce-checkout #payment h3 {
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
  color: var(--uf-ink) !important;
  margin-bottom: 18px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid var(--uf-line);
}

/* Form fields */
body.woocommerce-checkout .form-row {
  margin-bottom: 14px !important;
}
body.woocommerce-checkout .form-row label {
  font-size: 12px;
  font-weight: 700;
  color: var(--uf-ink);
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}
body.woocommerce-checkout .form-row abbr {
  color: var(--uf-blue);
  text-decoration: none;
}
body.woocommerce-checkout .form-row input.input-text,
body.woocommerce-checkout .form-row textarea,
body.woocommerce-checkout .form-row select,
body.woocommerce-checkout .select2-container--default .select2-selection--single {
  border: 1.5px solid var(--uf-line) !important;
  border-radius: var(--uf-radius-sm) !important;
  padding: 11px 14px !important;
  font-size: 14px !important;
  font-family: var(--uf-font) !important;
  color: var(--uf-ink) !important;
  background: #fff !important;
  min-height: 46px !important;
  width: 100% !important;
  outline: none !important;
  transition: border-color .18s, box-shadow .18s !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
body.woocommerce-checkout .form-row input.input-text:focus,
body.woocommerce-checkout .form-row textarea:focus,
body.woocommerce-checkout .form-row select:focus,
body.woocommerce-checkout .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--uf-blue) !important;
  box-shadow: 0 0 0 3px rgba(0,87,255,.10) !important;
}

/* Select2 alignment */
body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 44px !important;
  color: var(--uf-ink) !important;
  font-size: 14px !important;
  padding-left: 14px !important;
}
body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 44px !important;
}

/* Field error */
body.woocommerce-checkout .form-row.woocommerce-invalid input.input-text,
body.woocommerce-checkout .form-row.woocommerce-invalid textarea {
  border-color: #dc2626 !important;
}

/* Ship to different address checkbox */
body.woocommerce-checkout #ship-to-different-address label {
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

/* ── Payment box ── */
body.woocommerce-checkout #payment {
  background: var(--uf-soft);
  border: 1px solid var(--uf-line);
  border-radius: var(--uf-radius-sm);
  margin-top: 20px;
  overflow: hidden;
}
body.woocommerce-checkout #payment ul.payment_methods {
  padding: 16px;
  list-style: none;
  margin: 0;
  border-bottom: 1px solid var(--uf-line);
}
body.woocommerce-checkout #payment ul.payment_methods li {
  margin-bottom: 8px;
}
body.woocommerce-checkout #payment ul.payment_methods li:last-child { margin-bottom: 0; }
body.woocommerce-checkout #payment ul.payment_methods li label {
  font-size: 14px;
  font-weight: 600;
  color: var(--uf-ink);
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
body.woocommerce-checkout #payment .payment_box {
  font-size: 13px;
  color: var(--uf-muted);
  background: rgba(0,87,255,.04);
  border: none;
  border-radius: var(--uf-radius-xs);
  padding: 12px;
  margin-top: 6px;
}

body.woocommerce-checkout #payment .place-order {
  padding: 16px;
}
body.woocommerce-checkout #place_order {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 54px !important;
  border-radius: 999px !important;
  background: var(--uf-blue) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  font-family: var(--uf-font) !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 12px 28px rgba(0,87,255,.25) !important;
  transition: background .18s, transform .18s, box-shadow .18s !important;
  letter-spacing: -.01em !important;
}
body.woocommerce-checkout #place_order:hover {
  background: var(--uf-blue-dark) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 16px 36px rgba(0,87,255,.30) !important;
}

/* Privacy notice */
body.woocommerce-checkout .woocommerce-privacy-policy-text {
  font-size: 12px;
  color: var(--uf-muted);
  text-align: center;
  padding: 0 16px 12px;
}
body.woocommerce-checkout .woocommerce-privacy-policy-text a {
  color: var(--uf-blue) !important;
}

/* ── Right: Order review ── */
body.woocommerce-checkout #order_review {
  background: var(--uf-card);
  border: 1px solid var(--uf-line);
  border-radius: var(--uf-radius);
  overflow: hidden;
  box-shadow: var(--uf-shadow-sm);
  position: sticky;
  top: 90px;
}

body.woocommerce-checkout #order_review_heading {
  font-size: 15px !important;
  font-weight: 800 !important;
  padding: 18px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--uf-line) !important;
  background: var(--uf-soft);
}

body.woocommerce-checkout table.shop_table {
  width: 100%;
  border-collapse: collapse;
}
body.woocommerce-checkout table.shop_table thead th {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--uf-muted);
  padding: 10px 18px;
  border-bottom: 1px solid var(--uf-line);
  background: none;
  white-space: nowrap;
}
body.woocommerce-checkout table.shop_table tbody td,
body.woocommerce-checkout table.shop_table tfoot th,
body.woocommerce-checkout table.shop_table tfoot td {
  padding: 12px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--uf-line);
  color: var(--uf-ink);
}
body.woocommerce-checkout table.shop_table tfoot th {
  font-weight: 700;
  color: var(--uf-muted);
}
body.woocommerce-checkout table.shop_table tfoot td {
  font-weight: 800;
  text-align: right;
}
body.woocommerce-checkout table.shop_table tfoot .order-total th,
body.woocommerce-checkout table.shop_table tfoot .order-total td {
  font-size: 15px;
  font-weight: 900;
  border-bottom: none;
}
body.woocommerce-checkout table.shop_table tfoot .order-total td {
  color: var(--uf-blue);
}

/* Product name in order review */
body.woocommerce-checkout table.shop_table .product-name {
  font-weight: 700;
  color: var(--uf-ink);
}
body.woocommerce-checkout table.shop_table .product-quantity {
  color: var(--uf-muted);
  font-size: 12px;
}

/* ── Secure checkout badge ── */
.uf-secure-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  color: var(--uf-muted);
  padding: 10px 18px 16px;
}
.uf-secure-checkout svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--uf-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ─────────────────────────────────────────
   5. THANK YOU / ORDER RECEIVED
   ───────────────────────────────────────── */

body.woocommerce-order-received .woocommerce-thankyou-order-received {
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 900;
  letter-spacing: -.04em;
  color: var(--uf-ink);
  margin-bottom: 8px;
}

body.woocommerce-order-received .woocommerce-order {
  background: var(--uf-card);
  border: 1px solid var(--uf-line);
  border-radius: var(--uf-radius);
  padding: 32px;
  box-shadow: var(--uf-shadow-sm);
  max-width: 720px;
}

body.woocommerce-order-received .woocommerce-order-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  background: var(--uf-soft);
  border: 1px solid var(--uf-line);
  border-radius: var(--uf-radius-sm);
  padding: 18px;
  list-style: none;
  margin: 0 0 24px;
}
body.woocommerce-order-received .woocommerce-order-overview li {
  font-size: 12px;
  color: var(--uf-muted);
  font-weight: 600;
}
body.woocommerce-order-received .woocommerce-order-overview li strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: var(--uf-ink);
  margin-top: 3px;
}

body.woocommerce-order-received .woocommerce-order-details__title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}

/* ─────────────────────────────────────────
   6. HEADER REFINEMENTS (all WC pages)
   ───────────────────────────────────────── */

/* Cart count badge */
body:not(.home) .ct-header .cart-count-bubble,
body:not(.home) [class*="cart-count"] {
  background: var(--uf-blue) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  min-width: 17px !important;
  min-height: 17px !important;
  line-height: 17px !important;
  text-align: center !important;
}

/* ─────────────────────────────────────────
   7. RESPONSIVE
   ───────────────────────────────────────── */

/* ── Tablet ~960px ── */
@media (max-width: 980px) {

  /* Shop grid → 2 col */
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  /* Cart → stack */
  body.woocommerce-cart .woocommerce {
    grid-template-columns: 1fr;
  }
  body.woocommerce-cart .cart_totals {
    position: static;
  }

  /* Checkout → stack */
  body.woocommerce-checkout .woocommerce {
    grid-template-columns: 1fr;
  }
  body.woocommerce-checkout #order_review {
    position: static;
  }

  /* Trust badges → 2 col */
  .uf-trust-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Mobile ~640px ── */
@media (max-width: 640px) {

  /* Shop grid → 2 col (keep 2 on mobile) */
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  /* Smaller card text */
  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 12px !important;
    padding: 8px 10px 2px !important;
  }
  .woocommerce ul.products li.product .price {
    font-size: 13px !important;
    padding: 0 10px 8px !important;
  }
  .woocommerce ul.products li.product .button,
  .woocommerce ul.products li.product a.button {
    margin: 0 10px 10px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  /* Single product – stack gallery & summary */
  body.single-product .woocommerce-product-gallery {
    margin-bottom: 20px;
  }
  body.single-product .summary .product_title {
    font-size: 24px !important;
  }
  body.single-product .summary .price {
    font-size: 20px !important;
  }
  body.single-product .summary .single_add_to_cart_button {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Trust badges → 2 col */
  .uf-trust-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .uf-trust-badge strong { font-size: 10px; }

  /* Tabs scroll horizontal */
  body.single-product .woocommerce-tabs ul.tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    flex-wrap: nowrap;
    padding-bottom: 0;
  }
  body.single-product .woocommerce-tabs ul.tabs li a {
    white-space: nowrap;
    padding: 10px 14px;
  }

  /* Cart table */
  body.woocommerce-cart table.shop_table thead { display: none; }
  body.woocommerce-cart table.shop_table tbody tr {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    grid-template-areas:
      "remove thumb name"
      "remove thumb price"
      "remove thumb qty";
    gap: 6px;
    padding: 14px 14px;
    border-bottom: 1px solid var(--uf-line);
  }
  body.woocommerce-cart table.shop_table tbody td {
    border: none;
    padding: 0;
  }
  body.woocommerce-cart table.shop_table td.product-remove { grid-area: remove; align-self: center; }
  body.woocommerce-cart table.shop_table td.product-thumbnail { grid-area: thumb; }
  body.woocommerce-cart table.shop_table td.product-name { grid-area: name; }
  body.woocommerce-cart table.shop_table td.product-price { grid-area: price; font-size: 13px; }
  body.woocommerce-cart table.shop_table td.product-quantity { grid-area: qty; }
  body.woocommerce-cart table.shop_table td.product-subtotal { display: none; }

  /* Cart totals */
  body.woocommerce-cart .cart_totals h2 { font-size: 14px; }

  /* Checkout fields */
  body.woocommerce-checkout .col2-set {
    padding: 20px;
  }

  /* Order review on mobile – above payment */
  body.woocommerce-checkout .woocommerce {
    display: flex;
    flex-direction: column-reverse;
  }

  /* Thumbnail gallery thumbnails – smaller */
  body.single-product .flex-control-thumbs li {
    width: 52px !important;
    height: 52px !important;
  }
}

/* ── Very small 375px ── */
@media (max-width: 400px) {
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  .woocommerce ul.products {
    grid-template-columns: 1fr !important;
  }
}
