/* =========================================================
   Shop archive — hero (subtitle, title, description, search)
   Markup: woocommerce/archive-product.php (.tp-shop-hero)
   Copy: Customizer > Agntix Customizer > Shop Hero
   The category filter pills below live inside the same block.
   ========================================================= */

.tp-shop-hero {
  position: relative;
  padding: 56px 0 8px;
  text-align: center;
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Faint dot grid that fades out downward; sits under the text. */
.tp-shop-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(33, 33, 45, 0.16) 1px, transparent 1.3px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(#000, transparent 70%);
  mask-image: linear-gradient(#000, transparent 70%);
  opacity: 0.55;
}

.tp-shop-hero > .container {
  position: relative;
  z-index: 1;
}

.tp-shop-hero__content {
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 36px;
}

.tp-shop-hero__subtitle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--tp-ff-body);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  color: #f26a2e;
}

.tp-shop-hero__subtitle svg {
  flex: 0 0 auto;
}

.tp-shop-hero .tp-shop-hero__title {
  max-width: 11.8em;
  margin: 0 auto 26px;
  font-family: var(--tp-ff-body);
  font-size: clamp(40px, 6.2vw, 88px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: #0b0b0f;
  text-wrap: balance;
}

.tp-shop-hero__desc {
  max-width: 840px;
  margin: 0 auto 42px;
  font-family: var(--tp-ff-body);
  font-size: clamp(16px, 1.55vw, 22px);
  font-weight: 400;
  line-height: 1.4;
  color: #0b0b0f;
  text-wrap: balance;
}

/* Search box */
.tp-shop-hero__search {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 800px;
  height: 62px;
  margin: 0 auto;
  padding: 0 26px;
  border-radius: 999px;
  background-color: #fff;
  box-shadow: 0 24px 60px rgba(15, 15, 25, 0.07), 0 2px 6px rgba(15, 15, 25, 0.03);
  transition: box-shadow 0.25s ease;
}

.tp-shop-hero__search:focus-within {
  box-shadow: 0 24px 60px rgba(15, 15, 25, 0.1), 0 0 0 2px rgba(11, 11, 15, 0.85);
}

.tp-shop-hero .tp-shop-hero__search-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0b0b0f;
  cursor: pointer;
}

.tp-shop-hero .tp-shop-hero__search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  font-family: var(--tp-ff-body);
  font-size: 18px;
  font-weight: 400;
  color: #0b0b0f;
  -webkit-appearance: none;
  appearance: none;
}

.tp-shop-hero .tp-shop-hero__search input[type="search"]::placeholder {
  color: #7b7b92;
  opacity: 1;
}

.tp-shop-hero .tp-shop-hero__search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

/* Dark theme */
.agntix-dark .tp-shop-hero::before {
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1.3px);
}

.agntix-dark .tp-shop-hero .tp-shop-hero__title,
.agntix-dark .tp-shop-hero__desc {
  color: #fff;
}

.agntix-dark .tp-shop-hero__search {
  background-color: #17171d;
  box-shadow: none;
}

