/* =========================================================================
   FILTERS.CSS
   Μετατρέπει το πλαϊνό sidebar με τα φίλτρα (κατηγορίες, price filter, tags κτλ)
   σε ένα σύγχρονο "off-canvas drawer" στο mobile, με floating κουμπί.
   Το drawer/overlay markup γίνεται inject από το functions.php (wp_footer)
   και ελέγχεται από το assets/js/shop.js
   ========================================================================= */

/* ---------- Floating κουμπί φίλτρων (μόνο mobile) ---------- */
.shop-filters-fab{
  display: none;
  position: fixed;
  right: 18px;
  bottom: 84px; /* πάνω από το sticky add-to-cart bar αν υπάρχει */
  z-index: var(--shop-z-floating-btn);
  align-items: center;
  gap: 8px;
  background: var(--shop-primary);
  color: var(--shop-text-on-primary);
  border: none;
  border-radius: var(--shop-radius-pill);
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shop-shadow-lg);
  cursor: pointer;
  transition: var(--shop-transition);
}
.shop-filters-fab:hover{ background: var(--shop-primary-hover); transform: translateY(-2px); }
.shop-filters-fab svg{ width: 16px; height: 16px; }
.shop-filters-fab .shop-filters-fab__count{
  background: var(--shop-accent);
  color: #fff;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

@media (max-width: 900px){
  .shop-filters-fab{ display: inline-flex; }
}

/* ---------- Overlay πίσω από το drawer ---------- */
.shop-filters-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
  z-index: var(--shop-z-overlay);
}
body.shop-filters-open .shop-filters-overlay{
  opacity: 1;
  visibility: visible;
}

/* ---------- Το ίδιο το sidebar γίνεται drawer στο mobile ---------- */
@media (max-width: 900px){

  /* Καλύπτουμε τα πιο συνηθισμένα selectors που χρησιμοποιεί το Divi 5 / WP
     για sidebar widget areas. Αν το δικό σου layout χρησιμοποιεί άλλο container,
     πρόσθεσέ το στη λίστα SIDEBAR_SELECTORS μέσα στο shop.js ΚΑΙ εδώ. */
  body.shop-has-filters-drawer .widget-area,
  body.shop-has-filters-drawer .woocommerce-widget-area,
  body.shop-has-filters-drawer aside.widget-area,
  body.shop-has-filters-drawer #sidebar,
  body.shop-has-filters-drawer .et_pb_widget_area{
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 86vw) !important;
    max-width: 86vw;
    height: 100vh !important;
    overflow-y: auto !important;
    background: var(--shop-bg) !important;
    z-index: var(--shop-z-drawer);
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom)) 20px !important;
    box-shadow: var(--shop-shadow-lg);
    transform: translateX(100%);
    transition: transform .28s ease;
    border-radius: var(--shop-radius-lg) 0 0 var(--shop-radius-lg);
  }

  body.shop-filters-open.shop-has-filters-drawer .widget-area,
  body.shop-filters-open.shop-has-filters-drawer .woocommerce-widget-area,
  body.shop-filters-open.shop-has-filters-drawer aside.widget-area,
  body.shop-filters-open.shop-has-filters-drawer #sidebar,
  body.shop-filters-open.shop-has-filters-drawer .et_pb_widget_area{
    transform: translateX(0);
  }

  body.shop-filters-open{ overflow: hidden; }
}

/* ---------- Κουμπί κλεισίματος μέσα στο drawer ---------- */
.shop-filters-drawer__close{
  position: sticky;
  top: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--shop-bg-alt);
  border: 1px solid var(--shop-border);
  font-size: 16px;
  cursor: pointer;
  margin-bottom: 12px;
}
@media (min-width: 901px){
  .shop-filters-drawer__close{ display: none; }
}

/* ---------- Γενικό styling widgets μέσα στο sidebar/drawer (πιο minimal) ---------- */
.widget-area .widget,
.woocommerce-widget-area .widget,
.et_pb_widget_area .widget{
  border: none;
  padding: 0 0 22px 0;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--shop-border-light);
}
.widget-area .widget:last-child,
.woocommerce-widget-area .widget:last-child{
  border-bottom: none;
}
.widget-area .widget-title,
.woocommerce-widget-area .widget-title,
.widget-area .widgettitle{
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  color: var(--shop-text);
  margin-bottom: 14px;
}

/* Price filter slider ranges */
.widget_price_filter .price_slider_amount .button{
  padding: 8px 16px !important;
  font-size: 12px !important;
}
.price_slider_amount{ display:flex; align-items:center; justify-content:space-between; }
.ui-slider .ui-slider-range{ background: var(--shop-primary) !important; }
.ui-slider .ui-slider-handle{
  background: var(--shop-bg) !important;
  border: 2px solid var(--shop-primary) !important;
  border-radius: 50%;
  width: 16px !important;
  height: 16px !important;
}

/* Λίστα κατηγοριών / layered nav πιο minimal, χωρίς bullets */
.widget_product_categories ul,
.widget_layered_nav ul{
  list-style: none;
  margin: 0; padding: 0;
}
.widget_product_categories li,
.widget_layered_nav li{
  margin-bottom: 8px;
}
.widget_product_categories li a,
.widget_layered_nav li a{
  font-size: 14px;
  color: var(--shop-text);
  text-decoration: none;
}
.widget_layered_nav li a:hover,
.widget_product_categories li a:hover{
  color: var(--shop-accent);
}
