/* ==========================================================================
   OstuGrupp — WooCommerce premium styling (Step 3)
   Shop archive · product card · single product · cart · checkout · account.
   Uses the design tokens from main.css.
   ========================================================================== */

/* ---- Trust bar (under header) ---- */
.trust-bar { background: #fff; border-bottom: 1px solid var(--border); }
.trust-bar__inner { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; padding-block: 12px; }
.trust-bar__item { font-size: 13px; font-weight: 600; color: var(--slate); display: inline-flex; align-items: center; gap: 7px; }
.trust-bar__item svg { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }
/* Phones used to hide items 3–4 outright — which silently dropped "14 päeva
   tagastus", the single strongest trust signal, on the devices that bring most of
   the traffic. Scroll the row instead so every promise survives. */
@media (max-width: 768px) {
  .trust-bar__inner {
    display: flex; flex-wrap: nowrap; gap: 18px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; scroll-snap-type: x proximity;
  }
  .trust-bar__inner::-webkit-scrollbar { display: none; }
  .trust-bar__item { flex: none; white-space: nowrap; scroll-snap-align: start; }
}

/* ---- Breadcrumb ---- */
.woocommerce-breadcrumb {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; max-width: 100%;
  font-size: 13px; font-weight: 500; color: var(--slate-500);
  background: #fff; border: 1px solid var(--border);
  /* Rounded RECTANGLE, not a 999px pill: a long trail wraps to several lines on
     phones, and a full pill turns into a tall oval whose corners spill outside the
     border. A radius-lg rectangle contains multi-line text cleanly. */
  border-radius: var(--radius-lg);
  padding: 9px 16px; margin-bottom: 20px; box-shadow: var(--shadow-card); line-height: 1.6;
}
.woocommerce-breadcrumb a { color: var(--slate-500); text-decoration: none; padding: 2px 4px; border-radius: 6px; transition: color .15s ease, background .15s ease; }
.woocommerce-breadcrumb a:hover { color: var(--green); background: var(--muted); }
.woocommerce-breadcrumb a:first-child { color: var(--slate); font-weight: 600; }
.woocommerce-breadcrumb .sep { color: var(--slate-300); margin: 0 4px; }

/* ---- envo-extra plugin breadcrumb (.woo-breadcrumbs / .breadcrumb-trail) ----
   The store still has the envo-extra plugin active, which prints its OWN
   breadcrumb on shop + single pages (overriding ours). Style it to match our
   pill so it looks designed even before the plugin is removed. (Best fix:
   delete envo-extra — then our own "Avaleht" breadcrumb takes over.) */
.breadcrumb.woo-breadcrumbs, .woo-breadcrumbs, nav.breadcrumb-trail, .breadcrumb-trail {
  display: inline-flex; flex-wrap: wrap; align-items: center;
  font-size: 13px; font-weight: 500; color: var(--slate-500);
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 16px; margin: 0 0 20px; box-shadow: var(--shadow-card); list-style: none;
}
.woo-breadcrumbs a, .breadcrumb-trail a { color: var(--slate-500); text-decoration: none; }
.woo-breadcrumbs a:first-child, .breadcrumb-trail a:first-child { color: var(--slate); font-weight: 600; }
.woo-breadcrumbs a:hover, .breadcrumb-trail a:hover { color: var(--green); }
.woo-breadcrumbs .breadcrumb_last, .breadcrumb-trail .breadcrumb_last { color: var(--slate-dark); font-weight: 600; }

/* ---- Inline emoji sizing ----
   The WordPress emoji stylesheet is disabled for performance (inc/performance.php),
   which normally sizes img.emoji to 1em. Product descriptions imported with ✅/✔
   emoji therefore render the converted <img class="emoji"> at full/huge size.
   Restore the 1em inline sizing here (loads on every page — woocommerce.css is
   enqueued globally). */
img.emoji, img.wp-smiley {
  display: inline-block !important; width: 1em !important; height: 1em !important;
  margin: 0 .07em !important; vertical-align: -0.1em !important;
  background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important;
}

/* ---- Shop archive header ---- */
.woocommerce-products-header { margin-bottom: 24px; }
.woocommerce-products-header__title { font-size: clamp(28px, 4vw, 40px); }
.term-description { color: var(--slate-600); max-width: 720px; margin-top: 8px; }

/* result count + ordering toolbar */
.woocommerce-result-count { color: var(--slate-600); font-size: 14px; margin: 0; }
.woocommerce-ordering { margin: 0; }
.woocommerce-ordering select, .woocommerce select.orderby {
  appearance: none; -webkit-appearance: none; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 36px 10px 14px; font: inherit; font-weight: 600; color: var(--slate);
  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='%23334155' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; min-height: 44px; cursor: pointer;
}
.woo-content { display: flex; flex-direction: column; }
.woocommerce .woo-content::before, .woocommerce .woo-content::after { content: none; }
form.woocommerce-ordering, .woocommerce-result-count { } /* default flow */

/* ---- Product grid ---- */
.woocommerce ul.products, ul.products {
  display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0 0; padding: 0; list-style: none;
  align-items: stretch; /* every card fills the full row height → titles/prices/buttons line up */
}
@media (min-width: 768px) { .woocommerce ul.products, ul.products { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .woocommerce ul.products, ul.products { grid-template-columns: repeat(4, 1fr); } }
.woocommerce ul.products li.product, ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; text-align: left; height: 100%; }
/* WooCommerce core adds clearfix ::before/::after (content:" "; display:table) to
   ul.products. Because the list is display:grid here, those pseudo-elements become
   grid items — ::before steals the first cell (empty "phantom" product), ::after a
   trailing cell. Neutralise them everywhere (same treatment as .woo-content above). */
.woocommerce ul.products::before, .woocommerce ul.products::after,
ul.products::before, ul.products::after { content: none !important; display: none !important; }

/* ---- Premium product card ----
   Matches the approved mockup: white surface, 16px radius, subtle shadow,
   hover lift. Full-height flex column so an entire grid row stretches to equal
   height and the title / price / action area align across cards — out-of-stock
   cards too.

   DOM contract (see content-product.php + relocations):
     li.product-card
       .product-card__media   → image + .onsale (top-right) + .ostu-loop-badges (top-left)
       .product-card__body    → title · rating · .price · .product-card__actions
         .product-card__actions
           a.add_to_cart_button (primary, full width)
           .product-card__tools  → compare pill + quick-view pill (two small ghosts) */
.product-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column; height: 100%; position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: rgba(5,150,105,.3); }
/* .product-card__link wraps the image inside the media frame (contract). Fill it
   so the centered thumbnail uses the whole square. (Harmless if a legacy template
   wraps more — it stays a column.) */
