/* Relay Radio Store Build 0029 — shop + category archives ONLY.
 * Presentation styles. Product images and commerce interactions are owned by WooCommerce.
 */
body.relay-store-theme.woocommerce-shop,
body.relay-store-theme.tax-product_cat,
body.relay-store-theme.tax-product_tag {
  --relay-archive-cyan: #28caef;
  --relay-archive-edge: rgba(47, 143, 194, .32);
}
/* Suppress known Porto sale demo blocks on the MAIN shop, not category banners. */
body.relay-store-theme.woocommerce-shop :is(.category-banner, .shop-banner),
body.relay-store-theme.woocommerce-shop :is(.category-banner, .shop-banner).relay-archive-demo-banner,
body.relay-store-theme.woocommerce-shop .relay-archive-demo-banner,
body.relay-store-theme .relay-archive-demo-filters { display: none !important; }

/* Restrained branded collection header rather than a second oversized promo. */
body.relay-store-theme .relay-archive-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 158px;
  margin: 10px 0 30px;
  padding: 26px clamp(20px, 3vw, 38px);
  border-radius: 17px;
  border: 1px solid rgba(45, 141, 188, .36);
  background: radial-gradient(ellipse at 90% 10%, rgba(126, 64, 190, .18), transparent 52%),
    radial-gradient(ellipse at 10% 90%, rgba(9, 155, 203, .18), transparent 52%),
    linear-gradient(120deg, #11263d, #0a1628 70%);
  box-shadow: 0 14px 35px rgba(0, 0, 0, .16);
}
body.relay-store-theme .relay-archive-intro::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, #13b8e9, #6e63fa 56%, #f28e2e);
}
body.relay-store-theme .relay-archive-intro__content { position: relative; z-index: 1; }
body.relay-store-theme .relay-archive-intro__eyebrow {
  display: block; color: #65ddfa; font-size: .65rem; letter-spacing: .16em;
  font-weight: 900; margin-bottom: 10px;
}
body.relay-store-theme .relay-archive-intro__title {
  margin: 0 0 9px; font-size: clamp(1.5rem, 2.7vw, 2.2rem);
  line-height: 1.1; color: #f7fbff; letter-spacing: -.03em; font-weight: 900;
}
body.relay-store-theme .relay-archive-intro__description {
  margin: 0; color: #acc2d7; font-size: .83rem; line-height: 1.5;
}
body.relay-store-theme .relay-archive-intro__mark {
  font-weight: 1000; font-style: italic; font-size: clamp(4rem, 9vw, 7rem);
  letter-spacing: -.13em; padding-right: 15px; white-space: nowrap;
  background: linear-gradient(130deg, rgba(17,189,233,.36), rgba(176,89,225,.32));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none;
}

