/* ==========================================================================
   DeviceHub — Archive Page Layout
   Path: assets/css/archive/devhub-archive.css
   Depends on: style.css, product-card.css
   ========================================================================== */

body.woocommerce,
body.woocommerce-page,
body.tax-pwb-brand,
body.tax-product_brand,
body.tax-pa_brand {
  background-color: #fff !important;
}

body.woocommerce #content,
body.woocommerce-page #content,
body.tax-pwb-brand #content,
body.tax-product_brand #content,
body.tax-pa_brand #content,
body.woocommerce .woo-products,
body.woocommerce-page .woo-products,
body.tax-pwb-brand .woo-products,
body.tax-product_brand .woo-products,
body.tax-pa_brand .woo-products {
  background-color: #fff;
}

body.post-type-archive-product .devhub-archive__grid,
body.tax-product_cat .devhub-archive__grid,
body.tax-pwb-brand .devhub-archive__grid,
body.tax-product_brand .devhub-archive__grid,
body.tax-pa_brand .devhub-archive__grid {
  column-gap: 0;
  row-gap: 36px;
}

body.post-type-archive-product .devhub-archive__grid .devhub-product-card,
body.tax-product_cat .devhub-archive__grid .devhub-product-card,
body.tax-pwb-brand .devhub-archive__grid .devhub-product-card,
body.tax-product_brand .devhub-archive__grid .devhub-product-card,
body.tax-pa_brand .devhub-archive__grid .devhub-product-card {
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
  outline: 0;
  --devhub-card-pad: 12px;
  padding: var(--devhub-card-pad);
}

body.post-type-archive-product
  .devhub-archive__grid
  .devhub-product-card::after,
body.tax-product_cat .devhub-archive__grid .devhub-product-card::after,
body.tax-pwb-brand .devhub-archive__grid .devhub-product-card::after,
body.tax-product_brand .devhub-archive__grid .devhub-product-card::after,
body.tax-pa_brand .devhub-archive__grid .devhub-product-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: rgba(220, 224, 230, 0.95);
  pointer-events: none;
}

body.post-type-archive-product
  .devhub-archive__grid
  > .devhub-product-card:nth-child(4n)::after,
body.tax-product_cat
  .devhub-archive__grid
  > .devhub-product-card:nth-child(4n)::after,
body.tax-pwb-brand
  .devhub-archive__grid
  > .devhub-product-card:nth-child(4n)::after,
body.tax-product_brand
  .devhub-archive__grid
  > .devhub-product-card:nth-child(4n)::after,
body.tax-pa_brand
  .devhub-archive__grid
  > .devhub-product-card:nth-child(4n)::after {
  display: none;
}

body.post-type-archive-product
  .devhub-archive__grid
  .devhub-product-card:hover::after,
body.post-type-archive-product
  .devhub-archive__grid
  .devhub-product-card:focus-within::after,
body.tax-product_cat .devhub-archive__grid .devhub-product-card:hover::after,
body.tax-product_cat
  .devhub-archive__grid
  .devhub-product-card:focus-within::after,
body.tax-pwb-brand .devhub-archive__grid .devhub-product-card:hover::after,
body.tax-pwb-brand
  .devhub-archive__grid
  .devhub-product-card:focus-within::after,
body.tax-product_brand .devhub-archive__grid .devhub-product-card:hover::after,
body.tax-product_brand
  .devhub-archive__grid
  .devhub-product-card:focus-within::after,
body.tax-pa_brand .devhub-archive__grid .devhub-product-card:hover::after,
body.tax-pa_brand
  .devhub-archive__grid
  .devhub-product-card:focus-within::after {
  opacity: 0;
}

body.post-type-archive-product
  .devhub-archive__grid
  .devhub-product-card:has(+ .devhub-product-card:hover)::after,
body.post-type-archive-product
  .devhub-archive__grid
  .devhub-product-card:has(+ .devhub-product-card:focus-within)::after,
body.tax-product_cat
  .devhub-archive__grid
  .devhub-product-card:has(+ .devhub-product-card:hover)::after,
body.tax-product_cat
  .devhub-archive__grid
  .devhub-product-card:has(+ .devhub-product-card:focus-within)::after,
body.tax-pwb-brand
  .devhub-archive__grid
  .devhub-product-card:has(+ .devhub-product-card:hover)::after,
