/* ==========================================================================
   Archive: baudep_product
   Styles for output of baudep_render_product_collection() on archive page.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page wrapper
   -------------------------------------------------------------------------- */
.baudep-product-archive {
  padding-top: 48px;
  padding-bottom: 80px;
}

/* --------------------------------------------------------------------------
   Page heading
   -------------------------------------------------------------------------- */
.baudep-product-archive__head {
  padding-top: 40px;
  padding-bottom: 45px;
  margin-bottom: 40px;
  background-color: #f2f2f2;
  text-align: center;
}

.baudep-product-archive__title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin: 0 0 12px;
}

.baudep-product-archive__description {
  color: #666;
  font-size: 15px;
  max-width: 600px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Search form
   -------------------------------------------------------------------------- */
.baudep-product-archive__search {
  margin: 0;
}

.baudep-product-archive__search-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #d0d0d0;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.baudep-product-archive__search-wrap:focus-within {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.baudep-product-archive__search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 11px 16px;
  font-size: 14px;
  color: #1a1a1a;
  min-width: 0;
}

.baudep-product-archive__search-input::placeholder {
  color: #aaa;
}

/* Remove browser default search cancel button */
.baudep-product-archive__search-input::-webkit-search-cancel-button {
  display: none;
}

.baudep-product-archive__search-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0 14px 0 8px;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.baudep-product-archive__search-btn:hover {
  color: #1a1a1a;
}

.baudep-product-archive__search-clear {
  flex-shrink: 0;
  padding: 0 14px 0 2px;
  color: #bbb;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: color 0.2s ease;
}

.baudep-product-archive__search-clear:hover {
  color: #1a1a1a;
}

.baudep-product-archive__search-notice {
  margin: 10px auto 0;
  max-width: 480px;
  text-align: left;
  font-size: 13px;
  color: #000000;
}

/* --------------------------------------------------------------------------
   Layout — sidebar + content
   -------------------------------------------------------------------------- */
.baudep-product-archive__layout {
  display: grid;
  grid-template-columns: 1fr 4fr;
  gap: 48px;
  align-items: start;
}

.baudep-product-archive__content {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Filter toggle button (mobile only, hidden on desktop)
   -------------------------------------------------------------------------- */
.baudep-product-archive__filter-toggle {
  display: none;
}

/* Backdrop hidden on desktop */
.baudep-product-archive__backdrop {
  display: none;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.baudep-sidebar-widget {
  margin-bottom: 32px;
}

.baudep-sidebar-widget:last-child {
  margin-bottom: 0;
}

.baudep-sidebar-widget__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--baudep-accent);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.baudep-sidebar-widget__cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.baudep-sidebar-widget__cat-item {
  border-bottom: 1px solid #f0f0f0;
}

.baudep-sidebar-widget__cat-item:last-child {
  border-bottom: none;
}

.baudep-sidebar-widget__cat-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  text-decoration: none;
  color: #2a2a2a;
  font-size: 14px;
  transition: color 0.2s ease;
}

.baudep-sidebar-widget__cat-item a:hover,
.baudep-sidebar-widget__cat-item.is-active a {
  color: var(--baudep-accent);
}

.baudep-sidebar-widget__cat-name {
  flex: 1;
  min-width: 0;
}

.baudep-sidebar-widget__cat-count {
  flex-shrink: 0;
  color: #999;
  font-size: 13px;
  margin-left: 8px;
}

.baudep-sidebar-widget__cat-item.is-active .baudep-sidebar-widget__cat-count,
.baudep-sidebar-widget__cat-item a:hover .baudep-sidebar-widget__cat-count {
  color: var(--baudep-accent);
}

/* --------------------------------------------------------------------------
   Toolbar (count)
   -------------------------------------------------------------------------- */
.baudep-product-archive__toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding: 0 0 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e8e8e8;
}

.baudep-product-archive__count {
  margin: 0;
  font-size: 13px;
  color: #000000;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-weight: 400;
  text-transform: none;
}

/* --------------------------------------------------------------------------
   Collection wrapper — output of baudep_render_product_collection()
   wrapper_class: baudep-archive-grid
   content_class: baudep-archive-grid__list
   -------------------------------------------------------------------------- */
.baudep-archive-grid {
  position: relative;
}

.baudep-archive-grid__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 24px;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.baudep-product-archive__pagination {
  display: flex;
  justify-content: center;
  margin-top: 64px;
}

.baudep-product-archive__pagination ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.baudep-product-archive__pagination li a,
.baudep-product-archive__pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: #2a2a2a;
  text-decoration: none;
  border: 1px solid #d8d8d8;
  background: #fff;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.baudep-product-archive__pagination li a:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

.baudep-product-archive__pagination li span.current {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

.baudep-product-archive__pagination li span.dots {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

/* --------------------------------------------------------------------------
   Responsive — tablet landscape (≤ 1199px)
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .baudep-archive-grid__list {
    gap: 36px 20px;
  }
}

/* --------------------------------------------------------------------------
   Responsive — tablet (≤ 991px): sidebar becomes overlay
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .baudep-product-archive {
    padding-top: 40px;
    padding-bottom: 64px;
  }

  .baudep-product-archive__head {
    margin-bottom: 28px;
  }

  .baudep-product-archive__title {
    font-size: 26px;
  }

  .baudep-product-archive__layout {
    display: block;
  }

  /* Filter toggle visible */
  .baudep-product-archive__filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1.5px solid #d0d0d0;
    border-radius: 999px;
    background: #fff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 20px;
    transition: border-color 0.2s ease, background 0.2s ease;
  }

  .baudep-product-archive__filter-toggle:hover {
    border-color: #1a1a1a;
  }

  .baudep-product-archive__filter-toggle[aria-expanded="true"] {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
  }

  /* Sidebar — overlay panel */
  .baudep-product-archive__sidebar {
    position: fixed;
    top: 88px;
    left: 0;
    z-index: 1000;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #fff;
    padding: 32px 24px;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .baudep-product-archive__sidebar.is-open {
    transform: translateX(0);
  }

  /* Backdrop */
  .baudep-product-archive__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.4);
  }

  .baudep-product-archive__backdrop.is-open {
    display: block;
  }

  .baudep-product-archive__toolbar {
    margin-bottom: 28px;
  }

  .baudep-archive-grid__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px;
  }

  .baudep-product-archive__pagination {
    margin-top: 52px;
  }
}

/* --------------------------------------------------------------------------
   Responsive — large mobile (≤ 600px): 2 columns
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .baudep-product-archive {
    padding-top: 28px;
    padding-bottom: 48px;
  }

  .baudep-product-archive__head {
    margin-bottom: 20px;
  }

  .baudep-product-archive__title {
    font-size: 22px;
    letter-spacing: 0.02em;
  }

  .baudep-product-archive__description {
    font-size: 13px;
  }

  .baudep-product-archive__toolbar {
    padding: 0 0 12px;
    margin-bottom: 20px;
  }

  .baudep-product-archive__count {
    font-size: 12px;
  }

  .baudep-archive-grid__list {
    grid-template-columns: repeat(1, 1fr);
    gap: 20px 10px;
  }

  .baudep-product-archive__pagination {
    margin-top: 40px;
  }

  .baudep-product-archive__pagination li a,
  .baudep-product-archive__pagination li span {
    min-width: 32px;
    height: 32px;
    font-size: 12px;
    padding: 0 6px;
  }
}

/* --------------------------------------------------------------------------
   Responsive — small mobile (≤ 360px): 1 column
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
  .baudep-archive-grid__list {
    grid-template-columns: 1fr;
  }
}
