/* ==========================================================================
   بيت الرواء — Bayt Alrawaa design system (Glozin child)
   1. Tokens          5. Product cards       9.  CodWoo (WooForm) skin
   2. Base / type     6. Shop & filters      10. Footer
   3. Header          7. Single product      11. Pages & utilities
   4. Home sections   8. Cart / checkout     12. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
	/* Palette */
	--rawaa-ink: #2E2A24;
	--rawaa-text: #5C5248;
	--rawaa-muted: #7D6F62;
	--rawaa-olive: #4F5B45;
	--rawaa-olive-dark: #3F4A37;
	--rawaa-olive-deep: #2F3829;
	--rawaa-walnut: #7A5236;
	--rawaa-terra: #A4523A;
	--rawaa-gold: #B08A57;
	--rawaa-sand: #EADFCB;
	--rawaa-cream: #F5EEE2;
	--rawaa-ivory: #FBF8F3;
	--rawaa-white: #FFFFFF;
	--rawaa-sage-soft: #E8ECDF;
	--rawaa-blush-soft: #F6E9DF;
	--rawaa-border: #E6DCCB;
	--rawaa-border-strong: #D6C8B1;
	--rawaa-success: #3E7B4F;
	--rawaa-danger: #B3402E;

	/* Radius & elevation */
	--rawaa-radius-sm: 8px;
	--rawaa-radius: 14px;
	--rawaa-radius-lg: 20px;
	--rawaa-radius-pill: 999px;
	--rawaa-shadow-sm: 0 1px 2px rgba(46, 42, 36, .06), 0 2px 8px rgba(46, 42, 36, .05);
	--rawaa-shadow: 0 10px 30px -12px rgba(46, 42, 36, .22);

	/* Spacing scale */
	--rawaa-space-1: 4px;
	--rawaa-space-2: 8px;
	--rawaa-space-3: 12px;
	--rawaa-space-4: 16px;
	--rawaa-space-5: 24px;
	--rawaa-space-6: 32px;
	--rawaa-space-7: 48px;
	--rawaa-space-8: 72px;
	--rawaa-section: clamp(48px, 7vw, 96px);

	/* Type */
	--rawaa-font: 'Alexandria', 'Segoe UI', Tahoma, sans-serif;
	--rawaa-fs-body: 15px;
	--rawaa-fs-small: 13px;

	/* Map onto Glozin tokens so theme + CodWoo Glozin skin follow the brand. */
	--gz-body-font: var(--rawaa-font);
	--gz-heading-font: var(--rawaa-font);
	--gz-body-font-size: var(--rawaa-fs-body);
	--gz-body-line-height: 1.8;
	--gz-color-base: var(--rawaa-text);
	--gz-color-dark: var(--rawaa-ink);
	--gz-color-primary: var(--rawaa-walnut);
	--gz-color-grey: var(--rawaa-muted);
	--gz-color-light-grey: var(--rawaa-cream);
	--gz-color-dark-grey: rgba(46, 42, 36, .62);
	--gz-color-price-sale: var(--rawaa-terra);
	--gz-link-color: var(--rawaa-ink);
	--gz-link-color-hover: var(--rawaa-walnut);
	--gz-header-color: var(--rawaa-ink);
	--gz-border-color: var(--rawaa-border);
	--gz-heading-color: var(--rawaa-ink);
	--gz-heading-font-weight: 700;
	--gz-heading-letter-spacing: 0;
	--gz-heading-line-height: 1.45;
	--gz-subheading-font-weight: 600;
	--gz-button-color: var(--rawaa-ivory);
	--gz-button-bg-color: var(--rawaa-olive-dark);
	--gz-button-bg-color-hover: var(--rawaa-olive-deep);
	--gz-button-color-hover: var(--rawaa-ivory);
	--gz-button-eff-bg-color-hover: var(--rawaa-olive-deep);
	--gz-button-font-weight: 600;
	--gz-button-font-size: 15px;
	--gz-input-color: var(--rawaa-ink);
	--gz-input-border-color: var(--rawaa-border-strong);
	--gz-input-border-color-hover: var(--rawaa-walnut);
	--gz-input-rounded: 12px;
	--gz-input-font-size: 15px;
	--gz-input-placeholder-font-size: 14px;
	--gz-input-placeholder-color: rgba(46, 42, 36, .5);
	--gz-image-rounded: var(--rawaa-radius);
	--gz-rounded-md: var(--rawaa-radius);
	--gz-rounded-sm: var(--rawaa-radius-sm);
}

