/* ==========================================================================
   American Peptide Labs — Additional CSS
   Twenty Twenty-Five (block theme) + WooCommerce + Polylang + Contact Form 7
   Loaded by the APL Design plugin (Inter is loaded via <link> in wp_head).
   The font stack below falls back to the system UI font, so nothing breaks.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root, body {
  --apl-navy: #0B1F3A;
  --apl-navy-2: #132B4E;
  --apl-navy-3: #1C3A66;
  --apl-blue: #1F6FEB;
  --apl-blue-hover: #1A5FD0;
  --apl-blue-soft: #E8F0FE;
  --apl-silver: #C9D2DE;
  --apl-bg: #FFFFFF;
  --apl-bg-soft: #F4F7FB;
  --apl-border: #E3E8F0;
  --apl-border-strong: #CED6E2;
  --apl-text: #1A2740;
  --apl-muted: #5B6B82;
  --apl-radius: 14px;
  --apl-radius-sm: 10px;
  --apl-radius-lg: 20px;
  --apl-shadow-sm: 0 1px 2px rgba(11, 31, 58, .06);
  --apl-shadow: 0 1px 2px rgba(11, 31, 58, .05), 0 6px 20px rgba(11, 31, 58, .06);
  --apl-shadow-lg: 0 2px 4px rgba(11, 31, 58, .05), 0 18px 40px rgba(11, 31, 58, .10);
  --apl-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --apl-wrap: 1200px;
  --apl-gutter: clamp(20px, 4vw, 40px);
  --apl-section: clamp(56px, 8vw, 96px);

  /* Re-map Twenty Twenty-Five presets so theme parts follow the palette */
  --wp--preset--color--base: #FFFFFF;
  --wp--preset--color--contrast: #1A2740;
  --wp--preset--color--accent-1: #1F6FEB;
  --wp--preset--color--accent-2: #E8F0FE;
  --wp--preset--color--accent-3: #0B1F3A;
  --wp--preset--color--accent-4: #5B6B82;
  --wp--preset--color--accent-5: #F4F7FB;
  --wp--preset--color--accent-6: #E3E8F0;
}

