.psw-container{
  max-width:1400px;
  margin:0 auto;
  padding:20px;
  font-family:Arial;
  background:#f6f7fb;
}

.psw-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  margin-bottom:15px;
}

/* search right */
.psw-search{
  flex:1;
  display:flex;
  justify-content:flex-end;
}

#psw-search{
  width:260px;
  padding:10px;
  border-radius:10px;
  border:1px solid #ddd;
}

/* sort left */
.psw-sort select{
  padding:10px;
  border-radius:10px;
  border:1px solid #ddd;
  background:#fff;
}

/* layout */
.psw-layout{
    display: flex;
    gap: 15px;
}

/* sidebar */
.psw-sidebar{
    width: 270px;
    background: #fff;
    padding: 12px;
    border-radius: 10px;
/*     position: sticky; */
    top: 15px;
    border: 1px solid #eee;
}

.psw-block{
  margin-bottom:20px;
}

/* categories */
.cat-item{
  padding:8px;
  border-radius:8px;
  cursor:pointer;
  font-size:13px;
  margin-bottom:5px;
  background:#f5f5f5;
}

.cat-item.active{
  background:#111;
  color:#fff;
}

/* price */
.psw-price-display{
  margin-top:10px;
  font-size:13px;
}


.psw-range{
  margin-bottom:15px;
}

.psw-range label{
  display:block;
  font-size:12px;
  margin-bottom:6px;
  color:#333;
}

.psw-range input[type="range"]{
  width:100%;
}

.psw-val{
  display:inline-block;
  margin-top:5px;
  font-size:12px;
  font-weight:600;
}


/* grid */
.psw-grid{
  flex:1;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}

/* card */
.psw-card{
  background:#fff;
  border-radius:14px;
  padding:12px;
  border:1px solid #eee;
  transition:.2s;
  position: relative;
}

.psw-card:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 25px rgba(0,0,0,.08);
}


.psw-badge{
    position: absolute;
    top: 20px;
    left: 25px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #fff;
    z-index: 5;
}

/* in stock */
.psw-badge.in{
  background:#22c55e;
}

/* low stock */
.psw-badge.low{
  background:#f59e0b;
}

/* out of stock */
.psw-badge.out{
    background: #6e6e6e;
    font-size: 15px;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    border-radius: 6px;
    text-transform: uppercase;
}


.psw-card img{
  width:100%;
  height:220px;
  object-fit:contain;
}

.psw-card h3{
  font-size:14px;
  margin:8px 0;
}

.psw-card span{
  font-weight:700;
}


/* ── Card buttons wrapper — ensures both buttons are identical size ── */
.psw-card-btns{
  margin-top:10px;
  display: flex;
  flex-direction: row;
  gap:6px;
}

/* Normalise <a> and <button> to same box model */
.psw-card-btns .psw-add-to-cart,
.psw-card-btns .psw-buy-now{
  display:block !important;
  width:100% !important;
  box-sizing:border-box !important;
  padding:10px !important;
  border:none !important;
  border-radius:10px !important;
  font-size:13px !important;
  font-weight:700 !important;
  line-height:1.4 !important;
  cursor:pointer !important;
  transition:.2s !important;
  text-align:center !important;
  text-decoration:none !important;
  font-family:inherit !important;
}

