/* ==========================================================================
   MDT Store — polish pass from the UI/UX audit. Loaded after every other theme stylesheet so these rules win.
   Logical properties only, so English (LTR) and Arabic (RTL) share this file.
   ========================================================================== */

/* ---------- Type: buttons, inputs and the Instagram plugin used the browser fonts (Arial / Open Sans) ---------- */
button, input, select, textarea { font-family: inherit; }
.sbi_lightbox :is(div, span, p, a, button, strong), #sb_instagram :is(a, button, span) { font-family: inherit; }
h1, h2, h3 { text-wrap: balance; }
.mdt-shop div.product .product_title { text-wrap: balance; }

/* ---------- Header: fewer, slimmer bars above the content ---------- */
.mdt-wf-inner { padding-block: 3px; }
.mdt-hd-top-inner { min-height: 34px; }
.mdt-hd-top-phone a { padding-block: 4px; }
@media (max-width: 700px) {
	/* Offer bar: no repeated badge, text on its own line, then countdown and button. */
	.mdt-wf-badge { display: none; }
	.mdt-wf-text { order: 1; flex: 1 1 100%; }
	.mdt-wf-timer { order: 2; }
	.mdt-wf-cta { order: 3; margin-inline-start: auto; }
	/* Utility bar: one row with the phones and the language switch (the calculator stays in the menu). */
	.mdt-hd-top .mdt-calc-nav-top { display: none; }
	.mdt-hd-top .mdt-hd-top-end:has(.mdt-calc-nav-top) { flex: 1 1 100%; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding-block: 4px; }
	.mdt-hd-top-inner { min-height: 0; }
}
@media (pointer: coarse) {
	.mdt-hd-top-link, .mdt-hd-top-phone a { padding-block: 6px; }
}
@media (max-width: 700px) {
	/* Phones and language switch share one row (214 + 162 px did not fit in 358). */
	.mdt-hd-top .mdt-hd-top-phone { font-size: .8rem; }
	.mdt-hd-top .mdt-lang-switch > svg, .mdt-hd-top .mdt-lang-switch > .mdt-lang-globe { display: none; }
}

/* ---------- Home slider: 10 px dots were hard to tap; the visible dot is unchanged, the target is 24 px ---------- */
.mdt-slider-nav { gap: 0; }
.mdt-slider-nav .mdt-slider-dot { position: relative; width: 24px; height: 24px; background: transparent; }
.mdt-slider-nav .mdt-slider-dot::before { content: ""; position: absolute; inset-block-start: 7px; inset-inline-start: 7px; width: 10px; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .45); transition: width .25s var(--mdt-ease), background-color .25s; }
.mdt-slider-nav .mdt-slider-dot.is-active { width: 46px; background: transparent; }
.mdt-slider-nav .mdt-slider-dot.is-active::before { width: 28px; background: #fff; }
.mdt-slider-nav .mdt-slider-dot:focus-visible { outline: 2px solid #fff; outline-offset: -2px; border-radius: 999px; }

/* ---------- Home: category row on phones ---------- */
@media (max-width: 600px) {
	.mdt-store-home #categories .mdt-cat-tile-media { width: min(80px, 100%); padding: 10px; }
	.mdt-store-home #categories .mdt-cat-tile-name { display: -webkit-box; overflow: hidden; font-size: .8rem; line-height: 1.3; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
}

/* ---------- Product cards ---------- */
/* Photos with a white background melt into the white card instead of showing a box inside a tinted box. */
.woocommerce ul.products li.product a img { background: #fff; mix-blend-mode: multiply; }
/* Add to cart: label centred (it was left-aligned in a full-width pill). */
.woocommerce ul.products li.product .button { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
/* Three lines keep the model number readable instead of cutting the name. */
.woocommerce ul.products li.product .woocommerce-loop-product__title { -webkit-line-clamp: 3; }
/* Sale badge: white on the brand orange was 2.7:1; a deeper orange passes (5.2:1). */
.woocommerce span.onsale, .woocommerce ul.products li.product .onsale, .mdt-shop div.product span.onsale { background: #C2410C; }
/* Dollar equivalent: a little larger and darker. */
.woocommerce ul.products li.product .mdt-usd-amount { font-size: .84rem; color: #46566A; }
/* Wishlist and compare buttons: 40 px on touch screens. */
@media (pointer: coarse) {
	.woocommerce ul.products li.product .mdt-card-tools .mdt-tool { width: 40px; height: 40px; }
}
/* Phones: the dollar amount always sits under the price, so every card reads the same way. */
@media (max-width: 640px) {
	.woocommerce ul.products li.product .mdt-price-row { flex-direction: column; align-items: flex-start; gap: 2px; }
	.woocommerce ul.products li.product .mdt-usd { align-items: flex-start; text-align: start; }
}

/* ---------- Product page ---------- */
/* Photo and summary live in their own block (see mdt_pl_single_top), so the sticky photo stops at the end of that block
   instead of floating over Overview, Specifications and Related products. */
.mdt-shop div.product { display: block; }
.mdt-shop div.product > .mdt-pd-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.mdt-shop div.product span.onsale { inset-block-start: 16px; inset-inline-start: 16px; }
@media (max-width: 900px) { .mdt-shop div.product > .mdt-pd-top { grid-template-columns: minmax(0, 1fr); } }
/* WooCommerce's clearfix pseudo-elements became flex items and added 12 px of gap on both sides of the form. */
.mdt-shop div.product form.cart::before, .mdt-shop div.product form.cart::after { content: none; display: none; }
.mdt-shop div.product form.cart .quantity { margin: 0; }
/* Empty review section: a short invitation instead of a full form. */
.mdt-pd-reviews.is-empty { display: grid; gap: 12px; justify-items: start; }
.mdt-pd-reviews.is-empty .woocommerce-noreviews { margin: 0; color: var(--mdt-muted); }
.mdt-rv-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: .6em 1.4em; border: 1px solid var(--mdt-primary); border-radius: 999px; background: #fff; color: var(--mdt-primary-strong); font-weight: 600; cursor: pointer; }
.mdt-rv-toggle:hover, .mdt-rv-toggle[aria-expanded="true"] { background: var(--mdt-primary-tint); }
.mdt-pd-reviews.is-empty #review_form_wrapper { width: 100%; }

/* ---------- Floating buttons ---------- */
.mdt-whatsapp-float { width: 52px; height: 52px; inset-inline-end: 16px; transition: transform .2s var(--mdt-ease), opacity .2s; }
.mdt-to-top { width: 40px; height: 40px; inset-inline-end: 22px; }
@media (min-width: 901px) { .mdt-to-top { inset-block-end: 80px; } }
/* Product page on phones: the sticky buy bar sits above the bottom menu, so the button rises above it instead of covering "Add to cart". */
@media (max-width: 900px) { body:has([data-mdt-buybar]:not([hidden])) .mdt-to-top { inset-block-end: calc(88px + var(--mdt-bottom-nav)); } }
/* Near the footer the contact details are on the page, so the WhatsApp button steps aside. */
.mdt-ft-in-view .mdt-whatsapp-float { opacity: 0; pointer-events: none; transform: scale(.9); }

/* ---------- Footer links: 20 px tall targets ---------- */
.mdt-ft-links { gap: 4px; }
.mdt-ft-links a { display: inline-block; padding-block: 5px; }
