.custom-product-archive,
.custom-product-archive * {
  box-sizing: border-box;
}

.custom-product-archive {
  --cwcg-text: #23201c;
  --cwcg-muted: #6f675c;
  --cwcg-soft-text: #55503f;
  --cwcg-brown: #8a7357;
  --cwcg-green: #6e8b4b;
  --cwcg-green-hover: #55703a;
  --cwcg-green-dark: #3f5227;
  --cwcg-green-soft: #eef2e6;
  --cwcg-red: #8a3b32;
  --cwcg-amber: #c79a3b;
  --cwcg-surface-soft: #f4f1ec;
  --cwcg-border: #e8e1d6;
  --cwcg-divider: #efeae1;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 180px 48px 88px;
  color: var(--cwcg-text);
  font-family: "Montserrat", "Arial", "Helvetica", sans-serif;
}

/* Archive heading */

.custom-product-archive__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 720px;
  margin: 0 0 32px;
  text-align: left;
}

.custom-product-archive__eyebrow,
.custom-product-card__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--cwcg-brown);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.custom-product-archive__eyebrow [aria-hidden="true"],
.custom-product-card__categories [aria-hidden="true"] {
  color: #d8cfc2;
}

.custom-product-archive__eyebrow a {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
}

.custom-product-archive__eyebrow a:hover {
  color: var(--cwcg-green-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.custom-product-archive__title {
  margin: 0;
  color: var(--cwcg-text);
  font: inherit;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-align: left;
  text-wrap: pretty;
  padding-top: 0;
}

.custom-product-archive__description {
  max-width: 720px;
  margin: 0;
  color: var(--cwcg-muted);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}

.custom-product-archive__description p {
  margin: 0;
}

/* Tag filters */

.custom-product-filter {
  margin-bottom: 32px;
  padding: 20px 22px;
  border: 1px solid var(--cwcg-border);
  border-radius: 16px;
  background: #fff;
}

.custom-product-filter__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.custom-product-filter__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cwcg-brown);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.custom-product-filter__label svg {
  flex: 0 0 14px;
}

.custom-product-filter__count {
  color: var(--cwcg-muted);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}

.custom-product-filter__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body .custom-product-archive button.custom-product-filter__chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 1.5px solid var(--cwcg-border) !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--cwcg-soft-text) !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  text-transform: none !important;
  cursor: pointer;
  transition: 0.15s ease !important;
}

body .custom-product-archive button.custom-product-filter__chip:hover,
body .custom-product-archive button.custom-product-filter__chip:focus-visible {
  border-color: var(--cwcg-green-dark) !important;
  color: var(--cwcg-green-dark) !important;
}

body .custom-product-archive button.custom-product-filter__chip.is-active {
  border-color: var(--cwcg-green-dark) !important;
  background: var(--cwcg-green-dark) !important;
  color: #fff !important;
}

.custom-product-filter__chip:focus-visible,
.custom-product-filter-empty__reset:focus-visible,
.custom-product-card a:focus-visible,
.custom-product-card button:focus-visible {
  outline: 3px solid rgba(110, 139, 75, 0.35) !important;
  outline-offset: 2px;
}

/* Product grid */

.custom-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  align-items: stretch;
}

.custom-product-grid[hidden] {
  display: none !important;
}

.custom-product-card[hidden] {
  display: none !important;
}

/* Product card */

.custom-product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--cwcg-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(35, 32, 28, 0.05);
  color: var(--cwcg-text);
  font: inherit;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.custom-product-card:hover {
  box-shadow: 0 14px 32px rgba(35, 32, 28, 0.12);
  transform: translateY(-3px);
}

/* Product media */

.custom-product-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: radial-gradient(
    circle at 50% 78%,
    #e3d3be 0%,
    #efe4d4 42%,
    #faf6f0 72%
  );
}

.custom-product-card__image-link {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 0;
}

.custom-product-card__img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.custom-product-card:hover .custom-product-card__img {
  transform: scale(1.02);
}

.custom-product-card__badges {
  position: absolute;
  z-index: 2;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: calc(100% - 88px);
  pointer-events: none;
}

.custom-product-card__badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cwcg-green-dark);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.custom-product-card__badge--sale,
.custom-product-card__badge--claim,
.custom-product-card__badge--natzero {
  background: var(--cwcg-green-dark);
  color: #fff;
}

.custom-product-card__badge--highlight {
  background: var(--cwcg-red);
  color: #fff;
}

.custom-product-card__badge--unavailable {
  background: var(--cwcg-muted);
  color: #fff;
}

.custom-product-card__wishlist {
  position: absolute;
  z-index: 3;
  top: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--cwcg-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cwcg-muted);
}

.custom-product-card__wishlist > * {
  margin: 0;
}

.custom-product-card__wishlist:hover {
  border-color: var(--cwcg-red);
  color: var(--cwcg-red);
}

/* Product information */