/* ---------- 2. Base typography ---------- */
body {
  font-family: var(--apl-font);
  color: var(--apl-text);
  background: var(--apl-bg);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body :where(h1, h2, h3, h4, h5, h6),
body .wp-block-post-title,
body .wp-block-site-title {
  font-family: var(--apl-font);
  font-weight: 600;
  color: var(--apl-navy);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
body :where(h1) { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); }
body :where(h2) { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); }
body :where(h3) { font-size: 1.2rem; letter-spacing: -0.01em; }
body :where(p, li) { color: var(--apl-text); }
body a { color: var(--apl-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
body a:hover { color: var(--apl-blue-hover); }
::selection { background: var(--apl-blue-soft); color: var(--apl-navy); }
:focus-visible { outline: 2px solid var(--apl-blue); outline-offset: 2px; border-radius: 6px; }

/* ---------- 3. Header (sticky, white, subtle border) ---------- */
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--apl-border);
}
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part { top: 46px; } }
@media (max-width: 600px) { .admin-bar header.wp-block-template-part { top: 0; } }
header.wp-block-template-part > .wp-block-group,
header.wp-block-template-part .wp-block-group.alignwide {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}
header.wp-block-template-part .wp-block-site-title { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
header.wp-block-template-part .wp-block-site-title a { color: var(--apl-navy); text-decoration: none; }
header.wp-block-template-part .wp-block-site-logo img { max-height: 44px; width: auto; }

/* Navigation links */
.wp-block-navigation { font-size: .95rem; font-weight: 500; gap: 6px 22px; }
.wp-block-navigation .wp-block-navigation-item__content { color: var(--apl-text); text-decoration: none; padding: 6px 2px; transition: color .15s ease; }
.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { color: var(--apl-blue); }
.wp-block-navigation .wp-block-navigation__submenu-container {
  border: 1px solid var(--apl-border) !important;
  border-radius: var(--apl-radius-sm);
  box-shadow: var(--apl-shadow);
  padding: 6px;
}
/* Mobile overlay menu */
.wp-block-navigation__responsive-container.is-menu-open { background: #fff !important; color: var(--apl-navy) !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.15rem; padding: 10px 0; }

/* Polylang language switcher — styled, never hidden */
.lang-item a, .wp-block-polylang-language-switcher a,
.pll-parent-menu-item > .wp-block-navigation-item__content {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: .85rem; letter-spacing: .02em;
}
.wp-block-navigation .lang-item .wp-block-navigation-item__content {
  border: 1px solid var(--apl-border);
  border-radius: 999px;
  padding: 4px 12px;
}
.wp-block-navigation .lang-item.current-lang .wp-block-navigation-item__content { background: var(--apl-navy); border-color: var(--apl-navy); color: #fff; }

/* Mini-cart & account icons — styled, never hidden */
.wc-block-mini-cart__button {
  border-radius: 999px; padding: 8px 10px; color: var(--apl-navy);
  transition: background .15s ease;
}
.wc-block-mini-cart__button:hover { background: var(--apl-bg-soft); }
.wc-block-mini-cart__badge { background: var(--apl-blue) !important; color: #fff !important; border-color: #fff !important; font-weight: 600; }
.wc-block-mini-cart__amount { font-weight: 600; }
.wp-block-woocommerce-customer-account a { color: var(--apl-navy); }

/* Header row layout: logo left; nav + language switcher + account + cart right.
   One row, vertically centered, no wrap. Works for both EN and ES headers. */
header.wp-block-template-part .wp-block-group.is-layout-flex,
header.wp-block-template-part .wp-block-group.alignwide {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 12px 22px;
  min-width: 0;
}
header.wp-block-template-part .wp-block-group.alignwide { justify-content: space-between !important; }
header.wp-block-template-part .wp-block-group.alignwide > :last-child:not(:first-child) { margin-left: auto; }
header.wp-block-template-part .wp-block-group.alignwide > * { margin-block: 0 !important; }
header.wp-block-template-part .wp-block-site-logo,
header.wp-block-template-part .wp-block-site-title { flex: 0 0 auto; margin: 0; }
/* The Navigation block hidden for the other language must not take space */
header.wp-block-template-part .wp-block-navigation:empty,
header.wp-block-template-part .wp-block-navigation[hidden],
header.wp-block-template-part [class*="block-visibility-hidden"],
header.wp-block-template-part .block-visibility-hide,
header.wp-block-template-part .block-visibility-is-hidden { display: none !important; }
header.wp-block-template-part .wp-block-navigation { flex: 0 1 auto; min-width: 0; margin: 0 !important; }
header.wp-block-template-part .wp-block-navigation__container { flex-wrap: nowrap !important; align-items: center; }
header.wp-block-template-part .wp-block-navigation-item__content { white-space: nowrap; }
/* Polylang language switcher (dropdown): small pill, inline with the nav */
header.wp-block-template-part .wp-block-polylang-language-switcher,
header.wp-block-template-part .wp-block-navigation .wp-block-polylang-language-switcher {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  width: auto; margin: 0 !important; padding: 0; line-height: 1;
}
header.wp-block-template-part .wp-block-polylang-language-switcher form { display: inline-flex; margin: 0; }
header.wp-block-template-part .wp-block-polylang-language-switcher label:not(.screen-reader-text) { margin: 0; }
header.wp-block-template-part .screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; width: 1px;
  margin: -1px; overflow: hidden; padding: 0; position: absolute !important; word-wrap: normal !important;
}
.wp-block-polylang-language-switcher select,
header.wp-block-template-part select.pll-switcher-select,
header.wp-block-template-part select[name^="lang_choice"] {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  display: inline-block; width: auto !important; min-width: 0; max-width: 10rem;
  height: 34px; margin: 0; padding: 0 28px 0 12px;
  border: 1px solid var(--apl-border); border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230B1F3A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center / 10px 6px;
  color: var(--apl-navy); font-family: var(--apl-font); font-size: .85rem; font-weight: 600; line-height: 32px;
  cursor: pointer; box-shadow: none; vertical-align: middle;
}
.wp-block-polylang-language-switcher select:hover,
header.wp-block-template-part select.pll-switcher-select:hover { border-color: var(--apl-blue); }
/* Account + cart icons */
header.wp-block-template-part .wp-block-woocommerce-customer-account,
header.wp-block-template-part .wp-block-woocommerce-mini-cart,
header.wp-block-template-part .wc-block-mini-cart {
  display: inline-flex; align-items: center; flex: 0 0 auto; margin: 0 !important;
}
header.wp-block-template-part .wp-block-woocommerce-customer-account a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
header.wp-block-template-part .wc-block-mini-cart__button { display: inline-flex; align-items: center; }
@media (min-width: 782px) and (max-width: 1080px) {
  header.wp-block-template-part .wp-block-group.is-layout-flex,
  header.wp-block-template-part .wp-block-group.alignwide { gap: 10px 14px; }
  header.wp-block-template-part .wp-block-navigation,
  header.wp-block-template-part .wp-block-navigation__container { gap: 6px 14px; }
}
/* Mobile (<782px): logo left, compact controls; nav collapses to the theme's hamburger */
@media (min-width: 600px) and (max-width: 781px) {
  header.wp-block-template-part .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
  header.wp-block-template-part .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}
@media (max-width: 781px) {
  header.wp-block-template-part .wp-block-group.is-layout-flex,
  header.wp-block-template-part .wp-block-group.alignwide { gap: 8px 10px; }
  header.wp-block-template-part .wp-block-site-logo img { max-height: 36px; }
  header.wp-block-template-part .wp-block-site-title { font-size: 1rem; }
  .wp-block-polylang-language-switcher select,
  header.wp-block-template-part select.pll-switcher-select,
  header.wp-block-template-part select[name^="lang_choice"] { height: 30px; line-height: 28px; max-width: 6.5rem; padding: 0 24px 0 10px; background-position: right 9px center; font-size: .8rem; }
  header.wp-block-template-part .wc-block-mini-cart__button { padding: 6px; }
  header.wp-block-template-part .wp-block-navigation__responsive-container-open { padding: 4px; }
}

/* ---------- 4. Buttons (global + WooCommerce) ---------- */
.wp-element-button, .wp-block-button__link,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .wc-block-components-button:not(.is-link),
.wpcf7-submit, .apl-btn {
  font-family: var(--apl-font);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  border-radius: 999px !important;
  padding: .8em 1.5em;
  border: 1px solid transparent;
  background: var(--apl-navy);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease, color .18s ease;
  box-shadow: var(--apl-shadow-sm);
}
.wp-element-button:hover, .wp-block-button__link:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.wc-block-components-button:not(.is-link):hover, .wpcf7-submit:hover, .apl-btn:hover {
  background: var(--apl-blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(31, 111, 235, .25);
}
.woocommerce a.button.alt, .woocommerce button.button.alt,
.woocommerce .single_add_to_cart_button, .wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button, .apl-btn--primary {
  background: var(--apl-blue) !important; color: #fff !important;
}
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover,
.woocommerce .single_add_to_cart_button:hover, .wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover, .apl-btn--primary:hover {
  background: var(--apl-blue-hover) !important;
}
.wp-block-button.is-style-outline > .wp-block-button__link, .apl-btn--ghost {
  background: transparent; color: var(--apl-navy); border: 1px solid var(--apl-border-strong); box-shadow: none;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover, .apl-btn--ghost:hover {
  background: var(--apl-bg-soft); color: var(--apl-navy); border-color: var(--apl-navy); box-shadow: none;
}

/* ---------- 5. Forms (WooCommerce, Contact Form 7, generic) ---------- */
body input[type="text"], body input[type="email"], body input[type="tel"], body input[type="number"],
body input[type="password"], body input[type="search"], body input[type="url"], body select, body textarea,
.wpcf7-form-control:not(.wpcf7-submit):not(.wpcf7-checkbox):not(.wpcf7-radio):not(.wpcf7-acceptance) {
  font-family: var(--apl-font);
  font-size: 1rem;
  color: var(--apl-text);
  background: #fff;
  border: 1px solid var(--apl-border-strong);
  border-radius: var(--apl-radius-sm);
  padding: .75em .95em;
  transition: border-color .15s ease, box-shadow .15s ease;
  max-width: 100%;
}
body input:focus, body select:focus, body textarea:focus {
  outline: none;
  border-color: var(--apl-blue);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, .15);
}
body label { font-weight: 500; color: var(--apl-navy); font-size: .93rem; }

/* Contact Form 7 */
.wpcf7 {
  background: #fff;
  border: 1px solid var(--apl-border);
  border-radius: var(--apl-radius);
  box-shadow: var(--apl-shadow);
  padding: clamp(20px, 4vw, 36px);
  max-width: 720px;
}
.wpcf7 form > p { margin: 0 0 18px; }
.wpcf7 input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), .wpcf7 textarea, .wpcf7 select { width: 100%; margin-top: 6px; }
.wpcf7 textarea { min-height: 150px; }
.wpcf7-not-valid-tip { color: #B42318; font-size: .85rem; margin-top: 6px; }
.wpcf7 form .wpcf7-response-output {
  border-radius: var(--apl-radius-sm); margin: 16px 0 0; padding: 12px 16px; font-size: .93rem;
  border: 1px solid var(--apl-border) !important; background: var(--apl-bg-soft);
}
.wpcf7 form.sent .wpcf7-response-output { border-color: #A6E3C3 !important; background: #ECFDF3; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output { border-color: #F4C7C3 !important; background: #FEF3F2; }
.wpcf7-spinner { vertical-align: middle; }

/* ---------- 6. WooCommerce product grid (shortcode [products] + shop archive) ---------- */
.woocommerce ul.products, .woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0 !important;
  padding: 0;
  list-style: none;
}
.woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; content: none !important; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
  width: auto !important; float: none !important; margin: 0 !important;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--apl-border);
  border-radius: var(--apl-radius);
  padding: 12px 12px 18px;
  box-shadow: var(--apl-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-align: left;
}
.woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow: var(--apl-shadow-lg); border-color: var(--apl-border-strong); }
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; }
.woocommerce ul.products li.product a img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--apl-radius-sm);
  background: radial-gradient(120% 90% at 50% 20%, var(--apl-navy-3) 0%, var(--apl-navy) 70%);
  margin: 0 0 14px !important;
  transition: transform .35s ease;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem !important; font-weight: 600; color: var(--apl-navy);
  padding: 0 4px !important; margin: 0 0 6px; line-height: 1.35;
}
.woocommerce ul.products li.product .price {
  color: var(--apl-navy) !important; font-weight: 700; font-size: 1.1rem !important;
  padding: 0 4px; margin: auto 0 14px !important; display: block;
}
.woocommerce ul.products li.product .price del { color: var(--apl-muted); font-weight: 500; opacity: .8; }
.woocommerce ul.products li.product .price ins { text-decoration: none; }
.woocommerce ul.products li.product .button {
  margin: 0 4px !important; text-align: center; display: block; font-size: .9rem; padding: .75em 1em;
}
.woocommerce ul.products li.product .added_to_cart { display: block; text-align: center; margin-top: 8px; font-size: .88rem; font-weight: 500; }
.woocommerce span.onsale {
  background: var(--apl-blue); color: #fff; border-radius: 999px; min-height: 0; min-width: 0;
  padding: 4px 10px; line-height: 1.3; font-size: .75rem; font-weight: 600; top: 18px; left: 18px; right: auto; margin: 0;
}

