/* This file is enqueued only for the WooCommerce Shop archive. */
.post-type-archive-product {
  --epic-ink: #0d1b2a;
  --epic-blue: #1267b1;
  --epic-sky: #dcecf9;
  --epic-accent: #f5b400;
}

.post-type-archive-product .site-header {
  background-color: #071421;
  background-blend-mode: overlay;
  border-bottom: 3px solid var(--epic-accent);
  box-shadow: 0 8px 26px rgba(5, 20, 34, .2);
}

.post-type-archive-product .site-header .site-branding {
  margin-bottom: 1.5rem;
}

.post-type-archive-product .site-header .site-branding img {
  max-width: 250px;
}

.post-type-archive-product .site-header .site-search input[type="search"] {
  border: 0;
  border-radius: 9px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.post-type-archive-product .main-navigation ul.menu > li > a,
.post-type-archive-product .main-navigation ul.nav-menu > li > a,
.post-type-archive-product .site-header-cart .cart-contents {
  color: #fff;
  font-weight: 600;
  letter-spacing: .02em;
}

.post-type-archive-product .main-navigation ul.menu > li > a:hover,
.post-type-archive-product .main-navigation ul.nav-menu > li > a:hover {
  color: var(--epic-accent);
}

.post-type-archive-product .site-header-cart .cart-contents {
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 8px;
  padding: .45rem .85rem;
}

.post-type-archive-product .site-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

/* Storefront adds a large gap below this header; keep the valve grid close to the Express Line panel. */
.post-type-archive-product .woocommerce-products-header {
  padding-bottom: 0;
}

.post-type-archive-product .page-description {
  margin-bottom: 0;
}

.post-type-archive-product .storefront-sorting {
  display: none;
}

.post-type-archive-product .page-description h4 {
  position: relative;
  max-width: 1120px;
  min-height: 102px;
  margin: 0 auto .5rem;
  padding: 1.2rem 2.25rem 1.2rem 14.75rem;
  border: 1px solid #dce6ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(13, 27, 42, .10);
  color: #33475b;
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.7;
  text-align: left;
  overflow: hidden;
}

.post-type-archive-product .page-description h4::before {
  content: "EXPRESS LINE";
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  width: 11.5rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(145deg, #0d2a42, #1267b1);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-align: center;
}

.post-type-archive-product .page-description h4::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 11.5rem;
  width: 5px;
  background: var(--epic-accent);
  content: "";
}

.post-type-archive-product .page-description h4 a {
  color: var(--epic-blue);
  font-weight: 700;
}

.post-type-archive-product.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.35rem;
  margin: 0;
}

.post-type-archive-product.woocommerce ul.products li.product-category {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  grid-column: span 3;
  padding: 1rem 1.1rem 1rem;
  border: 1px solid #e1e9f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(23, 55, 85, .08);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

/* Seven categories: three centered above four aligned cards. */
.post-type-archive-product.woocommerce ul.products li.product-category:nth-child(1) { grid-column: 3 / span 3; }
.post-type-archive-product.woocommerce ul.products li.product-category:nth-child(2) { grid-column: 6 / span 3; }
.post-type-archive-product.woocommerce ul.products li.product-category:nth-child(3) { grid-column: 9 / span 3; }
.post-type-archive-product.woocommerce ul.products li.product-category:nth-child(4) { grid-column: 1 / span 3; }
.post-type-archive-product.woocommerce ul.products li.product-category:nth-child(5) { grid-column: 4 / span 3; }
.post-type-archive-product.woocommerce ul.products li.product-category:nth-child(6) { grid-column: 7 / span 3; }
.post-type-archive-product.woocommerce ul.products li.product-category:nth-child(7) { grid-column: 10 / span 3; }

.post-type-archive-product.woocommerce ul.products li.product-category:hover {
  transform: translateY(-6px);
  border-color: #a8cce8;
  box-shadow: 0 16px 30px rgba(23, 55, 85, .16);
}

.post-type-archive-product.woocommerce ul.products li.product-category a {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
  color: var(--epic-ink);
  text-decoration: none;
}

.post-type-archive-product.woocommerce ul.products li.product-category img {
  width: 100%;
  height: 125px;
  margin: 0 0 .8rem;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.post-type-archive-product.woocommerce ul.products li.product-category h2.woocommerce-loop-category__title {
  min-height: 3.2em;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--epic-ink);
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.45;
  text-align: left;
}

.post-type-archive-product.woocommerce ul.products li.product-category h2 mark {
  display: inline-block;
  margin-left: .35rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  background: var(--epic-sky);
  color: var(--epic-blue);
  font-size: .75em;
  font-weight: 800;
}

@media (max-width: 767px) {
  .post-type-archive-product .site-header .site-branding {
    margin-bottom: .75rem;
  }

  .post-type-archive-product .site-header .site-branding img {
    max-width: 205px;
  }

  .post-type-archive-product .site-main {
    padding: 1.35rem 1.25rem 2.5rem;
  }

  .post-type-archive-product .page-description h4 {
    min-height: 0;
    margin-bottom: 1.5rem;
    padding: 4.4rem 1.25rem 1.3rem;
    font-size: 1rem;
    line-height: 1.65;
  }

  .post-type-archive-product .page-description h4::before {
    right: 0;
    bottom: auto;
    width: auto;
    height: 3.25rem;
    padding: 0 1.25rem;
    justify-content: flex-start;
  }

  .post-type-archive-product .page-description h4::after {
    top: 3.25rem;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 4px;
  }

  .post-type-archive-product.woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
  }

  .post-type-archive-product.woocommerce ul.products li.product-category {
    grid-column: auto;
    padding: .9rem;
    border-radius: 11px;
  }

  .post-type-archive-product.woocommerce ul.products li.product-category:nth-child(7) {
    grid-column: 1 / -1;
    width: calc(50% - .45rem) !important;
    justify-self: center;
  }

  .post-type-archive-product.woocommerce ul.products li.product-category img {
    height: 105px;
    margin-bottom: .75rem;
  }

  .post-type-archive-product.woocommerce ul.products li.product-category h2.woocommerce-loop-category__title {
    font-size: .86rem;
  }
}