.custom-product-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 20px 22px;
}

.custom-product-card__categories {
  margin-bottom: 8px;
}

.custom-product-card__title-link {
  color: inherit;
  text-decoration: none;
}

.custom-product-card__title {
  margin: 0;
  color: var(--cwcg-text);
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.custom-product-card__title-link:hover .custom-product-card__title {
  color: var(--cwcg-green-dark);
}

.custom-product-card__description {
  margin-top: 8px;
  color: var(--cwcg-muted);
  font-size: 14px;
  line-height: 1.5;
  text-wrap: pretty;
}

.custom-product-card__technical-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 8px;
  color: var(--cwcg-green-hover);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.custom-product-card__technical-link:hover {
  color: var(--cwcg-green-dark);
  text-decoration: underline;
}

.custom-product-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.custom-product-card__chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--cwcg-border);
  border-radius: 999px;
  background: var(--cwcg-surface-soft);
  color: var(--cwcg-soft-text);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
}

/* Commerce information */

.custom-product-card__commerce {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

.custom-product-card__separator {
  width: 100%;
  height: 1px;
  margin: 14px 0;
  background: var(--cwcg-divider);
}

.custom-product-card__package {
  display: flex;
  align-items: center;
}

.custom-product-card__package-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--cwcg-soft-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.custom-product-card__package-label svg {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
}

.custom-product-card__options {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.custom-product-card__options legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  color: var(--cwcg-brown);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.custom-product-card__option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body .custom-product-archive button.custom-product-card__option {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 1.5px solid var(--cwcg-border) !important;
  border-radius: 11px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--cwcg-muted) !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-transform: none !important;
  cursor: pointer;
  transition: 0.15s ease !important;
}

body .custom-product-archive button.custom-product-card__option:hover,
body .custom-product-archive button.custom-product-card__option:focus-visible {
  border-color: var(--cwcg-green) !important;
}

body .custom-product-archive button.custom-product-card__option.is-selected {
  border-color: var(--cwcg-green) !important;
  background: var(--cwcg-green-soft) !important;
  color: var(--cwcg-green-dark) !important;
}

.custom-product-card__price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.custom-product-card__price {
  min-width: 0;
  color: var(--cwcg-text);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.custom-product-card__price .price,
.custom-product-card__price .woocommerce-Price-amount {
  color: inherit;
  font: inherit;
}

.custom-product-card__price del {
  margin-right: 5px;
  color: var(--cwcg-muted);
  font-size: 0.62em;
  font-weight: 500;
  opacity: 0.75;
}

.custom-product-card__price ins {
  text-decoration: none;
}

.custom-product-card__price .woocommerce-price-suffix {
  display: block;
  margin-top: 5px;
  color: var(--cwcg-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
}

.custom-product-card__price .guest-price-message {
  display: inline-block;
  color: var(--cwcg-muted);
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.4;
  letter-spacing: 0;
}

.custom-product-card__availability {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  max-width: 52%;
  color: var(--cwcg-green-dark);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
}

.custom-product-card__availability::before {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cwcg-green);
  content: "";
}

.custom-product-card__availability.available-on-backorder {
  color: var(--cwcg-brown);
}

.custom-product-card__availability.available-on-backorder::before {
  background: var(--cwcg-amber);
}

.custom-product-card__availability.out-of-stock {
  color: var(--cwcg-red);
}

.custom-product-card__availability.out-of-stock::before {
  background: var(--cwcg-red);
}

.custom-product-card__availability[hidden] {
  display: none;
}

/* Quantity and add to cart */

.custom-product-card__purchase {
  display: grid;
  grid-template-columns: minmax(108px, 0.72fr) minmax(132px, 1.28fr);
  gap: 10px;
  margin-top: 18px;
}

.custom-product-card__purchase--single {
  grid-template-columns: 1fr;
}

.custom-product-card__quantity {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(28px, 1fr) 42px;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  overflow: hidden;
  border: 1.5px solid var(--cwcg-border);
  border-radius: 12px;
  background: #fff;
}

.custom-product-card__quantity [data-quantity-live] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

body .custom-product-archive button.custom-product-card__quantity-button {
  align-self: stretch !important;
  width: 42px !important;
  min-width: 42px !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--cwcg-soft-text) !important;
  font: inherit !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-transform: none !important;
  cursor: pointer;
}

body .custom-product-archive button.custom-product-card__quantity-button:hover,
body
  .custom-product-archive
  button.custom-product-card__quantity-button:focus-visible {
  background: var(--cwcg-surface-soft) !important;
  color: var(--cwcg-green-dark) !important;
}

.custom-product-card__quantity .quantity {
  width: 100% !important;
  margin: 0 !important;
}

.custom-product-card__quantity .qty {
  width: 100% !important;
  min-width: 0 !important;
  height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--cwcg-text) !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center !important;
  appearance: textfield;
  -moz-appearance: textfield;
}