.psw-card-btns .psw-add-to-cart{
    background: #7b4ae2 !important;
    color: white !important;
    border-radius: 10px !important;
}
.psw-card-btns .psw-add-to-cart:hover{ background:#6236c8; }

.psw-card-btns .psw-buy-now{
  background:#e91e8c;
  color:#fff !important;
}
.psw-card-btns .psw-buy-now:hover{ background:#c7166e; }

.psw-card-btns .psw-buy-now.psw-btn-loading{ opacity:.65; cursor:wait; }
.psw-card-btns .psw-buy-now.psw-btn-error{ background:#c62828 !important; }


/* ── Filter toggle button (hidden on desktop) ── */
.psw-filter-toggle{
  display:none;
  align-items:center;
  gap:6px;
  padding:9px 14px;
  background:#111;
  color:#fff;
  border:none;
  border-radius:10px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  font-family:inherit;
  transition:.2s;
}
.psw-filter-toggle:hover{ background:#333; }

/* ── Sidebar close button (hidden on desktop) ── */
.psw-sidebar-close{
  display:none;
  background:none;
  border:none;
  cursor:pointer;
  padding:4px;
  color:#333;
  margin-bottom:12px;
  align-self:flex-end;
}

/* ── Overlay (hidden on desktop) ── */
.psw-sidebar-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  z-index:900;
  opacity:0;
  visibility:hidden;
  transition:opacity .3s,visibility .3s;
}

/* responsive */
@media(max-width:1100px){
  .psw-grid{grid-template-columns:repeat(2,1fr);}
}

@media(max-width:768px){

  /* Topbar: two rows
     Row 1: search (full width)
     Row 2: sort + filter toggle side by side */
  .psw-topbar{
    flex-wrap:wrap;
    gap:10px;
  }

  .psw-search{
    order:1;
    flex:0 0 100%;
    justify-content:stretch;
  }

  #psw-search{
    width:100%;
    box-sizing:border-box;
  }

  .psw-sort{
    order:2;
    flex:1;
  }

  .psw-sort select{
    width:100%;
    box-sizing:border-box;
  }

  .psw-filter-toggle{
    order:3;
    display:flex;
    flex:0 0 auto;
  }

  /* Overlay active */
  .psw-sidebar-overlay{
    display:block;
  }
  .psw-sidebar-overlay.psw-open{
    opacity:1;
    visibility:visible;
  }

  /* Sidebar becomes a slide-in drawer from the right */
  .psw-layout{ display:block; }

  .psw-sidebar{
    position:fixed;
    top:0;
    right:-320px;
    width:290px;
    height:100%;
    z-index:1000;
    overflow-y:auto;
    border-radius:0;
    border:none;
    transition:right .3s ease;
    display:flex;
    flex-direction:column;
  }
  .psw-sidebar.psw-open{
    right:0;
    box-shadow:-4px 0 20px rgba(0,0,0,.15);
  }

  .psw-sidebar-close{ display:flex; }

  /* Filter button inside drawer — full width */
  #psw-filter{
    margin-top:auto;
  }
}


/* ═══════════════════════════════════════════
   SINGLE PRODUCT PAGE
   All selectors target WooCommerce's own classes so the hook echo-system stays intact.
   Custom psw-* classes are only used for structural wrappers (layout, not content).
═══════════════════════════════════════════ */

/* Page shell */
.psw-single-product{
  background:#fff;
}

.psw-single-page{
  max-width:1200px;
  margin:0 auto;
  padding:40px 30px;
}

/* ── Breadcrumb ── */
.psw-breadcrumb-bar{
  margin-bottom:22px;
  direction:rtl;
}
.psw-breadcrumb-bar .woocommerce-breadcrumb{
  font-size:13px;
  color:#aaa;
  margin:0;
}
.psw-breadcrumb-bar .woocommerce-breadcrumb a{
  color:#aaa;
  text-decoration:none;
}
.psw-breadcrumb-bar .woocommerce-breadcrumb a:hover{ color:#555; }

/* ── Two-column layout ──
   direction:ltr keeps Left=info, Right=gallery regardless of page RTL.
   Each column restores direction:rtl for Hebrew text inside it.            */
.psw-single-container{
  display:flex;
  gap:70px;
  align-items:flex-start;
  direction:ltr;
}

.psw-single-info{
  flex:1;
  direction:rtl;
  text-align:right;
}

.psw-single-gallery{
  flex:1;
  direction:ltr;
  position:sticky;
  top:30px;
}

/* ── Sale badge (priority 4 — above title) ── */
.psw-single-sale-badge{
  display:inline-block;
  background:#e91e8c;
  color:#fff;
  font-size:13px;
  font-weight:700;
  padding:5px 14px;
  border-radius:20px;
  margin-bottom:12px;
  letter-spacing:.4px;
}

.psw-single-stock-badge{
  display:inline-block;
  color:#fff;
  font-size:15px;
  padding:8px 16px;
  border-radius:6px;
  margin-bottom:12px;
  letter-spacing:.5px;
  text-transform:uppercase;
}
.psw-single-stock-badge.out{
  background:#6e6e6e;
  box-shadow:0 3px 10px #6e6e6e;
}
.psw-single-stock-badge.low{
  background:#f59e0b;
  box-shadow:0 3px 10px rgba(245,158,11,0.4);
}

/* ── woocommerce_template_single_title (priority 5) ── */
.psw-single-info .product_title.entry-title{
  font-size:34px;
  font-weight:700;
  color:#111;
  margin:0 0 14px;
  line-height:1.3;
}

/* ── woocommerce_template_single_price (priority 10) ── */
.psw-single-info .price{
  font-size:26px;
  font-weight:700;
  margin-bottom:20px;
}
.psw-single-info .price .woocommerce-Price-amount,
.psw-single-info .price bdi{
  color:#e91e8c;
}
.psw-single-info .price del .woocommerce-Price-amount{
  color:#aaa;
  font-size:18px;
}

/* ── woocommerce_template_single_excerpt (priority 20) ── */
.psw-single-info .woocommerce-product-details__short-description{
  font-size:14px;
  line-height:1.9;
  color:#666;
  text-align:center;
  padding:20px 0;
  border-top:1px solid #eee;
  border-bottom:1px solid #eee;
  margin-bottom:24px;
}

/* ── woocommerce_template_single_add_to_cart (priority 30) ──
   WooCommerce renders:
     <form class="cart">            (flex row)
       [psw-qty-minus]              ← woocommerce_before_add_to_cart_quantity
       <div class="quantity">...</div>
       [psw-qty-plus]               ← woocommerce_after_add_to_cart_quantity
       <button.single_add_to_cart_button>
     </form>
  With direction:rtl on the form, HTML order is reversed visually:
  [button][+][qty][-]                                               */
.psw-single-info .cart{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
  padding:0;
  direction:rtl;
}

/* Qty stepper buttons (rendered by PSW_V6::qty_minus_btn / qty_plus_btn) */
.psw-qty-btn{
  background:#fff;
  border:1.5px solid #ddd;
  width:38px;
  height:46px;
  font-size:18px;
  cursor:pointer;
  color:#444;
  transition:.15s;
  font-family:inherit;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.psw-qty-btn:hover{ background:#f5f5f5; }

/* Fuse −, qty input, + into a single stepper unit.
   Visual order in RTL: [+][input][−]  so:
     psw-qty-minus (HTML-first → RTL-rightmost) → right border only
     .quantity (HTML-middle)                    → no side borders
     psw-qty-plus  (HTML-after qty → RTL-leftmost) → left border only    */
.psw-qty-minus{
  border-radius:0 8px 8px 0;
  border-left:none;
}
.psw-single-info .quantity{
  display:flex;
  align-items:stretch;
  flex-shrink:0;
  border:1.5px solid #ddd;
  border-left:none;
  border-right:none;
  border-radius:0;
  overflow:hidden;
}
.psw-qty-plus{
  border-radius:8px 0 0 8px;
  border-right:none;
}

/* Hide WC's qty label (screen-reader-text is still present for a11y) */
.psw-single-info .quantity label{
  display:none;
}

/* WC quantity number input */
.psw-single-info .quantity input.qty{
  width:40px;
  height:46px;
  border:none;
  text-align:center;
  font-size:15px;
  font-weight:600;
  color:#111;
  background:transparent;
  padding:0;
  -moz-appearance:textfield;
  appearance:textfield;
}
.psw-single-info .quantity input.qty::-webkit-outer-spin-button,
.psw-single-info .quantity input.qty::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}

/* Add-to-cart submit button (WC class: .single_add_to_cart_button) */
.psw-single-info .single_add_to_cart_button.button{
  flex:1;
  padding:14px 18px;
  background:#222;
  color:#fff;
  border:none;
  border-radius:8px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:.2s;
  text-align:center;
  font-family:inherit;
  text-decoration:none;
}
.psw-single-info .single_add_to_cart_button.button:hover{ background:#444; }
.psw-single-info .single_add_to_cart_button.psw-btn-loading{ opacity:.65; cursor:wait; }
.psw-single-info .single_add_to_cart_button.psw-btn-success{ background:#2e7d32 !important; transition:background .3s; }
.psw-single-info .single_add_to_cart_button.psw-btn-error{ background:#c62828 !important; transition:background .3s; }

/* Buy Now — single product (inside form.cart flex row, same size as add-to-cart) */
.psw-single-info form.cart .psw-single-buy-now{
  flex:1 1 0 !important;
  min-width:0;
  padding:14px 18px;
  background:#e91e8c !important;
  color:#fff !important;
  border:none;
  border-radius:8px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:.2s;
  text-align:center;
  font-family:inherit;
  text-decoration:none;
  display:block;
  line-height:normal;
  box-sizing:border-box;
  height:auto;
}
.psw-single-info form.cart .psw-single-buy-now:hover{ background:#c7166e !important; color:#fff !important; }
.psw-single-info form.cart .psw-single-buy-now.psw-btn-loading{ opacity:.65; cursor:wait; }
.psw-single-info form.cart .psw-single-buy-now.psw-btn-error{ background:#c62828 !important; }

/* ── woocommerce_template_single_meta (priority 40) ── */
.psw-single-info .product_meta{
  font-size:13px;
  color:#666;
  line-height:2;
  border-top:1px solid #eee;
  padding-top:16px;
  margin-top:4px;
}
.psw-single-info .product_meta .posted_in,
.psw-single-info .product_meta .sku_wrapper,
.psw-single-info .product_meta .tagged_as{
  display:block;
}
.psw-single-info .product_meta span.label{
  font-weight:600;
  color:#333;
  margin-left:4px;
}
.psw-single-info .product_meta a{
  color:#666;
  text-decoration:none;
}
.psw-single-info .product_meta a:hover{ color:#e91e8c; }

/* ── woocommerce_template_single_sharing (priority 50) ── */
.psw-single-info .woocommerce-share,
.psw-single-info .sharedaddy{
  margin-top:18px;
}

/* ── WooCommerce Product Gallery (woocommerce_show_product_images) ──
   The gallery is rendered inside .psw-single-gallery by
   woocommerce_before_single_product_summary at priority 20.             */
.psw-single-gallery .woocommerce-product-gallery{
  float:none !important;
  width:100% !important;
  margin:0;
  padding:0;
}

/* Main gallery image */
.psw-single-gallery .woocommerce-product-gallery__image,
.psw-single-gallery .woocommerce-product-gallery .flex-viewport{
  border-radius:14px;
  overflow:hidden;
  background:#f8f8f8;
}
.psw-single-gallery .woocommerce-product-gallery__image img,
.psw-single-gallery .woocommerce-product-gallery .flex-viewport img{
  width:100% !important;
  height:480px !important;
  object-fit:cover !important;
  display:block;
}

/* Thumbnail strip (WooCommerce flexslider .flex-control-thumbs) */
.psw-single-gallery .flex-control-thumbs{
  display:flex !important;
  flex-direction:row-reverse;
  gap:10px;
  padding:14px 0 0;
  margin:0;
  list-style:none;
}
.psw-single-gallery .flex-control-thumbs li{
  width:80px;
  height:80px;
  border-radius:10px;
  overflow:hidden;
  border:2px solid transparent;
  cursor:pointer;
  transition:.2s;
  flex-shrink:0;
}
.psw-single-gallery .flex-control-thumbs li img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
/* flex-active class is set on the img by WooCommerce's flexslider */
.psw-single-gallery .flex-control-thumbs li img.flex-active,
.psw-single-gallery .flex-control-thumbs li:hover img{
  outline:2px solid #e91e8c;
  outline-offset:-2px;
}

/* ── After-summary: tabs, upsells, related products ── */
.psw-single-after{
  max-width:1200px;
  margin:0 auto;
  padding:0 30px 40px;
}
.psw-single-after .woocommerce-tabs ul.tabs{
  padding-right:0;
}

/* ── Responsive ── */
@media(max-width:960px){
  .psw-single-container{
    flex-direction:column;
    direction:rtl;
    gap:30px;
  }
  .psw-single-gallery{
    position:static;
    width:100%;
  }
  .psw-single-gallery .woocommerce-product-gallery__image img,
  .psw-single-gallery .woocommerce-product-gallery .flex-viewport img{
    height:360px !important;
  }
}
@media(max-width:600px){
  .psw-single-page{ padding:28px 20px; }
  .psw-single-after{ padding:0 20px 40px; }
  .psw-single-info .product_title.entry-title{ font-size:24px; }

  /* Cart form — single row, no wrap */
  .psw-single-info .cart{ flex-wrap:nowrap; gap:8px; }

  /* Stepper buttons — compact */
  .psw-single-info .psw-qty-btn{ flex:none; width:36px; height:40px; font-size:16px; }

  /* Qty input */
  .psw-single-info .quantity input.qty{ width:38px; height:40px; font-size:14px; }

  /* Add-to-cart: fill remaining space on the same row */
  .psw-single-info .single_add_to_cart_button.button{
    flex:1;
    width:auto;
    padding:10px 12px;
    font-size:14px;
  }

  /* Gallery: shorter on small phones */
  .psw-single-gallery .woocommerce-product-gallery__image img,
  .psw-single-gallery .woocommerce-product-gallery .flex-viewport img{
    height:260px !important;
  }
}


/* ═══════════════════════════════════════════
   SHOPPING CART
   All selectors target WooCommerce's own classes so the hook echo-system stays intact.
   Custom psw-* classes are only used for structural wrappers (layout, not content).
═══════════════════════════════════════════ */

.wp-block-woocommerce-cart {
    container-type: inline-size;
    width: 100%;
    margin: auto !important;
}