/* ==========================================================
   DRESSIVA – Shop Page Styles
   ========================================================== */

/* ---- Page base ---- */
.shop-page .site-header { position: sticky; }

/* Shop page keeps the sticky main-nav (not embedded in header like index.html) */
@media (min-width: 992px) {
  .shop-page .main-nav {
    display: flex;
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 62px;
    z-index: 1050;
  }
}

.shop-main {
  padding: 28px 0 60px;
  min-height: 70vh;
  background: #f9f9f9;
}

/* ---- Top bar ---- */
.shop-topbar {
  flex-wrap: nowrap;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  background: #f9f9f9;
}

.shop-found {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
  /* On mobile: left. On desktop: pushed after sort. */
}

.shop-sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 0.82rem;
  color: var(--text-mid);
  white-space: nowrap;
}

/* Mobile: found text left, filter button right */
@media (max-width: 991px) {
  .shop-topbar {
    justify-content: space-between;
  }

  .shop-found {
    font-size: 0.84rem;
  }
}

.shop-sort-select {
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 6px 28px 6px 10px;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  min-width: 150px;
}

/* ---- Mobile filter toggle button ---- */
.shop-filter-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
}

.shop-filter-toggle:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ================================================================
   FILTER SIDEBAR
================================================================ */
.shop-sidebar {
  /* Desktop: static in the column flow */
}

/* Filter Panel wrapper */
.filter-panel {
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  padding: 20px 18px 28px;
  position: sticky;
  top: 100px; /* below header + nav */
}

/* Mobile: filter slides in as a drawer */
@media (max-width: 991px) {

  /* The aside col itself has no visible presence on mobile */
  .shop-sidebar {
    position: fixed;
    inset: 0;
    z-index: 1200;
    pointer-events: none;
  }

  .shop-sidebar.open { pointer-events: all; }

  /* Overlay backdrop */
  .filter-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
  }

  .shop-sidebar.open .filter-overlay { opacity: 1; }

  /* Slide-in panel */
  .filter-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    border-radius: 0;
    border: none;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    z-index: 1;
    padding-top: 0;
  }

  .shop-sidebar.open .filter-panel { transform: translateX(0); }
}

/* Filter panel header (mobile only) */
.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

.filter-panel-header button {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text-mid);
  cursor: pointer;
}

/* Filter group */
.filter-group {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.filter-group:last-of-type { border-bottom: none; }

.filter-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

/* Checkbox list */
.filter-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.filter-check-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
  color: var(--text-mid);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.filter-check-list label:hover { color: var(--text-dark); }

.filter-check-list input[type="checkbox"] {
  width: 15px;
  height: 15px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #ccc;
  border-radius: 3px;
  background-color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s, border-color 0.2s;
}

.filter-check-list input[type="checkbox"]:checked {
  background-color: var(--orange);
  border-color: var(--orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5l2.5 2.5 4.5-4.5' stroke='%23fff' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 10px 10px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---- jQuery UI Price Slider overrides ---- */
.price-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

#priceSlider {
  margin: 0 4px 12px;
  height: 4px;
}

/* Override jQuery UI track */
#priceSlider.ui-slider {
  background: var(--border-light);
  border: none;
  border-radius: 4px;
}

#priceSlider .ui-slider-range {
  background: var(--orange);
  border-radius: 4px;
}

#priceSlider .ui-slider-handle {
  width: 18px;
  height: 18px;
  top: -7px;
  margin-left: -9px;
  background: var(--orange);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(240,123,43,0.4);
  cursor: pointer;
  outline: none;
  transition: box-shadow 0.2s;
}

#priceSlider .ui-slider-handle:hover,
#priceSlider .ui-slider-handle:focus {
  box-shadow: 0 0 0 4px rgba(240,123,43,0.2);
}

.price-values {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 4px;
}

/* ---- Mobile Apply button ---- */
.filter-apply-wrap {
  padding-top: 16px;
}

.filter-apply-btn {
  width: 100%;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.25s;
}

.filter-apply-btn:hover { background: var(--orange-dark); }

/* ================================================================
   PRODUCT GRID  (reuses .na-card from style.css)
================================================================ */
.shop-products-col { padding-top: 4px; }

/* Items hidden until Load More */
.shop-prod-item.shop-hidden { display: none; }

/* No results message */
.no-results-msg {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: var(--text-mid);
  font-size: 0.92rem;
}

/* ================================================================
   LOAD MORE BUTTON
================================================================ */
.load-more-wrap {
  margin-top: 40px;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--text-dark);
  color: var(--text-dark);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 13px 40px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.load-more-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

.lm-spinner { display: none; }

.load-more-btn.loading .lm-text   { display: none; }
.load-more-btn.loading .lm-spinner { display: inline-flex; }
.load-more-btn.loading {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  pointer-events: none;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 575px) {
  .shop-topbar { gap: 8px; }
  .shop-found  { font-size: 0.82rem; }
  .shop-sort-select { min-width: 120px; font-size: 0.78rem; }
}