/* Block-based shop / Product Collection block (Twenty Twenty-Five archive template) */
.wc-block-product-template { gap: 24px !important; }
.wc-block-product-template .wc-block-product, li.wc-block-product {
  background: #fff;
  border: 1px solid var(--apl-border);
  border-radius: var(--apl-radius);
  padding: 12px 12px 18px;
  box-shadow: var(--apl-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.wc-block-product-template .wc-block-product:hover { transform: translateY(-4px); box-shadow: var(--apl-shadow-lg); }
.wc-block-components-product-image, .wp-block-woocommerce-product-image {
  border-radius: var(--apl-radius-sm); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 20%, var(--apl-navy-3) 0%, var(--apl-navy) 70%);
}
.wc-block-components-product-image img { aspect-ratio: 1 / 1; object-fit: cover; }
.wc-block-product .wp-block-post-title { font-size: 1rem !important; font-weight: 600; text-align: left !important; }
.wc-block-product .wp-block-post-title a { color: var(--apl-navy); text-decoration: none; }
.wc-block-components-product-price, .wp-block-woocommerce-product-price { font-weight: 700; color: var(--apl-navy); }
.wc-block-product .wp-block-woocommerce-product-button { margin-top: auto; }
.wc-block-product .wp-block-button__link { width: 100%; }

/* Shop toolbar */
.woocommerce .woocommerce-result-count, .wc-block-product-results-count { color: var(--apl-muted); font-size: .9rem; }
.woocommerce .woocommerce-ordering select, .wc-block-catalog-sorting select { border-radius: 999px; padding: .5em 2.2em .5em 1em; }
.woocommerce nav.woocommerce-pagination ul, .wp-block-query-pagination { border: 0 !important; gap: 6px; }
.woocommerce nav.woocommerce-pagination ul li { border: 0 !important; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span {
  border-radius: 999px; min-width: 38px; padding: 8px 12px; border: 1px solid var(--apl-border);
}
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--apl-navy); color: #fff; border-color: var(--apl-navy); }

/* ---------- 7. Single product ---------- */
.woocommerce div.product .woocommerce-product-gallery,
.wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery,
.wp-block-woocommerce-product-gallery {
  background: radial-gradient(120% 90% at 50% 20%, var(--apl-navy-3) 0%, var(--apl-navy) 70%);
  border-radius: var(--apl-radius-lg);
  overflow: hidden;
  box-shadow: var(--apl-shadow);
}
.woocommerce div.product .woocommerce-product-gallery img { border-radius: 0; }
/* Gallery starts at opacity:0 until its JS runs; never leave it faded */
.woocommerce div.product div.images.woocommerce-product-gallery { opacity: 1 !important; }
.woocommerce div.product .woocommerce-product-gallery__image img,
.woocommerce div.product .woocommerce-product-gallery .wp-post-image { opacity: 1 !important; }
.woocommerce div.product .flex-control-thumbs { padding: 10px !important; display: flex; gap: 8px; }
.woocommerce div.product .flex-control-thumbs li { width: 64px !important; margin: 0 !important; }
.woocommerce div.product .flex-control-thumbs li img { border-radius: 8px; opacity: .6; }
.woocommerce div.product .flex-control-thumbs li img.flex-active { opacity: 1; outline: 2px solid #fff; }
.woocommerce div.product .product_title, .single-product .wp-block-post-title { font-size: clamp(1.7rem, 1.3rem + 1.5vw, 2.4rem); margin-bottom: .3em; }
.woocommerce div.product p.price, .woocommerce div.product span.price,
.single-product .wp-block-woocommerce-product-price { color: var(--apl-navy) !important; font-size: 1.6rem !important; font-weight: 700; }
.woocommerce div.product .woocommerce-product-details__short-description,
.single-product .wp-block-post-excerpt {
  color: var(--apl-muted); font-size: .95rem;
  background: var(--apl-bg-soft); border: 1px solid var(--apl-border); border-radius: var(--apl-radius-sm);
  padding: 12px 16px;
}
.woocommerce div.product form.cart, .wp-block-add-to-cart-form form.cart {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; margin: 20px 0;
}
.woocommerce .quantity .qty, .wc-block-components-quantity-selector {
  width: 84px; text-align: center; border-radius: 999px !important; padding: .7em .5em;
}
.woocommerce .single_add_to_cart_button { flex: 1 1 220px; padding: .95em 1.6em !important; font-size: 1rem !important; }
.woocommerce div.product .product_meta { color: var(--apl-muted); font-size: .88rem; border-top: 1px solid var(--apl-border); padding-top: 14px; }
.woocommerce div.product .product_meta a { color: var(--apl-muted); }
.woocommerce div.product .woocommerce-tabs ul.tabs, .wp-block-woocommerce-product-details ul.tabs {
  padding: 0 !important; margin: 0 0 18px !important; display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--apl-border);
}
.woocommerce div.product .woocommerce-tabs ul.tabs::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li, .wp-block-woocommerce-product-details ul.tabs li {
  background: transparent !important; border: 0 !important; border-radius: 0 !important; margin: 0 !important; padding: 0 !important;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a, .wp-block-woocommerce-product-details ul.tabs li a {
  display: block; padding: 10px 14px !important; font-weight: 600; color: var(--apl-muted) !important; text-decoration: none; border-bottom: 2px solid transparent;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a, .wp-block-woocommerce-product-details ul.tabs li.active a { color: var(--apl-navy) !important; border-bottom-color: var(--apl-blue); }
.woocommerce table.shop_attributes { border: 1px solid var(--apl-border); border-radius: var(--apl-radius-sm); overflow: hidden; border-collapse: separate; }
.woocommerce table.shop_attributes th, .woocommerce table.shop_attributes td { border-color: var(--apl-border) !important; padding: 10px 14px; font-style: normal; }
.related.products > h2, .upsells.products > h2 { font-size: 1.4rem; margin-bottom: 20px; }

/* ---------- 8. Notices ---------- */
.woocommerce-message, .woocommerce-info, .woocommerce-error,
.wc-block-components-notice-banner {
  border-radius: var(--apl-radius-sm) !important;
  border: 1px solid var(--apl-border) !important;
  border-left: 4px solid var(--apl-blue) !important;
  background: #fff !important;
  box-shadow: var(--apl-shadow-sm);
  color: var(--apl-text);
}
.woocommerce-error, .wc-block-components-notice-banner.is-error { border-left-color: #D92D20 !important; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--apl-blue) !important; }

/* ---------- 9. Cart & Checkout (blocks + classic) ---------- */
.wc-block-cart, .wc-block-checkout { --apl-panel-pad: 24px; }
.wc-block-cart .wc-block-cart-items, .woocommerce table.shop_table {
  border: 1px solid var(--apl-border) !important; border-radius: var(--apl-radius) !important;
  border-collapse: separate !important; overflow: hidden; background: #fff;
}
.wc-block-cart .wc-block-cart-items th, .woocommerce table.shop_table th {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--apl-muted); font-weight: 600;
}
.wc-block-cart .wc-block-cart-items td, .wc-block-cart .wc-block-cart-items th,
.woocommerce table.shop_table td, .woocommerce table.shop_table th { padding: 14px 16px !important; border-color: var(--apl-border) !important; }
.wc-block-cart-item__image img, .woocommerce table.cart img {
  border-radius: 10px; background: var(--apl-navy); aspect-ratio: 1 / 1; object-fit: cover;
}
.wc-block-components-product-name { font-weight: 600; color: var(--apl-navy) !important; text-decoration: none; }
.wc-block-cart__sidebar, .wc-block-checkout__sidebar, .woocommerce .cart-collaterals .cart_totals {
  background: var(--apl-bg-soft); border: 1px solid var(--apl-border); border-radius: var(--apl-radius);
  padding: var(--apl-panel-pad, 24px) !important;
}
.wc-block-checkout__sidebar { align-self: flex-start; }
.wc-block-components-totals-item__label { color: var(--apl-muted); }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { color: var(--apl-navy); font-weight: 700; font-size: 1.15rem; }
.wc-block-components-checkout-step {
  background: #fff; border: 1px solid var(--apl-border); border-radius: var(--apl-radius);
  padding: 22px 22px 6px !important; margin-bottom: 18px !important; box-shadow: var(--apl-shadow-sm);
}
.wc-block-components-checkout-step::after { display: none !important; }
.wc-block-components-checkout-step__title { font-weight: 600; color: var(--apl-navy); }
.wc-block-components-checkout-step__heading { margin-top: 0 !important; }
.wc-block-components-checkout-step__container::after { display: none !important; }
.wc-block-components-text-input input, .wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-block-components-select select, .wc-blocks-components-select__select,
.wc-block-components-textarea {
  border-radius: var(--apl-radius-sm) !important; border-color: var(--apl-border-strong) !important; background: #fff !important;
}
.wc-block-components-text-input.is-active input, .wc-block-components-text-input input:focus,
.wc-blocks-components-select__select:focus {
  border-color: var(--apl-blue) !important; box-shadow: 0 0 0 4px rgba(31, 111, 235, .15) !important; outline: none;
}
.wc-block-components-radio-control__option, .wc-block-components-radio-control-accordion-option {
  border-radius: var(--apl-radius-sm) !important;
}
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option--checked-option-highlighted,
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
  box-shadow: inset 0 0 0 2px var(--apl-blue) !important;
}
.wc-block-components-radio-control__input:checked, .wc-block-components-checkbox__input:checked {
  border-color: var(--apl-blue) !important; background-color: var(--apl-blue) !important;
}
.wc-block-components-checkbox__input:checked + .wc-block-components-checkbox__mark { fill: #fff; }
.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button {
  width: 100%; min-height: 52px; font-size: 1.02rem !important;
}
.wc-block-checkout__terms { font-size: .88rem; color: var(--apl-muted); }
/* Classic checkout fallback */
.woocommerce-checkout #payment { background: var(--apl-bg-soft) !important; border-radius: var(--apl-radius) !important; border: 1px solid var(--apl-border); }
.woocommerce-checkout #payment div.payment_box { background: #fff !important; border-radius: var(--apl-radius-sm); }
.woocommerce-checkout #payment div.payment_box::before { display: none; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea { border-radius: var(--apl-radius-sm); }
/* Order received */
.woocommerce-order-overview, ul.woocommerce-thankyou-order-details {
  background: var(--apl-bg-soft); border: 1px solid var(--apl-border); border-radius: var(--apl-radius); padding: 18px 20px !important;
}

/* ---------- 10. Footer (navy) ---------- */
footer.wp-block-template-part {
  background: var(--apl-navy);
  color: #C9D2DE;
  margin-top: 0 !important;
}
footer.wp-block-template-part > .wp-block-group { background: transparent !important; }
footer.wp-block-template-part :where(p, li, span, h1, h2, h3, h4, h5, h6, .wp-block-site-title, .wp-block-site-tagline) { color: #C9D2DE; }
footer.wp-block-template-part :where(h2, h3, h4, .wp-block-site-title) { color: #fff; }
footer.wp-block-template-part a { color: #C9D2DE; text-decoration: none; }
footer.wp-block-template-part a:hover { color: #fff; text-decoration: underline; }

.apl-footer { padding: 64px var(--apl-gutter) 28px; background: var(--apl-navy); color: #C9D2DE; }
.apl-footer__inner { max-width: var(--apl-wrap); margin: 0 auto; }
.apl-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.apl-footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: #fff; letter-spacing: -0.01em; margin: 0 0 14px; }
.apl-footer__brand svg { color: #8FB6F5; flex: none; }
.apl-footer__ruo { font-size: .9rem; line-height: 1.6; color: #A9B6C8; max-width: 34ch; margin: 0; }
.apl-footer h3, .apl-footer .apl-footer__title {
  font-size: .78rem !important; text-transform: uppercase; letter-spacing: .1em; color: #fff !important; font-weight: 600; margin: 4px 0 16px;
}
.apl-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.apl-footer ul a { color: #C9D2DE !important; text-decoration: none; font-size: .95rem; }
.apl-footer ul a:hover { color: #fff !important; text-decoration: underline; }
.apl-footer__bottom {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: #A9B6C8;
}
.apl-footer__bottom p { margin: 0; color: #A9B6C8 !important; }

/* ---------- 11. Homepage building blocks (.apl-*) ---------- */
.apl-home { margin-top: 0 !important; }
.apl-home > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }
.apl-home p { margin: 0 0 1em; }
.apl-home :where(h1, h2, h3) { margin-top: 0; }
.apl-wrap { max-width: var(--apl-wrap); margin-inline: auto; padding-inline: var(--apl-gutter); box-sizing: border-box; }
.apl-section { padding-block: var(--apl-section); }
.apl-section--soft { background: var(--apl-bg-soft); }
.apl-section--navy { background: var(--apl-navy); }
.apl-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em;
  color: var(--apl-blue); margin: 0 0 14px !important;
}
.apl-section-head { max-width: 720px; margin: 0 0 40px; }
.apl-section-head--center { margin-inline: auto; text-align: center; }
.apl-section-head h2 { margin: 0 0 12px; }
.apl-section-head p { color: var(--apl-muted); font-size: 1.05rem; margin: 0 !important; }
.apl-icon { width: 24px; height: 24px; flex: none; }
.apl-btn { display: inline-flex; align-items: center; gap: 8px; }
.apl-btn svg { width: 18px; height: 18px; }
.apl-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* RUO notice — slim, elegant */
.apl-notice {
  background: var(--apl-bg-soft);
  border-bottom: 1px solid var(--apl-border);
  color: var(--apl-muted);
  font-size: .82rem;
  line-height: 1.45;
}
.apl-notice .apl-wrap { display: flex; align-items: center; justify-content: center; gap: 10px; padding-block: 9px; text-align: center; }
.apl-notice svg { width: 16px; height: 16px; color: var(--apl-blue); flex: none; }
.apl-notice p { margin: 0 !important; color: var(--apl-muted); }
.apl-notice strong { color: var(--apl-navy); font-weight: 600; }
.apl-notice a { color: var(--apl-navy); font-weight: 500; }

/* Hero */
.apl-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(31, 111, 235, .10), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(11, 31, 58, .06), transparent 60%),
    #fff;
  padding-block: clamp(56px, 8vw, 104px);
  border-bottom: 1px solid var(--apl-border);
}
.apl-hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.apl-hero h1 { margin: 0 0 18px; font-size: clamp(2.1rem, 1.3rem + 3vw, 3.5rem); line-height: 1.08; letter-spacing: -0.03em; }
.apl-hero h1 span { color: var(--apl-blue); }
.apl-hero__lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--apl-muted); max-width: 56ch; }
.apl-hero__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; padding: 0; list-style: none; font-size: .9rem; color: var(--apl-muted); }
.apl-hero__meta li { display: inline-flex; align-items: center; gap: 8px; color: var(--apl-muted); }
.apl-hero__meta svg { width: 18px; height: 18px; color: var(--apl-blue); }
.apl-hero__visual {
  position: relative; border-radius: 24px; padding: 28px;
  background: linear-gradient(160deg, var(--apl-navy-2) 0%, var(--apl-navy) 65%);
  box-shadow: var(--apl-shadow-lg); color: #fff; min-height: 380px;
  display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate;
}
.apl-hero__pattern { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .9; }
.apl-hero__card {
  background: #fff; color: var(--apl-text); border-radius: 16px; padding: 20px 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
}
.apl-hero__card-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: var(--apl-muted); margin: 0 0 12px !important; }
.apl-hero__card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.apl-hero__card li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .93rem; padding-bottom: 10px; border-bottom: 1px solid var(--apl-border); }
.apl-hero__card li:last-child { border-bottom: 0; padding-bottom: 0; }
.apl-hero__card li span { color: var(--apl-muted); }
.apl-hero__card li strong { color: var(--apl-navy); font-weight: 600; text-align: right; }
.apl-hero__flag { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 500; color: #C9D2DE; margin-bottom: 14px; }
.apl-hero__flag i { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .18); }

/* Trust strip */
.apl-trust-strip { background: #fff; border-bottom: 1px solid var(--apl-border); padding-block: 26px; }
.apl-trust-strip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.apl-trust-strip li {
  display: flex; align-items: center; gap: 12px; margin: 0;
  padding: 12px 14px; border-radius: 12px; background: var(--apl-bg-soft); border: 1px solid var(--apl-border);
  font-size: .93rem; font-weight: 500; color: var(--apl-navy); line-height: 1.35;
}
.apl-trust-strip li svg { width: 22px; height: 22px; color: var(--apl-blue); flex: none; }

/* Products section */
.apl-products .woocommerce { margin: 0; }
.apl-products__more { text-align: center; margin-top: 36px !important; }
.apl-products .wp-block-shortcode, .apl-products > .wp-block-shortcode { max-width: var(--apl-wrap); margin-inline: auto; padding-inline: var(--apl-gutter); }

/* Card grid (generic) */
.apl-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.apl-card {
  background: #fff; border: 1px solid var(--apl-border); border-radius: var(--apl-radius);
  padding: 24px; box-shadow: var(--apl-shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.apl-card:hover { transform: translateY(-3px); box-shadow: var(--apl-shadow); }
.apl-card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.apl-card p { color: var(--apl-muted); margin: 0 !important; font-size: .95rem; }
.apl-card__icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--apl-blue-soft); color: var(--apl-blue); margin-bottom: 16px;
}
.apl-card__icon svg { width: 22px; height: 22px; }

/* Steps */
.apl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: apl-step; }
.apl-steps li {
  position: relative; background: #fff; border: 1px solid var(--apl-border); border-radius: var(--apl-radius);
  padding: 26px 22px 24px; box-shadow: var(--apl-shadow-sm); counter-increment: apl-step; margin: 0;
}
.apl-steps li::before {
  content: counter(apl-step, decimal-leading-zero);
  position: absolute; top: 22px; right: 22px; font-size: .8rem; font-weight: 600; color: var(--apl-silver); letter-spacing: .05em;
}
.apl-steps h3 { margin: 0 0 8px; font-size: 1.08rem; }
.apl-steps p { color: var(--apl-muted); font-size: .95rem; margin: 0 !important; }
.apl-steps a { font-weight: 600; }

/* Guarantee split */
.apl-guarantee { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.apl-guarantee__panel {
  background: linear-gradient(160deg, var(--apl-navy-2), var(--apl-navy)); color: #fff;
  border-radius: 22px; padding: clamp(28px, 4vw, 44px); box-shadow: var(--apl-shadow-lg);
}
.apl-guarantee__panel .apl-big { display: block; font-size: clamp(3rem, 2rem + 4vw, 4.5rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: #fff; }
.apl-guarantee__panel p { color: #C9D2DE !important; margin: 10px 0 0 !important; }
.apl-guarantee__panel svg { width: 40px; height: 40px; color: #8FB6F5; margin-bottom: 18px; }
.apl-checklist { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.apl-checklist li { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.apl-checklist svg { width: 20px; height: 20px; color: var(--apl-blue); flex: none; margin-top: 3px; }

/* FAQ teaser */
.apl-faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.apl-faq details { background: #fff; border: 1px solid var(--apl-border); border-radius: var(--apl-radius-sm); padding: 0; box-shadow: var(--apl-shadow-sm); }
.apl-faq summary {
  cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; color: var(--apl-navy);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.apl-faq summary::-webkit-details-marker { display: none; }
.apl-faq summary::after { content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--apl-blue); line-height: 1; transition: transform .2s ease; }
.apl-faq details[open] summary::after { transform: rotate(45deg); }
.apl-faq details p { padding: 0 22px 18px; margin: 0 !important; color: var(--apl-muted); }
.apl-faq__more { text-align: center; margin-top: 28px !important; }

/* RUO section */
.apl-ruo {
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
  background: #fff; border: 1px solid var(--apl-border); border-radius: var(--apl-radius);
  padding: clamp(22px, 3.5vw, 32px); max-width: 960px; margin: 0 auto;
}
.apl-ruo__icon { width: 48px; height: 48px; border-radius: 12px; background: var(--apl-bg-soft); border: 1px solid var(--apl-border); display: grid; place-items: center; color: var(--apl-navy); }
.apl-ruo__icon svg { width: 24px; height: 24px; }
.apl-ruo h2 { font-size: 1.25rem !important; margin: 4px 0 10px; }
.apl-ruo ul { margin: 0; padding-left: 1.1em; color: var(--apl-muted); display: grid; gap: 6px; font-size: .95rem; }
.apl-ruo li { color: var(--apl-muted); }
.apl-ruo p { color: var(--apl-muted); font-size: .92rem; margin: 12px 0 0 !important; }

/* Final CTA */
.apl-cta {
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(31, 111, 235, .35), transparent 60%),
    var(--apl-navy);
  border-radius: 24px; padding: clamp(36px, 6vw, 64px); text-align: center; color: #fff;
  box-shadow: var(--apl-shadow-lg);
}
.apl-cta h2 { color: #fff !important; margin: 0 0 12px; }
.apl-cta p { color: #C9D2DE !important; max-width: 60ch; margin: 0 auto !important; }
.apl-cta .apl-actions { justify-content: center; }
.apl-cta .apl-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.apl-cta .apl-btn--ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; border-color: #fff; }

/* Language-specific helpers for shared template parts (Polylang sets <html lang>) */
html[lang^="es"] .apl-only-en { display: none !important; }
html:not([lang^="es"]) .apl-only-es { display: none !important; }

/* Front page: remove the theme's default top gap/page title so the hero sits flush.
   (Better: assign the "Page No Title" template to Home / Inicio.) */
.home main.wp-block-group, .home .wp-site-blocks > main { margin-top: 0 !important; padding-top: 0 !important; }
.home main .wp-block-post-title { display: none; }
.home main .entry-content, .home main .wp-block-post-content { margin-top: 0 !important; padding-top: 0 !important; }
.home main > .wp-block-group:has(.apl-home) { padding-top: 0 !important; padding-bottom: 0 !important; }
.home footer.wp-block-template-part { margin-top: 0 !important; }

/* Content pages that still carry their own <h1> (e.g. Contact, Research Use Only): the plugin adds
   body.apl-own-h1 when the page content has an <h1>, so the theme's page title is hidden and the title
   is not shown twice. Pages applied by the plugin (v1.0.2+) have no <h1> in the content and keep the theme title. */
body.apl-own-h1 main .wp-block-post-title:not(.wp-block-post-content *),
body.apl-own-h1 main .entry-title:not(.entry-content *) { display: none !important; }
/* Fallback if live page IDs differ: any page (not Home/Inicio) whose content has its own h1 */
body.page:not(.home):not(.page-id-1001):not(.page-id-1002) main:has(.wp-block-post-content h1) .wp-block-post-title:not(.wp-block-post-content *) { display: none !important; }

/* ---------- 12. Generic content pages polish ---------- */
.wp-block-table table, .entry-content table { border-collapse: separate; border-spacing: 0; border: 1px solid var(--apl-border); border-radius: var(--apl-radius-sm); overflow: hidden; }
.wp-block-table th, .wp-block-table td, .entry-content table th, .entry-content table td { border: 0; border-bottom: 1px solid var(--apl-border); padding: 12px 16px; text-align: left; }
.wp-block-table thead th, .entry-content table thead th { background: var(--apl-bg-soft); color: var(--apl-navy); font-weight: 600; }
.wp-block-separator { border-color: var(--apl-border); opacity: 1; }

/* ---------- 13. Responsive ---------- */
@media (max-width: 1080px) {
  .woocommerce ul.products, .woocommerce-page ul.products, .woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .apl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apl-footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .apl-footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .apl-hero__grid, .apl-guarantee { grid-template-columns: 1fr; }
  .apl-hero__visual { min-height: 300px; }
  .apl-trust-strip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .woocommerce ul.products, .woocommerce-page ul.products, .woocommerce ul.products.columns-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .woocommerce ul.products li.product { padding: 8px 8px 14px; }
  .woocommerce ul.products li.product .button { font-size: .82rem; padding: .7em .6em; }
  .wc-block-product-template { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .apl-steps, .apl-trust-strip ul { grid-template-columns: 1fr; }
  .apl-trust-strip li { padding: 10px 12px; }
  .apl-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .apl-actions .apl-btn { flex: 1 1 100%; justify-content: center; }
  .apl-ruo { grid-template-columns: 1fr; }
  .apl-notice .apl-wrap { justify-content: flex-start; text-align: left; }
  .woocommerce div.product form.cart { flex-direction: row; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------- 14. v1.0.2 polish ---------- */
/* Mini-cart on Cart/Checkout: WooCommerce renders it with visibility:hidden there; keep it visible.
   (The plugin also turns the disabled button into a link to the cart page.) */
.wc-block-mini-cart[style*="visibility"],
.wp-block-woocommerce-mini-cart[style*="visibility"] { visibility: visible !important; }
.wc-block-mini-cart__button:disabled, .wc-block-mini-cart__button[disabled] { opacity: 1 !important; cursor: pointer; }
a.wc-block-mini-cart__button { display: inline-flex; align-items: center; gap: 4px; color: var(--apl-navy); text-decoration: none; }

/* Single product gallery: show the whole vial photo (no cropping) */
.woocommerce div.product .woocommerce-product-gallery .woocommerce-product-gallery__image img,
.woocommerce div.product .woocommerce-product-gallery .wp-post-image,
.woocommerce div.product div.images img,
.wp-block-woocommerce-product-image-gallery img,
.wp-block-woocommerce-product-gallery img,
.wp-block-woocommerce-product-gallery-large-image img,
.single-product .wp-block-woocommerce-product-image img {
  width: 100% !important; height: auto !important; max-height: none;
  aspect-ratio: auto !important; object-fit: contain !important; object-position: center;
}
.woocommerce div.product .woocommerce-product-gallery .flex-viewport,
.woocommerce div.product .woocommerce-product-gallery__wrapper,
.woocommerce div.product .woocommerce-product-gallery__image { aspect-ratio: auto !important; }
.woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs li img { object-fit: contain; aspect-ratio: 1 / 1; }

/* RUO banner at the top of the policy pages (Shipping, FAQ, Terms, Privacy, ...) */
.ruo-notice {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 0 0 28px; padding: 14px 18px;
  background: var(--apl-bg-soft); border: 1px solid var(--apl-border); border-left: 4px solid var(--apl-blue);
  border-radius: var(--apl-radius-sm);
  color: var(--apl-navy); font-size: .9rem; line-height: 1.55;
}
.ruo-notice::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F6FEB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.5-3 8.3-7 10-4-1.7-7-5.5-7-10V6l7-3z'/%3E%3Cpath d='M12 8v5'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E") no-repeat center / contain;
}
.ruo-notice strong { font-weight: 600; letter-spacing: .01em; color: var(--apl-navy); }
.apl-page-content > .updated, .entry-content .updated { color: var(--apl-muted); font-size: .9rem; margin-top: 0; }
.apl-page-content h2 { margin-top: 1.8em; }
@media (max-width: 600px) { .ruo-notice { font-size: .85rem; padding: 12px 14px; } }
