/* Category Page Styles */
.breadcrumb {
  padding: 14px 32px;
  background: white;
  border-bottom: 1px solid var(--light-gray);
  font-size: 12px;
  color: var(--gray);
}

.breadcrumb-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.breadcrumb a {
  color: var(--gray);
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--pink);
}

.breadcrumb .current {
  color: var(--black);
  font-weight: 700;
}

.breadcrumb .sep {
  margin: 0 8px;
  color: var(--light-gray);
}

.cat-hero {
  background: linear-gradient(135deg, #FF1B6B 0%, #7B2CBF 100%);
  padding: 50px 32px 40px;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cat-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 182, 39, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
}

.cat-hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.cat-hero h1 {
  font-family: 'Bebas Neue', 'Heebo', sans-serif;
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  text-shadow: 3px 3px 0 var(--black);
  margin-bottom: 12px;
}

.cat-hero p {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 500;
  opacity: 0.95;
}

.cat-hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.cat-hero-stats span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  background: rgba(0, 0, 0, 0.4);
  padding: 8px 16px;
  backdrop-filter: blur(10px);
}

/* Subcats */
.subcats {
  background: linear-gradient(180deg, white 0%, var(--cream) 100%);
  padding: 18px 20px;
  border-bottom: 1px solid var(--light-gray);
}

.subcats-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.subcats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.subcat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  text-align: center;
  min-height: 88px;
  position: relative;
  overflow: hidden;
  color: white;
  background: linear-gradient(135deg, #0A0A0A 0%, #5A5550 100%);
}

.subcat-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  color: white;
}

.subcat-tile.active {
  outline: 3px solid var(--black);
  outline-offset: 2px;
  transform: scale(1.02);
}

.subcat-tile.active::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 4px;
  background: white;
  color: var(--black);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.subcat-tile-icon {
  font-size: 28px;
  line-height: 1;
}

.subcat-tile-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.2;
  color: white;
}

.subcat-tile-count {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.25);
  padding: 1px 8px;
  border-radius: 10px;
  margin-top: 2px;
  backdrop-filter: blur(4px);
}

/* Gradients for tiles */
.grad-pink-purple {
  background: linear-gradient(135deg, #FF1B6B 0%, #7B2CBF 100%);
}

.grad-pink-orange {
  background: linear-gradient(135deg, #FF1B6B 0%, #FF6B00 100%);
}

.grad-purple-blue {
  background: linear-gradient(135deg, #7B2CBF 0%, #1976D2 100%);
}

.grad-cyan-pink {
  background: linear-gradient(135deg, #00B4A6 0%, #FF1B6B 100%);
}

.grad-yellow-orange {
  background: linear-gradient(135deg, #FFB627 0%, #FF6B00 100%);
}

.grad-green-dark {
  background: linear-gradient(135deg, #28A745 0%, #2C2C54 100%);
}

/* ==========================================
   LAYOUT
   ========================================== */
.layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 32px;
  align-items: start;
}

/* ==========================================
   FILTERS SIDEBAR
   ========================================== */
.filters {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--light-gray);
  padding: 20px;
  position: sticky;
  top: 140px;
  align-self: start;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--light-gray);
}

.filters h3 {
  font-family: 'Bebas Neue', 'Heebo', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  margin: 0;
}

.filter-clear {
  font-size: 11px;
  color: var(--pink);
  text-decoration: underline;
  cursor: pointer;
  display: inline-block;
  font-weight: 600;
}

/* Desktop: hide mobile-only elements */
.filter-toggle-btn,
.filter-close-btn,
.filter-overlay {
  display: none;
}

.filter-group {
  padding: 16px 0;
  border-top: 1px solid var(--light-gray);
}

.filter-group h4,
.filters .widget-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  color: var(--black);
}

/* ---- SIZE GRID ---- */
.filter-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-size {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 36px;
  padding: 0 8px;
  border: 1.5px solid var(--light-gray);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  color: var(--black);
  user-select: none;
}

.filter-size:hover {
  border-color: var(--black);
}

.filter-size.active {
  background: var(--black);
  color: white;
  border-color: var(--black);
}

.filter-size.sold-out {
  background: #F5F5F5;
  color: #bbb;
  border-color: #e0e0e0;
  cursor: not-allowed;
  position: relative;
  overflow: hidden;
}

.filter-size.sold-out::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right,
      transparent calc(50% - 0.75px),
      #ccc calc(50% - 0.75px),
      #ccc calc(50% + 0.75px),
      transparent calc(50% + 0.75px));
}

/* ---- PRICE RANGE ---- */
.filter-price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-input {
  width: 72px;
  height: 38px;
  padding: 0 10px;
  border: 1.5px solid var(--light-gray);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 700;
  text-align: center;
  color: var(--black);
  transition: border-color 0.2s;
  -moz-appearance: textfield;
}

.price-input::-webkit-inner-spin-button,
.price-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.price-input:focus {
  outline: none;
  border-color: var(--pink);
}

.price-sep {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray);
  flex-shrink: 0;
}

/* ---- COLOR SWATCHES ---- */
.filter-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-swatch-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s;
  direction: rtl;
}