body.tax-pwb-brand
  .devhub-archive__grid
  .devhub-product-card:has(+ .devhub-product-card:focus-within)::after,
body.tax-product_brand
  .devhub-archive__grid
  .devhub-product-card:has(+ .devhub-product-card:hover)::after,
body.tax-product_brand
  .devhub-archive__grid
  .devhub-product-card:has(+ .devhub-product-card:focus-within)::after,
body.tax-pa_brand
  .devhub-archive__grid
  .devhub-product-card:has(+ .devhub-product-card:hover)::after,
body.tax-pa_brand
  .devhub-archive__grid
  .devhub-product-card:has(+ .devhub-product-card:focus-within)::after {
  opacity: 0;
}

body.post-type-archive-product .devhub-archive__grid .devhub-product-card:hover,
body.post-type-archive-product
  .devhub-archive__grid
  .devhub-product-card:focus-within,
body.tax-product_cat .devhub-archive__grid .devhub-product-card:hover,
body.tax-product_cat .devhub-archive__grid .devhub-product-card:focus-within,
body.tax-pwb-brand .devhub-archive__grid .devhub-product-card:hover,
body.tax-pwb-brand .devhub-archive__grid .devhub-product-card:focus-within,
body.tax-product_brand .devhub-archive__grid .devhub-product-card:hover,
body.tax-product_brand .devhub-archive__grid .devhub-product-card:focus-within,
body.tax-pa_brand .devhub-archive__grid .devhub-product-card:hover,
body.tax-pa_brand .devhub-archive__grid .devhub-product-card:focus-within {
  background: #fff;
  border-color: transparent;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(17, 17, 17, 0.12);
  outline: 1px solid rgba(220, 224, 230, 0.95);
}

body.post-type-archive-product
  .devhub-archive__grid
  .devhub-product-card__img-wrap,
body.tax-product_cat .devhub-archive__grid .devhub-product-card__img-wrap,
body.tax-pwb-brand .devhub-archive__grid .devhub-product-card__img-wrap,
body.tax-product_brand .devhub-archive__grid .devhub-product-card__img-wrap,
body.tax-pa_brand .devhub-archive__grid .devhub-product-card__img-wrap {
  border-radius: 0;
}

body.post-type-archive-product
  .devhub-archive__grid
  .devhub-product-card__img-wrap
  img,
body.tax-product_cat .devhub-archive__grid .devhub-product-card__img-wrap img,
body.tax-pwb-brand .devhub-archive__grid .devhub-product-card__img-wrap img,
body.tax-product_brand .devhub-archive__grid .devhub-product-card__img-wrap img,
body.tax-pa_brand .devhub-archive__grid .devhub-product-card__img-wrap img,
body.post-type-archive-product
  .devhub-archive__grid
  .devhub-product-card__img-wrap
  .devhub-product-card__img-placeholder,
body.tax-product_cat
  .devhub-archive__grid
  .devhub-product-card__img-wrap
  .devhub-product-card__img-placeholder,
body.tax-pwb-brand
  .devhub-archive__grid
  .devhub-product-card__img-wrap
  .devhub-product-card__img-placeholder,
body.tax-product_brand
  .devhub-archive__grid
  .devhub-product-card__img-wrap
  .devhub-product-card__img-placeholder,
body.tax-pa_brand
  .devhub-archive__grid
  .devhub-product-card__img-wrap
  .devhub-product-card__img-placeholder {
  margin-top: 26px;
}

/* ==========================================================================
   1. Page bar (breadcrumb left, title right)
   ========================================================================== */

.devhub-page-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 20px;
  border-bottom: 1px solid rgba(228, 231, 236, 0.9);
  margin-bottom: 34px;
  flex-wrap: wrap;
}

.devhub-page-bar .woocommerce-breadcrumb {
  font-size: clamp(1.7rem, 1.2vw, 1.95rem);
  font-weight: 700;
  color: var(--devhub-mid);
  margin: 0;
  line-height: 1.5;
}

.devhub-page-bar .woocommerce-breadcrumb a {
  color: var(--devhub-dark);
  text-decoration: none;
}

.devhub-page-bar .woocommerce-breadcrumb a:hover {
  color: var(--devhub-primary);
}

.devhub-page-bar__title {
  font-size: clamp(2rem, 2vw, 2.6rem);
  font-weight: 700;
  color: var(--devhub-black);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}