.agntix-dark .tp-shop-hero__search:focus-within {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.agntix-dark .tp-shop-hero .tp-shop-hero__search-btn,
.agntix-dark .tp-shop-hero .tp-shop-hero__search input[type="search"] {
  color: #fff;
}

@media (max-width: 767px) {
  .tp-shop-hero {
    padding-top: 36px;
  }

  .tp-shop-hero__subtitle {
    font-size: 16px;
  }

  .tp-shop-hero__content {
    padding-bottom: 26px;
  }

  .tp-shop-hero .tp-shop-hero__title {
    margin-bottom: 18px;
  }

  .tp-shop-hero__desc {
    margin-bottom: 28px;
  }

  .tp-shop-hero__search {
    height: 54px;
    padding: 0 20px;
  }

  .tp-shop-hero .tp-shop-hero__search input[type="search"] {
    font-size: 16px;
  }
}

/* =========================================================
   Shop archive — category filter pills
   Markup: woocommerce/archive-product.php (.tp-shop-filter)
   ========================================================= */

.tp-shop-filter {
  gap: 14px;
  /* Same width as the hero search box, so the pills wrap into a tidy block under it. */
  max-width: 800px;
  margin-right: auto;
  margin-left: auto;
}

.tp-shop-filter .tp-shop-filter__item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  background-color: #fff;
  color: #0b0b0f;
  font-family: var(--tp-ff-body);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* Icon = inline SVG ("All") or the category image uploaded in WooCommerce. */
.tp-shop-filter .tp-shop-filter__icon {
  flex: 0 0 auto;
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  transition: color 0.25s ease, filter 0.25s ease;
}

/* Hover: soft lift + orange icon */
.tp-shop-filter .tp-shop-filter__item:hover {
  color: #0b0b0f;
  box-shadow: 0 6px 18px rgba(15, 15, 25, 0.08);
}

.tp-shop-filter .tp-shop-filter__item:hover .tp-shop-filter__icon {
  color: #ff6a2b;
}

/* Active (current category / "All") */
.tp-shop-filter .tp-shop-filter__item.is-active,
.tp-shop-filter .tp-shop-filter__item.is-active:hover {
  background-color: #000;
  color: #fff;
  box-shadow: none;
}

.tp-shop-filter .tp-shop-filter__item.is-active .tp-shop-filter__icon {
  color: #fff;
}

/* Uploaded icons are expected to be dark, like the demo: flip them to white on the black pill. */

.tp-shop-filter .tp-shop-filter__item:focus-visible {
  outline: 2px solid #ff6a2b;
  outline-offset: 3px;
}

/* Dark theme */
.agntix-dark .tp-shop-filter .tp-shop-filter__item {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.agntix-dark .tp-shop-filter .tp-shop-filter__item:hover {
  color: #fff;
  box-shadow: none;
  background-color: rgba(255, 255, 255, 0.14);
}

.agntix-dark .tp-shop-filter .tp-shop-filter__item.is-active,
.agntix-dark .tp-shop-filter .tp-shop-filter__item.is-active:hover {
  background-color: #fff;
  color: #000;
}

.agntix-dark .tp-shop-filter .tp-shop-filter__item.is-active .tp-shop-filter__icon {
  color: #000;
}

/* Dark theme: dark uploaded icons flip to white on the translucent pills, and stay dark on the white active pill. */
.agntix-dark .tp-shop-filter .tp-shop-filter__item img.tp-shop-filter__icon {
  filter: invert(1);
}

.agntix-dark .tp-shop-filter .tp-shop-filter__item.is-active img.tp-shop-filter__icon {
  filter: none;
}

@media (max-width: 767px) {
  .tp-shop-filter {
    gap: 10px;
  }

  .tp-shop-filter .tp-shop-filter__item {
    height: 46px;
    padding: 0 20px;
    gap: 10px;
    font-size: 15px;
  }

  .tp-shop-filter .tp-shop-filter__icon {
    width: 18px;
    height: 18px;
  }
}

/* =========================================================
   Shop archive — page background + product card
   Markup: inc/tp-woocommerce.php (agntix_product_archive_card)
   Pill colours: Products > Categories (inc/tp-product-cat-colors.php)
   ========================================================= */

/* woo-new.css forces the shop pages white; the filter pills and cards need a tinted page to read. */
body.woocommerce-shop,
body.tax-product_cat {
  background-color: #f3f3f6 !important;
}

.tp-shop-card {
  margin-bottom: 24px;
  padding: 8px 8px 22px;
  border-radius: 28px;
  background-color: #fff;
  transition: box-shadow 0.3s ease;
}

.tp-shop-card:hover {
  box-shadow: 0 14px 40px rgba(15, 15, 25, 0.08);
}

.tp-shop-card__thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 20px;
  background-color: #e7e7ee;
}

.tp-shop-card__thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

.tp-shop-card__thumb .tp-shop-card__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tp-shop-card:hover .tp-shop-card__img {
  transform: scale(1.03);
}

.tp-shop-card__body {
  padding: 18px 16px 0;
}

.tp-shop-card__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.tp-shop-card__title {
  margin: 0;
  font-family: var(--tp-ff-body);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #0b0b0f;
}

.tp-shop-card__title a {
  color: inherit;
}

.tp-shop-card__price {
  flex: 0 0 auto;
  font-family: var(--tp-ff-body);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  color: #0b0b0f;
}

.tp-shop-card__price .price,
.tp-shop-card__price del,
.tp-shop-card__price ins {
  color: inherit;
  text-decoration: none;
}

.tp-shop-card__price del {
  margin-right: 6px;
  opacity: 0.45;
  text-decoration: line-through;
}

.tp-shop-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 10px;
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tp-shop-card__cats {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Category pill. Colours are set per category through the custom properties on its style attribute. */
.tp-shop-card .tp-shop-card__cat {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background-color: var(--tp-cat-bg, #e9e9ef);
  color: var(--tp-cat-text, #3b3b46);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.tp-shop-card .tp-shop-card__cat:hover {
  background-color: var(--tp-cat-bg-hover, var(--tp-cat-bg, #d9d9e2));
  color: var(--tp-cat-text-hover, var(--tp-cat-text, #3b3b46));
}

.tp-shop-card__date {
  color: #7b7b87;
}

.tp-shop-card__cats + .tp-shop-card__date::before {
  content: "\00b7";
  margin-right: 10px;
}

/* Dark theme */
.agntix-dark body.woocommerce-shop,
.agntix-dark body.tax-product_cat,
body.agntix-dark.woocommerce-shop,
body.agntix-dark.tax-product_cat {
  background-color: #0e0e12 !important;
}

.agntix-dark .tp-shop-card {
  background-color: #17171d;
}

.agntix-dark .tp-shop-card__title,
.agntix-dark .tp-shop-card__price {
  color: #fff;
}

.agntix-dark .tp-shop-card__date {
  color: #9a9aa6;
}

@media (max-width: 575px) {
  .tp-shop-card {
    border-radius: 22px;
  }

  .tp-shop-card__thumb {
    border-radius: 16px;
  }

  .tp-shop-card__title,
  .tp-shop-card__price {
    font-size: 16px;
  }
}
