/* ─── Shop Archive / Store (React Store.tsx parity) ────────────────────────── */
body.post-type-archive-product .site-main,
body.tax-product_cat .site-main,
body.woocommerce-shop .site-main,
body.woocommerce-page .site-main,
body.archive.woocommerce .site-main {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.ycc-shop-archive {
  min-height: 100vh;
  background-color: #f8fafc;
  transition: background-color 0.3s ease;
  font-family: inherit;
  width: 100%;
  overflow-x: clip;
}
html.dark .ycc-shop-archive {
  background-color: #020617;
}

/* Sticky Sub-Header */
.ycc-shop-sub-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky !important;
  top: var(--ycc-navbar-h, 64px) !important;
  z-index: 30 !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  width: 100%;
}
html.dark .ycc-shop-sub-header {
  background-color: #0f172a;
  border-bottom-color: #1e293b;
}
.ycc-shop-header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 16px;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .ycc-shop-header-container {
    padding: 16px 24px;
  }
}
@media (min-width: 1024px) {
  .ycc-shop-header-container {
    padding: 16px 32px;
  }
}
.ycc-shop-header-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
@media (min-width: 768px) {
  .ycc-shop-header-row {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
}
.ycc-shop-header-left h1 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin: 0;
}
@media (min-width: 640px) {
  .ycc-shop-header-left h1 {
    font-size: 24px;
  }
}
html.dark .ycc-shop-header-left h1 {
  color: #ffffff;
}
.ycc-shop-header-left p {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0 0;
}
@media (min-width: 640px) {
  .ycc-shop-header-left p {
    font-size: 14px;
  }
}
html.dark .ycc-shop-header-left p {
  color: #94a3b8;
}
.ycc-shop-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
@media (min-width: 768px) {
  .ycc-shop-header-right {
    width: auto;
  }
}

/* Mobile Filter Toggle */
#ycc-mobile-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #f1f5f9;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  border: 1px solid transparent;
  cursor: pointer;
  flex: 1;
}
html.dark #ycc-mobile-filter-btn {
  background-color: #1e293b;
  color: #cbd5e1;
}
@media (min-width: 1024px) {
  #ycc-mobile-filter-btn {
    display: none !important;
  }
}

/* Sort Select Form */
.ycc-shop-sort-form {
  position: relative;
  flex: 1;
  min-width: 140px;
  margin: 0;
}
@media (min-width: 640px) {
  .ycc-shop-sort-form {
    min-width: 160px;
  }
}
@media (min-width: 768px) {
  .ycc-shop-sort-form {
    flex: none;
  }
}
.ycc-shop-sort-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 8px 36px 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
html.dark .ycc-shop-sort-select {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
.ycc-shop-sort-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.ycc-shop-sort-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #64748b;
  display: flex;
  align-items: center;
}

/* Body Container & Layout */
.ycc-shop-body-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 16px;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .ycc-shop-body-container {
    padding: 32px 24px;
  }
}
@media (min-width: 1024px) {
  .ycc-shop-body-container {
    padding: 32px 32px;
  }
}
.ycc-shop-body-row {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  width: 100%;
}

/* Desktop Sidebar */
.ycc-shop-sidebar {
  display: none !important;
}
@media (min-width: 1024px) {
  .ycc-shop-sidebar {
    display: flex !important;
    flex-direction: column;
    gap: 32px;
    width: 256px;
    flex-shrink: 0;
    position: sticky !important;
    top: 144px !important;
  }
}
.ycc-shop-sidebar h3 {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 16px;
}
html.dark .ycc-shop-sidebar h3 {
  color: #ffffff;
}

/* Category Sidebar Links */
.ycc-shop-cat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ycc-cat-filter-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.2s ease;
  color: #475569 !important;
  box-sizing: border-box;
}
.ycc-cat-filter-link:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}
html.dark .ycc-cat-filter-link {
  color: #94a3b8 !important;
}
html.dark .ycc-cat-filter-link:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}
.ycc-cat-filter-link.active {
  background-color: #eff6ff !important;
  color: #2563eb !important;
  font-weight: 600;
}
html.dark .ycc-cat-filter-link.active {
  background-color: rgba(30, 58, 138, 0.2) !important;
  color: #60a5fa !important;
}

