/* Hide quantity and Add to Basket */
.single-product form.cart .quantity,
.single-product form.cart .single_add_to_cart_button {
    display: none !important;
}

/* Hide the "Clear" variation link */
.single-product form.cart .reset_variations {
    display: none !important;
}


/* Header menu: gold underline sits under the word, 2px */
.ct-header [data-id="menu"] > ul > li > a {
  --menu-indicator-height: 2px;
}
.ct-header [data-id="menu"] > ul > li > a::after {
  bottom: calc(50% - 1em);
}

/* Mobile: wide tables (4+ columns) scroll sideways, first column pinned */
@media (max-width: 760px) {
  .wp-block-table:has(tr > :nth-child(4)) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .wp-block-table:has(tr > :nth-child(4))::before { content: "Swipe to compare \2192"; display: block; position: sticky; left: 0; font-size: 0.75rem; opacity: 0.7; text-align: right; padding-bottom: 0.5rem; }
  .wp-block-table:has(tr > :nth-child(4)) table { table-layout: auto; min-width: 600px; font-size: 0.82rem; }
  .wp-block-table:has(tr > :nth-child(4)) :is(th, td) { padding: 0.6rem 0.7rem; }
  .wp-block-table:has(tr > :nth-child(4)) tr > :first-child { position: sticky; left: 0; z-index: 1; min-width: 100px; font-weight: 600; background: #fff; box-shadow: 2px 0 4px rgba(0,0,0,0.08); }
  .wp-block-table.is-style-stripes:has(tr > :nth-child(4)) tbody tr:nth-child(odd) > :first-child { background: #f0f0f0; }
}

.price-uom {
    opacity: 0.6;
    font-size: 0.7em;
    font-weight: 400;
    margin-left: 2px;
    white-space: nowrap;
}

/* Responsive gallery: 3 → 2 → 1 columns */
.entry-content .wp-block-gallery.responsive-gallery.has-nested-images {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.entry-content .wp-block-gallery.responsive-gallery.has-nested-images figure.wp-block-image {
  width: 100% !important;
  max-width: 100%;
  margin: 0 !important;
  flex: none !important;
}

.entry-content .wp-block-gallery.responsive-gallery.has-nested-images figure.wp-block-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;   /* remove for original proportions */
  object-fit: cover;
}

/* Tablet: 2 columns */
@media (max-width: 999.98px) {
  .entry-content .wp-block-gallery.responsive-gallery.has-nested-images {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: 1 column */
@media (max-width: 689.98px) {
  .entry-content .wp-block-gallery.responsive-gallery.has-nested-images {
    grid-template-columns: 1fr;
  }
}

/* ===== Blog sidebar: Categories + Recent Posts ===== */

#sidebar .ct-widget.widget_block:not(.widget_search) {
  background: var(--theme-palette-color-8);
  border: 1px solid var(--theme-palette-color-5);
  padding: 24px 26px;
}

#sidebar .wp-block-heading {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 14px;
  padding-bottom: 12px;
  position: relative;
}
#sidebar .wp-block-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--theme-palette-color-1);
}

#sidebar .wp-block-categories,
#sidebar .wp-block-latest-posts {
  list-style: none;
  margin: 0;
  padding: 0;
}
#sidebar .wp-block-categories li,
#sidebar .wp-block-latest-posts li {
  margin: 0;
  border-bottom: 1px solid var(--theme-palette-color-5);
}
#sidebar .wp-block-categories li:last-child,
#sidebar .wp-block-latest-posts li:last-child {
  border-bottom: 0;
}

#sidebar .wp-block-categories a,
#sidebar .wp-block-latest-posts a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  color: var(--theme-palette-color-4);
  font-weight: 500;
  text-decoration: none;
  transition: padding-left 0.2s ease, color 0.2s ease;
}

#sidebar .wp-block-categories a {
  justify-content: space-between;
  font-size: 16px;
}
#sidebar .wp-block-categories a::after {
  content: "→";
  color: var(--theme-palette-color-1);
  transition: transform 0.2s ease;
}

#sidebar .wp-block-latest-posts a {
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.45;
}
#sidebar .wp-block-latest-posts a::before {
  content: "";
  flex: 0 0 3px;
  align-self: stretch;
  background: var(--theme-palette-color-1);
}

#sidebar .wp-block-categories a:hover,
#sidebar .wp-block-categories a:focus-visible,
#sidebar .wp-block-latest-posts a:hover,
#sidebar .wp-block-latest-posts a:focus-visible {
  padding-left: 6px;
  text-decoration: underline;
  text-decoration-color: var(--theme-palette-color-1);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
#sidebar .wp-block-categories a:hover::after {
  transform: translateX(3px);
}

#sidebar .wp-block-categories .current-cat > a {
  font-weight: 700;
}