/* =====================================================================
   SULO Group - WooCommerce module styles (shop sites only, woocommerce/inc/setup.php)
   Base file on every page of a shop site: header icons, footer, forms, quote button, notices. The page types have their own
   files (woo-shop / -compare / -quote / -account.css, loaded by woocommerce/inc/setup.php only where needed).
   Taken over from sulo-group 0.6.4 without the SiteOrigin content styles (content comes from blocks now).
   !important only where a third-party plugin forces its own look (Filter Everything "wpc-*", inline styles of
   WooCommerce) and for screen-reader texts; own parts use specificity. Cart and checkout are the classic
   WooCommerce pages (woocommerce/inc/setup.php), styled with account and order pages in woo-account.css.
   ===================================================================== */

/* ---------- Header icons (hook sulogroup_header_tools) ----------
   Order: account (theme, 4) · saved + compare (plugin, 5) · quote (SULO Group Leads, 10) · cart (theme, 12), then the language.
   One look for all: line icon from --sg-icon, name for screen readers (tooltip with a mouse), number as a teal bubble.
   The same hook is printed a second time in the mobile menu (header.php, .sg-nav__tools): see "Phones" below. */
.sg-header__icons,
.sg-header__tools .sg-header__quote {
  display: flex;
  align-items: center;
}

.sg-header__icon,
.sg-header__tools .sg-header__quote a {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sg-ink);
  text-decoration: none;
}
.sg-header__icon::before,
.sg-header__tools .sg-header__quote a::before {
  content: "";
  width: 22px;
  height: 22px;
  background: currentColor;
  mask: var(--sg-icon) center / contain no-repeat;
}
.sg-header__icon:focus-visible,
.sg-header__tools .sg-header__quote a:focus-visible { outline: 2px solid var(--sg-teal); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .sg-header__icon:hover,
  .sg-header__tools .sg-header__quote a:hover { color: var(--sg-teal); }
}