/* ==========================================================================
   2. Page wrapper
   ========================================================================== */

.devhub-archive {
  padding: 0px 0 64px;
  background: var(--devhub-white);
  min-height: 60vh;
}

/* ==========================================================================
   2. Page header (title + breadcrumb)
   ========================================================================== */

.devhub-archive__header {
  margin-bottom: 28px;
}

.devhub-archive__title {
  font-size: var(--devhub-text-4xl);
  font-weight: 800;
  color: var(--devhub-black);
  margin-bottom: 10px;
}

/* WooCommerce breadcrumb override */
.devhub-archive .woocommerce-breadcrumb {
  font-size: clamp(1.7rem, 1.2vw, 1.95rem);
  font-weight: 700;
  color: var(--devhub-mid);
  background: none;
  padding: 0;
  margin: 0;
  line-height: 1.5;
}

.devhub-archive .woocommerce-breadcrumb a {
  color: var(--devhub-dark);
  text-decoration: none;
}

.devhub-archive .woocommerce-breadcrumb a:hover {
  color: var(--devhub-primary);
}

/* ==========================================================================
   3. Two-column layout
   ========================================================================== */

.devhub-archive__layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.devhub-archive__main {
  min-width: 0;
  width: 100%;
}

/* ==========================================================================
   4. Sidebar
   ========================================================================== */

.devhub-archive__sidebar {
  position: sticky;
  top: 100px; /* below sticky header */
}

.devhub-archive__filters {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(228, 231, 236, 0.95);
  border-radius: calc(var(--devhub-radius-md) + 2px);
  overflow: hidden;
  box-shadow: var(--devhub-shadow-card);
}

/* ==========================================================================
   5. Toolbar (result count + sort)
   ========================================================================== */

.devhub-archive__toolbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
}

/* WooCommerce result count */
.devhub-archive__toolbar p.woocommerce-result-count {
  display: block !important;
  float: none !important;
  width: auto !important;
  font-size: var(--devhub-text-xl);
  font-weight: 500;
  color: var(--devhub-mid);
  margin: 0 !important;
  margin-right: auto !important;
  margin-left: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  text-align: left !important;
}

/* WooCommerce ordering dropdown */
.devhub-archive__toolbar form.woocommerce-ordering {
  margin: 0 !important;
  margin-left: auto !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  float: none !important;
  width: auto !important;
  position: relative;
}

.devhub-archive__toolbar .woocommerce-ordering select,
.devhub-archive__toolbar .orderby {
  font-size: var(--devhub-text-md) !important;
  font-weight: 600;
  color: var(--devhub-dark) !important;
  border: 1px solid rgba(228, 231, 236, 0.95) !important;
  border-radius: var(--devhub-radius-full) !important;
  padding: 10px 38px 10px 16px !important;
  background-color: rgba(255, 255, 255, 0.95) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b6b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  box-shadow: var(--devhub-shadow-card) !important;
  accent-color: var(--devhub-primary);
  transition: border-color var(--devhub-transition);
}

.devhub-archive__toolbar .woocommerce-ordering select:focus,
.devhub-archive__toolbar .orderby:focus {
  outline: none !important;
  border-color: var(--devhub-primary) !important;
  box-shadow: none !important;
}

/* Custom sort dropdown */
.devhub-sort-dropdown {
  position: relative;
  z-index: 40;
  min-width: 168px;
}

.devhub-sort-dropdown__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  gap: 8px;
  padding: 5px 10px 5px 14px;
  font-size: var(--devhub-text-lg);
  font-weight: 600;
  color: var(--devhub-dark);
  background: linear-gradient(180deg, #fff 0%, #fffaf6 100%);
  border: 1.5px solid rgba(255, 102, 0, 0.28);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.06);
  cursor: pointer;
  transition:
    border-color var(--devhub-transition),
    box-shadow var(--devhub-transition),
    transform var(--devhub-transition),
    background-color var(--devhub-transition);
  white-space: nowrap;
}

.devhub-sort-dropdown__trigger:hover,
.devhub-sort-dropdown--open .devhub-sort-dropdown__trigger {
  border-color: var(--devhub-primary);
  box-shadow: 0 10px 22px rgba(255, 102, 0, 0.12);
  outline: none;
}

.devhub-sort-dropdown__trigger:focus,
.devhub-sort-dropdown__trigger:focus-visible {
  outline: none;
  border-color: var(--devhub-primary);
  box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.12);
}