/* Price Range */
.ycc-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.ycc-price-input-wrap {
  position: relative;
  flex: 1;
}
.ycc-price-curr {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #94a3b8;
  pointer-events: none;
}
.ycc-price-input {
  width: 100%;
  height: 38px;
  padding: 8px 8px 8px 24px !important;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
html.dark .ycc-price-input {
  background-color: #1e293b;
  border-color: #334155;
  color: #ffffff;
}
.ycc-price-input:focus {
  border-color: #3b82f6;
}
.ycc-price-sep {
  color: #94a3b8;
}
.ycc-apply-price-btn {
  width: 100%;
  height: 36px;
  background-color: #0f172a !important;
  color: #ffffff !important;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: none !important;
  cursor: pointer;
  transition: opacity 0.2s;
}
html.dark .ycc-apply-price-btn {
  background-color: #334155 !important;
  color: #ffffff !important;
}
.ycc-apply-price-btn:hover {
  opacity: 0.9;
}
.ycc-clear-filters-btn {
  width: 100%;
  height: 36px;
  border: 1px solid #e2e8f0;
  color: #475569;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  transition: background-color 0.2s;
  box-sizing: border-box;
}
html.dark .ycc-clear-filters-btn {
  border-color: #334155;
  color: #94a3b8;
}
.ycc-clear-filters-btn:hover {
  background-color: #f8fafc;
}
html.dark .ycc-clear-filters-btn:hover {
  background-color: #1e293b;
}

/* Products Main Column */
.ycc-shop-main {
  flex: 1;
  min-width: 0;
  width: 100%;
}
.ycc-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .ycc-shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1280px) {
  .ycc-shop-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Pagination List */
.ycc-shop-archive ul.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ycc-shop-archive ul.page-numbers li {
  margin: 0;
  padding: 0;
}
.ycc-shop-archive ul.page-numbers li .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: #475569;
  transition: all 0.2s ease;
}
html.dark .ycc-shop-archive ul.page-numbers li .page-numbers {
  color: #94a3b8;
}
.ycc-shop-archive ul.page-numbers li .page-numbers:hover:not(.current) {
  background-color: #f1f5f9;
}
html.dark .ycc-shop-archive ul.page-numbers li .page-numbers:hover:not(.current) {
  background-color: #1e293b;
}
.ycc-shop-archive ul.page-numbers li .page-numbers.current {
  background-color: #2563eb;
  color: #ffffff !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.ycc-shop-archive ul.page-numbers li .page-numbers.dots {
  background: transparent;
  color: #94a3b8;
}

/* Mobile Filter Drawer (React Store.tsx parity) */
.ycc-mobile-filter-drawer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 60 !important;
  display: flex !important;
  justify-content: flex-end !important;
  pointer-events: auto;
  transition: visibility 0.3s ease;
}
.ycc-mobile-filter-drawer.hidden {
  display: none !important;
  pointer-events: none !important;
}
@media (min-width: 1024px) {
  .ycc-mobile-filter-drawer {
    display: none !important;
  }
}
.ycc-mobile-filter-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}
.ycc-mobile-filter-content {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 100%;
  background-color: #ffffff;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  animation: ycc-slide-in-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}
html.dark .ycc-mobile-filter-content {
  background-color: #0f172a;
  border-left: 1px solid #1e293b;
}
.ycc-mobile-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #f1f5f9;
}
html.dark .ycc-mobile-filter-header {
  border-bottom-color: #1e293b;
}
.ycc-mobile-filter-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
html.dark .ycc-mobile-filter-header h3 {
  color: #ffffff;
}
.ycc-mobile-filter-close {
  padding: 8px;
  border-radius: 9999px;
  background-color: #f8fafc;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
html.dark .ycc-mobile-filter-close {
  background-color: #1e293b;
  color: #94a3b8;
}
.ycc-mobile-filter-close:hover {
  color: #334155;
}
html.dark .ycc-mobile-filter-close:hover {
  color: #ffffff;
}
.ycc-mobile-filter-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-sizing: border-box;
}
.ycc-mobile-filter-footer {
  padding: 20px;
  border-top: 1px solid #f1f5f9;
  background-color: #f8fafc;
  display: flex;
  gap: 12px;
}
html.dark .ycc-mobile-filter-footer {
  border-top-color: #1e293b;
  background-color: rgba(15, 23, 42, 0.5);
}

/* Compact desktop nav for 1024px-1279px to prevent navbar overflow */
@media (min-width: 1024px) and (max-width: 1279px) {
  .ycc-desktop-nav {
    gap: 2px !important;
  }
  .ycc-nav-link {
    padding: 6px 8px !important;
    font-size: 13px !important;
  }
}
