/* Storefront pro 1.3.2 — UI improvements.
   Loaded after theme.css so these rules win. Colors come from the theme tokens (--primary etc.). */

/* 1. Add to cart (shop + homepage product cards) ------------------------------------------- */
body ul.products li.product a.button.button {
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin: 0 !important;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 72%, #000));
  color: var(--button-text, #fff);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 6px 14px -7px color-mix(in srgb, var(--primary) 80%, transparent);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent;
}
body ul.products li.product a.button.button:hover {
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 72%, #000));
  color: var(--button-text, #fff);
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px -8px color-mix(in srgb, var(--primary) 85%, transparent);
}
body ul.products li.product a.button.button:active { transform: scale(.98); filter: brightness(.95); }
body ul.products li.product a.button.button:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 40%, #fff); outline-offset: 2px; }
body ul.products li.product a.button.button.loading { opacity: .75; pointer-events: none; }
body ul.products li.product a.button.button::after {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
}
body ul.products li.product a.button.button.added::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
/* Variable / external products ("Select options" etc.) keep the same look without the + icon */
body ul.products li.product a.button.button:not(.product_type_simple)::after { display: none; }
/* The old floating "+" is replaced by the icon inside the button */
.product-card-arrow { display: none !important; }
ul.products li.product a.added_to_cart { display: block; margin-top: 8px; text-align: center; font-size: 13px; font-weight: 600; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 380px) { body ul.products li.product a.button.button { font-size: 13px; padding-inline: 10px; } }

/* 2. Buy now: its own accent colour + shine ------------------------------------------------
   Deep navy by default — deliberately different from the teal "Add to Cart" so the faster
   action stands out, and controllable via Customizer → Theme colours → "Buy now button
   colour" (--buy-now / --buy-now-ink, emitted inline by inc/settings.php). */
body .woocommerce div.product form.cart .button.buy-now,
body.single-product form.cart .button.buy-now {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  border: 0;
  background: var(--buy-now, #17325E);
  color: var(--buy-now-ink, #fff);
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--buy-now, #17325E) 70%, transparent);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
body .woocommerce div.product form.cart .button.buy-now:hover,
body.single-product form.cart .button.buy-now:hover {
  background: color-mix(in srgb, var(--buy-now, #17325E) 86%, #fff);
  color: var(--buy-now-ink, #fff);
  filter: none;
  transform: translateY(-1px);
}
body.single-product form.cart .button.buy-now:active { transform: scale(.98); }
body.single-product form.cart .button.buy-now::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 38%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .55) 50%, transparent 100%);
  transform: translateX(-160%) skewX(-20deg);
  animation: sfp-shine 3s ease-in-out infinite;
}
@keyframes sfp-shine {
  0%   { transform: translateX(-160%) skewX(-20deg); }
  55%, 100% { transform: translateX(380%) skewX(-20deg); }
}
@media (prefers-reduced-motion: reduce) { body.single-product form.cart .button.buy-now::before { animation: none; opacity: 0; } }

/* 3. Quantity: + / - only, typing disabled -------------------------------------------------- */
.quantity.has-stepper {
  display: inline-flex;
  align-items: center;
  height: 47px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}
.quantity.has-stepper > .qty-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.quantity.has-stepper > .qty-btn:active { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.quantity.has-stepper > .qty-btn:disabled { opacity: .35; cursor: not-allowed; }
.quantity.has-stepper > input.qty.qty {
  width: 40px;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.quantity.has-stepper > input.qty::-webkit-outer-spin-button,
.quantity.has-stepper > input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.item-controls .quantity.has-stepper { height: 38px; }
.item-controls .quantity.has-stepper > .qty-btn { width: 34px; font-size: 19px; }
.item-controls .quantity.has-stepper > input.qty.qty { width: 32px; font-size: 15px; }

/* 4. Larger text on mobile ------------------------------------------------------------------- */
.woocommerce .woocommerce-breadcrumb { font-size: 14px; line-height: 1.6; }
@media (max-width: 760px) {
  .woocommerce .woocommerce-breadcrumb { font-size: 16px; }
  .section-heading > .text-link { font-size: 15px; gap: 6px; font-weight: 600; }
  .section-heading > .text-link .icon { width: 18px; }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button { font-size: 13px; font-weight: 500; min-height: 58px; min-width: 64px; gap: 4px; }
  .mobile-bottom-nav .icon { width: 25px; height: 25px; }
  .mobile-bottom-nav .cart-count { font-size: 11px; min-width: 19px; height: 19px; line-height: 19px; }
  .has-mobile-nav { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .single-product.has-mobile-nav { padding-bottom: 160px; }
  /* things that float above the (now taller) bottom bar */
  .sticky-purchase { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(94px + env(safe-area-inset-bottom)); }
}

/* 5. Homepage readability on mobile (search box + 4 benefit items) ---------------------------
   Benefit texts stay on ONE line: font size is calculated from the width of each grid cell
   (container query units), so it is as large as it can be while still fitting. Only if a very
   long custom text is entered in the Customizer will it wrap to a second line. */
@media (max-width: 760px) {
  .search-form input[type=search] { font-size: 16px; padding: 13px 14px; } /* 16px also stops iOS zoom-on-focus */
  .search-form input[type=search]::placeholder { font-size: 16px; opacity: .8; }

  .benefits > div,
  .benefits > div:first-child { align-items: center; gap: 8px; padding-left: 0; container-type: inline-size; min-width: 0; }
  .benefits .icon { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; }
  .benefits span { min-width: 0; font-size: 14px; line-height: 1.45; }
  .benefits small { margin-top: 2px; line-height: 1.5; color: color-mix(in srgb, var(--muted) 82%, #000); font-size: 11.5px; }
}
/* cell width (100cqw) minus icon (22px) and gap (8px) = text width; the divisors are the widest
   text measured in em (~6.0em titles, ~9.7em descriptions) plus a small safety margin */
@supports (width: 1cqw) {
  @media (max-width: 760px) {
    .benefits span  { font-size: clamp(11px, calc((100cqw - 32px) / 6.6), 16px); }
    .benefits small { font-size: clamp(10px, calc((100cqw - 32px) / 10.4), 14px); }
  }
}

/* JS (theme.js) adds .fit-one-line and sets the exact font size that fits; nowrap guarantees one line */
.benefits.fit-one-line span,
.benefits.fit-one-line small { white-space: nowrap; }

/* 6. Quantity attention after "Choose & buy": glow around the quantity pill + message bubble -- */
.quantity.has-stepper > input.qty:focus,
.quantity.has-stepper > input.qty:focus-visible { outline: none; box-shadow: none; }
.quantity.has-stepper { transition: box-shadow .25s ease, border-color .25s ease; }
.quantity.has-stepper.qty-attn {
  border-color: color-mix(in srgb, var(--qty-glow, #22d3ee) 80%, #fff);
  box-shadow: 0 0 16px 3px color-mix(in srgb, var(--qty-glow, #22d3ee) 45%, transparent);
  animation: sfp-qty-glow 1.8s ease-in-out infinite;
}
@keyframes sfp-qty-glow {
  0%, 100% { box-shadow: 0 0 14px 2px color-mix(in srgb, var(--qty-glow, #22d3ee) 38%, transparent); }
  50%      { box-shadow: 0 0 22px 6px color-mix(in srgb, var(--qty-glow, #22d3ee) 55%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .quantity.has-stepper.qty-attn { animation: none; } }

.has-qty-hint { position: relative; }
.qty-hint {
  position: absolute;
  left: 0;
  top: calc(100% + 12px);
  z-index: 30;
  box-sizing: border-box;
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--hint-radius, 14px);
  background: var(--hint-bg, #fff);
  color: var(--hint-color, #1f2a24);
  font-size: var(--hint-size, 15px);
  font-weight: 500;
  line-height: 1.55;
  filter: drop-shadow(0 8px 14px rgba(15, 30, 25, .16)) drop-shadow(0 0 1px rgba(15, 30, 25, .3));
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
}
.qty-hint[hidden] { display: none; }
.qty-hint.show { opacity: 1; transform: none; }
.qty-hint::before {
  content: "";
  position: absolute;
  top: -13px;
  left: var(--hint-tail-x, 56px);
  width: 22px;
  height: 14px;
  background: var(--hint-bg, #fff);
  clip-path: polygon(0 0, 100% 100%, 14% 100%);
}

/* 7. "Choose & buy" button: padding fitted to its text, arrow right beside the label ------------ */
.sticky-purchase .button {
  flex: 0 0 auto;
  width: auto;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 22px;
  font-size: 15px;
  line-height: 1.2;
}
.sticky-purchase .button .icon { flex: 0 0 auto; width: 18px; height: 18px; }
@media (max-width: 760px) {
  .sticky-purchase { gap: 14px; }
  .sticky-purchase .button { font-size: 15px; min-height: 46px; padding: 11px 20px; gap: 9px; }
}

/* 8. Mobile: the "Choose & buy" bar ends before the scroll-to-top button (never sits under it) ---
   theme.js measures the scroll-to-top button and sets --sp-right; 67px is the fallback.
   Compact content: name on one line, price on one line, small button without arrow. */
@media (max-width: 760px) {
  .sticky-purchase { left: 15px; right: var(--sp-right, 67px); width: auto; transform: none; padding: 10px 14px; gap: 10px; }
  .sticky-purchase > span { min-width: 0; }
  .sticky-purchase .button { font-size: 14px; min-height: 40px; padding: 8px 16px; gap: 0; }
  .sticky-purchase .button .icon { display: none; }
  .sticky-purchase strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; line-height: 1.35; }
  .sticky-purchase .price { display: flex; flex-wrap: nowrap; align-items: baseline; column-gap: 6px; white-space: nowrap; font-size: 13px; line-height: 1.4; }
  .sticky-purchase .price del { font-size: 12px; }
  .sticky-purchase .price ins { text-decoration: none; font-weight: 600; }
}

/* 9. Sticky "Choose & buy" bar: box color + optional glass (frosted) effect ---------------------- */
.sticky-purchase { background: var(--sp-bg, var(--surface)); }
.sticky-purchase.is-glass {
  background: linear-gradient(135deg, color-mix(in srgb, #fff 38%, transparent), transparent 55%), color-mix(in srgb, var(--sp-bg, #fff) var(--sp-opacity, 62%), transparent);
  -webkit-backdrop-filter: blur(var(--sp-blur, 16px)) saturate(180%);
  backdrop-filter: blur(var(--sp-blur, 16px)) saturate(180%);
  border-color: color-mix(in srgb, #fff 55%, transparent);
  box-shadow: 0 8px 28px rgba(15, 30, 25, .14), inset 0 1px 0 rgba(255, 255, 255, .45);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sticky-purchase.is-glass { background: color-mix(in srgb, var(--sp-bg, #fff) 95%, transparent); }
}
/* light text when the box color is dark */
.sticky-purchase.is-dark, .sticky-purchase.is-dark strong, .sticky-purchase.is-dark .price, .sticky-purchase.is-dark .price * { color: #fff !important; }

/* 10. Sign-up / login on phones ----------------------------------------------------------------- */
.account-auth input, .account-auth button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (max-width: 760px) { .account-auth input:not([type=checkbox]):not([type=radio]) { font-size: 16px; } }
/* keyboard open: give the keyboard the whole screen */
body.kb-open .mobile-bottom-nav, body.kb-open .scroll-top, body.kb-open .sticky-purchase { display: none !important; }

/* 11. Low-end phones: no blur/glass, no looping animations --------------------------------------- */
.low-end .site-header.is-scrolled,
.low-end .scroll-top.glass,
.low-end .filter-backdrop,
.low-end dialog::backdrop { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.low-end .has-glass-header .site-header.is-scrolled { background: var(--header); }
.low-end .scroll-top.glass { background: var(--top-bg, var(--primary)); }
.low-end body.single-product form.cart .button.buy-now::before,
.low-end .quantity.has-stepper.qty-attn { animation: none; }

/* 12. Cart / checkout blocks: "Proceed to checkout" (and other block buttons) text was invisible --------
   The rule ".entry-content a:not(.button)" colors every link green, which turned the label of the
   green block button green-on-green. Block buttons keep the button text color in every state. */
body .wc-block-components-button:not(.is-link),
body .wc-block-components-button:not(.is-link):hover,
body .wc-block-components-button:not(.is-link):focus,
body .wc-block-components-button:not(.is-link):active,
body .wc-block-components-button:not(.is-link) .wc-block-components-button__text,
body .wc-block-components-button:not(.is-link) .wc-block-components-button__text * {
  color: var(--button-text, #fff) !important;
  text-decoration: none !important;
}
body .wc-block-cart__submit-button,
body .wc-block-components-checkout-place-order-button { min-height: 52px; font-weight: 600; }

/* 12. Add-to-cart colour (1.6.3) -----------------------------------------------------------------
   The product-page button and the card/sticky "add to cart" affordances used --primary (dark
   forest green), which read as heavy on phones. They now use --atc, a dedicated CTA colour that
   the store owner can change in the Customizer / store portal (Theme colours → "Add to cart
   button colour", default: teal). --atc-ink flips the label to dark ink on light choices, so the
   contrast stays safe. The checkout CTA (--cta, orange) is untouched.
   !important is deliberate: this is a colour decision, and on optimised sites (CSS combine /
   reordering) the theme's generic .button rules can otherwise win the cascade. */
:root { --atc: #0F766E; --atc-ink: #FFFFFF; --buy-now: #17325E; --buy-now-ink: #FFFFFF; }

.single_add_to_cart_button,
.woocommerce div.product form.cart .button.alt,
div.product form.cart button.button,
.sticky-purchase .button {
  background: var(--atc) !important;
  border-color: var(--atc) !important;
  color: var(--atc-ink) !important;
}
.single_add_to_cart_button:hover, .single_add_to_cart_button:focus-visible,
.woocommerce div.product form.cart .button.alt:hover, .woocommerce div.product form.cart .button.alt:focus-visible,
div.product form.cart button.button:hover, div.product form.cart button.button:focus-visible,
.sticky-purchase .button:hover, .sticky-purchase .button:focus-visible {
  background: color-mix(in srgb, var(--atc) 86%, #000) !important;
  border-color: color-mix(in srgb, var(--atc) 86%, #000) !important;
  color: var(--atc-ink) !important;
}
/* Buy now keeps its own accent colour — it must never be re-coloured by the teal rules above
   (an !important background here would otherwise beat the navier .buy-now block in §2). */
body .woocommerce div.product form.cart .button.buy-now,
body.single-product form.cart .button.buy-now {
  background: var(--buy-now, #17325E) !important;
  color: var(--buy-now-ink, #fff) !important;
  border-color: var(--buy-now, #17325E) !important;
}
body .woocommerce div.product form.cart .button.buy-now:hover,
body.single-product form.cart .button.buy-now:hover,
body.single-product form.cart .button.buy-now:focus-visible {
  background: color-mix(in srgb, var(--buy-now, #17325E) 86%, #fff) !important;
  color: var(--buy-now-ink, #fff) !important;
  border-color: color-mix(in srgb, var(--buy-now, #17325E) 86%, #fff) !important;
}

/* Shop / home product cards now carry the same solid CTA colour as the product page
   (the owner asked for one colour across every "add to cart"/"select options" button). */
ul.products li.product .button,
.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button,
ul.products li.product .button.product_type_variable,
ul.products li.product .button.product_type_simple,
ul.products li.product .button.product_type_external {
  background: var(--atc) !important;
  border-color: var(--atc) !important;
  color: var(--atc-ink) !important;
}
ul.products li.product .button:hover, ul.products li.product .button:focus-visible,
.woocommerce ul.products li.product .button:hover,
.woocommerce-page ul.products li.product .button:hover {
  background: color-mix(in srgb, var(--atc) 86%, #000) !important;
  border-color: color-mix(in srgb, var(--atc) 86%, #000) !important;
  color: var(--atc-ink) !important;
}
li.product:has(.button:hover) .product-card-arrow,
li.product:has(.button:focus-visible) .product-card-arrow { color: var(--atc-ink); }
ul.products li.product a.added_to_cart { color: var(--atc); }