.devhub-sort-dropdown__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.devhub-sort-dropdown__chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 999px;
  background: rgba(255, 102, 0, 0.08);
  color: var(--devhub-primary);
  transition: transform 0.2s ease;
}

.devhub-sort-dropdown--open .devhub-sort-dropdown__chevron {
  transform: rotate(180deg);
}

.devhub-sort-dropdown__list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: auto;
  min-width: 180px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 102, 0, 0.12);
  border-radius: 16px;
  box-shadow: 0 18px 36px rgba(17, 17, 17, 0.12);
  backdrop-filter: blur(14px);
  list-style: none;
  margin: 0;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
  z-index: 1000;
}

.devhub-sort-dropdown--open .devhub-sort-dropdown__list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.devhub-sort-dropdown__item {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: var(--devhub-text-lg);
  color: var(--devhub-dark);
  cursor: pointer;
  font-weight: 500;
  transition:
    background var(--devhub-transition),
    color var(--devhub-transition),
    transform var(--devhub-transition);
}

.devhub-sort-dropdown__item:hover {
  background: linear-gradient(180deg, #fff6ef 0%, #fff0e4 100%);
  color: var(--devhub-primary);
  transform: translateX(2px);
}

.devhub-sort-dropdown__item--active {
  color: var(--devhub-primary);
  font-weight: 700;
  background: linear-gradient(180deg, #fff4ea 0%, #ffe8d7 100%);
}

@media (max-width: 991px) {
  .devhub-sort-dropdown__list {
    left: 0;
    right: auto;
  }
}

/* ==========================================================================
   6. Product grid
   ========================================================================== */

.devhub-archive__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
  width: 100%;
}

.devhub-archive__carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.devhub-archive__carousel-nav {
  display: none;
}

.devhub-archive__grid .devhub-product-card {
  --devhub-card-pad: 12px;
  padding: var(--devhub-card-pad);
}

.devhub-archive__grid .devhub-product-card__img-wrap {
  height: 180px;
  margin-bottom: 26px;
  overflow: visible;
}

.devhub-archive__grid .devhub-product-card__body {
  gap: 6px;
}

.devhub-archive__grid .devhub-product-card__offer-badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  z-index: 2;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 28px;
  padding: 0;
  border-radius: 0 18px 0 0;
  background: linear-gradient(90deg, #7a0f8f 0%, #d4147b 38%, #ff0d67 100%);
  box-shadow: none;
  color: #fff;
  text-align: left;
}

.devhub-archive__grid .devhub-product-card__offer-value {
  display: block;
  flex: 0 0 auto;
  padding: 4px 0 4px 14px;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #fff;
  white-space: nowrap;
}

.devhub-archive__grid .devhub-product-card__offer-caption {
  display: block;
  min-width: 0;
  margin-top: 1px;
  padding: 4px 14px 4px 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 244, 251, 0.95);
}

body.post-type-archive-product
  .devhub-archive__grid
  .devhub-product-card__bundle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-height: 20px;
  padding: 2px 8px;
  background: linear-gradient(180deg, #fff3ea 0%, #ffe7d6 100%);
  color: #c45508;
  border: 1px solid rgba(255, 102, 0, 0.18);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  box-shadow: none;
}

body.tax-product_cat .devhub-archive__grid .devhub-product-card__bundle,
body.tax-pwb-brand .devhub-archive__grid .devhub-product-card__bundle,
body.tax-product_brand .devhub-archive__grid .devhub-product-card__bundle,
body.tax-pa_brand .devhub-archive__grid .devhub-product-card__bundle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-height: 20px;
  padding: 2px 8px;
  background: linear-gradient(180deg, #fff3ea 0%, #ffe7d6 100%);
  color: #c45508;
  border: 1px solid rgba(255, 102, 0, 0.18);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  box-shadow: none;
}

body.post-type-archive-product
  .devhub-archive__grid
  .devhub-product-card__bundle::before,
body.tax-product_cat .devhub-archive__grid .devhub-product-card__bundle::before,
body.tax-pwb-brand .devhub-archive__grid .devhub-product-card__bundle::before,
body.tax-product_brand
  .devhub-archive__grid
  .devhub-product-card__bundle::before,
