/* Meshkah theme — layout details that theme.json can't express. */

:root {
	--mk-radius: 14px;
	--mk-line: var(--wp--preset--color--line);
	--mk-muted: var(--wp--preset--color--muted);
	--mk-accent: var(--wp--preset--color--accent);
	--mk-accent-soft: var(--wp--preset--color--accent-soft);
}

body { -webkit-font-smoothing: antialiased; }
/* "اطلب دلوقتي" and other in-page links glide instead of jumping. */
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
img { height: auto; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }

/* ---------- Header ---------- */
.mk-topbar p { margin: 0; }
.mk-header { position: sticky; top: 0; z-index: 50; background: var(--wp--preset--color--base); border-bottom: 1px solid var(--mk-line); }
.mk-header-row { gap: 20px; padding-block: 12px; }
.mk-logo { margin: 0; flex: none; }
.mk-search { flex: 1 1 auto; max-width: 560px; margin: 0; }
.mk-search .wp-block-search__inside-wrapper { background: var(--wp--preset--color--surface); border: 0; border-radius: 12px; padding: 0 6px 0 0; min-height: 48px; }
.mk-search .wp-block-search__input { border: 0; background: transparent; font-family: inherit; font-size: 16px; padding-inline: 14px; min-height: 48px; }
.mk-search .wp-block-search__input:focus { outline: none; }
.mk-search .wp-block-search__inside-wrapper:focus-within { outline: 2px solid var(--mk-accent); outline-offset: 1px; }
.mk-search .wp-block-search__button { background: transparent; color: var(--wp--preset--color--contrast); padding: 0 12px; margin: 0; }
.mk-header-icons { gap: 4px; flex: none; }
.mk-header-icons .wc-block-mini-cart__button,
.mk-header-icons .wc-block-customer-account a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 760px) {
	.mk-header-row { flex-wrap: wrap !important; }
	.mk-search { order: 3; flex-basis: 100%; max-width: none; }
}

