/* MANA extras: small fixes that used to live in separate plugins (ui-fixes, shop-tools, blog-images, brand, toast, price-gap). */

/* compare is hidden for now */
.wd-compare-btn,.compare-btn-wrapper,.wd-header-compare,.wd-toolbar-compare,.wd-tools-element.wd-header-compare,.woodmart-compare-btn,a.compare,.wd-action-btn.wd-compare-btn,.wd-compare-icon,.wd-compare-count,.compare-btn,li.menu-item-compare,.wd-widget-compare{display:none!important}

/* price: small gap between the currency symbol and the number */
.price .woocommerce-Price-currencySymbol,.amount .woocommerce-Price-currencySymbol{margin-inline-end:.3em}

/* 1) Login panel: truly centred (no translate maths, works in RTL) */
@media(max-width:1024px){
  .login-form-side.wd-side-hidden{inset:0!important;margin:auto!important;width:min(92vw,420px)!important;height:fit-content!important;max-height:88vh!important;transform:scale(.96)!important;translate:none!important}
  .login-form-side.wd-side-hidden.wd-opened{transform:none!important}
}
/* 2) Cart panel text in the dark theme */
html[data-mana-theme="dark"] .cart-widget-side{background:#0F1930!important;color:#EDE6D8!important}
html[data-mana-theme="dark"] .cart-widget-side :is(.widget-heading,.wd-heading,.title,h2,h3,h4,.woocommerce-mini-cart-item,.woocommerce-mini-cart__total,.quantity,.amount,bdi,.wd-entities-title,.wd-entities-title a,.cart-info,.product-title,.variation,dt,dd,p,span,strong,small,.woocommerce-mini-cart__empty-message){color:#EDE6D8!important}
html[data-mana-theme="dark"] .cart-widget-side :is(.close-side-widget,.wd-action-btn,.remove,a.remove){color:#EDE6D8!important}
html[data-mana-theme="dark"] .cart-widget-side :is(.woocommerce-mini-cart__total,.woocommerce-mini-cart-item,.wd-heading){border-color:#2C3A5E!important}
html[data-mana-theme="dark"] .cart-widget-side .woocommerce-mini-cart__buttons a.button,html[data-mana-theme="dark"] .cart-widget-side .wd-buttons a.button{color:#0B1426!important}
/* 3) Header icons: one family (same size, ring and stroke) on phones/tablets */
@media(max-width:1024px){
  .whb-general-header :is(.whb-mobile-left,.whb-mobile-right,.whb-mobile-center){display:flex;align-items:center;gap:6px}
  .whb-general-header .wd-tools-element>a,.whb-general-header .mana-acct-btn{position:relative;width:38px!important;height:38px!important;min-width:0!important;padding:0!important;margin:0!important;display:flex!important;align-items:center;justify-content:center;border:1px solid var(--mana-line)!important;border-radius:50%!important;background:transparent!important;color:var(--mana-navy)!important}
  .whb-general-header .wd-tools-element .wd-tools-icon{margin:0!important;width:auto!important;height:auto!important;font-size:20px!important;line-height:1}
  .whb-general-header .wd-tools-element .wd-tools-icon:before{font-size:20px!important;color:inherit!important}
  .whb-general-header .wd-tools-element .wd-tools-text{display:none!important}
  .whb-general-header .wd-tools-element .wd-tools-count{position:absolute;top:-4px;inset-inline-end:-4px;min-width:16px;height:16px;line-height:16px;font-size:10px;border-radius:99px;background:var(--mana-gold)!important;color:#fff!important}
  .whb-general-header .wd-tools-element>a svg{width:20px;height:20px}
  .whb-general-header .mana-acct-btn svg{width:20px;height:20px}
  html[data-mana-theme="dark"] .whb-general-header :is(.wd-tools-element>a,.mana-acct-btn){color:#EDE6D8!important;border-color:#2C3A5E!important}
}

/* dark: page title + checkout steps */
html[data-mana-theme="dark"] :is(.wd-page-title,.page-title) :is(h1,.title,span,a,.breadcrumbs){color:#EDE6D8!important}
html[data-mana-theme="dark"] .wd-checkout-steps :is(span,a,.step-name,.step-count){color:#EDE6D8!important}
html[data-mana-theme="dark"] .wd-checkout-steps .step-inactive :is(span,a){opacity:.6}
html[data-mana-theme="dark"] button[name="update_cart"]:disabled,html[data-mana-theme="dark"] button[name="update_cart"][disabled]{background:#16223F!important;color:#9AA6C2!important;opacity:1!important;border:1px solid #2C3A5E!important}
html[data-mana-theme="dark"] .scrollToTop{background:#16223F!important;color:#EDE6D8!important;border:1px solid #2C3A5E}
/* header: no leftover gap where the hidden top bar used to be (only when the sticky placeholder is active) */
@media(min-width:1025px){header.whb-header.whb-sticky-prepared{height:101px!important;padding-top:101px!important}}
@media(max-width:1024px){
  header.whb-header.whb-sticky-prepared{height:61px!important;padding-top:61px!important}
  .whb-general-header .mana-acct-btn{height:38px!important;min-height:38px!important;max-height:38px!important}
  .mana-acct{display:flex!important;align-items:center}
  /* login panel: fits its content, no inner scrollbar or empty space */
  .login-form-side .container_woodplus{min-height:0!important;height:auto!important;padding:18px 0 22px!important}
  .login-form-side.wd-side-hidden{overflow-y:auto!important;scrollbar-width:none}
  .login-form-side.wd-side-hidden::-webkit-scrollbar{display:none}
}
/* bottom bar: labels never cut with ... */
.wd-toolbar .wd-toolbar-label{font-size:11px!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;max-width:none!important}
/* shop sidebar: the mislabelled top-rated list is hidden */
.widget_top_rated_products{display:none!important}
/* product page: variation label sits above its select, never hangs outside the box */
.variations,.variations tbody,.variations tr{display:block;width:100%}
.variations th.label,.variations td.value{display:block;width:100%;padding:0}
.variations th.label{margin:0 0 6px;text-align:start}
.variations th.label label{display:inline-block;font-weight:700}
/* cart badge hidden when the cart is empty */
.mana-zero{display:none!important}
/* account dashboard top bar: wallet amount readable on the navy bar */
.wallet-btn,.wallet-btn :is(.woocommerce-Price-amount,.woocommerce-Price-currencySymbol,bdi,span){color:#fff!important}
/* account dashboard: the side-menu handle is a clear navy edge tab labelled "منو" */
.btn_toggle__sidebar{background:#14213D!important;border:1px solid #C9A96E!important;border-right:0!important;border-radius:14px 0 0 14px!important;width:34px!important;height:70px!important;translate:12px 0;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;box-shadow:-4px 6px 18px rgba(11,20,38,.3);transition:transform .2s}
.btn_toggle__sidebar:active{transform:scale(.94)}
.btn_toggle__sidebar:focus-visible{outline:2px solid #C9A96E;outline-offset:2px}
.btn_toggle__sidebar i{color:#fff!important;font-size:18px;opacity:1!important}
.btn_toggle__sidebar::after{content:"منو";font-size:11px;font-weight:700;line-height:1;color:#fff}
@media(prefers-reduced-motion:reduce){.btn_toggle__sidebar{transition:none}}
/* account dashboard, dark theme: the "edit information" button is not a white box */
html[data-mana-theme="dark"] a.btn.link_primary{background:#16223F!important;color:#EDE6D8!important;border:1px solid #2C3A5E!important}
/* nothing may push the page sideways at any zoom level */
html,body{max-width:100%;overflow-x:clip}
img,video,iframe,svg{max-width:100%}

/* latest articles cards ([mana_latest_posts]) */
.mana-posts{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.mana-post{display:flex;flex-direction:column;gap:8px;padding:22px;border:1px solid var(--mana-line);border-radius:20px;background:var(--mana-surface);color:var(--mana-text)!important;text-decoration:none!important;transition:transform .25s,box-shadow .25s,border-color .25s}.mana-post:hover{transform:translateY(-3px);border-color:var(--mana-gold);box-shadow:0 14px 34px rgba(11,20,38,.12)}.mana-post:active{transform:scale(.99)}.mana-post:focus-visible{outline:2px solid var(--mana-gold);outline-offset:3px}.mana-post-img{display:block;margin-bottom:6px}.mana-post-img img{width:100%;height:170px;object-fit:cover;object-position:center 30%;border-radius:14px;display:block}.mana-post small{font-weight:700;opacity:.7;font-size:12px}.mana-post strong{font-size:18px;line-height:1.7;font-weight:800}.mana-post em{font-style:normal;font-size:14px;line-height:1.9;opacity:.85}.mana-post-more{margin-top:auto;font-weight:700;font-size:14px;color:var(--mana-gold)}@media(max-width:900px){.mana-posts{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){.mana-post{transition:none}}

/* shop: sort control = one tidy pill that stays inside its row */
.woocommerce-ordering{position:relative!important;height:auto!important;width:auto!important}
.woocommerce-ordering select{position:static!important;display:block!important;width:auto!important;min-width:150px;height:38px!important;padding:0 14px 0 34px!important;border:1px solid var(--mana-line,#E6DECF)!important;border-radius:19px!important;background-color:var(--mana-surface,#fff)!important;background-image: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 1.5l5 5 5-5' fill='none' stroke='%2314213D' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:left 13px center!important;color:var(--mana-text,#14213D)!important;-webkit-text-fill-color:var(--mana-text,#14213D)!important;font-size:13px!important;font-weight:700;opacity:1!important;cursor:pointer}
html[data-mana-theme="dark"] .woocommerce-ordering select{background-image: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 1.5l5 5 5-5' fill='none' stroke='%23EDE6D8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E")!important}
.woocommerce-ordering select:focus-visible{outline:2px solid var(--mana-gold,#C9A96E);outline-offset:2px}
.woocommerce-ordering::before,.woocommerce-ordering::after{display:none!important}
@media(max-width:1024px){.wd-shop-tools:last-child{align-items:center;justify-content:space-between;gap:10px;min-height:42px}}
/* product photos: every picture sits in the same square box, shown whole */
.woocommerce-product-gallery__image img:not(.zoomImg),.woocommerce-product-gallery .wd-carousel-item img:not(.zoomImg){aspect-ratio:1/1;width:100%;height:auto;object-fit:contain;background:var(--mana-surface,#fff)}
.wd-gallery-thumb img{aspect-ratio:1/1;object-fit:contain;width:100%;height:auto}
.wd-products .product-image-link img,.products .product-image-link img{aspect-ratio:1/1;width:100%;height:auto;object-fit:cover}
/* account dashboard: the menu tab sits clear of the first card */
@media(max-width:1024px){.btn_toggle__sidebar{translate:12px -58px!important}}

/* article pictures share one proportion */
article.post img[class*="attachment-"],.blog article img[class*="attachment-"],.single-post article img[class*="attachment-post-thumbnail"]{aspect-ratio:16/10!important;width:100%!important;height:auto!important;object-fit:cover;object-position:center 30%}

/* header logo: mark image + live wordmark */
.site-logo .wd-logo{display:inline-flex;align-items:center;gap:9px}.site-logo .wd-logo::before{display:none!important}.site-logo .wd-logo img{display:block!important;width:40px!important;height:40px!important;max-width:none!important;border-radius:11px;order:0;box-shadow:0 0 0 1.5px rgba(201,169,110,.75)}.whb-sticked .site-logo .wd-logo img{width:34px!important;height:34px!important}@media(max-width:1024px){.site-logo .wd-logo img{width:34px!important;height:34px!important}.site-logo .wd-logo::after{font-size:26px!important}}

/* toast message (add to cart / wishlist) */
.mana-toast{position:fixed;z-index:100000;left:50%;bottom:84px;transform:translate(-50%,20px);max-width:min(92vw,420px);width:max-content;display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:16px;background:#14213D;color:#F3ECDD;border:1px solid rgba(214,196,160,.35);box-shadow:0 10px 30px rgba(0,0,0,.35);font-size:14px;line-height:1.7;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;direction:rtl}
.mana-toast.on{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.mana-toast a{flex:none;padding:6px 14px;border-radius:999px;background:#D6C4A0;color:#14213D;font-weight:700;text-decoration:none;font-size:13px}
@media(min-width:1025px){.mana-toast{bottom:28px}}
@media(prefers-reduced-motion:reduce){.mana-toast{transition:none}}