/* 2. Base / typography ----------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }
body {
	background-color: var(--rawaa-ivory);
	font-family: var(--rawaa-font);
	color: var(--rawaa-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
body, button, input, select, optgroup, textarea,
.gz-button, .button, .glozin-button,
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.heading-letter-spacing, .primary-navigation .nav-menu > li > a,
.woocommerce-loop-product__title, .product_title, .price {
	font-family: var(--rawaa-font);
}
h1, .h1 { font-weight: 800; }
h2, .h2 { font-weight: 700; }
h3, .h3 { font-weight: 700; }
h4, h5, h6, .h4, .h5, .h6 { font-weight: 600; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { letter-spacing: 0; line-height: 1.45; }
/* Letter-spacing and uppercase have no meaning in Arabic script. */
.rtl .heading-letter-spacing, .rtl .text-uppercase, .rtl [class*="letter-spacing"] { letter-spacing: 0 !important; }
.rtl .text-uppercase { text-transform: none; }
p { line-height: 1.9; }
a { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
::selection { background: var(--rawaa-sand); color: var(--rawaa-ink); }

/* Numbers, prices and codes stay left-to-right inside RTL text. */
.rtl .woocommerce-Price-amount bdi,
.rtl .codwo-btn-price,
.rtl .codwo-price,
.rtl input[type="tel"] { unicode-bidi: isolate; }
.rtl input[type="tel"] { direction: ltr; text-align: right; }

/* Accessible focus ring everywhere (keyboard only). */
:focus { outline: none; }
:focus-visible {
	outline: 2px solid var(--rawaa-walnut);
	outline-offset: 2px;
	border-radius: 4px;
}
.screen-reader-text:focus { clip: auto !important; }

/* Buttons: pill, solid olive; consistent states. */
.gz-button, .button, button.button, a.button, input[type="submit"], .glozin-button.gz-button {
	border-radius: var(--rawaa-radius-pill);
	font-weight: 600;
	letter-spacing: 0;
	min-height: 48px;
}
.gz-button:disabled, .button:disabled, .button.disabled { opacity: .55; cursor: not-allowed; }

/* Forms */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="search"],
input[type="password"], input[type="url"], select, textarea {
	border-radius: 12px;
	min-height: 48px;
	font-size: 15px;
	background-color: var(--rawaa-white);
}
textarea { min-height: 120px; }

/* Images */
img { image-rendering: auto; }

/* 3. Header ---------------------------------------------------------------- */
.campaign-bar { font-size: 13px; font-weight: 500; }
.campaign-bar a { text-decoration: underline; text-underline-offset: 3px; }
.site-header { background-color: var(--rawaa-ivory); }
.header-logo > a svg { display: block; height: auto; max-width: 100%; }
.rawaa-header-note { display: flex; gap: 18px; font-size: 13px; color: var(--rawaa-muted); white-space: nowrap; }
.rawaa-header-note span { display: inline-flex; align-items: center; gap: 8px; }
.rawaa-header-note span::before {
	content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rawaa-gold); display: inline-block;
}
.primary-navigation .nav-menu > li > a { font-size: 15px; font-weight: 500; }
.primary-navigation .nav-menu > li.current-menu-item > a,
.primary-navigation .nav-menu > li.current-menu-ancestor > a { color: var(--rawaa-walnut); }
.primary-navigation .sub-menu { border-radius: var(--rawaa-radius); box-shadow: var(--rawaa-shadow); }