body.tax-pa_brand .devhub-archive__grid .devhub-product-card__bundle::before {
  /* Small open-box icon before the label (it replaces the old orange dot). */
  content: "";
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("../../images/bundle-pkg-icon.svg") center / contain
    no-repeat;
  mask: url("../../images/bundle-pkg-icon.svg") center / contain no-repeat;
  flex: 0 0 13px;
}

.devhub-archive__grid .devhub-product-card__name {
  font-size: var(--devhub-text-2xl);
}

.devhub-archive__grid .devhub-product-card__price {
  font-size: var(--devhub-text-2xl);
}

.devhub-archive__grid .devhub-product-card__price del {
  font-size: var(--devhub-text-lg);
}

.devhub-archive__grid .devhub-product-card__stock {
  top: 12px;
  right: 12px;
  font-size: var(--devhub-text-xl) !important;
}

.devhub-archive__grid .devhub-product-card__badge {
  top: 12px;
  left: 12px;
  padding: 0.42rem 0.72rem;
  font-size: var(--devhub-text-md);
}

.devhub-archive__grid .devhub-product-card__action {
  min-height: 34px;
  padding: 8px 14px;
  font-size: var(--devhub-text-lg);
}

/* ==========================================================================
   7. Pagination
   ========================================================================== */

.devhub-archive__pagination {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.devhub-archive__pagination .woocommerce-pagination,
.devhub-archive__pagination .woocommerce-Pagination {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

/* WooCommerce pagination */
.devhub-archive__pagination .woocommerce-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.devhub-archive__pagination .woocommerce-pagination li > .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3.9rem;
  height: 3.9rem;
  padding: 0.2rem 1.2rem;
  border: 1px solid var(--devhub-border);
  border-radius: 999px;
  background: var(--devhub-white);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--devhub-dark);
  text-decoration: none;
  transition:
    background var(--devhub-transition),
    border-color var(--devhub-transition),
    color var(--devhub-transition);
}

.devhub-archive__pagination .woocommerce-pagination li > .page-numbers i {
  font-size: 1.3rem;
}

.devhub-archive__pagination .woocommerce-pagination li > .page-numbers:hover {
  border-color: var(--devhub-primary);
  color: var(--devhub-primary);
}

.devhub-archive__pagination .woocommerce-pagination li > .page-numbers.current {
  background: var(--devhub-primary);
  border-color: var(--devhub-primary);
  color: var(--devhub-white);
  font-weight: 700;
}

/* ==========================================================================
   8. Empty state
   ========================================================================== */

.devhub-archive-empty-state {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 92px;
  padding: 24px 32px;
  border: 1px solid var(--devhub-border);
  border-radius: var(--devhub-radius-md);
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  box-shadow: var(--devhub-shadow-card);
}

.devhub-archive-empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--devhub-primary);
  font-size: 2rem;
}

.devhub-archive-empty-state__message {
  margin: 0;
  font-size: clamp(1.5rem, 1.1vw, 1.9rem);
  line-height: 1.4;
  color: var(--devhub-dark);
  font-weight: 500;
}