.color-swatch-label:hover {
  transform: scale(1.05);
}

.color-swatch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.color-swatch {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--light-gray);
  transition: all 0.2s ease;
  display: block;
  flex-shrink: 0;
}

.color-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
}

/* Selected State */
.color-swatch-input:checked+.color-swatch {
  box-shadow: 0 0 0 3px white, 0 0 0 5px var(--black);
  transform: scale(1.1);
}

.color-swatch-input:checked~.color-name {
  font-weight: 800;
  color: var(--pink);
}

/* ==========================================
   DYNAMIC WOOCOMMERCE WIDGET STYLES
   (for when real widgets are added via WP Admin)
   ========================================== */

/* Widget wrapping (matches register_sidebar wrapper) */
.filters .widget {
  padding: 16px 0;
  border-top: 1px solid var(--light-gray);
}

/* WC Price Slider */
.filters .widget_price_filter .price_slider_wrapper {
  padding-top: 8px;
}

.filters .widget_price_filter .ui-slider {
  height: 4px;
  background: var(--light-gray);
  border: none;
  border-radius: 2px;
  margin: 16px 0;
}

.filters .widget_price_filter .ui-slider-range {
  background: var(--black);
}

.filters .widget_price_filter .ui-slider-handle {
  width: 16px;
  height: 16px;
  top: -6px;
  border-radius: 50%;
  background: var(--black);
  border: 2px solid white;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  cursor: grab;
}

.filters .widget_price_filter .price_label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray);
  margin-top: 8px;
}

.filters .widget_price_filter .price_label span {
  color: var(--black);
}

.filters .widget_price_filter button.button {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: var(--black);
  color: white;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.filters .widget_price_filter button.button:hover {
  background: var(--pink);
}

/* WC Layered Nav (checkbox lists) */
.filters .woocommerce-widget-layered-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filters .woocommerce-widget-layered-nav-list__item a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--black);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.filters .woocommerce-widget-layered-nav-list__item a:hover {
  color: var(--pink);
}

.filters .woocommerce-widget-layered-nav-list__item--chosen a {
  font-weight: 800;
  color: var(--pink);
}

.filters .woocommerce-widget-layered-nav-list__item .count {
  margin-right: auto;
  color: var(--gray);
  font-size: 11px;
  font-weight: 400;
}

/* WC Rating Filter */
.filters .wc-layered-nav-rating a {
  font-size: 13px;
  color: var(--black);
  text-decoration: none;
}

.filters .wc-layered-nav-rating a:hover {
  color: var(--pink);
}

/* ==========================================
   PRODUCTS AREA
   ========================================== */
.products-area {
  min-width: 0;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
  background: white;
  border: 1px solid var(--light-gray);
  border-radius: 10px;
  padding: 12px 16px;
}

.toolbar-info {
  font-size: 13px;
  color: var(--gray);
}

.toolbar-info strong {
  color: var(--black);
}

/* WooCommerce ordering dropdown */
.woocommerce-ordering select,
.sort-select {
  padding: 8px 12px;
  border: 1.5px solid var(--light-gray);
  border-radius: 6px;
  background: white;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  font-weight: 600;
  color: var(--black);
  transition: border-color 0.2s;
}

.woocommerce-ordering select:focus,
.sort-select:focus {
  outline: none;
  border-color: var(--pink);
}

.products-grid-cat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Pagination */
.woocommerce-pagination {
  margin-top: 40px;
  text-align: center;
}

.woocommerce-pagination ul {
  display: inline-flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--light-gray);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--black);
  transition: all 0.2s;
  background: white;
}

.woocommerce-pagination ul li a:hover {
  border-color: var(--pink);
  color: var(--pink);
}

.woocommerce-pagination ul li span.current {
  background: var(--black);
  color: white;
  border-color: var(--black);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 968px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  /* Mobile filter drawer */
  .filters {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 380px;
    height: 100vh;
    z-index: 1000;
    background: white;
    border-radius: 0;
    border: none;
    padding: 20px;
    overflow-y: auto;
    transition: right 0.3s ease;
    max-height: none;
  }

  .filters.open {
    right: 0;
  }

  .filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .filter-overlay.open {
    display: block;
  }

  .filter-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    color: var(--black);
  }

  .filters-header {
    gap: 8px;
  }

  .filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--light-gray);
    border-radius: 8px;
    background: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--black);
  }

  .products-grid-cat {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .cat-hero h1 {
    font-size: 42px;
    text-shadow: 2px 2px 0 var(--black);
  }

  .woocommerce .toolbar .woocommerce-result-count,
  .woocommerce .toolbar .woocommerce-ordering {
    margin-bottom: 0;
  }

  .subcats {
    padding: 12px;
    position: sticky;
    top: 60px;
    z-index: 70;
    background: white;
    border-bottom: 2px solid var(--light-gray);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  .subcats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .subcat-tile {
    min-height: 78px;
    padding: 10px 4px;
    border-radius: 12px;
  }

  .subcat-tile-icon {
    font-size: 22px;
  }

  .subcat-tile-name {
    font-size: 11px;
  }
}