.custom-product-card__quantity .qty::-webkit-inner-spin-button,
.custom-product-card__quantity .qty::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

/* Scoped overrides for themes targeting WooCommerce button classes. */

body .custom-product-archive button.custom-product-card__submit.button,
body .custom-product-archive button.custom-product-card__submit.button.alt,
body .custom-product-archive .custom-product-card__loop-action a.button,
body .custom-product-archive .custom-product-card__loop-action button.button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 1px solid var(--cwcg-green) !important;
  border-radius: 12px !important;
  background: var(--cwcg-green) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #fff !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  opacity: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  text-shadow: none !important;
  text-transform: none !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: 0.15s ease !important;
}

body .custom-product-archive button.custom-product-card__submit.button:hover,
body
  .custom-product-archive
  button.custom-product-card__submit.button:focus-visible,
body .custom-product-archive button.custom-product-card__submit.button:active,
body
  .custom-product-archive
  button.custom-product-card__submit.button.alt:hover,
body
  .custom-product-archive
  button.custom-product-card__submit.button.alt:focus-visible,
body
  .custom-product-archive
  button.custom-product-card__submit.button.alt:active,
body .custom-product-archive .custom-product-card__loop-action a.button:hover,
body
  .custom-product-archive
  .custom-product-card__loop-action
  a.button:focus-visible,
body
  .custom-product-archive
  .custom-product-card__loop-action
  button.button:hover,
body
  .custom-product-archive
  .custom-product-card__loop-action
  button.button:focus-visible {
  border-color: var(--cwcg-green-hover) !important;
  background: var(--cwcg-green-hover) !important;
  background-image: none !important;
  color: #fff !important;
}

.custom-product-card__submit svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.custom-product-card__loop-action {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

body .custom-product-archive .custom-product-card__loop-action .added_to_cart {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  padding: 6px 12px !important;
  color: var(--cwcg-green-dark) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

/* Empty states and pagination */

.custom-product-filter-empty,
.custom-product-archive__empty {
  padding: 64px 24px;
  border: 1px dashed #dcd2c4;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}

.custom-product-filter-empty[hidden] {
  display: none;
}

.custom-product-filter-empty__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--cwcg-surface-soft);
  color: var(--cwcg-brown);
}

.custom-product-filter-empty h3 {
  margin: 0;
  color: var(--cwcg-text);
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.custom-product-filter-empty p {
  max-width: 420px;
  margin: 8px auto 20px;
  color: var(--cwcg-muted);
  font-size: 14px;
  line-height: 1.55;
}

body .custom-product-archive button.custom-product-filter-empty__reset {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border: 1px solid var(--cwcg-green) !important;
  border-radius: 12px !important;
  background: var(--cwcg-green) !important;
  box-shadow: none !important;
  color: #fff !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-transform: none !important;
  cursor: pointer;
}

body .custom-product-archive button.custom-product-filter-empty__reset:hover {
  border-color: var(--cwcg-green-hover) !important;
  background: var(--cwcg-green-hover) !important;
}

.custom-product-pagination {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.custom-product-pagination[hidden] {
  display: none !important;
}

.custom-product-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  margin: 0 3px;
  padding: 0 10px;
  border: 1px solid var(--cwcg-border);
  border-radius: 10px;
  color: var(--cwcg-soft-text);
  text-decoration: none;
}

.custom-product-pagination .page-numbers.current {
  border-color: var(--cwcg-green-dark);
  background: var(--cwcg-green-dark);
  color: #fff;
  font-weight: 700;
}

/* Responsive: project breakpoints */

@media (min-width: 1140px) {
  .custom-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .custom-product-archive {
    padding-right: 32px;
    padding-bottom: 72px;
    padding-left: 32px;
  }

  .custom-product-grid {
    gap: 22px;
  }

  .custom-product-archive__title {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .custom-product-archive {
    padding-right: 24px;
    padding-bottom: 64px;
    padding-left: 24px;
  }

  .custom-product-archive__header,
  .custom-product-filter {
    margin-bottom: 28px;
  }

  .custom-product-grid {
    gap: 20px;
  }

  .custom-product-archive__title {
    font-size: 32px;
  }

  .custom-product-archive__description {
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .custom-product-archive {
    padding-right: 16px;
    padding-bottom: 56px;
    padding-left: 16px;
  }

  .custom-product-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .custom-product-filter {
    padding: 18px 16px;
  }

  .custom-product-filter__heading {
    align-items: flex-start;
  }

  .custom-product-card__content {
    padding: 20px 18px 22px;
  }

  .custom-product-card__purchase {
    grid-template-columns: minmax(108px, 0.8fr) minmax(128px, 1.2fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .custom-product-card,
  .custom-product-card__img,
  .custom-product-card__option,
  .custom-product-card__submit,
  .custom-product-card__loop-action .button,
  .custom-product-filter__chip {
    transition: none !important;
  }
}