.product-card__link { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.product-card__media { position: relative; background: var(--muted); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.product-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .3s ease; }
.product-card:hover .product-card__media img { transform: scale(1.05); }

/* Body — full-height flex column that grows so the buy block pins to the bottom
   and lines up across the whole row regardless of title length. */
.product-card__body { padding: 14px; display: flex; flex-direction: column; gap: 7px; flex: 1 1 auto; min-height: 0; }

/* Title-link — the contract wraps title + rating + price in an <a>. Make it a
   growing flex column so the price's margin-top:auto pushes price (and the
   actions below) to the bottom. Legacy templates put these straight in the body;
   the same flex chain still works there. */
.product-card__body .product-card__title-link {
  display: flex; flex-direction: column; gap: 7px; flex: 1 1 auto; min-height: 0;
}

/* Title — supports the contract class .product-card__title and the WooCommerce
   default .woocommerce-loop-product__title. Clamp to 2 lines; reserve the height
   so 1- and 2-line titles keep the price on the same baseline. */
.product-card__title,
.product-card__body .woocommerce-loop-product__title,
.product-card .woocommerce-loop-product__title {
  font-family: var(--font-body); font-size: 14.5px; font-weight: 500; color: var(--slate-dark); line-height: 1.35;
  /* The clamp lives on the inner span (inc/woocommerce.php prints it): this h2 is a
     flex item and flex items are blockified, so -webkit-box here computed to
     flow-root and the clamp silently did nothing. overflow+max-height stay as a
     safety net for any renderer that skips the span. */
  overflow: hidden; padding: 0; margin: 0;
  min-height: 38px; /* ≈ two 14.5px/1.35 lines → titles + prices align across the row */
  /* 3em, not 2.7em. 2.7em is EXACTLY two lines at line-height 1.35 (43.2px at 16px)
     — zero room below the second line — so overflow:hidden sliced the descenders and
     brackets off it: "aku (Makita 18V akude sobivus)" lost the bottom of its
     parentheses, "Hõõgküünla Remontkomplekt" lost its p and its comma. The owner
     spotted it on two separate screenshots; it affects every product grid on the site.
     The LINE COUNT is already limited by -webkit-line-clamp:2 below, so this value
     only ever needed to be a floor for alignment, never a guillotine. */
  max-height: 3em;
}
.product-card__title-text {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card:hover .product-card__title,
.product-card:hover .woocommerce-loop-product__title { color: var(--green); }
.product-card .star-rating { font-size: 13px; margin: 0; }

/* Price — BIG (mockup): 22px / 700, slate-dark; sale ins green, regular del
   struck through small. margin-top:auto pushes price + actions to the bottom. */
.product-card .price { color: var(--slate-dark) !important; font-size: 22px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; margin-top: auto; }
.product-card .price del { color: var(--slate-400); font-weight: 500; font-size: 13px; opacity: .85; margin-right: 6px; }
.product-card .price ins { text-decoration: none; color: var(--green) !important; }

/* sale flash ("Soodus") — tidy pill inset over the image, TOP-RIGHT. Anchors to
   .product-card__media (position: relative). Pairs with the "Otsas" badge, which
   sits TOP-LEFT (.ostu-loop-badges below), so they never overlap.

   SPECIFICITY: WooCommerce core ships `.woocommerce ul.products li.product .onsale`
   with absolute positioning + NEGATIVE margins (margin:-.5em -.5em 0 0; top/right:0),
   which pushes the pill outside the card where overflow:hidden clips it. Our base
   `.onsale` selector is too weak to beat that, so we add a selector that matches
   core's weight (and `.product-card .onsale` for the home/quick rails) and force
   the inset with !important. The pill then sits fully INSIDE the media at 12px. */
.onsale, .woocommerce span.onsale,
.woocommerce ul.products li.product .onsale,
.woocommerce ul.products li.product span.onsale,
.product-card .onsale, .product-card span.onsale {
  position: absolute !important;
  top: 12px !important; right: 12px !important; left: auto !important; bottom: auto !important;
  margin: 0 !important;
  z-index: 3; background: var(--danger-dark); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 4px 11px; border-radius: 999px;
  min-height: 0; min-width: 0; line-height: 1.4;
  box-shadow: 0 2px 6px -2px rgba(185, 28, 28, .4);
}

/* ---- Loop badges ("Otsas" / "Uus") ----
   Printed by inc/shop-extras.php (ostugrupp_loop_badges) as
   .ostu-loop-badges > .ostu-badge inside li.product-card on EVERY product grid:
   the shop archive, taxonomy archives AND the home [products] rails. Because
   shop.css only loads on shop/taxonomy views, the badges rendered as unstyled
   plain text on the home rails. The styling lives here (woocommerce.css loads
   wherever WooCommerce is active) so the "Otsas" pill is identical everywhere —
   slate-dark, white, top-left, matching the "Soodus" pill above. Anchors to
   li.product-card (position: relative); pairs with .onsale top-right. */
.ostu-loop-badges {
  position: absolute; top: 12px; left: 12px; right: auto; z-index: 4;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  pointer-events: none; margin: 0;
}
.ostu-loop-badges .ostu-badge,
.product-card .ostu-badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-display, inherit); font-size: 10.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px; line-height: 1.4; margin: 0;
  box-shadow: 0 2px 6px -2px rgba(15, 23, 42, .3);
}
.ostu-loop-badges .ostu-badge--new,
.product-card .ostu-badge--new { background: var(--slate-dark); color: #fff; }
/* "Otsas" — calm dark slate pill (matches the Soodus pill's weight without
   competing for the eye). Consistent on shop + home rails. */
.ostu-loop-badges .ostu-badge--out,
.product-card .ostu-badge--out { background: var(--slate-dark); color: #fff; }

/* Dim out-of-stock cards subtly so the "Otsas" pill + "Laost otsas" state read
   clearly. (Mirrors the shop.css rule so it also applies on the home rails.) */
.product-card.outofstock .product-card__media img { opacity: .72; }

/* "Laost otsas" — out-of-stock placeholder where the green buy button would go.
   Rendered by content-product.php for unbuyable products INSTEAD of WooCommerce's
   confusing empty white read-more button. Clearly muted, never green. */
.product-card__oos {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  text-align: center; background: var(--muted); color: var(--slate-600);
  border: 1px solid var(--border); border-radius: var(--radius);
  min-height: 44px; padding: 11px 16px; font-weight: 600; font-size: 14px;
  box-shadow: none; text-decoration: none;
  /* It is a link now ("Vaata toodet"), not a dead label — so it must look and
     behave like one. It used to be cursor:default, which told the shopper the
     opposite of the truth. */
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.product-card__oos:hover,
.product-card__oos:focus-visible {
  border-color: var(--green); color: var(--green); background: #fff;
}

/* ---- Category image cards (li.product.product-category) ---- */
.woocommerce ul.products li.product.product-category { display: flex; }
.woocommerce ul.products li.product.product-category > a {
  display: flex; flex-direction: column; width: 100%; height: 100%;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.woocommerce ul.products li.product.product-category > a:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: rgba(5,150,105,.3);
}
.woocommerce ul.products li.product.product-category img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: contain; padding: 14px;
  background: var(--muted); margin: 0; transition: transform .3s ease;
}
.woocommerce ul.products li.product.product-category > a:hover img { transform: scale(1.05); }
.woocommerce ul.products li.product.product-category .woocommerce-loop-category__title {
  font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--slate-dark);
  padding: 14px; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.woocommerce ul.products li.product.product-category mark.count {
  background: var(--muted); color: var(--slate-600); font-size: 12px; font-weight: 600;
  border-radius: 999px; padding: 2px 9px; line-height: 1.4;
}
.woocommerce ul.products li.product.product-category:hover .woocommerce-loop-category__title { color: var(--green); }

/* ---- Card action area (the buy block) ----
   .product-card__actions stacks the primary "Lisa korvi" full-width button and,
   below it, .product-card__tools (compare + quick-view as two small ghost pills,
   side by side). The body is flex:1 so this whole block sits at the card bottom.

   The actions wrapper + tools row are produced by the PHP/JS contract; the
   legacy fallbacks (.ostu-qv-trigger + .ostu-cmp-card-actions as bare card
   children) are styled in quickview.css / wishlist.css. */
.product-card__actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* "Lisa korvi" — prominent green primary, full-width. */
.product-card__actions .button,
.product-card__actions a.add_to_cart_button,
.product-card__actions a.added_to_cart,
.product-card .button,
.product-card a.add_to_cart_button,
.product-card a.added_to_cart {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  text-align: center; background: var(--green); color: #fff;
  border-radius: var(--radius); min-height: 44px; padding: 11px 16px; font-weight: 700; font-size: 14px;
  border: 0; box-shadow: 0 6px 14px -6px rgba(5, 150, 105, .55);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
/* Cart icon before the "Lisa korvi" label. CSS-only (button is already flex+gap),
   so WooCommerce's AJAX .loading / .added_to_cart states stay intact. Loop cards
   only — the single-product .single_add_to_cart_button is a different class. */
.product-card__actions a.add_to_cart_button:not(.added)::before,
.product-card a.add_to_cart_button:not(.added)::before {
  content: ""; width: 17px; height: 17px; flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='17'%20height='17'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23fff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='9'%20cy='21'%20r='1'/%3E%3Ccircle%20cx='20'%20cy='21'%20r='1'/%3E%3Cpath%20d='M1%201h4l2.68%2013.39a2%202%200%200%200%202%201.61h9.72a2%202%200%200%200%202-1.61L23%206H6'/%3E%3C/svg%3E") no-repeat center / contain;
}
/* Legacy bare-child layout (no .product-card__actions wrapper): keep the side
   gutters + bottom margin so the button still aligns inside the card. */
.product-card > .button,
.product-card > a.add_to_cart_button,
.product-card > a.added_to_cart { margin: 0 14px 14px; width: auto; }
.product-card__actions .button:hover,
.product-card__actions a.add_to_cart_button:hover,
.product-card .button:hover,
.product-card a.add_to_cart_button:hover {
  background: var(--green-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 20px -8px rgba(5, 150, 105, .6);
}
.product-card .button:active, .product-card a.add_to_cart_button:active { transform: translateY(0); }
.product-card .button:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
/* Loading + added states stay on-brand instead of reverting to the grey base button. */
.product-card a.add_to_cart_button.loading { opacity: .85; }
/* "Vaata korvi" confirmation link sits as a slim secondary line under the primary. */
.product-card .added_to_cart {
  min-height: 0; padding: 8px 14px;
  background: transparent; color: var(--green-dark); border: 1px solid var(--border);
  box-shadow: none; font-size: 13px; font-weight: 600;
}
.product-card > .added_to_cart { margin: -6px 14px 14px; }
.product-card .added_to_cart:hover { background: var(--muted); color: var(--green-dark); border-color: rgba(5, 150, 105, .35); transform: none; box-shadow: none; }
/* Out-of-stock / variable "Loe lähemalt" / read-more reads as a calm white
   outline, NOT a green CTA. */
.product-card.outofstock .button,
.product-card .button.product_type_external,
.product-card a.button:not(.add_to_cart_button):not(.added_to_cart) {
  background: #fff; color: var(--slate); border: 1px solid var(--border); box-shadow: none;
}
.product-card.outofstock .button:hover,
.product-card a.button:not(.add_to_cart_button):not(.added_to_cart):hover {
  background: var(--muted); color: var(--green-dark); border-color: rgba(5, 150, 105, .35); transform: translateY(-1px); box-shadow: none;
}

/* ---- Tools row (compare + quick-view) ----
   Two equal-width, de-emphasised ghost buttons, side by side. The card's OWN
   quick-view trigger (quickview.css) and the compare pill (wishlist.css) are
   relocated into .product-card__tools; scope their shared look here so both
   pills are identical regardless of which stylesheet set their base. */
.product-card__tools { display: flex; gap: 8px; }
.product-card__tools > * { flex: 1 1 0; min-width: 0; }
.product-card__tools .ostu-qv-trigger,
.product-card__tools .ostu-cmp-btn--card,
.product-card__tools > button,
.product-card__tools > a {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  width: 100%; min-height: 40px; height: 40px; margin: 0; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 8px; background: transparent;
  color: var(--slate); font-family: var(--font-body); font-weight: 500; font-size: 12px; letter-spacing: 0;
  box-shadow: none; transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.product-card__tools .ostu-qv-trigger:hover,
.product-card__tools .ostu-qv-trigger:focus-visible,
.product-card__tools .ostu-cmp-btn--card:hover,
.product-card__tools > button:hover,
.product-card__tools > a:hover {
  background: transparent; color: var(--green); border-color: var(--green);
}
.product-card__tools .ostu-qv-trigger__icon,
.product-card__tools .ostu-cmp-btn__icon { color: currentColor; }
.product-card__tools .ostu-qv-trigger__icon svg,
.product-card__tools .ostu-cmp-btn__icon svg { width: 15px; height: 15px; }
.product-card__tools .ostu-qv-trigger__label,
.product-card__tools .ostu-cmp-btn__label {
  min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
/* Active compare state stays green inside the tools row. */
.product-card__tools .ostu-cmp-btn--card.is-active {
  background: var(--green); color: #fff; border-color: var(--green);
}
.product-card__tools .ostu-cmp-btn--card.is-active:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

/* ---- Pagination ----
   Owner: "numbrid jube koledad". Rebuilt into clean premium rounded buttons:
   each page number / prev-next is a 44px square-ish pill (white, 1px border,
   slate text, 600) that hovers green; the .current page is a solid green chip.
   The default WC list borders/floats/full-width are removed and the row is
   centered with a comfortable 8px gap. Prev/next get real arrow glyphs. */
.woocommerce-pagination,
.woocommerce nav.woocommerce-pagination { text-align: center; margin-top: 40px; }
.woocommerce-pagination ul,
.woocommerce nav.woocommerce-pagination ul {
  border: 0; display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 0; padding: 0; width: auto;
}
.woocommerce-pagination ul li,
.woocommerce nav.woocommerce-pagination ul li {
  border: 0; margin: 0; padding: 0; display: inline-flex; overflow: visible;
}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span,
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  box-sizing: border-box;
  min-width: 44px; height: 44px; padding: 0 12px; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
  color: var(--slate); font-weight: 600; font-size: 15px; line-height: 1;
  font-variant-numeric: tabular-nums; text-decoration: none;
  transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
/* Hover (links only) → green border + green text, subtle lift shadow. */
.woocommerce-pagination ul li a:hover,
.woocommerce-pagination ul li a:focus-visible,
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li a:focus-visible {
  border-color: var(--green); color: var(--green);
  background: #fff; box-shadow: 0 4px 12px -6px rgba(5, 150, 105, .4); outline: none;
}
/* Current page → solid green chip, white text. */
.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--green); color: #fff; border-color: var(--green);
  box-shadow: 0 6px 14px -6px rgba(5, 150, 105, .5);
}
/* Disabled (dots / unavailable) read muted and non-interactive. */
.woocommerce-pagination ul li span.dots {
  border-color: transparent; background: transparent; color: var(--slate-400); min-width: 28px; padding: 0 4px;
}
/* Prev / next arrows. WooCommerce outputs "←" / "→" text or the words; we add a
   chevron glyph and tighten the label so they sit as clean arrow buttons. */
.woocommerce-pagination ul li a.prev,
.woocommerce-pagination ul li a.next,
.woocommerce nav.woocommerce-pagination ul li a.prev,
.woocommerce nav.woocommerce-pagination ul li a.next {
  font-size: 0; /* hide WC's text/arrow so only our glyph shows */ gap: 0;
}
.woocommerce-pagination ul li a.prev::before { content: "\2039"; font-size: 22px; line-height: 1; }
.woocommerce-pagination ul li a.next::before { content: "\203A"; font-size: 22px; line-height: 1; }

/* ==========================================================================
   Single product
   ========================================================================== */
.single-product div.product { display: grid; grid-template-columns: 1fr; gap: 32px 44px; position: relative; }
@media (min-width: 900px) {
  /* Gallery LEFT (~46%) + a roomy summary/buy-box RIGHT (~54%). CRITICAL: each
     track is minmax(0, …), NOT a bare fr. A bare `52fr 48fr` gives each grid
     track an implicit min-width:auto = min-CONTENT width; the gallery's FlexSlider
     viewport (sized to a wide product image) then overflowed its 52fr track and
     SQUEEZED the summary column far below 48% — the owner's "kokku surutud" buy-box.
     minmax(0, …) lets the gallery shrink to its track so the summary keeps its full
     share. Summary is the larger column so the buy-box reads as the hero. */
  .single-product div.product { grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: 36px 44px; align-items: start; }
}
@media (min-width: 1200px) {
  .single-product div.product { gap: 40px 48px; }
}
/* Align the ENTIRE single page to ONE measure. Capping the CONTENT WRAPPER (not
   just div.product) makes the breadcrumb, the gallery+summary row, the
   description/tabs and the related rails all share identical left + right edges —
   killing the "summary block looks narrower / shifted vs the description below"
   mismatch — while still keeping the gallery + summary from stretching apart on
   wide screens. 1240px inner ≈ the old 1200 product measure. */
.single-product .woo-content { max-width: 1240px; }
/* Gallery — capped, premium panel. Instead of a huge raw image, the main image
   sits CONTAINED on a soft --muted rounded panel with a comfortable max-height,
   so it never dwarfs the summary. The whole gallery column is sticky on desktop
   (it's the shorter column) so it follows the scrolling summary, no dead void. */
/* WooCommerce sets the gallery to opacity:0 inline and its JS (FlexSlider) flips
   it to 1 on init. If that init is blocked/slow (e.g. the envo-extra plugin
   interfering with the gallery script) the gallery stayed invisible — a big blank
   gap on some products, especially mobile. Force it visible so it can never hide. */
.single-product .woocommerce-product-gallery { position: relative; margin: 0; width: 100% !important; min-width: 0; float: none !important; opacity: 1 !important; }
/* THE squish fix. WooCommerce core (woocommerce-layout.css) ships
   `.woocommerce div.product div.summary { float:right; width:48% }`. The gallery
   already overrode that with width:100% !important, but the SUMMARY did not — so
   core's width:48% kept the summary at 48% of its 54% grid track (~26% of the row),
   leaving a big empty gap on the right and a cramped buy-box. Force the summary to
   FILL its grid track, exactly like the gallery, and drop the core float. */
.single-product div.product > .summary.entry-summary,
.single-product div.product .summary.entry-summary {
  width: 100% !important; max-width: 100% !important; float: none !important; min-width: 0;
}
.single-product .woocommerce-product-gallery__wrapper { margin: 0; }
/* GALLERY FALLBACK — the real root of the broken mobile gallery.
   The gallery is `--columns-4`, so WooCommerce's base CSS FLOATS every gallery
   image at width:25% into a grid. FlexSlider normally overrides that into a single
   slider — but when the slider JS is slow/deferred/blocked, the raw 25%-floated
   grid of all 6 images shows, with a tall dead gap (cleared floats).
   Detect "slider NOT yet built" by the ABSENCE of FlexSlider's `.flex-viewport`
   (works no matter which element FlexSlider tags). In that state: force every image
   full-width with NO float, and show ONLY the first — so the worst case is one
   clean full-width image, never a floated grid + gap. Once `.flex-viewport` exists
   the real slider (with thumbnails) takes over untouched. */
.single-product .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image {
  width: 100% !important; float: none !important; margin: 0 !important;
}
.single-product .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image:not(:first-child) {
  /* !important, and it is safe: the whole selector STOPS MATCHING the instant
     FlexSlider inserts .flex-viewport, so it can never fight the built slider.
     Without it the rule lost the pre-init frames — measured on the live product
     page, the slider is not ready until 694ms, and for that whole first stretch
     the owner sees all six images stacked down the page before it snaps into a
     slider. A rule that only has to win for 700ms still has to win. */
  display: none !important;
}
/* Reserve the gallery box so the page does not RESIZE when the slider appears.
   Even with the images hidden above, the column had no height of its own until
   FlexSlider set one — so everything below the gallery jumped upward at 694ms.
   A square box matches this shop's product photos (all 1000x1000 or 1024x1024). */
.single-product .woocommerce-product-gallery:not(:has(.flex-viewport)) {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
/* Main image on a clean WHITE panel with a soft border — product photos (mostly
   shot on white) blend seamlessly and read premium, instead of floating on a grey
   tile. Comfortable inner padding gives the product air. */
.single-product .woocommerce-product-gallery__image {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.single-product .woocommerce-product-gallery__image a { display: block; }
.single-product .woocommerce-product-gallery__image img {
  border-radius: var(--radius-lg); background: #fff;
  display: block; width: 100% !important; height: auto;
  max-height: 540px; object-fit: contain; padding: 26px;
}
@media (min-width: 1200px) {
  .single-product .woocommerce-product-gallery__image img { max-height: 580px; padding: 32px; }
}
/* Zoom trigger (magnifier) — a clean circular button in the gallery's top-right. */
.single-product .woocommerce-product-gallery__trigger {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  /* 44px, not 42 — on a phone this is the ONLY way to enlarge a product picture,
     and it sat just under the WCAG 2.5.5 target size. */
  width: 44px; height: 44px; border-radius: 50%; margin: 0; padding: 0;
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  color: var(--slate-dark); font-size: 0; text-indent: 0; transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.single-product .woocommerce-product-gallery__trigger:hover {
  background: var(--green); color: #fff; border-color: var(--green); transform: translateY(-1px);
}
/* Thumbnail row — a neat, evenly spaced strip under the main image. WooCommerce
   prints these as a .flex-control-thumbs (FlexSlider) or, with no slider, as the
   extra gallery images; style both into a calm row of soft tiles. */
/* BULLETPROOF static flex row. WooCommerce's FlexSlider control-nav inherits
   position:absolute (FlexSlider base CSS) and/or width:25%;float:left (WC core /
   woocommerce-smallscreen.css). On some mobile browsers that stacked the thumbnails
   ON TOP OF EACH OTHER. Force a clean, self-contained row that can never overlap —
   static positioning, no float, explicit sizes — with !important to beat both WC and
   FlexSlider on every screen. */
.single-product .woocommerce-product-gallery .flex-control-nav,
.single-product .woocommerce-product-gallery .flex-control-thumbs,
.single-product .flex-control-thumbs {
  position: static !important; top: auto !important; bottom: auto !important; left: auto !important; right: auto !important;
  display: flex !important; flex-wrap: wrap; align-content: flex-start; gap: 10px;
  width: 100% !important; height: auto !important; max-height: none !important;
  margin: 14px 0 0 !important; padding: 0 !important; list-style: none; overflow: visible !important;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs li,
.single-product .flex-control-thumbs li {
  position: static !important; float: none !important; display: block !important;
  width: 64px !important; height: 64px !important; margin: 0 !important; padding: 0 !important;
}
/* Desktop: a flush 6-column grid instead of a wrapping 64px flex row. With 12
   images in a ~526px column the flex row broke as 7 + 5 with a ragged gap, and
   64px is too small to tell the detail shots apart — they are the shopper's only
   substitute for handling the product. Six columns fill the width (~79px tiles)
   and any image count lands on flush rows. The !important declarations above stay
   (they are load-bearing against FlexSlider/WC on phones — see the comment);
   this only re-sizes them where that mobile bug cannot occur. */
@media (min-width: 900px) {
  .single-product .woocommerce-product-gallery .flex-control-thumbs,
  .single-product .flex-control-thumbs {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
  }
  .single-product .woocommerce-product-gallery .flex-control-thumbs li,
  .single-product .flex-control-thumbs li {
    width: auto !important; height: auto !important; aspect-ratio: 1 / 1;
  }
}

/* Tablet (601–899px): the gallery is single-column and full-bleed while the photo
   is height-capped, so roughly half the width painted white. Constrain and centre
   the gallery instead of stretching the box around a small image. */
@media (min-width: 601px) and (max-width: 899px) {
  .single-product .woocommerce-product-gallery { max-width: 520px; margin-inline: auto; }
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li img,
.single-product .flex-control-thumbs img {
  display: block; width: 100% !important; height: 100% !important; object-fit: contain; padding: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  opacity: 1; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.single-product .flex-control-thumbs img:hover { opacity: 1; transform: translateY(-2px); }
/* FlexSlider marks the active thumb with .flex-active on the <img>. */
.single-product .flex-control-thumbs img.flex-active,
.single-product .flex-control-thumbs .flex-active img,
.single-product .flex-control-thumbs li.flex-active img {
  opacity: 1; border-color: var(--green) !important; box-shadow: 0 0 0 2px rgba(5, 150, 105, .22);
}
@media (min-width: 900px) and (min-height: 760px) {
  /* Sticky gallery so it tracks the longer summary column without a void
     (measured live: gallery 705px vs summary 1638px = ~930px of dead white).
     ⚠️ SPECIFICITY IS LOAD-BEARING — this is Trap 1 again. The plain
     `.single-product .woocommerce-product-gallery` (0,3,0) that lived here never
     actually worked: a plugin stylesheet ships
     `.woocommerce div.product div.images.woocommerce-product-gallery{position:relative}`
     at (0,4,2), which won, so the gallery stayed relative while `top:96px` applied
     alone and did nothing. Matching that structure and adding the body class gets
     us to (0,5,2), which wins regardless of which bundle W3TC prints first.
     Verified live: computed position flips relative -> sticky.
     The min-height guard stops a short window from clipping image + thumbnails. */
  /* The wrapper (inc/single-product.php, priority 19/21) is stretched to the full
     row height and is what actually bounds the sticky travel — WITHOUT it Chrome
     lets a sticky grid item run the whole grid container, and the gallery painted
     over the description sections further down (measured live). */
  .single-product div.product > .ostu-gallery-col { align-self: stretch; }
  .single-product.woocommerce div.product .ostu-gallery-col div.images.woocommerce-product-gallery {
    position: sticky;
    top: 96px;
  }
}
/* No wrapper (another theme/plugin removed the gallery hook, or below 900px):
   the column must not affect layout. */
.ostu-gallery-col { min-width: 0; }
/* Sale flash on the single page — pin it onto the gallery image (top-LEFT, over
   the big left column), never floating alone in the empty top-right whitespace.
   WC core prints .onsale either inside .woocommerce-product-gallery or as a
   direct child of div.product (which is position:relative above). The gallery is
   the first grid cell, so top:12px;left:12px lands on the image either way. */
.single-product .woocommerce-product-gallery .onsale,
.single-product div.product > .onsale,
.single-product div.product > span.onsale {
  /* !important: WooCommerce core's `.woocommerce div.product .onsale` has the
     same specificity and loads after this sheet, pinning it top:0;right:0 (the
     odd floating top-right). Force it onto the gallery's top-left instead. */
  position: absolute !important; top: 12px !important; left: 12px !important; right: auto !important; z-index: 3;
  margin: 0; background: var(--green); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 5px 12px; border-radius: 999px;
  min-height: 0; min-width: 0; line-height: 1.4; box-shadow: 0 2px 6px -2px rgba(5, 150, 105, .45);
}
/* Summary hierarchy — big title, large price, generous breathing room between
   each block (title → price → short desc → add-to-cart → trust → accordions).
   The per-block spacing is owned by single.css (.summary rhythm); these set the
   type scale + the add-to-cart prominence. */
.single-product .product_title { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; margin-bottom: 14px; }
.single-product .price { font-size: 32px; font-weight: 700; color: var(--slate-dark); font-variant-numeric: tabular-nums; line-height: 1.2; }
.single-product .price del { color: var(--slate-400); font-size: 21px; font-weight: 500; opacity: .7; }
.single-product .price ins { text-decoration: none; color: var(--green-dark); }
.single-product .woocommerce-product-details__short-description { color: var(--slate-600); margin: 18px 0; line-height: 1.75; font-size: 15.5px; }
/* Add-to-cart row — prominent. The qty stepper + a large full-bleed green CTA
   sit on one row; the button grows to fill so it reads as the page's primary
   action. Wraps gracefully on narrow widths.

   IMPORTANT — only flex the form for SIMPLE products. A VARIABLE product's
   form.cart is a `.variations_form` whose children are the attribute table
   (.variations), the selected-variation price wrap (.single_variation) and the
   qty+button row (.woocommerce-variation-add-to-cart). Flexing the FORM there
   would line those blocks up side by side and break the picker on both
   breakpoints. Same story for a GROUPED product (`.grouped_form`): its children
   are a multi-row table of child products with per-row qty inputs — flexing the
   form there would scramble the table. So scope the form flex to simple forms
   only (`:not(.variations_form):not(.grouped_form)`), and apply the same qty +
   button row treatment to `.woocommerce-variation-add-to-cart` instead, which
   holds the qty + button for variable products. */
.single-product form.cart:not(.variations_form):not(.grouped_form),
.single-product form.cart .woocommerce-variation-add-to-cart {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin: 22px 0;
}
/* Inside a variations form the qty+button row owns the margin; the form itself
   stacks the table → price → row normally. (Grouped form keeps its own block
   table flow — only the margin is normalised below.) */
.single-product form.cart.variations_form,
.single-product form.cart.grouped_form { margin: 22px 0; }
.single-product .quantity input.qty { width: 84px; height: 56px; border: 1px solid var(--border); border-radius: var(--radius); text-align: center; font-weight: 700; font-size: 16px; }
.single-product .quantity input.qty { -moz-appearance: textfield; appearance: textfield; }
.single-product .quantity input.qty::-webkit-outer-spin-button,
.single-product .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.single-product form.cart .button, .single-product .single_add_to_cart_button {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green); color: #fff; border: 0; border-radius: var(--radius); min-height: 54px; padding: 0 32px;
  font-weight: 700; font-size: 16px; box-shadow: var(--shadow-green); transition: background .2s, transform .2s, box-shadow .2s;
}
.single-product .single_add_to_cart_button:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(5, 150, 105, .6); }
.single-product .single_add_to_cart_button:active { transform: translateY(0); }

/* trust row */
.product-trust { display: flex; flex-wrap: wrap; gap: 16px; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid var(--border); }
.product-trust li { font-size: 13px; font-weight: 600; color: var(--slate); padding-left: 22px; position: relative; }
/* SVG tick — see the note in cart-widget.css. */
.product-trust li::before { content: ""; position: absolute; left: 0; top: .28em;
  width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat; }

/* tabs — full-width section under the product row with a clean tab bar. The grid
   row-gap already separates them from the buy block; a small extra top margin
   plus a baseline divider under the pills gives the description a premium,
   editorial feel. */
.woocommerce-tabs { grid-column: 1 / -1; margin-top: 12px; }
@media (min-width: 900px) { .woocommerce-tabs { margin-top: 24px; } }
.woocommerce-tabs ul.tabs { border: 0; border-bottom: 1px solid var(--border); padding: 0 0 16px; margin: 0 0 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.woocommerce-tabs ul.tabs::before { border: 0; }
.woocommerce-tabs ul.tabs li { border: 1px solid var(--border); border-radius: 999px; background: #fff; padding: 0; }
.woocommerce-tabs ul.tabs li::before, .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce-tabs ul.tabs li a { padding: 10px 20px; font-weight: 600; color: var(--slate); }
.woocommerce-tabs ul.tabs li.active { background: var(--slate-dark); border-color: var(--slate-dark); }
.woocommerce-tabs ul.tabs li.active a { color: #fff; }
.woocommerce-tabs .panel { padding: 0; color: var(--slate-600); line-height: 1.8; max-width: 100%; overflow-wrap: break-word; }
.woocommerce-tabs .panel h2 { font-size: 22px; margin: 0 0 14px; color: var(--slate-dark); }
/* Safety net: nothing inside the imported description (wide marketing images, a
   stray data-table, an embed) may push the page wider than the screen on mobile. */
.woocommerce-tabs .panel img,
.woocommerce-tabs .panel video,
.woocommerce-tabs .panel iframe { max-width: 100% !important; height: auto; }
.woocommerce-tabs .panel > table:not(.shop_attributes) { display: block; width: 100%; max-width: 100%; overflow-x: auto; }
/* Final catch-all: any element in the imported description (a stray div/span/embed
   carrying a hardcoded inline width beyond the img/video/iframe/table cases above)
   can never push the page wider than its column on mobile. */
.woocommerce-tabs .panel * { max-width: 100%; }
.woocommerce-tabs .panel table.shop_attributes { width:100%; border:1px solid var(--border); border-radius:var(--radius-lg); border-collapse:separate; border-spacing:0; overflow:hidden; background:#fff; box-shadow:var(--shadow-card); margin:6px 0 0; }
.woocommerce-tabs .panel table.shop_attributes th,
.woocommerce-tabs .panel table.shop_attributes td { padding:12px 16px; border-top:1px solid var(--border); text-align:left; vertical-align:top; font-size:14px; }
.woocommerce-tabs .panel table.shop_attributes tr:first-child th,
.woocommerce-tabs .panel table.shop_attributes tr:first-child td { border-top:0; }
.woocommerce-tabs .panel table.shop_attributes th { width:34%; background:var(--muted); color:var(--slate-dark); font-weight:700; }
.woocommerce-tabs .panel table.shop_attributes td { color:var(--slate-600); }
.woocommerce-tabs .panel table.shop_attributes td p { margin:0; }

/* related products + the theme's after-summary sections (Sageli koos ostetud /
   bundle, Hiljuti vaadatud / recently-viewed). All are direct children of the
   single-product grid (div.product) hooked on woocommerce_after_single_product_summary,
   so they MUST span the full width below the gallery+summary row, never sit in a
   grid column. */
.related.products, .upsells.products,
.single-product div.product > .ostu-bundle,
.single-product div.product > .ostu-rv-rail { grid-column: 1 / -1; margin-top: 40px; }
.upsells.products > h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 6px; }

/* ==========================================================================
   Cart
   ========================================================================== */
/* Target via :has(.woocommerce-cart-form) too, NOT only the .woocommerce-cart body
   class — the cart lives at slug /cart-3/ and WC only adds that body class when its
   "Cart page" setting matches, which can be false here (same root cause as the My
   Account grid). Matching the cart FORM directly guarantees the 2-col grid applies. */
.woocommerce-cart .woocommerce,
.woocommerce:has(.woocommerce-cart-form) { display: grid; grid-template-columns: 1fr; gap: 28px; }
/* 1200px, not 1000px. The cart table cannot go below ~669px without its columns
   colliding (measured: remove 48 + thumb 108 + name 146 min + price 89 + qty 174 +
   subtotal 112). At a 1000px breakpoint the 360px sticky sidebar left only 544px,
   so the table overflowed its grid track by 125px and slid under the totals card.
   Below 1200px the cart simply stacks — table full width, totals underneath. */
@media (min-width: 1200px) {
  .woocommerce-cart .woocommerce,
  .woocommerce:has(.woocommerce-cart-form) { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
  .woocommerce-cart-form { grid-column: 1; min-width: 0; }
  .cart-collaterals { grid-column: 2; width: 100% !important; min-width: 0; float: none !important; position: sticky; top: 96px; }
  /* Cart-collaterals: WooCommerce CORE ships
     `.woocommerce .cart-collaterals .cart_totals { width:48%; float:right }`
     (specificity 0,3,0). Our override MUST match/beat that specificity AND use
     !important. When this was trimmed to `.cart-collaterals .cart_totals` (0,2,0)
     core's 48% float won again and squeezed the WHOLE totals table into a ~40px
     sliver — every label (VAHESUMMA, SHIPMENT, KOKKU…) wrapped one char per line. */
  .woocommerce .cart-collaterals .cart_totals,
  .woocommerce-cart .cart-collaterals .cart_totals { width: 100% !important; float: none !important; }
}
/* ⚠️ THE SAME OVERRIDE, OUTSIDE THE 1200px BLOCK — load-bearing.
   WooCommerce core ships `.woocommerce .cart-collaterals .cart_totals{float:right;
   width:48%}` at media="all". The theme only cancelled it inside @media
   (min-width:1200px), and core's own small-screen sheet only covers <=768px — so
   between 769px and 1199px (every tablet and small laptop) the totals card sat in a
   48% box floated hard right, with the entire left half of the page empty, because
   inc/woocommerce.php:61 removes the cross-sell that used to fill it.
   The comment above this block claimed "below 1200px the cart simply stacks"; it did
   not. v1.2.63 missed it because a float causes no overflow — that release measured
   table width, and the table was fine.
   Base rule now, so the cart stacks at EVERY width below 1200 and the grid above it
   is unaffected. */
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-cart .cart-collaterals .cart_totals { width: 100% !important; float: none !important; }
.shop_table { border: 1px solid var(--border); border-radius: var(--radius-lg); border-collapse: separate; border-spacing: 0; overflow: hidden; width: 100%; background: #fff; }
.shop_table th { background: var(--muted); color: var(--slate-dark); font-weight: 700; padding: 14px 16px; text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.shop_table td { padding: 16px; border-top: 1px solid var(--border); vertical-align: middle; }
/* mobile: core stacks rows — let the table breathe and brand the data labels */
@media (max-width: 768px) {
  .shop_table { overflow: visible; }
  .shop_table td { padding: 12px 14px; }
  .shop_table td::before { color: var(--slate-dark); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
}
/* Cart thumbnail — TRAP 1, THIRD INSTANCE. WooCommerce core's own woocommerce.css
   ships `.woocommerce-cart table.cart img { width: 32px }` (0,2,2), which BEAT the
   theme's `.cart_item .product-thumbnail img` (0,2,1): the picture rendered as a
   32px grey blob, and once the table overflowed its column (see td.actions below)
   core's `max-width:100%` shrank it further to 14px. Measured live 2026-08-09.
   Match on three classes + two elements (0,3,2) so the theme wins, and pin
   max-width too — core's `max-width:100%` is a DIFFERENT property from width and
   would otherwise still clamp the image to a starved column. */
table.cart .cart_item .product-thumbnail img { width: 76px; height: 76px; max-width: 76px; object-fit: contain; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--muted); }
/* Pin the two narrow columns so auto table layout can never starve them again;
   the product name then takes the slack. Desktop only — phones stack the rows. */
@media (min-width: 769px) {
  .woocommerce-cart table.cart th.product-remove,
  .woocommerce-cart table.cart td.product-remove { width: 48px; }
  .woocommerce-cart table.cart th.product-thumbnail,
  .woocommerce-cart table.cart td.product-thumbnail { width: 108px; }
}
/* Product cell — bold linked name, muted variation/meta underneath. */
/* break-word, so one very long unbroken product word can never re-inflate the
   table's minimum width and push it back out of its grid track. */
.woocommerce-cart .cart_item td.product-name { font-weight: 600; overflow-wrap: break-word; }
.woocommerce-cart .cart_item td.product-name > a { color: var(--slate-dark); text-decoration: none; }
.woocommerce-cart .cart_item td.product-name > a:hover { color: var(--green); }
.woocommerce-cart .cart_item td.product-name .variation,
.woocommerce-cart .cart_item td.product-name dl { color: var(--slate-500); font-size: 13px; font-weight: 400; margin: 4px 0 0; }
.woocommerce-cart .cart_item td.product-price,
.woocommerce-cart .cart_item td.product-subtotal { font-variant-numeric: tabular-nums; color: var(--slate-dark); }
.woocommerce-cart .cart_item td.product-subtotal { font-weight: 700; }
.woocommerce a.remove { color: var(--slate-500) !important; border: 1px solid var(--border); line-height: 1.6; }
.woocommerce a.remove:hover { background: var(--danger) !important; color: #fff !important; border-color: var(--danger); }
.cart .quantity input.qty { width: 64px; height: 44px; border: 1px solid var(--border); border-radius: 10px; text-align: center; }
.cart_totals { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-card); }
.cart_totals h2 { font-size: 18px; margin-bottom: 14px; }
.cart_totals .order-total .amount { color: var(--slate-dark); font-size: 20px; }

/* Totals table: rows breathe and never overflow the narrow column.
   Laid out as FLEX ROWS, not as a table. A 360px sidebar cannot afford a fixed
   percentage label column: at `table-layout:fixed` + `th{width:42%}` the label
   cell came out ~109px, and `.shop_table th`'s 16px side padding left ~80px of
   content — so "VAHESUMMA" broke mid-word into "VAHESUMM / A". Flex rows size
   each label to its own content instead, and let the shipping row below go full
   width without needing a colspan the markup does not have. */
.cart_totals table,
.cart_totals table tbody { display: block; width: 100%; }
.cart_totals table tr {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--border);
}
.cart_totals table tr:first-child { border-top: 0; }
/* ⚠️ The `.woocommerce-cart .cart-collaterals` prefix is LOAD-BEARING — TRAP 1,
   FOURTH INSTANCE. WooCommerce core ships
   `.woocommerce-cart .cart-collaterals .cart_totals table th { width: 35% }`
   and a border-top on every th/td, both at (0,3,2). A plain `.cart_totals table th`
   is (0,2,1) and lost: after v1.2.63 shipped, the label cell was STILL pinned to
   109px with 12px side padding, so "VAHESUMMA" broke into "VAHESUMM / A" and two
   stray border stubs floated above the KOKKU row. Measured live 2026-08-09.
   Adding `tr` makes these (0,3,3), which beats core outright rather than relying on
   stylesheet order. Label height 57px -> 20px, label width 109px -> its own content. */
.woocommerce-cart .cart-collaterals .cart_totals table tr th,
.woocommerce-cart .cart-collaterals .cart_totals table tr td,
.cart_totals table th,
.cart_totals table td {
  display: block; width: auto; padding: 0; border: 0; background: none;
  word-break: normal; overflow-wrap: anywhere;
}
.woocommerce-cart .cart-collaterals .cart_totals table tr th,
.cart_totals table th { color: var(--slate-600); font-weight: 600; text-align: left; }
.woocommerce-cart .cart-collaterals .cart_totals table tr td,
.cart_totals table td { text-align: right; color: var(--slate-dark); }

/* Shipment methods (Omniva / DPD radios + carrier logos): wrap label, price
   and logo cleanly instead of overflowing the totals column. */
.cart_totals #shipping_method,
.woocommerce-shipping-methods,
ul#shipping_method { margin: 0; padding: 0; list-style: none; }
.cart_totals #shipping_method li,
ul#shipping_method li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 6px 0;
  margin: 0;
}
.cart_totals #shipping_method li input { flex: 0 0 auto; margin: 0; }
.cart_totals #shipping_method li label,
ul#shipping_method li label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-weight: 600;
  color: var(--slate);
  word-break: break-word;
}
.cart_totals #shipping_method li label .amount { font-weight: 700; color: var(--slate-dark); }
.cart_totals #shipping_method img,
ul#shipping_method img { max-height: 22px; width: auto; vertical-align: middle; }
.woocommerce-shipping-destination { color: var(--slate-500); font-size: 13px; margin-top: 4px; }
/* SHIPPING ROW — the carrier list (Omniva/DPD/Tasuta + logos) needs the FULL width
   of the totals column, but its <td> carries no colspan and CSS cannot add one.
   ⚠️ The previous fix set th/td to `display:block` while the table was still a real
   table. A non-table-cell child of a table-row gets wrapped in an ANONYMOUS table
   cell, which lands in COLUMN 1 — so `width:100%` resolved against the ~109px label
   column and the methods were crushed into it, breaking "Omniva pakiautomaat"
   mid-word. Same anonymous-cell trap as td.actions below; measured live 2026-08-09.
   The totals table is flex now (above), so a plain block row simply stacks label
   over methods at full width. Before → after: list 85px → 312px, label 105px → 57px.
   Match the row by the method list it CONTAINS (:has) as well as by class, because
   on this store the row's label came from a plugin and class-only selectors missed it. */
.cart_totals table tr:has(#shipping_method),
.cart_totals table tr:has(.woocommerce-shipping-methods),
.cart_totals table tr.shipping,
.cart_totals table tr.woocommerce-shipping-totals { display: block; }
/* The class-based selectors carry the same .woocommerce-cart .cart-collaterals
   prefix as the block above, so they still outrank the generic th/td rule there
   (0,3,3) if the :has() variants ever stop matching. */
.cart_totals table tr:has(#shipping_method) th,
.cart_totals table tr:has(.woocommerce-shipping-methods) th,
.woocommerce-cart .cart-collaterals .cart_totals table tr.shipping th,
.woocommerce-cart .cart-collaterals .cart_totals table tr.woocommerce-shipping-totals th {
  margin-bottom: 6px; text-align: left;
  text-transform: uppercase; letter-spacing: .03em; font-size: 12px; color: var(--slate-500);
}
.cart_totals table tr:has(#shipping_method) td,
.cart_totals table tr:has(.woocommerce-shipping-methods) td,
.woocommerce-cart .cart-collaterals .cart_totals table tr.shipping td,
.woocommerce-cart .cart-collaterals .cart_totals table tr.woocommerce-shipping-totals td { text-align: left; }
.wc-proceed-to-checkout a.checkout-button { background: var(--green) !important; color: #fff !important; border-radius: var(--radius) !important; min-height: 54px; display: flex; align-items: center; justify-content: center; font-weight: 700 !important; font-size: 16px; box-shadow: var(--shadow-green); }
.wc-proceed-to-checkout a.checkout-button:hover { background: var(--green-dark) !important; }

/* coupon / buttons */
.woocommerce .button, .woocommerce button.button, .woocommerce input.button {
  background: var(--slate-dark); color: #fff; border-radius: var(--radius); min-height: 48px; padding: 0 22px; font-weight: 600; border: 0; transition: background .2s, transform .2s;
}
.woocommerce .button:hover { background: #0f172a; transform: translateY(-1px); }
.woocommerce .button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt { background: var(--green); }
.woocommerce .button.alt:hover { background: var(--green-dark); }
.woocommerce .button:focus-visible,
.woocommerce button.button:focus-visible,
.woocommerce input.button:focus-visible,
.woocommerce .woocommerce-form-login__submit:focus-visible,
.woocommerce .woocommerce-form-register__submit:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Cart actions row — DESKTOP/TABLET. Three groups on one clean line:
   [← Jätka ostlemist]  …auto gap…  [coupon input + Rakenda]  [Uuenda].
   The continue-shopping link (added via the woocommerce_cart_actions hook) is
   pulled to the FAR LEFT with order:-1 + margin-right:auto so it anchors the row
   and fills what used to be dead space; coupon + update group on the right. The
   coupon input picks up the same 44px bordered/rounded treatment as the rest of
   the cart. The <=768px block below overrides this to full-width stacking. */
/* ⚠️ CART OVERFLOW ON PHONES — load-bearing. Measured at a real 375px viewport.
   `div.woocommerce` is a grid, and its single track was sizing to 433px inside a
   339px box: a grid item's automatic minimum (min-width:auto) refuses to shrink
   below the item's content, so the track — and everything in it — overflowed.
   `body{overflow-x:clip}` then CUT the excess with no way to scroll to it, so the
   line price sat 75px off-screen and "Mine maksma" was 57px off-screen.
   Before -> after on a live 375px cart: track 433->339, table 434->339,
   price right edge 450->355, button right edge 432->338, overflowing elements 0.
   NB the earlier audit blamed the coupon row; measured, that row is only 171px.
   Do not remove these min-width:0 declarations. */
@media (max-width: 768px) {
  .woocommerce-cart .woocommerce > * { min-width: 0; }
  .woocommerce-cart .woocommerce-cart-form,
  .woocommerce-cart table.shop_table,
  .woocommerce-cart .cart-collaterals,
  .woocommerce-cart .cart_totals { min-width: 0; max-width: 100%; }
  /* Stacked mobile rows do not need auto column sizing, and fixed layout stops a
     long product name from re-inflating the table. */
  .woocommerce-cart table.shop_table { table-layout: fixed; width: 100%; }
}

/* ⚠️⚠️ NEVER give this cell a non-table display. LOAD-BEARING — measured live
   2026-08-09 after the owner reported the cart "appi kui kole".
   The cell is `<td colspan="6" class="actions">`. It used to be `display:flex`,
   which strips its table-cell box — and a colspan is only honoured on a REAL table
   cell. The browser then wraps the flex box in an ANONYMOUS table cell that lands
   in COLUMN 1, so the whole coupon group (continue link + input + two buttons,
   ~422px of content) was measured as the minimum width of the tiny remove-× column.
   Fallout, all measured at 1450px: remove column 429px instead of 48px, thumbnail
   column starved to 38px (image 14px), product names crushed to 152px, and the
   table 995px wide inside a 995px track only because it had already eaten the
   whole row — at 1280px it overflowed its grid track by 157px.
   Fix: stay a table-cell (colspan works → cell spans all six columns, 993px) and
   arrange the three groups with floats, which a table-cell contains on its own.
   Floats, not flex, because flex here is exactly what broke it.
   Source order is coupon → update → continue, so the continue link can only reach
   the far left if the other two are floated out of the line first; verified
   geometry: Jätka 43→216, Uuenda 425→602, kupong 614→1000. */
.woocommerce-cart table.cart td.actions {
  display: table-cell; text-align: left; padding: 18px;
}
.woocommerce-cart table.cart td.actions::after { content: ""; display: block; clear: both; }
.woocommerce-cart table.cart td.actions .ostu-continue-shopping {
  float: left; margin: 0;
  background: #fff !important; color: var(--slate) !important;
  border: 1px solid var(--border) !important; border-radius: var(--radius) !important;
  min-height: 48px; padding: 0 18px; font-weight: 600; box-shadow: none !important;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.woocommerce-cart table.cart td.actions .ostu-continue-shopping:hover {
  border-color: var(--green) !important; color: var(--green) !important;
  background: var(--muted) !important; transform: none;
}
/* "Uuenda korv" (update cart) button — WooCommerce renders it grey + disabled
   (aria-disabled) until a qty changes, which read as unreadable grey-on-grey.
   Make it a clean, legible secondary button in both states. */
.woocommerce-cart table.cart td.actions .button[name="update_cart"],
.woocommerce-cart table.cart .button[name="update_cart"],
.woocommerce button[name="update_cart"] {
  background: #fff !important; color: var(--slate-dark) !important;
  border: 1px solid var(--border) !important; border-radius: var(--radius) !important;
  font-weight: 600; min-height: 48px; padding: 0 20px; opacity: 1 !important; box-shadow: none !important;
  white-space: nowrap;
}
/* Update + coupon sit together at the far RIGHT; the continue link anchors the left. */
.woocommerce-cart table.cart td.actions .button[name="update_cart"] { float: right; margin: 0 12px 0 0; }
.woocommerce button[name="update_cart"]:not([disabled]):not([aria-disabled="true"]):hover {
  border-color: var(--green) !important; color: var(--green) !important; background: var(--muted) !important;
}
.woocommerce button[name="update_cart"][disabled],
.woocommerce button[name="update_cart"][aria-disabled="true"] {
  color: var(--slate-500) !important; background: var(--muted) !important; cursor: default;
}
/* Coupon group: input + "Rakenda" stay side by side ALWAYS (flex-wrap:nowrap).
   Floated right (the cell is a table-cell, not a flex row — see above), so it needs
   a real width instead of a flex basis; on a narrow desktop it simply wraps to its
   own line rather than squeezing the input. */
.woocommerce-cart table.cart td.actions .coupon {
  float: right; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0;
  width: 380px; max-width: 45%; min-width: 0;
}
.woocommerce-cart table.cart td.actions .coupon .input-text {
  height: 48px; min-height: 48px; flex: 1 1 auto; width: auto; min-width: 0; max-width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 14px; font: inherit; background: #fff; color: var(--slate-dark);
}
.woocommerce-cart table.cart td.actions .coupon .input-text:focus {
  outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green);
}
.woocommerce-cart table.cart td.actions .coupon .button,
.woocommerce-cart table.cart td.actions button[name="apply_coupon"] {
  background: #fff !important; color: var(--slate-dark) !important;
  border: 1px solid var(--border) !important; border-radius: var(--radius) !important;
  min-height: 48px; padding: 0 20px; font-weight: 600; box-shadow: none !important;
  flex: 0 0 auto; white-space: nowrap;
}
.woocommerce-cart table.cart td.actions .coupon .button:hover,
.woocommerce-cart table.cart td.actions button[name="apply_coupon"]:hover {
  border-color: var(--green) !important; color: var(--green) !important; background: var(--muted) !important; transform: none;
}

/* ---- Empty cart. Raw WooCommerce put a grey notice with its OWN blue icon
   (#1e85be, a colour that exists nowhere else in this shop) above a dark grey
   button. Every visitor who just clicks the cart icon lands here, so it gets a
   real designed state: theme cart icon, a heading, one line, and WooCommerce's
   own return button promoted to the green primary — no second CTA stacked on it. */
.woocommerce-cart .ostu-cart-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 44px 22px 6px;
}
.woocommerce-cart .ostu-cart-empty__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--muted); color: var(--green);
}
.woocommerce-cart .ostu-cart-empty__icon svg { width: 40px; height: 40px; }
.woocommerce-cart .ostu-cart-empty__title { font-size: clamp(20px, 3vw, 26px); margin: 0; }
.woocommerce-cart .ostu-cart-empty__lead {
  margin: 0; color: var(--slate-500); max-width: 46ch; line-height: 1.6;
}
/* The default notice is now redundant next to the heading above it — keep it for
   screen readers (it carries role="status") but take it out of the visual flow. */
.woocommerce-cart .cart-empty.woocommerce-info {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.woocommerce-cart .return-to-shop { text-align: center; margin: 22px 0 60px; }
.woocommerce-cart .return-to-shop .button {
  background: var(--green) !important; color: #fff !important;
  min-height: 52px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 30px; font-weight: 700; border-radius: var(--radius);
  box-shadow: var(--shadow-green);
}
.woocommerce-cart .return-to-shop .button:hover { background: var(--green-dark) !important; }

/* ==========================================================================
   Checkout
   ========================================================================== */
/* Back to the cart. The checkout had no link to the cart anywhere in <main>, so a
   shopper who wanted to change a quantity had to use the browser back button. */
.ostu-edit-cart {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  margin: -4px 0 10px; color: var(--slate-500); font-size: 14px; font-weight: 600;
  text-decoration: none;
}
.ostu-edit-cart:hover { color: var(--green); text-decoration: underline; }
.woocommerce-checkout .col2-set, .woocommerce-checkout #customer_details { width: 100%; min-width: 0; }
/* Desktop: billing (1fr) on the left, order review + payment on the right. The
   owner reported the payment column felt "kõik nii kokku surutud" (squished) —
   the Montonio bank grid was cramped in a 440px column. Widen the right column
   to ~500px and open the column gap so the payment area breathes.
   Stacks to one column under 900px. */
@media (min-width: 900px) {
  .woocommerce-checkout form.checkout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(480px, 520px);
    grid-template-rows: auto 1fr;          /* row 2 stretches → sticky has travel room */
    gap: 14px 48px;
    align-items: start;
  }
  /* Billing spans both rows of the left column; review heading + panel fill the
     right column. The 1fr second row lets the panel stick as billing scrolls. */
  .woocommerce-checkout #customer_details { grid-column: 1; grid-row: 1 / 3; min-width: 0; }
  .woocommerce-checkout #order_review_heading { grid-column: 2; grid-row: 1; margin: 0; }
  .woocommerce-checkout #order_review { grid-column: 2; grid-row: 2; align-self: start; }
}
@media (min-width: 900px) and (min-height: 980px) {
  .woocommerce-checkout #order_review { position: sticky; top: 96px; }
}
/* Roomier layout on wide screens so the bank/parcel grid never feels packed. */
@media (min-width: 1180px) {
  .woocommerce-checkout form.checkout { grid-template-columns: minmax(0, 1fr) 520px; gap: 16px 56px; }
}
.woocommerce-checkout #order_review_heading { font-size: 20px; color: var(--slate-dark); margin: 0 0 14px; }

/* Customer details: billing + (optional) shipping stack in their own blocks so
   "Saada teisele aadressile?" and "Märkused tellimuse kohta" never overlap. */
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 { float: none; width: 100%; max-width: none; padding: 0; }
.woocommerce-checkout #customer_details .col-2 { margin-top: 8px; }
.woocommerce-billing-fields,
.woocommerce-shipping-fields,
.woocommerce-additional-fields { display: block; width: 100%; clear: both; margin-bottom: 18px; }
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
.woocommerce-additional-fields h3 { font-size: 18px; margin: 0 0 14px; color: var(--slate-dark); }
/* "Saada teisele aadressile?" toggle owns its own line above the notes block. */
.woocommerce-shipping-fields h3#ship-to-different-address {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  clear: both;
}
.woocommerce-shipping-fields h3#ship-to-different-address label { font-size: 18px; font-weight: 700; margin: 0; }
.woocommerce-shipping-fields h3#ship-to-different-address input { width: auto; min-height: 0; margin: 0; }

/* Form rows: label above input with breathing room; no overlap when fields
   wrap. Core uses .form-row-first / .form-row-last floats — make them a clean
   2-column grid that collapses on narrow screens. */
.woocommerce form .form-row { display: flex; flex-direction: column; margin: 0 0 16px; padding: 0; }
.woocommerce form .form-row label { display: block; }
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper,
.woocommerce-checkout .woocommerce-additional-fields__field-wrapper { display: block; }
.woocommerce form .form-row-first,
.woocommerce form .form-row-last { width: 100%; float: none; margin-right: 0; }
@media (min-width: 560px) {
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
  .woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }
  /* Full-width rows span both columns; name pairs share the two columns. */
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper > .form-row-wide,
  .woocommerce-checkout .woocommerce-shipping-fields__field-wrapper > .form-row-wide { grid-column: 1 / -1; }
}
/* Order-review panel (sticky positioning is set in the >=900px grid rule above,
   so it never sticks while stacked on mobile). Generous padding keeps the
   totals + payment grid from feeling compressed. */
.woocommerce-checkout #order_review { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 26px 28px; box-shadow: var(--shadow-card); }
@media (min-width: 900px) { .woocommerce-checkout #order_review { padding: 28px 30px 30px; } }
.woocommerce form .form-row label { font-weight: 600; color: var(--slate); margin-bottom: 6px; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .select2-container .select2-selection {
  border: 1px solid var(--border) !important; border-radius: var(--radius) !important; min-height: 48px; padding: 12px 14px; font: inherit; background: #fff; width: 100%;
}
/* The rule above uses `border: … !important`, which also beats WooCommerce's own
   `.form-row.woocommerce-invalid input.input-text { border-color: var(--wc-red) }`
   (core ships that WITHOUT !important). So a field the shopper failed to fill in
   looked exactly like a field they had filled in correctly. Checkout scrolls to the
   FIRST error, so that one gets found — but the second and third, and every error on
   the login and registration forms, were invisible.
   Added at matching weight rather than removing the !important above, which exists
   to hold the field shape against plugin CSS. Nothing here touches the payment area. */
.woocommerce form .form-row.woocommerce-invalid input.input-text,
.woocommerce form .form-row.woocommerce-invalid textarea,
.woocommerce form .form-row.woocommerce-invalid select,
.woocommerce form .form-row.woocommerce-invalid .select2-container .select2-selection {
  border-color: var(--danger) !important;
}
.woocommerce form .form-row.woocommerce-validated input.input-text,
.woocommerce form .form-row.woocommerce-validated textarea,
.woocommerce form .form-row.woocommerce-validated select {
  border-color: var(--green) !important;
}
.woocommerce form .form-row .select2-container .select2-selection--single { display:flex; align-items:center; }
.woocommerce form .form-row .select2-selection__rendered { line-height:1.4; padding:0; color:var(--slate-dark); }
.woocommerce form .form-row .select2-selection__arrow { top:0; bottom:0; height:auto; right:8px; display:flex; align-items:center; }
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row .select2-container--focus .select2-selection,
.woocommerce form .form-row .select2-container--open .select2-selection { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green) !important; }

/* Order-review table — tidy rows, totals stand out. */
.woocommerce-checkout #order_review .shop_table { border: 0; border-radius: 0; box-shadow: none; background: transparent; margin: 0; overflow: visible; }
.woocommerce-checkout #order_review .shop_table th,
.woocommerce-checkout #order_review .shop_table td {
  padding: 12px 0; border-top: 1px solid var(--border); background: transparent;
  text-transform: none; letter-spacing: 0; font-size: 14px; vertical-align: top;
}
.woocommerce-checkout #order_review .shop_table thead th { color: var(--slate-500); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-top: 0; padding-top: 0; }
.woocommerce-checkout #order_review .cart_item td.product-name { color: var(--slate); font-weight: 600; }
.woocommerce-checkout #order_review .cart_item td.product-total { text-align: right; color: var(--slate-dark); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.woocommerce-checkout #order_review .product-quantity { color: var(--slate-500); font-weight: 600; }
.woocommerce-checkout #order_review tfoot th { color: var(--slate-600); font-weight: 600; text-align: left; }
.woocommerce-checkout #order_review tfoot td { text-align: right; color: var(--slate-dark); font-variant-numeric: tabular-nums; }
.woocommerce-checkout #order_review tfoot .order-total th,
.woocommerce-checkout #order_review tfoot .order-total td { font-size: 17px; font-weight: 700; color: var(--slate-dark); }

/* Checkout shipping methods (Omniva / DPD / Tasuta transport) — was: pushed to the RIGHT
   of the totals column (inherits tfoot text-align:right) with the carrier logo wrapping
   BELOW the label, which looked unbalanced. Stack the label above the methods at FULL
   width and give each carrier a clean, LEFT-aligned selectable CARD row (radio + logo +
   name on the left, price right) — matching the payment rows below for one consistent,
   premium checkout. Matched by both the WC class AND :has(#shipping_method) so a
   plugin-renamed shipping row is still caught. */
.woocommerce-checkout #order_review tr.woocommerce-shipping-totals th,
.woocommerce-checkout #order_review tr:has(#shipping_method) th {
  display: block; width: 100%; text-align: left; padding: 4px 0 8px; color: var(--slate-600); font-weight: 600;
}
.woocommerce-checkout #order_review tr.woocommerce-shipping-totals td,
.woocommerce-checkout #order_review tr:has(#shipping_method) td {
  display: block; width: 100%; text-align: left; padding: 0 0 6px;
}
.woocommerce-checkout #order_review ul#shipping_method li {
  gap: 10px; padding: 12px 14px; margin: 0 0 8px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.woocommerce-checkout #order_review ul#shipping_method li:last-child { margin-bottom: 0; }
.woocommerce-checkout #order_review ul#shipping_method li label { flex: 1 1 auto; align-items: center; gap: 10px; }
.woocommerce-checkout #order_review ul#shipping_method li label .amount { margin-left: auto; white-space: nowrap; }
.woocommerce-checkout #order_review ul#shipping_method img { max-height: 24px; flex: 0 0 auto; }
.woocommerce-checkout #order_review ul#shipping_method li:has(input:checked) {
  border-color: var(--green); background: rgba(5, 150, 105, .04); box-shadow: 0 0 0 2px rgba(5, 150, 105, .22);
}

/* Payment methods — radio + label rows, Montonio logos sit inline and tidy.
   Roomy padding + clear gaps so the bank/parcel picker never feels squished. */
.woocommerce-checkout #payment,
.woocommerce-checkout .payment_methods { border: 0; padding: 0; margin: 22px 0 0; background: transparent; list-style: none; }
.woocommerce-checkout .wc_payment_method { display:flex; flex-wrap:wrap; align-items:center; column-gap:12px; row-gap:10px; background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:16px 18px; margin-bottom:12px; list-style:none; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.woocommerce-checkout .wc_payment_method:last-child { margin-bottom: 0; }
.woocommerce-checkout .wc_payment_method:hover { border-color: rgba(5, 150, 105, .4); box-shadow: 0 4px 14px -8px rgba(15, 23, 42, .25); }
.woocommerce-checkout .wc_payment_method > label { flex:1 1 auto; display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0; font-weight:600; color:var(--slate-dark); cursor:pointer; }
.woocommerce-checkout .wc_payment_method > input[type="radio"] { flex: 0 0 auto; width: auto; min-height: 0; margin: 0; accent-color: var(--green); }
.woocommerce-checkout .wc_payment_method label img { max-height:26px; width:auto; vertical-align:middle; margin-left:auto; flex:0 0 auto; }
/* Checked = clean green ring + faint green wash so the active method is obvious. */
.woocommerce-checkout .wc_payment_method:has(input:checked) { border-color: var(--green); background: rgba(5, 150, 105, .04); box-shadow: 0 0 0 2px rgba(5, 150, 105, .25); }

#place_order { background: var(--green) !important; min-height: 54px; width: 100%; margin-top: 18px; font-size: 16px !important; font-weight: 700 !important; border-radius: var(--radius) !important; box-shadow: var(--shadow-green); }
#place_order:hover { background: var(--green-dark) !important; }

/* payment box — Montonio bank/parcel picker renders here; keep it un-clipped
   (no overflow / transform / clip — those break the Montonio iframe layout). */
.woocommerce-checkout .payment_box { background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 8px 0 4px; font-size: 14px; color: var(--slate); }
.woocommerce-checkout .payment_box p:last-child { margin-bottom: 0; }

/* checkout coupon / login panels */
.woocommerce-checkout .checkout_coupon, .woocommerce-checkout .woocommerce-form-login { background: var(--surface, #fff); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-card); margin-bottom: 20px; }

/* thank-you / order received */
.woocommerce-thankyou-order-received { font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); color: var(--slate-dark); margin-bottom: 20px; }
.woocommerce-order-overview { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; margin: 0 0 28px; padding: 20px 24px; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.woocommerce-order-overview li { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--slate-500); border: 0; padding: 0; }
.woocommerce-order-overview li strong { font-family: var(--font-display); font-size: 18px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--slate-dark); }

/* ==========================================================================
   Account
   ========================================================================== */
/* WooCommerce functional pages (cart/checkout/account) render full-width via
   page.php .woo-page — no 760px prose measure, no bullet lists bleeding in. */
.woo-page { max-width: none; width: 100%; }
.woo-page__content { width: 100%; }
/* Account layout. Target BOTH the body class AND the account markup directly
   via :has() — because WooCommerce only adds the .woocommerce-account body class
   when is_account_page() is true, which can resolve false for a static account
   page, leaving the grid unmatched (nav + content then stacked/squeezed). */
/* DASHBOARD only (it contains the account nav). MUST require the nav, otherwise
   the logged-OUT login/register .woocommerce (which has NO nav) also matched and
   got squeezed into the 260px column — the broken cramped login form. */
.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation),
.woocommerce:has(> .woocommerce-MyAccount-navigation) {
  display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start;
}
@media (min-width: 900px) {
  .woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation),
  .woocommerce:has(> .woocommerce-MyAccount-navigation) { grid-template-columns: 260px 1fr; }
}
/* Robust fallback WITHOUT :has() — same fix pattern as the product gallery. The
   dashboard is the only account view shown to a LOGGED-IN user (the login/register page
   is logged-out), so `.logged-in` distinguishes it from the login page without :has().
   On browsers lacking :has() (and when the :has() structure quirk above misses), the
   dashboard then still gets the tidy top-aligned 2-column layout (nav left, content
   right) instead of a misaligned stack. The theme force-adds the woocommerce-account
   body class, so this matches even when is_account_page() resolves false. */
.woocommerce-account.logged-in .woocommerce {
  display: grid; grid-template-columns: 1fr; gap: 28px; align-items: start;
}
@media (min-width: 900px) {
  .woocommerce-account.logged-in .woocommerce { grid-template-columns: 260px 1fr; }
}

/* THE alignment fix (v1.2.25). The [woocommerce_my_account] shortcode emits an
   (almost always EMPTY) <div class="woocommerce-notices-wrapper"> as the FIRST direct
   child of .woocommerce, BEFORE the nav + content — confirmed on the LIVE site:
   class="woocommerce"><div class="woocommerce-notices-wrapper"></div>. As a grid item
   that empty wrapper stole cell (row1,col1 = 260px), shoving the nav into col2 and
   dropping the content table down to row2 — so the left menu never lined up with the
   right table. align-items:start could NOT fix it: the defect is cell ASSIGNMENT, not
   in-cell alignment (nav + content ended up in different rows). Fix: drop the empty
   wrapper out of the grid flow; if notices DO appear (non-empty), let them span the
   full width as their own top row so nav + content stay aligned. */
.woocommerce-account .woocommerce-notices-wrapper:empty { display: none; }
@media (min-width: 900px) {
  .woocommerce-account.logged-in .woocommerce > .woocommerce-notices-wrapper,
  .woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) > .woocommerce-notices-wrapper,
  .woocommerce:has(> .woocommerce-MyAccount-navigation) > .woocommerce-notices-wrapper {
    grid-column: 1 / -1;
  }
}

/* Logged-OUT login + register page. CRITICAL: on this store WooCommerce renders
   the wrapper as <div class="u-columns col2-set"> with NO #customer_login id, so
   the old #customer_login selector never matched — the two forms fell back to WC's
   ~47% floats and staggered DIAGONALLY (login up-right, register down-left).
   Target the live markup (.u-columns.col2-set) and scope with
   :has(.woocommerce-form-register) so the checkout's own .col2-set is never
   touched. #customer_login kept as a fallback for stores that do emit the id.
   Result: two equal cards, side by side, tops on the SAME level (≥768px). */
.woocommerce .u-columns.col2-set:has(.woocommerce-form-register),
.woocommerce-account #customer_login.u-columns,
.woocommerce #customer_login.u-columns {
  display: grid; grid-template-columns: 1fr; gap: 22px; max-width: 940px; margin-inline: auto;
}
@media (min-width: 768px) {
  .woocommerce .u-columns.col2-set:has(.woocommerce-form-register),
  .woocommerce-account #customer_login.u-columns,
  .woocommerce #customer_login.u-columns { grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
}
/* Two premium cards. Neutralise WC's col2-set floats / percentage widths. */
.u-columns.col2-set:has(.woocommerce-form-register) > .col-1,
.u-columns.col2-set:has(.woocommerce-form-register) > .col-2,
.u-columns.col2-set:has(.woocommerce-form-register) > .u-column1,
.u-columns.col2-set:has(.woocommerce-form-register) > .u-column2,
#customer_login .u-column1, #customer_login .u-column2 {
  width: auto !important; float: none !important; margin: 0 !important;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-card);
}
.u-columns.col2-set:has(.woocommerce-form-register) h2,
#customer_login h2 { font-size: 22px; margin: 0 0 18px; color: var(--slate-dark); }
.u-columns.col2-set:has(.woocommerce-form-register) .woocommerce-form-login__rememberme,
.u-columns.col2-set:has(.woocommerce-form-register) .woocommerce-form-register__rememberme,
#customer_login .woocommerce-form-login__rememberme,
#customer_login .woocommerce-form-register__rememberme { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 14px; }
.u-columns.col2-set:has(.woocommerce-form-register) .woocommerce-privacy-policy-text p,
#customer_login .woocommerce-privacy-policy-text p { font-size: 13px; color: var(--slate-500); line-height: 1.5; }
.u-columns.col2-set:has(.woocommerce-form-register) .woocommerce-form-login__submit,
.u-columns.col2-set:has(.woocommerce-form-register) .woocommerce-form-register__submit,
#customer_login .woocommerce-form-login__submit,
#customer_login .woocommerce-form-register__submit {
  display: block; width: 100%; min-height: 50px; margin-top: 4px;
  font-size: 15px; font-weight: 700;
}
/* The register card carries a Google reCAPTCHA widget (.g-recaptcha → a fixed
   304px iframe) plus a Mailchimp newsletter row. The 304px iframe is WIDER than
   the inner width of the card on a 375px phone, so it pushed the page into
   horizontal scroll. Never let it exceed the card; on phones scale the whole
   304px badge down so it sits flush inside the card. (transform here is on the
   OUTER login widget — NOT inside #payment .payment_box, so Montonio is untouched.) */
.u-columns.col2-set:has(.woocommerce-form-register) .g-recaptcha,
.u-columns.col2-set:has(.woocommerce-form-register) .woocommerce-form-row--recaptcha,
.u-columns.col2-set:has(.woocommerce-form-register) form > div[style*="recaptcha"],
#customer_login .g-recaptcha,
#customer_login .woocommerce-form-row--recaptcha,
#customer_login form > div[style*="recaptcha"] { max-width: 100%; overflow: hidden; margin: 0 0 14px; }
.u-columns.col2-set:has(.woocommerce-form-register) .g-recaptcha,
#customer_login .g-recaptcha { transform-origin: 0 0; }
@media (min-width: 768px) and (max-width: 820px) {
  .u-columns.col2-set:has(.woocommerce-form-register) .g-recaptcha,
  #customer_login .g-recaptcha { transform: scale(.92); height: 71px; }
  .u-columns.col2-set:has(.woocommerce-form-register) .g-recaptcha > div,
  #customer_login .g-recaptcha > div { width: 304px !important; }
}
@media (max-width: 480px) {
  .u-columns.col2-set:has(.woocommerce-form-register) .g-recaptcha,
  #customer_login .g-recaptcha { transform: scale(.92); height: 71px; }
  .u-columns.col2-set:has(.woocommerce-form-register) .g-recaptcha > div,
  #customer_login .g-recaptcha > div { width: 304px !important; }
}
@media (max-width: 400px) {
  .u-columns.col2-set:has(.woocommerce-form-register) .g-recaptcha,
  #customer_login .g-recaptcha { transform: scale(.86); height: 67px; }
}
@media (max-width: 360px) {
  .u-columns.col2-set:has(.woocommerce-form-register) .g-recaptcha,
  #customer_login .g-recaptcha { transform: scale(.74); height: 58px; }
}
/* Kill WooCommerce core's default 30% / 68% widths + floats so the nav + content
   fill their grid cells instead of collapsing into narrow stacked columns. */
.woocommerce-MyAccount-navigation,
.woocommerce-MyAccount-content { width: auto !important; float: none !important; margin: 0 !important; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px; box-shadow: var(--shadow-card); }
.woocommerce-MyAccount-navigation li { margin: 0; }
.woocommerce-MyAccount-navigation li a { display: block; padding: 12px 16px; border-radius: 10px; font-weight: 600; color: var(--slate); text-decoration: none; }
.woocommerce-MyAccount-navigation li a:hover { background: var(--muted); color: var(--green); }
.woocommerce-MyAccount-navigation li.is-active a {
  background: rgba(5,150,105,.10); color: var(--green-dark);
  font-weight: 700; box-shadow: inset 3px 0 0 var(--green);
}

/* account content panel */
.woocommerce-MyAccount-content { background: var(--surface, #fff); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-card); }
.woocommerce-MyAccount-content > p:first-child { margin-top: 0; }
.woocommerce-MyAccount-content a:not(.button):not(.woocommerce-button) {
  color: var(--green); font-weight: 600; text-decoration: underline;
  text-underline-offset: 2px;
}
.woocommerce-MyAccount-content a:not(.button):not(.woocommerce-button):hover {
  color: var(--green-dark);
}

/* address cards */
.woocommerce-Addresses { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 8px; }
@media (min-width: 600px) { .woocommerce-Addresses { grid-template-columns: repeat(2, 1fr); } }
.woocommerce-Addresses .woocommerce-Address { background: var(--surface, #fff); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.woocommerce-Addresses .woocommerce-Address-title { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.woocommerce-Addresses .woocommerce-Address-title h3 { font-size: 16px; margin: 0; }
.woocommerce-Addresses .woocommerce-Address address { color: var(--slate-600); font-style: normal; line-height: 1.7; }

/* orders + downloads tables (My Account). Both ship core's .shop_table +
   .shop_table_responsive classes; give them the same rounded, bordered surface
   as the cart so they read as premium cards, not raw tables. */
.woocommerce-MyAccount-content .shop_table,
.woocommerce-orders-table,
.woocommerce-table--order-downloads {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  border-collapse: separate; border-spacing: 0; overflow: hidden; width: 100%; background: #fff;
}
.woocommerce-orders-table th,
.woocommerce-table--order-downloads th { background: var(--muted); color: var(--slate-dark); font-weight: 700; padding: 14px 16px; text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.woocommerce-orders-table td,
.woocommerce-table--order-downloads td { padding: 16px; border-top: 1px solid var(--border); vertical-align: middle; color: var(--slate); }
.woocommerce-orders-table .woocommerce-orders-table__cell-order-status { font-weight: 600; color: var(--slate-dark); }
/* The per-row action buttons (Vaata / Lae alla) sit inline on desktop; keep them
   compact and wrapping so a row with two buttons never overflows the cell. */
.woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions,
.woocommerce-table--order-downloads td.download-actions { white-space: nowrap; }
.woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions .button,
.woocommerce-table--order-downloads td.download-actions .button {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; margin: 2px 0 2px 6px;
}
/* MOBILE (≤768px): core stacks these responsive tables (display:block rows, td
   carries a data-title label via ::before). Mirror the cart's card treatment so
   each order/download becomes a tidy card with the value right-aligned against
   its label — instead of the unstyled left-jammed stack core leaves behind. */
@media (max-width: 768px) {
  .woocommerce-MyAccount-content table.shop_table_responsive { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .woocommerce-MyAccount-content table.shop_table_responsive thead { display: none; }
  .woocommerce-MyAccount-content table.shop_table_responsive tr {
    display: block; border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 12px; padding: 4px 0; background: #fff; box-shadow: var(--shadow-card);
  }
  .woocommerce-MyAccount-content table.shop_table_responsive td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    text-align: right; border-top: 0; border-bottom: 1px solid var(--border); padding: 11px 14px;
  }
  .woocommerce-MyAccount-content table.shop_table_responsive tr td:last-child { border-bottom: 0; }
  .woocommerce-MyAccount-content table.shop_table_responsive td::before {
    color: var(--slate-dark); font-weight: 700; font-size: 12px; text-transform: uppercase;
    letter-spacing: .04em; text-align: left; flex: 0 0 auto; margin-right: 8px;
  }
  /* The actions cell holds full-width buttons — let them fill the row, not crowd. */
  .woocommerce-MyAccount-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions,
  .woocommerce-MyAccount-content table.shop_table_responsive td.download-actions { justify-content: flex-end; }
  .woocommerce-MyAccount-content table.shop_table_responsive td.woocommerce-orders-table__cell-order-actions .button,
  .woocommerce-MyAccount-content table.shop_table_responsive td.download-actions .button { min-height: 40px; }
}

/* ==========================================================================
   Notices
   ========================================================================== */
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-radius: var(--radius); border-top: 0; padding: 14px 18px 14px 44px; }
.woocommerce-message { background: rgba(5,150,105,.08); border-left: 4px solid var(--green); color: var(--green-dark); }
.woocommerce-info { background: var(--muted); border-left: 4px solid var(--slate); }
/* WooCommerce draws its notice glyphs in its own blue #1e85be — a colour that
   appears nowhere else in this shop, so it read as a stain on these grey bars. */
.woocommerce-message::before { color: var(--green); }
.woocommerce-info::before { color: var(--slate); }
.woocommerce-error::before { color: var(--danger); }
.woocommerce-error { background: #fef2f2; border-left: 4px solid var(--danger); color: var(--danger-dark); }

/* star rating colour */
/* Rating stars — CONTRAST, measured not eyeballed. #f59e0b on the white card is
   2.15:1 where WCAG 1.4.11 wants 3:1 for graphics, and core's empty track #cfc8d8
   sits at 1.63:1 — so filled against empty was 1.32:1 and the score was unreadable
   at a glance, on the one element that exists to be read at a glance.
   #b45309 = 4.58:1, and the darker empty track brings the filled/empty difference
   to a genuine step. Tokenised so the two stylesheets cannot drift. */
:root { --rating: #b45309; --rating-empty: #64748b; }
.star-rating span::before, .woocommerce p.stars a::before { color: var(--rating); }
.woocommerce .star-rating::before { color: var(--rating-empty); }

/* ==========================================================================
   MOBILE — full beauty pass  (TOP PRIORITY)
   Owner: "kõik peab mobiilis ilus olema!!!"  Phones (~375px) and tablets.
   Every WooCommerce surface refined for narrow widths: shop grid, breadcrumb,
   single product, cart, checkout. Goals: 2-col readable grid, badges never
   clipped, side-by-side compare/quick-view, full-width tappable CTAs (>=44px),
   clean stacking, no horizontal scroll. Desktop rules above are untouched —
   these are max-width overrides only.
   ========================================================================== */
@media (max-width: 768px) {
  /* ---- Global guard: nothing overflows the viewport horizontally ---- */
  .woocommerce, .woocommerce-page { max-width: 100%; overflow-x: clip; }

  /* ---- Breadcrumb pill: wraps onto multiple lines gracefully ---- */
  .woocommerce-breadcrumb {
    display: flex; width: 100%; box-sizing: border-box;
    padding: 8px 14px; margin-bottom: 16px; font-size: 12.5px; line-height: 1.6;
  }

  /* ---- Shop header / toolbar: stack the result count above the ordering ---- */
  .woocommerce-products-header { margin-bottom: 18px; }
  .woocommerce-result-count { font-size: 13px; }
  .woocommerce-ordering { width: 100%; }
  .woocommerce-ordering select, .woocommerce select.orderby { width: 100%; }

  /* ---- Product grid: 2 readable columns with comfortable gap ---- */
  .woocommerce ul.products, ul.products { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
  .product-card__body { padding: 12px; gap: 6px; }
  /* Title scales down a hair but keeps the 2-line clamp + reserved height. */
  .product-card__title,
  .product-card__body .woocommerce-loop-product__title,
  .product-card .woocommerce-loop-product__title { font-size: 13.5px; min-height: 36px; }
  /* Price stays clearly visible (slightly smaller so it never wraps awkwardly). */
  .product-card .price { font-size: 19px; }
  /* Badges ("Soodus" / "Otsas") inset a touch tighter so they never clip the
     smaller card corner. */
  .onsale, .woocommerce span.onsale,
  .woocommerce ul.products li.product .onsale,
  .product-card .onsale, .product-card span.onsale { top: 10px !important; right: 10px !important; font-size: 10px; padding: 3px 9px; }
  .ostu-loop-badges { top: 10px; left: 10px; gap: 5px; }
  .ostu-loop-badges .ostu-badge, .product-card .ostu-badge { font-size: 10px; padding: 3px 9px; }
  /* "Lisa korvi" full-width and 44px+ tappable. */
  .product-card__actions .button,
  .product-card__actions a.add_to_cart_button,
  .product-card a.add_to_cart_button { min-height: 44px; font-size: 13.5px; }
  /* Compare + Quick-view stay SIDE BY SIDE and tappable (no stacking). */
  .product-card__tools { gap: 6px; }
  .product-card__tools .ostu-qv-trigger,
  .product-card__tools .ostu-cmp-btn--card,
  .product-card__tools > button,
  .product-card__tools > a { min-height: 44px; height: 44px; font-size: 11.5px; }

  /* ---- Single product: gallery first, then summary, full-width, roomy ---- */
  /* (The base grid is already 1-column mobile-first; reinforce order + spacing.) */
  .single-product div.product { gap: 24px; }
  /* NO CSS `order` here, on purpose. On the 1-column mobile grid the SOURCE
     order is already correct (gallery → summary → tabs → bundle → upsells →
     related → recently-viewed). Setting `order` on only SOME children made the
     unordered extras (Soovitame / Sinu sirvimine / upsells = default order 0)
     jump ABOVE the gallery + summary — the bug the owner saw. So we only unstick
     the gallery and let the natural source order win. */
  .single-product .woocommerce-product-gallery { position: static !important; top: auto !important; }
  /* Contain ONLY the outer gallery. Do NOT cap .__wrapper — when FlexSlider builds,
     that <figure> becomes the "ul.slides" and FlexSlider sets its width to N×100% to
     lay the slides side by side. A max-width:100% + overflow:hidden on it CLIPS slides
     2..N, which is exactly why the gallery worked on DESKTOP (no such cap there) but
     broke on MOBILE: slides squished, thumbnails overlapping the main image, and
     tapping a thumbnail showed a blank frame. The image itself is already capped to
     width:100% below, so the outer container alone prevents any horizontal escape. */
  .single-product .woocommerce-product-gallery { max-width: 100%; overflow: hidden; }
  .single-product .woocommerce-product-gallery__image img { width: 100%; max-width: 100%; height: auto; max-height: 380px; object-fit: contain; padding: 16px; }
  /* Thumbnail strip slightly smaller on phones so the row reads as thumbnails. */
  .single-product .flex-control-thumbs li,
  .single-product .flex-control-thumbs img { width: 58px; height: 58px; }
  /* Title scales down sensibly. */
  .single-product .product_title { font-size: clamp(24px, 7vw, 30px); }
  .single-product .price { font-size: 27px; }
  .single-product .price del { font-size: 18px; }
  /* Add-to-cart row: qty + button must not overflow. The button grows to fill
     the remaining width; qty stays a fixed comfortable stepper. Covers BOTH the
     simple-product form and the variable-product variation row. */
  .single-product form.cart:not(.variations_form):not(.grouped_form),
  .single-product form.cart .woocommerce-variation-add-to-cart { gap: 10px; margin: 20px 0; flex-wrap: wrap; }
  .single-product form.cart.variations_form,
  .single-product form.cart.grouped_form { margin: 20px 0; }
  .single-product .quantity { flex: 0 0 auto; }
  .single-product .quantity input.qty { width: 72px; height: 52px; font-size: 16px; }
  .single-product form.cart .button,
  .single-product .single_add_to_cart_button { flex: 1 1 140px; min-height: 52px; padding: 0 18px; font-size: 15px; }
  /* Trust row wraps to a clean 2-up. */
  .product-trust { gap: 10px 16px; margin-top: 18px; padding-top: 16px; }
  .product-trust li { font-size: 12.5px; }

  /* Tabs: a horizontal scroll strip so the pills never break the layout. */
  .woocommerce-tabs ul.tabs {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 12px; margin-bottom: 18px; gap: 6px;
    scrollbar-width: none;
  }
  .woocommerce-tabs ul.tabs::-webkit-scrollbar { display: none; }
  .woocommerce-tabs ul.tabs li { flex: 0 0 auto; }
  .woocommerce-tabs ul.tabs li a { padding: 9px 16px; font-size: 14px; }
  .woocommerce-tabs .panel h2 { font-size: 19px; }
  .related.products > h2, .upsells.products > h2 { font-size: 20px; }

  /* ---- Cart: stacked rows read cleanly, totals full-width, CTA tappable ---- */
  .woocommerce-cart .woocommerce { gap: 22px; }
  /* WooCommerce stacks .shop_table rows on mobile (responsive table). Make each
     row a tidy card and right-align the data values against their labels. */
  .woocommerce-cart table.shop_table { border-radius: var(--radius); }
  .woocommerce-cart table.shop_table tr {
    display: block; border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 12px; padding: 4px 0; background: #fff;
  }
  .woocommerce-cart table.shop_table thead { display: none; }
  .woocommerce-cart table.shop_table td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    text-align: right; border-top: 0; border-bottom: 1px solid var(--border); padding: 11px 14px;
  }
  .woocommerce-cart table.shop_table tr td:last-child { border-bottom: 0; }
  /* PHONE CART CARD — picture back, and on the same line as the name.
     WooCommerce's own woocommerce-smallscreen.css hides the cart thumbnail outright
     (`.woocommerce table.cart .product-thumbnail{display:none}`, 0,2,2), so a phone
     shopper saw only names and numbers and had to trust their memory of what they
     had picked. Beaten here at (0,3,1), without leaning on the .woocommerce-cart
     body class, which this store does not always carry.
     The row becomes a small card: [picture][name][×] on the first line, then price,
     quantity and line total full width underneath. Measured at 375px: picture
     34→94, name 98→303, × 303→355, nothing past the container, no side scroll. */
  table.cart tr.cart_item { display: flex; flex-wrap: wrap; align-items: center; }
  table.cart .cart_item .product-thumbnail {
    display: block; order: 1; flex: 0 0 auto; width: 78px;
    padding: 11px 0 11px 14px; border-bottom: 0;
  }
  table.cart .cart_item .product-thumbnail::before { display: none; }
  /* Same specificity as the desktop rule above — it now has to beat WC core's
     `.woocommerce-cart table.cart img{width:32px}` (0,2,2), so a 2-class selector
     here would no longer win and the phone would inherit the 76px desktop size. */
  table.cart .cart_item .product-thumbnail img { width: 60px; height: 60px; max-width: 60px; }
  table.cart .cart_item .product-name {
    order: 2; flex: 1 1 0; min-width: 0;
    text-align: left; justify-content: flex-start; border-bottom: 0;
  }
  table.cart .cart_item .product-name::before { display: none; }
  table.cart .cart_item .product-remove { order: 3; flex: 0 0 auto; padding-right: 14px; border-bottom: 0; }
  table.cart .cart_item .product-remove::before { display: none; }
  table.cart .cart_item .product-price,
  table.cart .cart_item .product-quantity,
  table.cart .cart_item .product-subtotal { order: 4; flex: 1 1 100%; }
  table.cart .cart_item .product-price { border-top: 1px solid var(--border); }
  .cart .quantity input.qty { width: 64px; height: 44px; }
  /* Coupon / update row: full-width stacked. The coupon field + "Rakenda"
     button share one line; "Uuenda korv" goes full-width underneath.
     The desktop row is a floated table-cell, so every float MUST be cleared here —
     a leftover `float:right` plus `width:100%` would push the update button past
     the screen edge, which is exactly the overflow this cart was just fixed for. */
  .woocommerce-cart table.cart td.actions { display: block; text-align: left; padding: 14px; }
  .woocommerce-cart table.cart td.actions .ostu-continue-shopping { float: none; display: flex; width: 100%; justify-content: center; margin: 0 0 10px; }
  .woocommerce-cart table.cart td.actions .coupon { float: none; display: flex; gap: 8px; margin: 0 0 10px; width: auto; max-width: none; }
  .woocommerce-cart table.cart td.actions .coupon .input-text { flex: 1 1 auto; width: auto; min-width: 0; }
  .woocommerce-cart table.cart td.actions .button[name="update_cart"] { float: none; width: 100%; margin: 0; }
  .woocommerce-cart table.cart td.actions .coupon .button { flex: 0 0 auto; width: auto; }
  .cart_totals { padding: 18px; }
  .wc-proceed-to-checkout a.checkout-button { width: 100%; }

  /* ---- Checkout: single column, payment area full-width, nothing squished --- */
  .woocommerce-checkout #order_review,
  .woocommerce-checkout #customer_details { width: 100%; min-width: 0; }
  .woocommerce-checkout #order_review { padding: 18px 16px 20px; }
  /* Order-review table stays a proper table on checkout (it's compact), but keep
     it from overflowing. */
  .woocommerce-checkout #order_review .shop_table { width: 100%; }
  .woocommerce-checkout #order_review table { table-layout: fixed; }
  .woocommerce-checkout #order_review .cart_item td.product-name { word-break: break-word; }
  /* Payment methods: full-width rows, logos wrap under the label if needed. */
  .woocommerce-checkout .wc_payment_method { padding: 14px; }
  .woocommerce-checkout .wc_payment_method label img { max-height: 22px; }
  #place_order { width: 100%; }
  /* Form fields full-width single column (the >=560px 2-col grid is desktop). */
  .woocommerce form .form-row-first,
  .woocommerce form .form-row-last { width: 100%; }
}

/* ---- Small phones (~375px and below): final squeeze-proofing ---- */
@media (max-width: 480px) {
  /* Grid gap + card padding tighten so 2 columns stay comfortable at 375px. */
  .woocommerce ul.products, ul.products { gap: 10px; }
  .product-card__body { padding: 11px; }
  .product-card .price { font-size: 18px; }
  /* On the very narrowest screens the compare/quick-view labels can crowd — keep
     them side-by-side but allow the text to shrink; icons stay legible. */
  .product-card__tools .ostu-qv-trigger,
  .product-card__tools .ostu-cmp-btn--card,
  .product-card__tools > button,
  .product-card__tools > a { font-size: 11px; padding: 0 6px; gap: 4px; }
  /* Never shrink the icon, so the two pills always read as clean, equal,
     tappable chips. (Label ellipsis is set in the base tools block.) */
  .product-card__tools .ostu-qv-trigger__icon,
  .product-card__tools .ostu-cmp-btn__icon { flex: none; }

  /* Single product: qty + add-to-cart share ONE row. With flex:1 1 100% the
     button could never sit beside the 68px stepper, so the layout was always
     row 1 = a small number box with ~265px of dead space, row 2 = the CTA.
     1 1 auto + min-width:0 lets them share a 343px row and still wrap if a
     translation makes the label very long. */
  .single-product .quantity input.qty { width: 68px; }
  .single-product form.cart .button,
  .single-product .single_add_to_cart_button { flex: 1 1 auto; min-width: 0; }

  /* Breadcrumb: smaller, still a neat pill. */
  .woocommerce-breadcrumb { font-size: 12px; padding: 7px 12px; }

  /* Checkout review padding a touch tighter. */
  .woocommerce-checkout #order_review { padding: 16px 14px 18px; }
}

/* ---- Tightest phones (<=400px): icon-only Võrdle / Kiirvaade chips ----
   On a ~160px-wide card the two ghost pills are too narrow for both an icon and
   a full Estonian word. Rather than ellipsis-clip "Kiirvaade" (which reads as a
   bug), drop to clean ICON-ONLY chips: each pill keeps its 40px tap target and
   the two stay side-by-side, while the accessible name is preserved by the
   button's aria-label / title (set in compare.php + quick-view.php). */
@media (max-width: 400px) {
  .product-card__tools .ostu-qv-trigger__label,
  .product-card__tools .ostu-cmp-btn__label { display: none; }
  .product-card__tools .ostu-qv-trigger,
  .product-card__tools .ostu-cmp-btn--card,
  .product-card__tools > button,
  .product-card__tools > a { gap: 0; padding: 0; }
  .product-card__tools .ostu-qv-trigger__icon svg,
  .product-card__tools .ostu-cmp-btn__icon svg { width: 17px; height: 17px; }
}

/* Why an account is worth making — printed on woocommerce_register_form_start.
   The card used to be a bare form with no reason to fill it in. */
.ostu-register-why {
  list-style: none; margin: 0 0 18px; padding: 14px 16px;
  background: var(--muted); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 7px;
  color: var(--slate-600); font-size: 14px; line-height: 1.5;
}
.ostu-register-why li { position: relative; padding-left: 24px; }
.ostu-register-why li::before {
  content: ""; position: absolute; left: 4px; top: .42em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
}

/* ==========================================================================
   CHECKOUT ORDER SUMMARY — the anonymous-cell trap again (CLAUDE.md Trap 11)
   The shipping row's th/td were given `display:block; width:100%` while the
   summary was still a real table, so both were wrapped in anonymous table cells
   that land in COLUMN 1 — `width:100%` then resolved against that column, not the
   panel, and the Omniva/DPD cards came out roughly half the width they should be.
   Exactly what v1.2.63 fixed in the cart, in the other money-path table.
   Fix is the same: take the WHOLE table off table display, so no anonymous cell
   can be generated, and lay the rows out with flex. Never half of it.
   Scope note: every selector below is inside the ORDER SUMMARY table only. The
   payment area keeps its own decorative block further up this file, untouched —
   check 6a in tools/check-theme.sh is what enforces that, and it counts literal
   selector mentions, so do not name them here either.
   ========================================================================== */
.woocommerce-checkout #order_review table.shop_table,
.woocommerce-checkout #order_review table.shop_table thead,
.woocommerce-checkout #order_review table.shop_table tbody,
.woocommerce-checkout #order_review table.shop_table tfoot { display: block; width: 100%; }
.woocommerce-checkout #order_review table.shop_table tr {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 4px 12px;
}
.woocommerce-checkout #order_review table.shop_table th,
.woocommerce-checkout #order_review table.shop_table td { display: block; width: auto; }
/* The shipping row stacks instead: its label sits above a full-width list of
   carrier cards. Now that the table is not a table, this is just a block row. */
.woocommerce-checkout #order_review table.shop_table tr.woocommerce-shipping-totals,
.woocommerce-checkout #order_review table.shop_table tr:has(#shipping_method) { display: block; }

/* Montonio's pickup-point row inherited tfoot's right alignment while every other
   label on the panel is left-aligned, so the one control the shopper must actually
   operate was the odd one out. (It is a plain <select>, not a widget — the audit's
   ".choices" claim was wrong; verified in the live checkout HTML.) */
.woocommerce-checkout #order_review tr.montonio-pickup-point th,
.woocommerce-checkout #order_review tr.montonio-pickup-point td,
.woocommerce-checkout #order_review tr:has(select[id*="pickup-point"]) th,
.woocommerce-checkout #order_review tr:has(select[id*="pickup-point"]) td { text-align: left; }

/* Lost-password was the only account form without a card — it stretched the full
   content width while login and register sit in neat 480px panels. */
.woocommerce-account .woocommerce-ResetPassword.lost_reset_password {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-card);
  max-width: 480px; margin-inline: auto;
}

@media (max-width: 768px) {
  /* Cart totals said every label twice — "Tarne" from the theme's own <th>, then
     "Tarne: " again from WooCommerce's small-screen data-title pseudo-element. The
     th is already forced visible here, so core's label is pure duplication. */
  /* Needs the full .woocommerce-cart .cart-collaterals prefix: WooCommerce's
     small-screen sheet sets this content at (0,2,4) and a bare
     `.cart_totals table td::before` is only (0,1,3) — the v1.2.72 version of this
     line lost the cascade and was dead code. Now (0,3,4), which beats core fairly.
     Same prefix v1.2.64 already uses for the totals cells themselves. */
  .woocommerce-cart .cart-collaterals .cart_totals table tr td::before { content: none; }
  /* Fixed layout is for real tables; this one is flex rows now (see above), and
     leaving it on made the browser reserve column widths that no longer exist. */
  .woocommerce-checkout #order_review table { table-layout: auto; }
}