/* ---------- Shared bits ---------- */
.mk-section { padding-block: var(--wp--preset--spacing--50); }
.mk-eyebrow { margin-bottom: 0; }
.mk-price { font-size: 30px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 8px 0 20px; }
.mk-price strong { font-weight: 700; }
.mk-price s { color: var(--mk-muted); font-size: 18px; }
.mk-save { background: var(--mk-accent-soft); color: var(--mk-accent); font-size: 14px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.mk-cta .wp-block-button__link { min-height: 52px; display: inline-flex; align-items: center; }

.mk-ticks, .mk-check-list, .mk-x-list, .mk-plain-list { list-style: none; padding: 0; margin: 0; }
.mk-ticks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; color: var(--mk-muted); }
.mk-ticks li, .mk-check-list li, .mk-x-list li { position: relative; padding-inline-start: 26px; }
.mk-check-list li, .mk-x-list li { margin-bottom: 12px; }
.mk-ticks li::before, .mk-check-list li::before, .mk-x-list li::before {
	content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 16px; height: 16px;
	background: var(--mk-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mk-x-list li::before {
	background: #B42318;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}
.mk-plain-list li { margin-bottom: 6px; color: var(--mk-muted); }

/* ---------- Home (store-wide, not tied to one product) ---------- */
.mk-home-hero { text-align: center; background: var(--mk-accent-soft); border-radius: 24px; margin-top: 24px !important; padding: 56px 20px; }
.mk-home-hero h1 { margin: 6px 0 12px; font-size: clamp(30px, 5vw, 46px); line-height: 1.3; }
.mk-home-hero p { margin-top: 0; }
.mk-perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px !important; }
.mk-perk { border: 1px solid var(--mk-line); border-radius: 16px; padding: 18px 20px; margin: 0 !important; }
.mk-perk p { margin: 0; }
.mk-perk-title { font-weight: 700; font-size: 18px; color: var(--mk-accent); margin-bottom: 4px !important; }
.mk-home-products > h2 { margin-bottom: 24px; }
.mk-cards .wc-block-product { background: var(--wp--preset--color--base); border: 1px solid var(--mk-line); border-radius: 16px; padding: 12px 12px 16px; text-align: center; }
.mk-cards .wc-block-components-product-image img { border-radius: 12px; aspect-ratio: 1 / 1; object-fit: cover; }
.mk-cards .wp-block-post-title { margin: 12px 0 6px; line-height: 1.5; }
.mk-cards .wp-block-post-title a { color: inherit; text-decoration: none; }
.mk-cards .wc-block-components-product-price { font-weight: 700; color: var(--mk-accent); }
.mk-cards .wc-block-components-product-price del { color: var(--mk-muted); font-weight: 400; font-size: .85em; }
.mk-cards .wc-block-components-product-price ins { text-decoration: none; }
.mk-cards .wp-block-button__link { width: 100%; min-height: 48px; border-radius: 16px; font-weight: 700; }
.mk-more { margin-top: 24px; }
.mk-more .wp-block-button__link { border-radius: 16px; min-height: 48px; padding-inline: 32px; }
.mk-home .mk-faq .wp-block-details { border: 1px solid var(--mk-line); border-radius: var(--mk-radius); padding: 14px 18px; margin-top: 10px; }
.mk-steps { gap: 16px !important; }
.mk-step { border: 1px solid var(--mk-line); border-radius: var(--mk-radius); padding: 20px; }
.mk-step h3 { margin: 0; }
.mk-step-num { margin: 0; color: var(--mk-accent); font-weight: 700; font-size: 22px; }
.wp-block-details summary { cursor: pointer; font-weight: 700; font-size: 17px; }
.wp-block-details summary::marker { color: var(--mk-accent); }

@media (max-width: 781px) {
	.mk-home-hero { padding: 36px 16px; margin-top: 16px !important; }
	.mk-perks { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.mk-perk { padding: 14px 16px; }
	.mk-cards .wc-block-product-template { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
	.mk-cards .wp-block-post-title { font-size: 15px !important; }
}

/* ---------- Product page ---------- */
.mk-product-page { padding-bottom: var(--wp--preset--spacing--60); }
.mk-product { margin-top: 24px; align-items: flex-start; }
.mk-faq h2 { text-align: center; }
.mk-faq details p { margin: 10px 0 0; color: var(--mk-muted); }
.mk-summary > * + * { margin-top: 14px; }
.mk-summary .wp-block-post-title { margin: 0; }
.mk-product-price .price, .mk-product-price { font-weight: 700; }
.mk-product-price del { color: var(--mk-muted); font-size: .65em; font-weight: 400; }
.mk-product-price ins { text-decoration: none; }
.mk-gallery .woocommerce-product-gallery__image img { border-radius: var(--mk-radius); }
.mk-gallery .flex-control-thumbs { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px !important; padding: 0; }
.mk-gallery .flex-control-thumbs li { width: auto !important; margin: 0 !important; list-style: none; }
.mk-gallery .flex-control-thumbs img { border-radius: 10px; opacity: .6; cursor: pointer; }
.mk-gallery .flex-control-thumbs img.flex-active { opacity: 1; outline: 2px solid var(--mk-accent); outline-offset: -2px; }
.mk-alt-cart { border-top: 1px solid var(--mk-line); padding-top: 14px; }
.mk-alt-cart p { margin: 0 0 8px; }
.mk-alt-cart form.cart { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.mk-alt-cart .quantity input { min-height: 48px; width: 70px; border: 1px solid #CBD2D0; border-radius: 12px; text-align: center; font-family: inherit; font-size: 16px; }
.mk-alt-cart .single_add_to_cart_button { background: var(--mk-accent-soft) !important; color: var(--mk-accent) !important; border-radius: 12px; min-height: 48px; font-family: inherit; font-weight: 700; padding: 0 22px; border: 0; }
.mk-details { margin-top: var(--wp--preset--spacing--50); }
.mk-details .wc-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 0; border-bottom: 1px solid var(--mk-line); }
.mk-details .wc-tabs li { list-style: none; margin: 0; }
.mk-details .wc-tabs li a { display: inline-block; padding: 10px 16px; font-weight: 700; color: var(--mk-muted); }
.mk-details .wc-tabs li.active a { color: var(--wp--preset--color--contrast); box-shadow: inset 0 -3px 0 var(--mk-accent); }

/* ---------- Product story (the product's own description, written as landing sections) ---------- */
.mk-product-story { margin-top: 0; }
.mk-story { padding-block: var(--wp--preset--spacing--50); }
.mk-story > h2 { text-align: center; margin-bottom: 8px; }
.mk-story > .mk-story-sub { text-align: center; color: var(--mk-muted); margin-top: 0; }
.mk-pain-cards { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.mk-pain-cards li { position: relative; background: #FEF3F2; border: 1px solid #FBD5D1; border-radius: var(--mk-radius); padding: 16px 52px 16px 16px; font-weight: 600; }
.mk-pain-cards li::before { content: ""; position: absolute; inset-inline-start: 16px; top: 18px; width: 22px; height: 22px; border-radius: 50%; background: #B42318 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 12px no-repeat; }
.mk-callout { background: var(--mk-accent-soft); border-radius: 20px; padding: 28px 24px; text-align: center; }
.mk-callout h3 { color: var(--mk-accent); margin: 0 0 8px; font-size: 24px; }
.mk-callout p { margin: 0; }
.mk-for-card { background: var(--wp--preset--color--surface); border-radius: 20px; padding: 24px; }
.mk-product-story .wp-block-details { background: #fff; border: 1px solid var(--mk-line); border-radius: var(--mk-radius); padding: 14px 18px; margin-top: 10px; }
.mk-final-cta .wp-block-button__link { min-height: 56px; display: inline-flex; align-items: center; font-size: 18px; }

/* ---------- Footer (dark) ---------- */
.mk-footer { background: #0F2421; color: #DCE6E4; margin-top: var(--wp--preset--spacing--60) !important; }
.mk-footer .wp-block-site-title a { color: #fff !important; }
.mk-footer h3 { margin: 0 0 8px; color: #fff; }
.mk-footer .has-muted-color, .mk-footer .mk-plain-list li { color: #A9BAB7 !important; }
.mk-footer a { color: #DCE6E4; }
.mk-copy { margin-top: 24px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; }
/* Room for the mobile sticky order bar belongs inside the dark footer, not as a white strip under it. */
@media (max-width: 760px) {
	body.single-product { padding-bottom: 0 !important; }
	body.single-product .mk-footer { padding-bottom: 96px !important; }
}

/* Phone numbers are LTR (+20…); without this the plus sign jumps to the end in RTL. */
.woocommerce-customer-details--phone, .wc-block-components-address-card__address-section--phone { direction: ltr; unicode-bidi: isolate; text-align: right; }
