/* Dutone Shop UX — Aprin category archives */

:root {
  --dsux-ink: #1a1c1e;
  --dsux-muted: #6b7280;
  --dsux-line: #e6e8ec;
  --dsux-soft: #f4f5f7;
  --dsux-card: #ffffff;
  --dsux-accent: #0f766e;
  --dsux-accent-soft: #ecfdf8;
  --dsux-radius: 12px;
  --dsux-chip-radius: 10px;
}

/* Hide Aprin default collapsed category widget */
body.dsux-hide-default-cats .widget_product_categories {
  display: none !important;
}

/* Hide Aprin’s duplicate page title when we render toolbar title */
body.dsux-on.woocommerce .woocommerce-products-header,
body.dsux-on .page-title,
body.dsux-on .woocommerce-products-header__title {
  display: none !important;
}

.dsux-toolbar {
  margin: 0 0 16px;
  padding: 0;
}

.dsux-toolbar__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dsux-toolbar__back {
  display: inline-block;
  font-size: 13px;
  color: var(--dsux-muted);
  text-decoration: none;
  margin-bottom: 4px;
}

.dsux-toolbar__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--dsux-ink);
  letter-spacing: -0.02em;
}

.dsux-filter-btn {
  display: none;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border: 1px solid var(--dsux-line);
  background: var(--dsux-card);
  color: var(--dsux-ink);
  border-radius: var(--dsux-chip-radius);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.dsux-filter-btn:active {
  transform: scale(0.98);
}

/* Chips */
.dsux-chips {
  margin: 0 0 8px;
}

.dsux-chips__track {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dsux-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--dsux-chip-radius);
  background: var(--dsux-soft);
  color: var(--dsux-ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}

.dsux-chip:hover {
  background: #e9ebef;
  color: var(--dsux-ink);
}

.dsux-chip.is-active {
  background: var(--dsux-accent-soft);
  color: var(--dsux-accent);
  border-color: rgba(15, 118, 110, 0.25);
}

.dsux-chip__count {
  font-size: 11px;
  font-weight: 600;
  color: var(--dsux-muted);
  background: rgba(0,0,0,.04);
  padding: 2px 6px;
  border-radius: 6px;
}

.dsux-chip.is-active .dsux-chip__count {
  background: rgba(15, 118, 110, 0.12);
  color: var(--dsux-accent);
}

/* Desktop sidebar replacement nav (Elementor widget) */
.dsux-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dsux-nav__item {
  margin: 0;
}

.dsux-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--dsux-ink);
  font-size: 14px;
  font-weight: 500;
}

.dsux-nav__link em {
  font-style: normal;
  font-size: 12px;
  color: var(--dsux-muted);
}

.dsux-nav__item.is-active > .dsux-nav__link {
  background: var(--dsux-accent-soft);
  color: var(--dsux-accent);
  font-weight: 700;
}

.dsux-nav--child {
  padding: 0 0 6px 12px;
  margin: 0 0 4px;
  border-left: 2px solid var(--dsux-line);
  margin-left: 12px;
}

.dsux-nav--child .dsux-nav__link {
  padding: 8px 10px;
  font-size: 13px;
}

/* Tighter product grid */
body.dsux-on ul.products {
  --dsux-gap: 14px;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--dsux-gap) !important;
  margin: 0 !important;
}

body.dsux-on ul.products::before,
body.dsux-on ul.products::after {
  display: none !important;
}

body.dsux-on ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
  background: var(--dsux-card);
  border: 1px solid var(--dsux-line);
  border-radius: var(--dsux-radius);
  overflow: hidden;
  padding: 0 !important;
}

body.dsux-on ul.products li.product .woocommerce-loop-product__link {
  display: block;
  padding: 10px 10px 0;
}

body.dsux-on ul.products li.product img {
  border-radius: 8px;
  margin: 0 0 10px !important;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--dsux-soft);
}

body.dsux-on ul.products li.product .woocommerce-loop-product__title,
body.dsux-on ul.products li.product h2,
body.dsux-on ul.products li.product h3 {
  font-size: 14px !important;
  line-height: 1.35 !important;
  margin: 0 10px 6px !important;
  padding: 0 !important;
  font-weight: 650 !important;
  color: var(--dsux-ink);
}

body.dsux-on ul.products li.product .price {
  margin: 0 10px 12px !important;
  font-size: 13px;
  color: var(--dsux-ink);
}

/* Mobile sheet */
.dsux-sheet[hidden] {
  display: none !important;
}

.dsux-sheet {
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.dsux-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 22, 0.45);
}

.dsux-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(86vh, 720px);
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  animation: dsux-up .22s ease-out;
}

@keyframes dsux-up {
  from { transform: translateY(24px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}

.dsux-sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: #d1d5db;
  margin: 10px auto 0;
}

.dsux-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
  border-bottom: 1px solid var(--dsux-line);
}

.dsux-sheet__close {
  border: 0;
  background: var(--dsux-soft);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.dsux-sheet__body {
  overflow: auto;
  padding: 14px 16px 28px;
  -webkit-overflow-scrolling: touch;
}

.dsux-chips--sheet .dsux-chips__track {
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.dsux-sheet__nav {
  margin-top: 8px;
}

body.dsux-sheet-open {
  overflow: hidden;
}

/* Sticky chips on mobile */
@media (max-width: 991px) {
  .dsux-filter-btn {
    display: inline-flex;
  }

  body.dsux-on.aprin-sidebar-left .sidebar,
  body.dsux-on .widget-area,
  body.dsux-on #secondary {
    display: none !important;
  }

  body.dsux-on .content-area,
  body.dsux-on #primary,
  body.dsux-on .site-main {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
  }

  .dsux-toolbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    padding: 10px 0 8px;
    margin: 0 0 12px;
    border-bottom: 1px solid var(--dsux-line);
  }

  .dsux-chips--toolbar .dsux-chips__track {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .dsux-chips--toolbar .dsux-chips__track::-webkit-scrollbar {
    display: none;
  }

  .dsux-chips--toolbar .dsux-chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  body.dsux-on ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.dsux-on ul.products li.product .woocommerce-loop-product__title,
  body.dsux-on ul.products li.product h2,
  body.dsux-on ul.products li.product h3 {
    font-size: 13px !important;
  }

  body.dsux-on .woocommerce-result-count,
  body.dsux-on .woocommerce-ordering {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  body.dsux-on ul.products li.product .price {
    font-size: 12px;
  }
}

@media (min-width: 992px) {
  body.dsux-on ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Soften huge card padding from Aprin product-block-style-1 */
  body.dsux-on ul.products li.product {
    box-shadow: none;
  }
}

@media (min-width: 1200px) {
  body.dsux-on ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