/* Keep the functional Porto category and price widgets; restyle rather than rebuild. */
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .sidebar-content :is(.widget_product_categories, .widget_price_filter),
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .sidebar :is(.widget_product_categories, .widget_price_filter) {
  padding: 18px 15px !important;
  background: linear-gradient(160deg, #13263a, #0c1627) !important;
  border: 1px solid rgba(49,137,190,.34) !important;
  border-radius: 15px !important;
  box-shadow: 0 12px 27px rgba(0,0,0,.15);
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .sidebar :is(.widget_product_categories, .widget_price_filter) .widget-title,
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .sidebar-content :is(.widget_product_categories, .widget_price_filter) .widget-title {
  font-size: .82rem !important; font-weight: 900; text-transform: uppercase;
  letter-spacing: .05em; padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(65,144,188,.26); color: #f6f9ff !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .widget_product_categories :is(li, li > a) { font-size: .82rem; line-height: 1.4; }
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .widget_product_categories li { padding: 4px 0; }
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .widget_product_categories .current-cat > a { color: #64e1fa !important; font-weight: 800; }
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .widget_price_filter .ui-slider .ui-slider-range { background: #23c5ea; }
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .widget_price_filter .ui-slider .ui-slider-handle { background: #745df0; border-color: #b5a6ff; }
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .widget_price_filter .button { background: linear-gradient(135deg,#147eaf,#6950d5); border-radius: 10px; }

/* Real WooCommerce sort, layout-toggle and product-count controls. */
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.shop-loop-before, .shop-loop-after) {
  border: 1px solid rgba(52, 131, 178, .29) !important;
  border-radius: 14px !important;
  padding: 13px 16px !important;
  background: linear-gradient(140deg, #111f32, #0c1627) !important;
  color: #b9cadc; box-shadow: 0 8px 25px rgba(0,0,0,.12);
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.shop-loop-before, .shop-loop-after) :is(select, .view-mode a, .gridlist-toggle a, .sort-source) {
  background: #0a1728 !important; color: #e7f5ff !important;
  border: 1px solid rgba(51, 138, 191, .36) !important;
  border-radius: 9px !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.shop-loop-before, .shop-loop-after) :is(select, button, a):focus-visible { outline: 2px solid #48ccf2; outline-offset: 3px; }

/* Card hooks added only to actual archive product nodes; preserve product selection. */
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-products { margin-top: 13px; row-gap: 22px !important; }
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-product { min-width: 0; height: auto; }
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card {
  position: relative; display: flex !important; flex-direction: column !important;
  height: 100% !important; padding: 9px !important;
  border: 1px solid rgba(51,140,190,.33) !important;
  border-radius: 16px !important;
  background: linear-gradient(160deg, #172940, #0d192b 65%, #0a1424) !important;
  box-shadow: 0 14px 30px rgba(0,0,0,.18) !important;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card:hover {
  transform: translateY(-3px);
  border-color: rgba(38,204,241,.6) !important;
  box-shadow: 0 17px 35px rgba(0,0,0,.23), 0 0 0 1px rgba(24,187,232,.08) !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-image-stage {
  display: flex !important; align-items: center !important; justify-content: center !important;
  position: relative; height: 224px !important; min-height: 224px !important;
  padding: 12px !important; margin: 0 0 14px !important;
  border: 1px solid rgba(213, 222, 236, .8) !important;
  border-radius: 12px !important; background: #f6f8fc !important;
  overflow: hidden;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-image-stage img {
  display: block; width: auto !important; height: auto !important;
  max-height: 200px !important; max-width: 100% !important;
  object-fit: contain !important; object-position: center !important;
  margin: auto !important; border-radius: 0 !important;
  transform: none !important; filter: none !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-image-stage :is(.product-image, .product-image-wrap) { max-width: 100%; }
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card :is(.product-content, .product-details, .product-info) {
  display: flex; flex-direction: column; flex: 1; padding: 0 9px 12px !important;
  background: transparent !important; text-align: left !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card :is(.category-list, .product-category, .product-categories) {
  color: #90bad0 !important; font-size: .67rem !important; line-height: 1.45;
  text-transform: uppercase; letter-spacing: .065em; margin-bottom: 7px;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card :is(.product-title, .woocommerce-loop-product__title, h3) {
  font-size: .91rem !important; color: #f2f8ff !important; line-height: 1.43 !important;
  font-weight: 750 !important; text-align: left !important;
  margin: 0 0 12px !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card :is(.product-title, .woocommerce-loop-product__title) a { color: #e7f0ff !important; }
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card .price { font-size: 1rem !important; font-weight: 900 !important; color: #fff !important; margin-top: auto !important; }
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card .price .amount { color: #fff !important; }
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card :is(.add-links, .product-actions) { margin-top: auto; }

/* Keep WooCommerce pagination interactive and consistently sized. */
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.woocommerce-pagination, .pagination) :is(a,span) {
  border-radius: 9px !important; min-width: 33px; min-height: 33px;
  border: 1px solid rgba(60,138,188,.30) !important;
  color: #bfd0e9 !important; background: #112037 !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.woocommerce-pagination, .pagination) :is(.current, .active > span) {
  border-color: rgba(58,214,244,.5) !important;
  color: #fff !important; background: linear-gradient(120deg,#147eac,#6358ed) !important;
}

@media (max-width: 900px) {
  body.relay-store-theme .relay-archive-intro { min-height: 130px; margin-bottom: 21px; }
  body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag) .relay-archive-image-stage { height: 195px !important; min-height:195px !important; }
  body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag) .relay-archive-image-stage img { max-height:171px !important; }
}
@media (max-width: 600px) {
  body.relay-store-theme .relay-archive-intro { min-height:0; padding: 21px 19px; margin: 8px 0 18px; }
  body.relay-store-theme .relay-archive-intro__mark { font-size: 3.6rem; opacity:.55; }
  body.relay-store-theme .relay-archive-intro__description { font-size: .78rem; }
  body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag) .relay-archive-image-stage { height: 180px !important; min-height: 180px !important; }
  body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag) .relay-archive-image-stage img { max-height:156px !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.relay-store-theme .relay-archive-card { transition: none !important; }
}


/* Build 0030 — catalog readability polish; scoped to shop/category/tag archives.
 * All category counts, prices and product details remain sourced from WooCommerce.
 */
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_product_categories :is(ul.product-categories, ul.product-categories ul.children) {
  margin-bottom: 0;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_product_categories li.relay-catalog-cat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  padding: 7px 6px !important;
  border-radius: 9px;
  transition: background-color .15s ease;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_product_categories li.relay-catalog-cat-row:hover,
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_product_categories li.relay-catalog-cat-row:focus-within {
  background: rgba(35, 123, 169, .13);
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_product_categories li.relay-catalog-cat-row > a {
  flex: 1 1 auto;
  min-width: 0;
  color: #dbe8f8 !important;
  font-size: .84rem !important;
  font-weight: 630;
  line-height: 1.42;
  text-decoration: none;
}
/* Some Porto widgets nest the count inside the category link. */
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_product_categories li.relay-catalog-cat-row > a:has(.relay-catalog-cat-count) {
  display: flex;
  gap: 7px;
  align-items: center;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_product_categories li.relay-catalog-cat-row > ul.children {
  flex: 0 0 100%;
  width: 100%;
  margin-top: 4px;
  padding-left: 12px;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_product_categories .relay-catalog-cat-count,
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_product_categories :is(.count, mark.count, .post-count, .cat-count) {
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 27px;
  padding: 3px 6px !important;
  margin-left: auto !important;
  border: 1px solid rgba(61, 171, 218, .32) !important;
  border-radius: 7px !important;
  background: rgba(24, 68, 97, .65) !important;
  color: #9deaff !important;
  -webkit-text-fill-color: #9deaff !important;
  font-weight: 850 !important;
  font-size: .71rem !important;
  line-height: 1.25 !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 1 !important;
  visibility: visible !important;
  text-align: center;
  box-shadow: none !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_product_categories li.current-cat > a,
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_product_categories li.current-cat-parent > a {
  color: #8ceaff !important;
  font-weight: 800 !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_product_categories li a:focus-visible {
  outline: 2px solid #69dfff;
  outline-offset: 3px;
  border-radius: 3px;
}

/* Price filter: readable limits, values and action button against dark panels. */
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_price_filter :is(.price_slider_amount, .price_label, .price_label .from, .price_label .to, .price_label .woocommerce-Price-amount, .price_label bdi) {
  color: #dfedff !important;
  -webkit-text-fill-color: #dfedff !important;
  font-size: .81rem !important;
  font-weight: 650;
  line-height: 1.5;
  opacity: 1 !important;
  visibility: visible !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_price_filter .price_slider_amount {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_price_filter .price_slider_amount .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px !important;
  background: linear-gradient(130deg, #148bb4, #6756db) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-radius: 9px !important;
  border: 1px solid rgba(167, 218, 255, .2) !important;
  font-weight: 800;
  font-size: .79rem !important;
  opacity: 1 !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.sidebar, .sidebar-content) .widget_price_filter .price_slider_amount .button:hover {
  filter: brightness(1.12);
}

/* Catalog heading/product label legibility while retaining the existing layout. */
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card :is(.product-title, .woocommerce-loop-product__title, h3),
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card :is(.product-title, .woocommerce-loop-product__title) a {
  color: #f2f8ff !important;
  font-size: .99rem !important;
  font-weight: 790 !important;
  line-height: 1.42 !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card .price,
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  .relay-archive-card .price .amount {
  color: #ffffff !important;
  font-size: 1.09rem !important;
  font-weight: 900 !important;
  font-variant-numeric: tabular-nums;
}

/* Sorting, product count and genuine filter actions (no hiding of functional controls). */
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.shop-loop-before, .shop-loop-after) :is(.woocommerce-ordering, .woocommerce-ordering label, .woocommerce-result-count, .sort-by, .sort-source, .sort-label, .per-page, .products-per-page) {
  color: #d6e7fa !important;
  font-size: .81rem !important;
  opacity: 1 !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.shop-loop-before, .shop-loop-after) select {
  min-height: 36px;
  padding-block: 6px;
  font-size: .82rem !important;
  font-weight: 700;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.clear-all, .clear-all-filters, .clear-filters, .reset-filters, a.clear-filters, a.reset) {
  color: #8ce9ff !important;
  -webkit-text-fill-color: #8ce9ff !important;
  font-weight: 750 !important;
  font-size: .78rem !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 1 !important;
}
body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
  :is(.clear-all, .clear-all-filters, .clear-filters, .reset-filters, a.clear-filters, a.reset):hover {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

@media (max-width: 767px) {
  body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
    :is(.sidebar, .sidebar-content) .widget_product_categories li.relay-catalog-cat-row > a {
    font-size: .89rem !important;
  }
  body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
    .relay-archive-card :is(.product-title, .woocommerce-loop-product__title, h3) {
    font-size: .94rem !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.relay-store-theme:is(.woocommerce-shop, .tax-product_cat, .tax-product_tag)
    :is(.sidebar, .sidebar-content) .widget_product_categories li.relay-catalog-cat-row {
    transition: none;
  }
}