/* icons (stroke 1.5, 24 px grid) */
.sg-header__icon--account { --sg-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8.5' r='3.8'/><path d='M4.5 20c.9-3.6 3.9-5.6 7.5-5.6s6.6 2 7.5 5.6'/></svg>"); }
.sg-header__icon--saved { --sg-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 20s-7.5-4.6-7.5-10.1A4.4 4.4 0 0 1 12 7.2a4.4 4.4 0 0 1 7.5 2.7C19.5 15.4 12 20 12 20z' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'/></svg>"); }
.sg-header__icon--compare { --sg-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M4 8h14M14 4l4 4-4 4'/><path d='M20 16H6M10 12l-4 4 4 4'/></svg>"); }
.sg-header__icon--cart { --sg-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M3 4h2.2l2.2 11h10.4l2-8H6.4'/><circle cx='9' cy='19.5' r='1.3'/><circle cx='17' cy='19.5' r='1.3'/></svg>"); }
/* quote link of SULO Group Leads: thin document icon like the others instead of the plugin's filled one */
.sg-header__tools .sg-header__quote a { --sg-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M14 2.5H7A2.5 2.5 0 0 0 4.5 5v14A2.5 2.5 0 0 0 7 21.5h10a2.5 2.5 0 0 0 2.5-2.5V8z'/><path d='M14 2.5V7a1 1 0 0 0 1 1h4.5'/><path d='M8.5 13h7M8.5 17h4.5'/></svg>"); }
.sg-header__tools .sg-header__quote a svg { display: none; }

.sg-header__icon--compare.is-empty { display: none; } /* only while products are in the comparison */

/* name only for screen readers (the icon says it visually) */
.sg-header__icon-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* number: small teal bubble on the icon */
.sg-header__count,
.sg-header__tools .sg-header__quote .sg-leads-header-badge {
  position: absolute;
  inset-block-start: -4px;
  inset-inline-end: -7px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--sg-teal);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
.sg-header__count[hidden] { display: none; }

/* name as a small tooltip below the icon (mouse and keyboard; screen readers read it anyway) */
@media (hover: hover) and (pointer: fine) {
  .sg-header__tools .sg-header__icon:is(:hover, :focus-visible) .sg-header__icon-label,
  .sg-header__tools .sg-header__quote a:is(:hover, :focus-visible)::after {
    position: absolute;
    inset-block-start: calc(100% + 8px);
    left: 50%;
    z-index: 5;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    translate: -50% 0;
    padding: 4px 8px;
    border-radius: 0;
    background: var(--sg-ink);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
  }
  .sg-header__tools .sg-header__quote a:is(:hover, :focus-visible)::after { content: attr(aria-label); }
}

/* one even rhythm, a little more room before the language */
.sg-profile-shop .sg-header__tools { gap: 14px; }
.sg-header__icons { gap: 14px; }
.sg-header__tools .sg-header__icons--shop { margin-inline-end: 10px; }

/* ---------- Phones: only quote, cart (when filled), language and menu stay in the header ----------
   Account, saved products and compare move into the menu (.sg-nav__tools: same links with their names). */
.sg-nav__tools { display: none; }
@media (max-width: 600px) {
  .sg-profile-shop .sg-header__tools { gap: 0; }
  .sg-header__tools :is(.sg-header__quote a, .sg-header__icon) { width: 40px; height: 40px; }
  .sg-header__tools :is(.sg-header__icons--account, .sg-header__icon--saved, .sg-header__icon--compare, .sg-header__icon--cart.is-empty) { display: none; }
  .sg-header__tools .sg-header__icons { gap: 0; }
  .sg-header__tools .sg-header__icons--shop { margin-inline-end: 0; }
  .sg-header__tools :is(.sg-header__quote .sg-leads-header-badge, .sg-header__count) { inset-block-start: 2px; inset-inline-end: 0; }

  .sg-nav__tools {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 var(--sg-gutter-right) 8px var(--sg-gutter);
  }
  .sg-nav__tools .sg-header__icons { display: contents; }
  .sg-nav__tools :is(.sg-header__quote, .sg-header__icons--shop) { display: none; } /* already in the header */
  .sg-nav__tools .sg-header__icon {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: auto;
    padding: 14px 0;
    border-top: 1px solid var(--sg-line);
    font-size: 16px;
  }
  .sg-nav__tools .sg-header__icon::before { flex-shrink: 0; color: var(--sg-teal); }
  .sg-nav__tools .sg-header__icon-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .sg-nav__tools .sg-header__count { position: static; margin-inline-start: auto; }
}
@media (max-width: 380px) {
  .sg-header__tools :is(.sg-header__quote a, .sg-header__icon) { width: 36px; }
}

/* Footer: widget areas of the shop sites, columns follow the number of menu sections */
.sg-profile-shop .sg-footer__top { grid-template-columns: 1.5fr repeat(auto-fit, minmax(150px, 1fr)); }

/* Forms – base styles from the tokens (contact forms, WooCommerce, filters). Shop profile only, the group site keeps the form styles of the design (site.css). */
.sg-profile-shop :is(input[type=text],input[type=email],input[type=tel],input[type=url],input[type=number],input[type=password],input[type=search],input[type=date],select,textarea) {
  font: inherit;
  font-size: 15px;
  color: var(--sg-ink);
  background: #fff;
  border: 1px solid var(--wp--custom--field-border, #7d8b88);
  border-radius: 0;
  padding: 11px 14px;
  width: 100%;
  max-width: 100%;
  line-height: 1.4;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.sg-profile-shop select {
  appearance: none;
  padding-right: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5l3 3 3-3' fill='none' stroke='%230e6e64' stroke-width='1.4'/%3E%3C/svg%3E") right 14px center/10px no-repeat;
  cursor: pointer;
}
.sg-profile-shop textarea { min-height: 140px; resize: vertical; }
.sg-profile-shop :is(input,select,textarea):focus {
  outline: none;
  border-color: var(--sg-teal);
  box-shadow: 0 0 0 3px var(--sg-teal-wash);
}
.sg-profile-shop :is(input,textarea)::placeholder { color: var(--sg-muted); opacity: 1; }
.sg-profile-shop :is(input[type=checkbox],input[type=radio]) {
  accent-color: var(--sg-teal);
  width: 18px;
  height: 18px;
  vertical-align: -3px;
}
.sg-profile-shop label { color: var(--sg-ink); font-size: 14px; }
.sg-profile-shop fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 36px;
  min-width: 0;
}
.sg-profile-shop legend {
  display: block;
  float: left;
  width: 100%;
  padding: 0 0 10px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--sg-line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sg-teal);
}
.sg-profile-shop legend + * { clear: both; }

/* "Add to quote" on product cards and product pages: secondary button */
.sg-profile-shop .sg-leads-add {
  font: inherit;
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 12px 20px;
  line-height: 1.4;
  background: transparent;
  border: 1.5px solid var(--sg-teal);
  color: var(--sg-teal);
  border-radius: 0;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.sg-profile-shop .sg-leads-add:hover { background: var(--sg-teal); color: #fff; }


/* Quantity of WooCommerce (product page, cart): −/+ stepper around the number field (woo.js adds the buttons),
   same look as the stepper of SULO Group Leads. Without script the plain number field stays. */
.quantity.sg-qty {
  display: inline-flex;
  align-items: stretch;
  height: 48px;
  border: 1px solid var(--wp--custom--field-border, #7d8b88);
  border-radius: 0;
  background: #fff;
  overflow: hidden;
}
.quantity.sg-qty:focus-within { border-color: var(--sg-teal); box-shadow: 0 0 0 1px var(--sg-teal); }
.sg-qty__btn {
  display: grid;
  place-items: center;
  width: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sg-ink);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.sg-qty__btn:hover { background: var(--sg-mint); color: var(--sg-teal); }
.sg-qty__btn:is(:disabled, [aria-disabled="true"]) { opacity: .35; cursor: default; background: transparent; }
.sg-qty__btn:focus-visible { outline: 2px solid var(--sg-teal); outline-offset: -2px; }
.quantity.sg-qty input.qty,
.sg-profile-shop .quantity.sg-qty input.qty {
  width: 48px;
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  font-size: 16px;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.quantity.sg-qty input.qty::-webkit-inner-spin-button,
.quantity.sg-qty input.qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Success card: quote request sent (SULO Group Leads, .sg-leads-success) and order received (WooCommerce
   "Thank you" page, .woocommerce-thankyou-order-received) – the same calm card: check icon, title, text, actions. */
:is(.sg-leads-success, .woocommerce-thankyou-order-received) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 720px;
  margin: 0 0 32px;
  padding: 32px;
  border: 1px solid var(--sg-line);
  border-radius: 0;
  background: #fff;
  color: var(--sg-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}
:is(.sg-leads-success, .woocommerce-thankyou-order-received):focus { outline: none; }
:is(.sg-leads-success, .woocommerce-thankyou-order-received):focus-visible { outline: 2px solid var(--sg-teal); outline-offset: 3px; }
.woocommerce-thankyou-order-received::before,
.sg-leads-success__icon {
  content: "";
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  padding: 14px;
  border-radius: 50%;
  background: var(--sg-mint);
  color: var(--sg-teal);
}
.woocommerce-thankyou-order-received::before {
  background: var(--sg-mint) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e6e64' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19 7.5'/></svg>") center / 28px no-repeat;
}
:is(.sg-leads-success__title, .sg-success__title) {
  display: block;
  margin: 4px 0 0;
  color: var(--sg-ink);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 700;
  line-height: 1.25;
}
:is(.sg-leads-success__text, .sg-success__text) { display: block; margin: 0; color: var(--sg-body); }
:is(.sg-leads-success__actions, .sg-success__actions) { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
:is(.sg-leads-success__actions, .sg-success__actions) a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid var(--sg-teal);
  border-radius: 0;
  background: var(--sg-teal);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-decoration: none;
  text-transform: uppercase;
}
:is(.sg-leads-success__actions, .sg-success__actions) a:hover { background: var(--sg-teal-dark); border-color: var(--sg-teal-dark); color: #fff; }
:is(.sg-leads-success__actions, .sg-success__actions) a + a { background: #fff; color: var(--sg-teal); }
:is(.sg-leads-success__actions, .sg-success__actions) a + a:hover { background: var(--sg-mint); border-color: var(--sg-teal); color: var(--sg-teal); }
@media (max-width: 600px) {
  :is(.sg-leads-success, .woocommerce-thankyou-order-received) { padding: 24px 20px; }
  :is(.sg-leads-success__actions, .sg-success__actions) a { flex: 1 1 100%; justify-content: center; }
}
/* Cart, checkout, account, quote list, comparison: page width (body class from woocommerce/inc/setup.php) */
.sg-wide :is(.sg-content, .sg-page-head) > :not(.alignfull) {
  max-width: var(--wp--style--global--wide-size, 1312px);
}

/* Product description: everything at least as wide as the page column (logo to language button) */
.sg-product-content.is-layout-constrained > :not(.alignfull) {
  max-width: var(--wp--style--global--wide-size, 1312px);
}
.sg-product-content .sg-section__in.is-w-content {
  max-width: calc(var(--wp--style--global--wide-size, 1312px) + 2 * var(--wp--custom--gutter, 24px));
}

/* ---------- 0. Neutralise design classes that WooCommerce also uses ---------- */
.sg-shop-page section.sg-related-products, .woocommerce-cart section, .woocommerce-checkout section { padding-block: 0; }
.woocommerce .woocommerce-Tabs-panel {
  display: block;
  border: 0;
  padding: 0;
}
.sg-product-card__price:empty, .summary .price:empty { display: none; }

/* ---------- 1. Page frame ---------- */
.sg-shop-page:not(.sg-product) { padding-bottom: 88px; }

/* Content areas of a category (post type sg_area, archive-product.php) */
.sg-area--above { margin: 8px 0 40px; }
.sg-area--below {
  margin-top: 72px;
  padding-top: 56px;
  border-top: 1px solid var(--sg-line);
}
.sg-shop-wrap { max-width: var(--sg-page-width); }


/* ---------- 4. Notices as popup (woocommerce/inc/setup.php) ---------- */
.sg-notice-open :is(.woocommerce-message,.woocommerce-error,.woocommerce-info) {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1301;
  width: min(420px, calc(100% - 32px));
  background: #fff;
  border: 0;
  border-radius: 0;
  padding: 28px 52px 26px 92px !important;
  box-shadow: 0 30px 60px -20px rgba(21, 26, 25, .45);
  text-align: left;
  list-style: none;
  margin: 0;
  color: var(--sg-ink);
  font-size: 15px;
  line-height: 1.5;
}

/* cart icon in a mint circle */
.sg-notice-open :is(.woocommerce-message,.woocommerce-error,.woocommerce-info)::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sg-mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e6e64' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.4'/%3E%3Ccircle cx='18' cy='20' r='1.4'/%3E%3Cpath d='M2.5 3.5h2.6l2.4 11.2h11.1l2-8H6.3'/%3E%3C/svg%3E") center / 24px no-repeat;
}
.sg-notice-open .woocommerce-error::before {
  background-image: none;
  content: "!";
  color: var(--ann);
  font-weight: 700;
  font-size: 22px;
  line-height: 48px;
  text-align: center;
}
.sg-notice-open :is(.woocommerce-message,.woocommerce-info) .button {
  display: inline-block;
  margin-top: 16px;
  padding: 11px 20px;
  border-radius: 0;
  background: var(--sg-teal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
}
.sg-notice-open :is(.woocommerce-message,.woocommerce-info) .button:hover { background: var(--sg-teal-dark); color: #fff; }
.wcpc-compare-link.is-disabled { opacity: .45; cursor: not-allowed; }
.sg-notice-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 26, 25, .45);
  z-index: 1300;
}
.sg-notice-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: var(--sg-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.sg-notice-close:hover { color: var(--sg-ink); }


/* =====================================================================
   SULO – product compare (plugin sulogroup-blocks, shop/compare.php): colours of the compare parts.
   Toggle + comparison page, taken over 1:1 from the plugin "WC Product Compare" 1.0.0 (wcpc-style.css);
   Here only the shared variables; the toggle and the compare list of the dock are styled in woo-shop.css, the comparison page in woo-compare.css.
   ===================================================================== */
:root {
  --wcpc-accent: #000;
  --wcpc-accent-hover: #b80015;
  --wcpc-accent-tint: #fdeceb;
  --wcpc-accent-white: #fff;
  --wcpc-border: #ddd;
  --wcpc-text-muted: #666;
  --wcpc-sticky-offset: 0px;
}