/* ==========================================================================
   9. Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .devhub-archive__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  body.post-type-archive-product
    .devhub-archive__grid
    > .devhub-product-card::after,
  body.tax-product_cat .devhub-archive__grid > .devhub-product-card::after,
  body.tax-pwb-brand .devhub-archive__grid > .devhub-product-card::after,
  body.tax-product_brand .devhub-archive__grid > .devhub-product-card::after,
  body.tax-pa_brand .devhub-archive__grid > .devhub-product-card::after {
    display: block;
  }

  body.post-type-archive-product
    .devhub-archive__grid
    > .devhub-product-card:nth-child(4n)::after,
  body.tax-product_cat
    .devhub-archive__grid
    > .devhub-product-card:nth-child(4n)::after,
  body.tax-pwb-brand
    .devhub-archive__grid
    > .devhub-product-card:nth-child(4n)::after,
  body.tax-product_brand
    .devhub-archive__grid
    > .devhub-product-card:nth-child(4n)::after,
  body.tax-pa_brand
    .devhub-archive__grid
    > .devhub-product-card:nth-child(4n)::after {
    display: block;
  }

  body.post-type-archive-product
    .devhub-archive__grid
    > .devhub-product-card:nth-child(2n)::after,
  body.tax-product_cat
    .devhub-archive__grid
    > .devhub-product-card:nth-child(2n)::after,
  body.tax-pwb-brand
    .devhub-archive__grid
    > .devhub-product-card:nth-child(2n)::after,
  body.tax-product_brand
    .devhub-archive__grid
    > .devhub-product-card:nth-child(2n)::after,
  body.tax-pa_brand
    .devhub-archive__grid
    > .devhub-product-card:nth-child(2n)::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .devhub-archive__layout {
    grid-template-columns: 1fr;
  }

  .devhub-archive__sidebar {
    position: static;
  }

  .devhub-archive__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .devhub-archive-empty-state {
    padding: 20px 22px;
  }
}

@media (max-width: 575px) {
  .devhub-archive__toolbar {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
  }

  .devhub-archive__toolbar p.woocommerce-result-count {
    width: 100% !important;
    margin-right: 0 !important;
    text-align: center !important;
  }

  .devhub-archive__toolbar form.woocommerce-ordering {
    width: auto !important;
    margin-left: 0 !important;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .devhub-archive__grid {
    grid-template-columns: 1fr;
  }

  body.post-type-archive-product .devhub-archive__grid,
  body.tax-product_cat .devhub-archive__grid,
  body.tax-product_tag .devhub-archive__grid,
  body.tax-pwb-brand .devhub-archive__grid,
  body.tax-product_brand .devhub-archive__grid,
  body.tax-pa_brand .devhub-archive__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.post-type-archive-product
    .devhub-archive__grid
    > .devhub-product-card::after,
  body.tax-product_cat .devhub-archive__grid > .devhub-product-card::after,
  body.tax-product_tag .devhub-archive__grid > .devhub-product-card::after,
  body.tax-pwb-brand .devhub-archive__grid > .devhub-product-card::after,
  body.tax-product_brand .devhub-archive__grid > .devhub-product-card::after,
  body.tax-pa_brand .devhub-archive__grid > .devhub-product-card::after {
    display: none;
  }

  .devhub-archive-empty-state {
    gap: 14px;
    padding: 18px 18px;
  }

  .devhub-archive-empty-state__message {
    font-size: 1.4rem;
  }
}

@media (max-width: 575px) {
  body.post-type-archive-product .devhub-archive__carousel-nav,
  body.tax-pwb-brand .devhub-archive__carousel-nav,
  body.tax-product_brand .devhub-archive__carousel-nav,
  body.tax-pa_brand .devhub-archive__carousel-nav,
  body.tax-product_cat .devhub-archive__carousel-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 102, 0, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--devhub-primary);
    box-shadow: 0 10px 22px rgba(17, 17, 17, 0.12);
    transform: translateY(-50%);
    transition:
      color var(--devhub-transition),
      border-color var(--devhub-transition),
      background-color var(--devhub-transition),
      opacity var(--devhub-transition);
  }

  body.post-type-archive-product .devhub-archive__carousel-nav:hover,
  body.tax-pwb-brand .devhub-archive__carousel-nav:hover,
  body.tax-product_brand .devhub-archive__carousel-nav:hover,
  body.tax-pa_brand .devhub-archive__carousel-nav:hover,
  body.tax-product_cat .devhub-archive__carousel-nav:hover {
    border-color: rgba(255, 102, 0, 0.45);
    background: #fff5f0;
  }

  body.post-type-archive-product .devhub-archive__carousel-nav:focus,
  body.post-type-archive-product .devhub-archive__carousel-nav:focus-visible,
  body.post-type-archive-product .devhub-archive__carousel-nav:active,
  body.tax-pwb-brand .devhub-archive__carousel-nav:focus,
  body.tax-pwb-brand .devhub-archive__carousel-nav:focus-visible,
  body.tax-pwb-brand .devhub-archive__carousel-nav:active,
  body.tax-product_brand .devhub-archive__carousel-nav:focus,
  body.tax-product_brand .devhub-archive__carousel-nav:focus-visible,
  body.tax-product_brand .devhub-archive__carousel-nav:active,
  body.tax-pa_brand .devhub-archive__carousel-nav:focus,
  body.tax-pa_brand .devhub-archive__carousel-nav:focus-visible,
  body.tax-pa_brand .devhub-archive__carousel-nav:active,
  body.tax-product_cat .devhub-archive__carousel-nav:focus,
  body.tax-product_cat .devhub-archive__carousel-nav:focus-visible,
  body.tax-product_cat .devhub-archive__carousel-nav:active {
    outline: none !important;
    box-shadow: 0 10px 22px rgba(17, 17, 17, 0.12) !important;
  }

  body.post-type-archive-product .devhub-archive__carousel-nav:disabled,
  body.post-type-archive-product .devhub-archive__carousel-nav[disabled],
  body.tax-pwb-brand .devhub-archive__carousel-nav:disabled,
  body.tax-pwb-brand .devhub-archive__carousel-nav[disabled],
  body.tax-product_brand .devhub-archive__carousel-nav:disabled,
  body.tax-product_brand .devhub-archive__carousel-nav[disabled],
  body.tax-pa_brand .devhub-archive__carousel-nav:disabled,
  body.tax-pa_brand .devhub-archive__carousel-nav[disabled],
  body.tax-product_cat .devhub-archive__carousel-nav:disabled,
  body.tax-product_cat .devhub-archive__carousel-nav[disabled] {
    opacity: 0.32;
    pointer-events: none;
  }

  body.post-type-archive-product .devhub-archive__carousel-nav.is-hidden,
  body.tax-pwb-brand .devhub-archive__carousel-nav.is-hidden,
  body.tax-product_brand .devhub-archive__carousel-nav.is-hidden,
  body.tax-pa_brand .devhub-archive__carousel-nav.is-hidden,
  body.tax-product_cat .devhub-archive__carousel-nav.is-hidden {
    opacity: 0;
    pointer-events: none;
  }

  body.post-type-archive-product .devhub-archive__carousel-nav--prev,
  body.tax-pwb-brand .devhub-archive__carousel-nav--prev,
  body.tax-product_brand .devhub-archive__carousel-nav--prev,
  body.tax-pa_brand .devhub-archive__carousel-nav--prev,
  body.tax-product_cat .devhub-archive__carousel-nav--prev {
    left: 0;
  }

  body.post-type-archive-product .devhub-archive__carousel-nav--next,
  body.tax-pwb-brand .devhub-archive__carousel-nav--next,
  body.tax-product_brand .devhub-archive__carousel-nav--next,
  body.tax-pa_brand .devhub-archive__carousel-nav--next,
  body.tax-product_cat .devhub-archive__carousel-nav--next {
    right: 0;
  }

  body.post-type-archive-product .devhub-archive__grid,
  body.tax-pwb-brand .devhub-archive__grid,
  body.tax-product_brand .devhub-archive__grid,
  body.tax-pa_brand .devhub-archive__grid,
  body.tax-product_cat .devhub-archive__grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 80%;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 44px 8px 0;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body.post-type-archive-product .devhub-archive__grid::-webkit-scrollbar,
  body.tax-pwb-brand .devhub-archive__grid::-webkit-scrollbar,
  body.tax-product_brand .devhub-archive__grid::-webkit-scrollbar,
  body.tax-pa_brand .devhub-archive__grid::-webkit-scrollbar,
  body.tax-product_cat .devhub-archive__grid::-webkit-scrollbar {
    display: none;
  }

  body.post-type-archive-product .devhub-archive__grid > .devhub-product-card,
  body.tax-pwb-brand .devhub-archive__grid > .devhub-product-card,
  body.tax-product_brand .devhub-archive__grid > .devhub-product-card,
  body.tax-pa_brand .devhub-archive__grid > .devhub-product-card,
  body.tax-product_cat .devhub-archive__grid > .devhub-product-card {
    min-width: 0;
    scroll-snap-align: start;
  }

  body.post-type-archive-product .devhub-archive__grid--single-card,
  body.tax-pwb-brand .devhub-archive__grid--single-card,
  body.tax-product_brand .devhub-archive__grid--single-card,
  body.tax-pa_brand .devhub-archive__grid--single-card,
  body.tax-product_cat .devhub-archive__grid--single-card {
    grid-auto-columns: 100%;
    padding-right: 0;
    overflow-x: hidden;
  }

  body.post-type-archive-product
    .devhub-archive__grid
    > .devhub-product-card::after,
  body.tax-pwb-brand .devhub-archive__grid > .devhub-product-card::after,
  body.tax-product_brand .devhub-archive__grid > .devhub-product-card::after,
  body.tax-pa_brand .devhub-archive__grid > .devhub-product-card::after,
  body.tax-product_cat .devhub-archive__grid > .devhub-product-card::after {
    display: block;
  }
}
