/* Product category/archive page styling */

/* Scope to Woo product archive + product category taxonomy pages */
body.post-type-archive-product,
body.tax-product_cat {
  background: #111318;
  color: #ece8de;
}

/* Archive hero/header */
body.post-type-archive-product .entry-hero.product-archive-hero-section,
body.tax-product_cat .entry-hero.product-archive-hero-section {
  background: linear-gradient(180deg, #151923 0%, #111318 100%);
  border-top: none;
  border-bottom: none;
}

body.post-type-archive-product .entry-hero.product-archive-hero-section .hero-container,
body.tax-product_cat .entry-hero.product-archive-hero-section .hero-container {
  padding-top: clamp(1.2rem, 3vw, 2.2rem);
  padding-bottom: none;
}

body.post-type-archive-product .entry-hero .archive-title,
body.tax-product_cat .entry-hero .archive-title {
  margin: 0;
  color: #f2efe7;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0.015em;
  text-align: center;
}

/* Top controls row */
body.post-type-archive-product .kadence-shop-top-row,
body.tax-product_cat .kadence-shop-top-row {
  color: rgba(236, 232, 222, 0.9);
  padding-top: 2rem;
}

body.post-type-archive-product .woocommerce-ordering .orderby,
body.tax-product_cat .woocommerce-ordering .orderby {
  color: #ece8de;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(198, 168, 83, 0.45);
}

/* Hide list/grid toggle controls; keep default grid view */
body.post-type-archive-product .kadence-woo-toggle,
body.tax-product_cat .kadence-woo-toggle,
body.post-type-archive-product .kadence-product-toggle-container,
body.tax-product_cat .kadence-product-toggle-container {
  display: none;
}

/* Force grid layout */
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

body.post-type-archive-product .jp-title {
    color: #fff;
}

.woocommerce ul.products.woo-archive-action-on-hover li.product:hover .entry-content-wrap, 
.woocommerce ul.products.woo-archive-action-on-hover li.product:focus-within .entry-content-wrap {
    background: #265F87;
    z-index: 2;
}

@media (max-width: 980px) {
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products {
    grid-template-columns: 1fr;
  }
}

/* Fixed product image dimensions – uniform 400×518 regardless of upload size */
body.post-type-archive-product ul.products li.product .woocommerce-loop-image-link,
body.tax-product_cat ul.products li.product .woocommerce-loop-image-link {
  width: min(400px, 100%);
  aspect-ratio: 400 / 518;
  display: block;
  overflow: hidden;
}
body.post-type-archive-product ul.products li.product .woocommerce-loop-image-link img,
body.tax-product_cat ul.products li.product .woocommerce-loop-image-link img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Product card: blue background animates upward on hover to accommodate Add to Cart */
body.post-type-archive-product ul.products li.product .product-details,
body.tax-product_cat ul.products li.product .product-details {
  padding: 0.75rem 1rem 0.9rem !important;
  transition: padding 0.3s ease;
}

body.post-type-archive-product ul.products li.product:hover .product-details,
body.tax-product_cat ul.products li.product:hover .product-details {
  padding-top: 1.25rem !important;
  padding-bottom: 1.35rem !important;
}

.tax-product_cat .entry-hero.product-archive-hero-section.entry-hero-layout-standard .entry-hero-container-inner {
    background: #151a25;
}

.tax-product_cat .jp-header {
    display: none;
}

.tax-product_cat .page-title.archive-title {
    font-family: "HaboroContrast", Sans-Serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem) !important;
    font-weight: 400;
    letter-spacing: 0.3rem !important;
    color: white;
    display: flex;
    margin: 0;
    flex-shrink: 0;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    padding: 0;
}

.tax-product_cat .entry-header.product-archive-title.title-align-inherit.title-tablet-align-inherit.title-mobile-align-inherit {
    padding-left: 0;
    min-height: unset;
    margin-top: 5rem;
    padding-bottom: 0;
}

/* Category menu (sort nav) under title on product category pages */
.tax-product_cat .jp-shop-category-menu-wrap {
  margin: 0.5rem 0 0;
  width: 100%;
}

.tax-product_cat .jp-shop-category-menu-wrapper {
  padding: 0.85rem 0;
  margin: 0;
}

.tax-product_cat .jp-shop-category-menu-wrapper .jp-inline-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.tax-product_cat .jp-shop-category-menu-wrapper .jp-inline-menu .menu-item + .menu-item::before {
  content: "";
  display: inline-block;
  width: 0.28rem;
  height: 0.28rem;
  margin-right: clamp(0.85rem, 1.8vw, 1.5rem);
  border-radius: 50%;
  background: rgba(198, 168, 83, 0.65);
  vertical-align: middle;
}

.tax-product_cat .jp-shop-category-menu-wrapper .jp-inline-menu .menu-item > a {
  color: rgba(242, 239, 231, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 240ms ease;
}

.tax-product_cat .jp-shop-category-menu-wrapper .jp-inline-menu .jp-shop-submenu.sub-menu .menu-item:last-child > a {
  padding: 0.15rem 1rem;
}

.tax-product_cat .jp-shop-category-menu-wrapper .jp-inline-menu .menu-item > a:hover,
.tax-product_cat .jp-shop-category-menu-wrapper .jp-inline-menu .menu-item > a:focus-visible {
  color: #fff;
}


.tax-product_cat #primary {
    margin-top: 0;
}

.tax-product_cat .jp-inline-menu {
    border-top: none;
    border-bottom: none;
}

.tax-product_cat .jp-inline-menu {
    list-style: none !important;
    margin: 0 0 2.5rem !important;
    padding: 3rem 0 0 !important;
    border-bottom: 1px solid rgba(198, 168, 83, 0.18);
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: rgba(198, 168, 83, 0.18);
    display: flex !important;
    justify-content: flex-end;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0 clamp(1.1rem, 2.2vw, 2.2rem) !important;
}

.tax-product_cat .jp-inline-menu .menu-item + .menu-item::before {
    content: "";
    display: inline-block;
    width: 0.28rem;
    height: 0.28rem;
    margin-right: clamp(0.85rem, 1.8vw, 1.5rem);
    border-radius: 50%;
    background: rgba(198, 168, 83, 0.65);
    vertical-align: middle;
}

.tax-product_cat .jp-shop-category-menu-wrapper .jp-inline-menu .menu-item:last-child > a {
    padding: 0.15rem 0;
}