/* 4. Home sections ---------------------------------------------------------- */
.rawaa-occasions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; }
.rawaa-occasions__title { font-weight: 600; color: var(--rawaa-ink); }
.rawaa-occasions__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rawaa-chip {
	display: inline-flex; align-items: center; min-height: 40px; padding: 6px 18px;
	border: 1px solid var(--rawaa-border-strong); border-radius: var(--rawaa-radius-pill);
	background: var(--rawaa-white); color: var(--rawaa-ink); font-size: 14px; font-weight: 500;
}
.rawaa-chip:hover, .rawaa-chip:focus-visible { border-color: var(--rawaa-olive-dark); background: var(--rawaa-olive-dark); color: var(--rawaa-ivory); }

/* 5. Product cards ---------------------------------------------------------- */
ul.products li.product .woocommerce-loop-product__title { font-size: 15px; font-weight: 600; line-height: 1.6; }
ul.products li.product .price { font-size: 15px; font-weight: 700; color: var(--rawaa-ink); }
ul.products li.product .price del { color: var(--rawaa-muted); font-weight: 400; font-size: 13px; }
ul.products li.product .price ins { color: var(--rawaa-terra); text-decoration: none; }
ul.products li.product .product-thumbnail { background: var(--rawaa-cream); border-radius: var(--rawaa-radius); overflow: hidden; }
ul.products li.product .product-thumbnail img { object-fit: cover; }

/* 7. Single product --------------------------------------------------------- */
.rawaa-trust {
	list-style: none; margin: 20px 0 0; padding: 4px 18px;
	border: 1px solid var(--rawaa-border); border-radius: var(--rawaa-radius);
	background: var(--rawaa-white);
}
.rawaa-trust__item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; }
.rawaa-trust__item + .rawaa-trust__item { border-top: 1px solid var(--rawaa-border); }
.rawaa-trust .rawaa-icon { flex: 0 0 auto; color: var(--rawaa-olive); margin-top: 2px; }
.rawaa-trust__text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.7; }
.rawaa-trust__text strong { color: var(--rawaa-ink); font-weight: 600; }
.rawaa-trust__text a { color: var(--rawaa-walnut); text-decoration: underline; text-underline-offset: 3px; }
.rawaa-tab-content ul { padding-inline-start: 20px; }
.rawaa-tab-content li { margin-bottom: 6px; }
.rawaa-faq__q { font-size: 15px; font-weight: 600; margin: 18px 0 6px; color: var(--rawaa-ink); }
.rawaa-faq__q:first-child { margin-top: 0; }
.rawaa-faq__a { margin: 0; }

/* 9. CodWoo (WooForm) ------------------------------------------------------- */
/* Honeypot: CodWoo parks it at left:-10000px, which in an RTL document becomes
   scrollable overflow (10 000px-wide pages on phones). Same trap, no offset. */
.codwo-product-form-wrapper .codwo-hp,
.rtl .codwo-product-form-wrapper .codwo-hp {
	position: absolute !important;
	left: auto !important;
	right: auto !important;
	inset-inline-start: 0 !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* 5b. Cards: no empty stars for unrated products; empty counters hidden. */
.rawaa-no-rating .glozin-rating { display: none !important; }
.header-counter.empty-counter { display: none; }

/* 4b. Typography scale for section headings (Elementor + Glozin widgets). */
.elementor-widget-glozin-heading h2.glozin-heading,
.elementor-widget-glozin-heading .glozin-heading.h2,
.elementor-widget-glozin-heading h2 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; line-height: 1.4; }
.rawaa-why-item .glozin-icon-box__title,
.rawaa-why-item h3 { font-size: 17px !important; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }
.rawaa-why-item .glozin-icon-box__description,
.rawaa-why-item .glozin-icon-box__content p { font-size: 14px; line-height: 1.8; color: var(--rawaa-text); }

/* Hero: secondary CTA as outline. */
.glozin-slide__button.glozin-button__second {
	background-color: transparent !important;
	color: var(--rawaa-olive-dark) !important;
	border: 1.5px solid var(--rawaa-olive-dark) !important;
}
.glozin-slide__button.glozin-button__second:hover,
.glozin-slide__button.glozin-button__second:focus-visible {
	background-color: var(--rawaa-olive-dark) !important;
	color: var(--rawaa-ivory) !important;
}
.glozin-slide__before-title, .glozin-slide .glozin-slide__before-title { letter-spacing: 0; }

