/* ==========================================================================
   BIO METABOL — app-like WooCommerce styling (shop / cart / checkout / product)
   Brand palette only: brown #3A1F0F, honey #E5A72E, beige #F8F1E6,
   green #2E7D32, text #2B170D, border #E8D8BD. RTL, mobile-first.
   ========================================================================== */

.woocommerce-shell{max-width:1200px;margin:0 auto;padding:24px 20px 70px}
.woocommerce .woocommerce-products-header__title,
.woocommerce h1.product_title,
.woocommerce-shell h1{font-family:'El Messiri',serif;color:#3A1F0F;font-size:28px}

/* ---- honey buttons everywhere (kill the purple) ---- */
.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,
.woocommerce #respond input#submit,.woocommerce .button.alt,
.woocommerce #place_order,.woocommerce button.button.alt,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button{
  background:#E5A72E !important;color:#3A1F0F !important;border:none !important;
  border-radius:12px !important;font-weight:800 !important;box-shadow:none !important;
  padding:12px 22px !important;transition:background .2s,color .2s;
}
.woocommerce a.button:hover,.woocommerce button.button:hover,
.woocommerce #place_order:hover,.woocommerce .button.alt:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover{
  background:#C8791A !important;color:#fff !important;
}
.woocommerce .wc-proceed-to-checkout a.checkout-button{display:block;text-align:center;font-size:16px}
.woocommerce span.price,.woocommerce div.product p.price,
.woocommerce ul.products li.product .price{color:#C8791A;font-weight:800}

/* ---- notices in brand colour ---- */
.woocommerce-message,.woocommerce-info,.woocommerce-error,.woocommerce-noreviews{
  border-top-color:#E5A72E;border-radius:10px;background:#F8F1E6;
}
.woocommerce-message{border-top-color:#2E7D32}

/* ==========================================================================
   SHOP / ARCHIVE
   ========================================================================== */
.woocommerce ul.products{display:grid !important;gap:16px;margin:0 !important;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.woocommerce ul.products li.product{width:auto !important;margin:0 !important;float:none !important}
.woocommerce .woocommerce-result-count{color:#8A7660;font-size:14px}
.woocommerce .woocommerce-ordering select{border:1px solid #E8D8BD;border-radius:10px;padding:8px 10px;background:#fff;color:#3A1F0F}

/* ==========================================================================
   SINGLE PRODUCT — app-like
   ========================================================================== */
.single-product div.product{display:grid;gap:28px;grid-template-columns:1fr 1fr;align-items:start}
.single-product div.product .woocommerce-product-gallery{margin:0}
.single-product div.product .summary{margin:0}
.single-product .woocommerce-product-gallery__image img{border-radius:20px}
.single-product div.product .summary{background:#fff;border:1px solid #E8D8BD;border-radius:20px;padding:22px;box-shadow:0 8px 24px rgba(74,46,19,.06)}
.single-product .quantity input.qty{border:1px solid #E8D8BD;border-radius:10px;padding:10px;width:70px}
.single-product .product_meta{font-size:13px;color:#8A7660;border-top:1px dashed #E8D8BD;margin-top:14px;padding-top:12px}
.single-product .woocommerce-tabs ul.tabs{padding:0;margin:0 0 14px;display:flex;gap:8px;flex-wrap:wrap;border:none}
.single-product .woocommerce-tabs ul.tabs::before{display:none}
.single-product .woocommerce-tabs ul.tabs li{background:#F8F1E6;border:1px solid #E8D8BD !important;border-radius:999px;margin:0}
.single-product .woocommerce-tabs ul.tabs li.active{background:#E5A72E}
.single-product .woocommerce-tabs ul.tabs li a{color:#3A1F0F;font-weight:700}
.single-product .related.products>h2{font-family:'El Messiri',serif;color:#3A1F0F}

@media(max-width:860px){
  .single-product div.product{grid-template-columns:1fr}
}

/* ==========================================================================
   CART — table on desktop, cards on mobile
   ========================================================================== */
.woocommerce-cart table.cart{border:none}
.woocommerce-cart table.cart th{color:#3A1F0F;font-weight:800}
.woocommerce-cart table.cart td,.woocommerce-cart table.cart th{border-color:#E8D8BD}
.woocommerce-cart table.cart img{border-radius:12px;border:1px solid #E8D8BD}
.woocommerce-cart .cart_totals h2{font-family:'El Messiri',serif;color:#3A1F0F}
.woocommerce-cart .cart-collaterals .cart_totals{background:#fff;border:1px solid #E8D8BD;border-radius:16px;padding:18px}

@media(max-width:768px){
  .woocommerce-cart table.cart thead{display:none}
  .woocommerce-cart table.cart tr{display:block;background:#fff;border:1px solid #E8D8BD;border-radius:16px;padding:12px;margin-bottom:14px}
  .woocommerce-cart table.cart td{display:flex;justify-content:space-between;align-items:center;border:none !important;padding:8px 4px;text-align:start !important}
  .woocommerce-cart table.cart td::before{content:attr(data-title);font-weight:700;color:#8A7660}
  .woocommerce-cart table.cart td.product-remove{justify-content:flex-end}
  .woocommerce-cart table.cart td.product-thumbnail{justify-content:center}
  .woocommerce-cart table.cart td.product-thumbnail::before{display:none}
  .woocommerce-cart .actions{display:flex;flex-direction:column;gap:10px}
}

/* ==========================================================================
   CHECKOUT — card layout, one column on mobile
   ========================================================================== */
.woocommerce-checkout .col2-set,.woocommerce-checkout #customer_details{width:100%}
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2{float:none;width:100%}
.woocommerce-checkout h3{font-family:'El Messiri',serif;color:#3A1F0F}
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout #order_review,
.woocommerce-checkout .woocommerce-additional-fields{background:#fff;border:1px solid #E8D8BD;border-radius:16px;padding:20px;margin-bottom:18px}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce-checkout select,
.select2-container .select2-selection{border:1px solid #E8D8BD !important;border-radius:12px !important;padding:12px 14px;min-height:46px}
.woocommerce-checkout #payment{background:#F8F1E6;border-radius:14px}
.woocommerce-checkout #payment ul.payment_methods{border-color:#E8D8BD}
.woocommerce-checkout #place_order{width:100%;font-size:17px;padding:15px !important}

@media(min-width:861px){
  .woocommerce-checkout form.checkout{display:grid;grid-template-columns:1.1fr .9fr;gap:24px;align-items:start}
  .woocommerce-checkout form.checkout #customer_details{grid-column:1}
  .woocommerce-checkout form.checkout #order_review_heading,
  .woocommerce-checkout form.checkout #order_review{grid-column:2}
}

/* ==========================================================================
   Reduce horizontal overflow site-wide
   ========================================================================== */
.woocommerce-shell,.woocommerce{overflow-x:hidden}
img{max-width:100%;height:auto}

/* ==========================================================================
   SHOP FILTER — Lovable-style right sidebar + mobile drawer
   ========================================================================== */
.bio-shop-layout{display:grid;grid-template-columns:280px 1fr;gap:24px;align-items:start}
.bio-shop-main{min-width:0}
.bio-shop-main ul.products{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}

.bio-filter{position:sticky;top:88px;background:#fff;border:1px solid #E8D8BD;border-radius:18px;padding:18px}
.bio-filter-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.bio-filter-title{font-family:'El Messiri',serif;font-weight:800;font-size:18px;color:#3A1F0F}
.bio-filter-reset{font-size:13px;color:#C8791A;font-weight:700}
.bio-fg{padding:12px 0;border-top:1px solid #F0E7D6}
.bio-fg:first-of-type{border-top:none;padding-top:0}
.bio-fg__title{font-weight:800;color:#3A1F0F;margin-bottom:10px;font-size:14.5px}
.bio-fg__chips{display:flex;flex-wrap:wrap;gap:7px}
.bio-chip{display:inline-flex;align-items:center;cursor:pointer;user-select:none}
.bio-chip input{position:absolute;opacity:0;width:0;height:0}
.bio-chip span{display:inline-block;background:#F8F1E6;border:1px solid #E8D8BD;color:#5A4326;
  font-size:13px;font-weight:600;padding:7px 13px;border-radius:999px;transition:all .15s}
.bio-chip:hover span{border-color:#E5A72E}
.bio-chip:has(input:checked) span{background:#E5A72E;border-color:#E5A72E;color:#3A1F0F}
.bio-filter-actions{margin-top:14px}
.bio-filter-apply{width:100%;background:#3A1F0F;color:#F5E4C3;border:none;border-radius:12px;padding:12px;font-weight:800;cursor:pointer}
.bio-filter-apply:hover{background:#2B170D}
.bio-filter-toggle{display:none}
.bio-filter-backdrop{display:none}

@media(max-width:860px){
  .bio-shop-layout{grid-template-columns:1fr}
  .bio-filter-toggle{display:block;width:100%;background:#fff;border:1px solid #E8D8BD;border-radius:12px;
    padding:13px;font-weight:800;color:#3A1F0F;cursor:pointer;margin-bottom:14px}
  .bio-filter{position:fixed;top:0;right:0;bottom:0;width:86%;max-width:340px;z-index:70;
    border-radius:0;overflow-y:auto;transform:translateX(100%);transition:transform .25s ease;padding-bottom:80px}
  .bio-filter.open{transform:translateX(0) !important}
  body.bio-filter-open .bio-filter-backdrop{display:block;position:fixed;inset:0;z-index:65;background:rgba(59,36,16,.45)}
  .bio-filter .bio-filter-actions{position:sticky;bottom:0;background:#fff;padding-top:12px;margin:0 -18px -18px;padding:12px 18px;border-top:1px solid #E8D8BD}
}

/* ==========================================================================
   PAGE HEADERS (cart / checkout big Arabic titles)
   ========================================================================== */
.bio-page-head{max-width:1200px;margin:0 auto 22px;padding:24px 20px 0;text-align:right}
.bio-page-eyebrow{color:#C8791A;font-weight:800;font-size:13px;letter-spacing:.5px}
.bio-page-title{font-family:'El Messiri',serif;color:#3A1F0F;font-size:34px;margin:4px 0 6px}
.bio-page-sub{color:#8A7660}

/* ==========================================================================
   LEFT CART DRAWER
   ========================================================================== */
.bio-drawer-overlay{position:fixed;inset:0;background:rgba(59,36,16,.45);opacity:0;visibility:hidden;transition:.25s;z-index:9998}
.bio-drawer-overlay.open{opacity:1;visibility:visible}
.bio-cart-drawer{position:fixed;top:0;left:0;bottom:0;width:420px;max-width:92%;background:#FBF7EF;
  box-shadow:6px 0 30px rgba(59,36,16,.25);border-radius:0 22px 22px 0;z-index:9999;
  transform:translateX(-110%);transition:transform .28s cubic-bezier(.4,0,.2,1);display:flex;flex-direction:column}
.bio-cart-drawer.open{transform:translateX(0)}
.bio-drawer-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #E8D8BD;background:#fff;border-radius:0 22px 0 0}
.bio-drawer-title{font-family:'El Messiri',serif;font-size:22px;font-weight:800;color:#3A1F0F}
.bio-drawer-close{background:none;border:none;font-size:28px;line-height:1;color:#5A4326;cursor:pointer}
.bio-drawer-content{flex:1;overflow-y:auto;padding:14px 16px}
.bio-drawer-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.bio-drawer-item{display:flex;gap:12px;align-items:flex-start;background:#fff;border:1px solid #E8D8BD;border-radius:14px;padding:10px}
.bio-di-img img{width:60px;height:60px;object-fit:cover;border-radius:10px;border:1px solid #E8D8BD}
.bio-di-info{flex:1;min-width:0}
.bio-di-name{font-weight:700;color:#3A1F0F;font-size:14px;line-height:1.4}
.bio-di-price{color:#C8791A;font-weight:800;font-size:14px;margin:2px 0 6px}
.bio-di-qty{display:inline-flex;align-items:center;gap:8px;background:#F8F1E6;border-radius:999px;padding:3px 10px}
.bio-di-qty .bio-qty-btn{background:none;border:none;cursor:pointer;font-size:13px;line-height:1}
.bio-di-count{min-width:18px;text-align:center;font-weight:700}
.bio-di-remove{font-size:18px;text-decoration:none}
.bio-drawer-foot{padding:14px 4px 4px;border-top:1px solid #E8D8BD;margin-top:12px}
.bio-drawer-total{display:flex;justify-content:space-between;font-size:16px;margin-bottom:12px;font-weight:700}
.bio-drawer-total b{color:#C8791A}
.bio-drawer-checkout{display:block;text-align:center;background:#3A1F0F;color:#F5E4C3;padding:14px;border-radius:14px;font-weight:800;margin-bottom:8px}
.bio-drawer-checkout:hover{background:#2B170D;color:#fff}
.bio-drawer-continue{display:block;width:100%;text-align:center;background:#fff;border:1.5px solid #2E7D32;color:#2E7D32;padding:12px;border-radius:14px;font-weight:700;cursor:pointer;margin-bottom:8px}
.bio-drawer-viewcart{display:block;text-align:center;color:#8A7660;font-size:13px}
.bio-drawer-empty{text-align:center;padding:60px 20px;color:#8A7660}
.bio-drawer-empty__bee{font-size:48px}
.bio-drawer-empty__txt{font-size:18px;font-weight:700;margin:10px 0 20px;color:#3A1F0F}
body.bio-drawer-lock{overflow:hidden}

/* ==========================================================================
   CART PAGE — cards (right) + sticky summary (left)
   ========================================================================== */
.bio-cart-layout{display:grid;grid-template-columns:380px 1fr;gap:24px;max-width:1200px;margin:0 auto;padding:0 20px 60px;align-items:start}
.bio-cart-summary{position:sticky;top:88px}
.bio-cart-summary__card{background:#fff;border:1px solid #E8D8BD;border-radius:18px;padding:22px;box-shadow:0 8px 24px rgba(74,46,19,.06)}
.bio-cart-summary__title{font-family:'El Messiri',serif;color:#3A1F0F;font-size:20px;margin:0 0 16px}
.bio-sum-row{display:flex;justify-content:space-between;align-items:center;padding:9px 0;color:#5A4326;border-bottom:1px dashed #EFE3CE}
.bio-sum-muted{color:#A98A5E;font-size:13px}
.bio-sum-total{border-bottom:none;font-size:20px;font-weight:800;color:#3A1F0F;margin-top:4px}
.bio-sum-total b{color:#3A1F0F}
.bio-sum-checkout{display:block;text-align:center;background:#3A1F0F;color:#F5E4C3;padding:15px;border-radius:14px;font-weight:800;margin:14px 0 8px}
.bio-sum-checkout:hover{background:#2B170D;color:#fff}
.bio-sum-wa{display:block;text-align:center;background:#fff;border:1.5px solid #2E7D32;color:#2E7D32;padding:13px;border-radius:14px;font-weight:700}
.bio-sum-wa:hover{background:#2E7D32;color:#fff}
.bio-sum-notes{margin-top:16px;color:#6B5A44;font-size:13.5px;line-height:2}
.bio-cart-card{display:flex;gap:14px;align-items:center;background:#fff;border:1px solid #E8D8BD;border-radius:18px;padding:14px;margin-bottom:14px;box-shadow:0 6px 18px rgba(74,46,19,.05)}
.bio-cc-media img{width:84px;height:84px;object-fit:cover;border-radius:14px;border:1px solid #E8D8BD}
.bio-cc-info{flex:1;min-width:0}
.bio-cc-name{font-family:'El Messiri',serif;font-weight:700;color:#3A1F0F;font-size:17px}
.bio-cc-name a{color:inherit}
.bio-cc-price{color:#C8791A;font-weight:800;margin:6px 0}
.bio-cc-qty{display:inline-flex;align-items:center;gap:6px;background:#F8F1E6;border-radius:999px;padding:4px 8px}
.bio-cc-step{background:#fff;border:1px solid #E8D8BD;border-radius:50%;width:28px;height:28px;cursor:pointer;font-size:13px}
.bio-cc-input{width:44px;text-align:center;border:none;background:transparent;font-weight:700;font-size:15px}
.bio-cc-remove{font-size:20px;text-decoration:none}
.bio-cart-actions{margin-top:8px}
.bio-coupon{display:flex;gap:8px;margin-bottom:14px}
.bio-coupon .input-text{flex:1;border:1px solid #E8D8BD;border-radius:12px;padding:11px 14px}
.bio-cart-actions__row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.bio-cart-continue{color:#C8791A;font-weight:700}
.bio-cart-update.button{background:#fff !important;border:1px solid #E8D8BD !important;color:#3A1F0F !important}

@media(max-width:860px){
  .bio-cart-layout{grid-template-columns:1fr}
  .bio-cart-items{order:1}
  .bio-cart-summary{order:2;position:static}
  .bio-page-title{font-size:26px}
  .bio-cart-drawer{border-radius:0}
}

/* ==========================================================================
   CHECKOUT reassurance notes
   ========================================================================== */
.bio-checkout-note{background:#F8F1E6;border:1px solid #E8D8BD;border-radius:12px;padding:12px 14px;margin:12px 0 0;font-weight:600;color:#3A1F0F;font-size:14px}
.bio-checkout-note--muted{background:transparent;border:none;color:#8A7660;font-weight:500;padding:8px 2px}

/* ==========================================================================
   ARABIC RTL — global (French pages get <html dir="ltr"> automatically)
   ========================================================================== */
html[dir=rtl] body{direction:rtl;text-align:right}
html[dir=rtl] input,html[dir=rtl] textarea,html[dir=rtl] select{direction:rtl;text-align:right}
html[dir=rtl] input[type=tel],html[dir=rtl] input[type=email],html[dir=rtl] input[type=number]{direction:ltr;text-align:right}
html[dir=rtl] .woocommerce,html[dir=rtl] .woocommerce-page,html[dir=rtl] .woocommerce table,
html[dir=rtl] .woocommerce-cart,html[dir=rtl] .woocommerce-checkout,html[dir=rtl] .single-product,
html[dir=rtl] .bio-filter,html[dir=rtl] .bio-cart-drawer{direction:rtl;text-align:right}
html[dir=rtl] .woocommerce table.shop_table th,html[dir=rtl] .woocommerce table.shop_table td{text-align:right}
html[dir=ltr] body{direction:ltr;text-align:left}

/* ==========================================================================
   FIX RTL NUMBER ORDERING — prices must read left-to-right (7 300 دج),
   not reversed (300 7). The space thousands-separator triggers bidi reorder,
   so isolate every price as an LTR run.
   ========================================================================== */
.woocommerce-Price-amount,
.woocommerce-Price-amount bdi,
.woocommerce-Price-amount .woocommerce-Price-currencySymbol,
.amount,
.bio-card__price,
.bio-cc-price,
.bio-di-price,
.bio-drawer-total b,
.bio-sum-row b,
.bio-sum-total b,
.bio-checkout-note,
.order-total .amount,
td.product-total .amount,
.cart-subtotal .amount{
  direction:ltr;
  unicode-bidi:isolate;
}
.woocommerce-Price-amount{display:inline-block}