/* Sale badge: keep "-15%" readable in RTL. */
.woocommerce-badge.onsale { direction: ltr; unicode-bidi: isolate; background-color: var(--rawaa-terra); }
.woocommerce-badge.sold-out, .woocommerce-badge.soldout { background-color: var(--rawaa-ink); }

/* One clear primary action on phones: on product pages CodWoo's sticky order
   bar replaces the bottom navigation bar. */
@media (max-width: 1199px) {
	.single-product .glozin-mobile-navigation-bar { display: none !important; }
	.single-product { --gz-navigation-bar-height: 0px; }
	.codwo-sticky-cta { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}
.codwo-sticky-cta__btn { font-weight: 700; min-height: 48px; border-radius: var(--rawaa-radius-pill) !important; }
.codwo-sticky-cta__price { font-weight: 700; }

/* 11. Pages & utilities ------------------------------------------------------ */
/* Long-form pages (policies, offers intro): comfortable reading measure.
   Product grids from shortcodes keep the full container width. */
.page:not(.elementor-page) .entry-content > *:not(.woocommerce):not(.alignwide):not(.alignfull) {
	max-width: 820px;
	margin-inline: auto;
}
.page:not(.elementor-page) .entry-content { font-size: 16px; line-height: 1.95; }
.page:not(.elementor-page) .entry-content h2,
.page:not(.elementor-page) .entry-content .wp-block-heading {
	font-size: clamp(19px, 2vw, 23px);
	font-weight: 700;
	margin-top: 2.2em;
	margin-bottom: .6em;
	color: var(--rawaa-ink);
}
.page:not(.elementor-page) .entry-content ul { padding-inline-start: 1.3em; }
.page:not(.elementor-page) .entry-content li { margin-bottom: .45em; }
.page:not(.elementor-page) .entry-content a,
.elementor-widget-text-editor a { color: var(--rawaa-walnut); text-decoration: underline; text-underline-offset: 3px; }
.page:not(.elementor-page) .entry-content .woocommerce a { text-decoration: none; }
.rawaa-note, .rawaa-updated { font-size: 13px !important; color: var(--rawaa-muted); }
.rawaa-lead { font-size: 17px; color: var(--rawaa-text); margin-bottom: 32px !important; }
.rawaa-offers-more { margin-top: 32px; }

/* About */
.rawaa-about-intro .elementor-widget-text-editor { text-align: center; }
.rawaa-about-img img, .rawaa-kids__img img { border-radius: var(--rawaa-radius-lg); }

/* Contact details list (filled from the Customizer). */
.rawaa-contact-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.rawaa-contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.rawaa-contact-list .rawaa-icon { color: var(--rawaa-olive); flex: 0 0 auto; margin-top: 3px; }
.rawaa-contact-list li > span { display: flex; flex-direction: column; font-size: 15px; }
.rawaa-contact-list strong { color: var(--rawaa-ink); font-weight: 600; }
.rawaa-contact-list a { color: var(--rawaa-walnut); }
.rawaa-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Floating WhatsApp (only rendered when a number is set). */
.rawaa-wa-float {
	position: fixed; z-index: 90; inset-inline-start: 18px;
	bottom: calc(18px + env(safe-area-inset-bottom));
	width: 54px; height: 54px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: #2E7D4F; color: #fff; box-shadow: var(--rawaa-shadow);
}
@media (max-width: 1199px) { .rawaa-wa-float { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* 10. Footer ------------------------------------------------------------------ */
.site-footer, .glozin-footer { background-color: var(--rawaa-cream); }
.rawaa-footer-logo img { width: 190px; height: auto; display: block; }
.rawaa-footer-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--rawaa-text); }
.rawaa-footer-facts li { display: flex; align-items: center; gap: 8px; }
.rawaa-footer-facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rawaa-gold); }
.rawaa-footer-pay { margin: 0; font-size: 14px; color: var(--rawaa-text); }
.glozin-navigation-menu .glozin-navigation-menu__title,
.elementor-widget-glozin-navigation-menu h2 { font-size: 16px !important; font-weight: 700; color: var(--rawaa-ink); }
.elementor-widget-glozin-navigation-menu a { font-size: 14px; color: var(--rawaa-text); }
.elementor-widget-glozin-navigation-menu a:hover { color: var(--rawaa-walnut); }

/* Story panel & kids panel finishing. */
.rawaa-story { overflow: hidden; }
.rawaa-kids .glozin-products-carousel ul.products li.product .product-thumbnail { background: var(--rawaa-white); }

/* Photographic hero + banners: a soft ivory fade behind text keeps contrast
   over light walls and leaf shadows without dimming the products. */
.rawaa-hero .glozin-slide,
.rawaa-hero .glozin-slides-elementor__item { position: relative; }
.rawaa-hero .glozin-slides-elementor__item::after {
	content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
	background: linear-gradient(90deg, rgba(38, 31, 22, .66) 0%, rgba(38, 31, 22, .42) 34%, rgba(38, 31, 22, 0) 62%);
}
.rawaa-hero .glozin-slide { z-index: 2; }
.rawaa-hero .glozin-slide__title { text-shadow: 0 1px 14px rgba(20, 15, 8, .25); }
.rawaa-hero .glozin-slide__description { text-shadow: 0 1px 10px rgba(20, 15, 8, .3); }
@media (max-width: 767px) {
	.rawaa-hero .glozin-slides-elementor__item::after {
		background: linear-gradient(180deg, rgba(38, 31, 22, .72) 0%, rgba(38, 31, 22, .5) 40%, rgba(38, 31, 22, 0) 66%);
	}
}
.rawaa-banner .glozin-banner__wrapper::before,
.rawaa-banner .glozin-banner::before {
	content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
	background: linear-gradient(270deg, rgba(38, 31, 22, .68) 0%, rgba(38, 31, 22, .36) 42%, rgba(38, 31, 22, 0) 72%);
}
.rawaa-banner--top .glozin-banner__wrapper::before,
.rawaa-banner--top .glozin-banner::before {
	background: linear-gradient(180deg, rgba(38, 31, 22, .66) 0%, rgba(38, 31, 22, .32) 38%, rgba(38, 31, 22, 0) 62%);
}
.rawaa-banner .glozin-banner__content { position: relative; z-index: 2; }
.rawaa-banner .glozin-banner__title, .rawaa-banner .glozin-banner__description { text-shadow: 0 1px 12px rgba(20, 15, 8, .3); }
@media (min-width: 768px) and (max-width: 1199px) {
	.rawaa-hero .glozin-slides-elementor__item::after {
		background: linear-gradient(90deg, rgba(38, 31, 22, .62) 0%, rgba(38, 31, 22, .5) 50%, rgba(38, 31, 22, .3) 100%);
	}
}
.header-logo img { height: auto; max-height: 64px; width: auto; }
@media (max-width: 1199px) { .header-logo img { max-height: 46px; } }

/* 8. Cart / checkout: a single Morocco-wide rate needs no "shipping to <region>" line. */
.woocommerce-shipping-destination { display: none; }
@media (max-width: 1199px) {
	.site-header__mobile .header-logo img { max-height: 42px; max-width: min(46vw, 180px); object-fit: contain; }
}
@media (max-width: 380px) {
	.site-header__mobile .header-logo img { max-height: 34px; max-width: 44vw; }
	.site-header__mobile .header-items { gap: 6px; }
}

/* Off-canvas panels (cart, menu, filters) and their popovers are 350px wide in
   Glozin; on 320–349px phones that widened the layout viewport. */
.offscreen-panel .panel__container,
.offscreen-panel > .panel__container,
.glozin-note-estimate-coupon__popover,
.popover.note-popover, .popover.discount-popover {
	max-width: 100vw;
}
@media (max-width: 380px) {
	.offscreen-panel .panel__container { width: 92vw; }
	.site-header__mobile .header-wishlist { display: none; } /* also in the bottom bar */
	.site-header__mobile .site-header__container { padding-inline: 10px; }
}
html { overflow-x: clip; }
