/*
 Theme Name:   Bfres Child
 Description:  NUDAR Naturals premium brand layer on top of Bfres
 Author:       NUDAR Naturals
 Template:     bfres
 Version:      1.4.17
 Text Domain:  bfres-child
*/

@import url('fonts/fonts.css');

/* The parent theme mirrors control positions in RTL but keeps LTR glyphs. */
html[dir="rtl"] .slick-carousel:not(.vertical) > .slick-arrow > i,
html[dir="rtl"] :is(.post-navigation, .goal-pagination, .woocommerce-pagination, .widget_shopping_cart_content) :is(.icon-arrow-left, .icon-arrow-right),
html[dir="rtl"] .breadcrumb > :is(li, a) + :is(li, a)::before {
	display: inline-block;
	transform: scaleX(-1);
}

/* Open each drawer from the same side as its language-specific trigger. */
html[dir="rtl"] #goal-mobile-menu {
	left: auto;
	right: 0;
	transform: translateX(100%);
}
html[dir="rtl"] .goal-topcart .offcanvas-content {
	left: 0;
	right: auto;
	transform: translateX(-100%);
}
html[dir="rtl"] #goal-mobile-menu.active,
html[dir="rtl"] .goal-topcart .offcanvas-content.active {
	transform: translateX(0);
}

.nudar-product-info {
	max-width: 920px;
	margin: 0 auto clamp(32px, 5vw, 64px);
	text-align: start;
}
.nudar-product-info section > h2:first-child {
	font-size: clamp(22px, 3vw, 28px);
	margin-block: 0 16px;
}
.nudar-product-description > h2 + h2 { font-size: clamp(18px, 2.4vw, 22px); }
.nudar-product-info ul { padding-inline-start: 1.3em; }
.nudar-product-info section + section {
	margin-block-start: 24px;
	padding-block-start: 24px;
	border-block-start: 1px solid #e4e8e6;
}
.nudar-product-share { margin-block-start: 16px; }
.nudar-share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nudar-share-title { font-weight: 600; margin-inline-end: 4px; }
.nudar-share-actions .nudar-share-control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid #dce4df;
	border-radius: 50%;
	background: #fff;
	color: #1B5242;
	font-size: 17px;
}
.nudar-share-actions .nudar-share-control:is(:hover, :focus-visible) {
	background: #07261F;
	color: #fff;
}
.nudar-share-url { width: 100%; direction: ltr; margin-block-start: 8px; }
.nudar-share-status:not(:empty) { margin-block-start: 8px; }

/* ============ NUDAR brand palette (from approved proposal direction + logo gold) ============ */
:root {
	--nudar-emerald-deep: #07261F;
	--nudar-emerald:      #0B352B;
	--nudar-forest:       #1B5242;
	--nudar-gold:         #C9A247;
	--nudar-gold-light:   #DEBF6E;
	--nudar-cream:        #F6F0E5;
	--nudar-cream-dark:   #F6F0E5;
	--nudar-ink:          #141414;
}

/* ============ Typography ============ */
/* Body typography handled natively via Elementor Kit (Tajawal) */
h1, h2, h3, h4, .nudar-display { font-family: 'Marcellus', 'Tajawal', serif; letter-spacing: .01em; }

/* Font delivery and RTL fallbacks. Individual widget typography stays editable. */
body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4 { font-family: 'Alexandria', 'Tajawal', sans-serif; letter-spacing: 0; }
body.rtl { font-family: 'Tajawal', sans-serif; }
html[lang^="en"] :is(.elementor-heading-title, .widget-title, .wrapper-banner, .product_title, .cat-title, .elementor-widget-text-editor) { text-align: left; }
/* Let About headings follow the native Elementor widget alignment in both languages. */
.elementor-4877 .elementor-widget-heading .elementor-heading-title { text-align: inherit; }
html[lang^="en"] :is(.elementor-heading-title, .title1, .products-tabs-title) { font-family: Georgia, serif; }
html[lang^="en"] rs-layer { direction: ltr; }

/* Original retail photographs: reversible color-only correction. The source
   lettering, barcode, weight and artwork are never regenerated or repainted. */
img[src*="official-product-"], img[srcset*="official-product-"] { filter: saturate(1.24) contrast(1.1); }

/* ============ Announcement bar ============ */
.nudar-announce { background: var(--nudar-emerald-deep); color: var(--nudar-cream); font-size: 14px; }
.nudar-announce-inner { max-width: 1200px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; }
.nudar-announce-msg b { color: var(--nudar-gold-light); font-weight: 700; }
.nudar-announce-wa { color: var(--nudar-gold); font-weight: 700; text-decoration: none; border: 1px solid var(--nudar-gold); border-radius: 999px; padding: 2px 14px; transition: all .2s; }
.nudar-announce-wa:hover { background: var(--nudar-gold); color: var(--nudar-emerald-deep); }

/* ============ Free-shipping progress ============ */
.nudar-progress { padding: 14px 18px !important; }
.nudar-progress-track { height: 8px; background: rgba(30,77,58,.15); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.nudar-progress-fill { height: 100%; background: linear-gradient(90deg, var(--nudar-forest), var(--nudar-gold)); border-radius: 999px; transition: width .4s ease; }

/* ============ Cart goal popup (~EGP 1500) ============ */
.nudar-popup-overlay { position: fixed; inset: 0; background: rgba(11,46,34,.62); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.nudar-popup-overlay[hidden] { display: none; }
.nudar-popup { background: var(--nudar-cream); border: 1px solid var(--nudar-gold); border-radius: 16px; max-width: 440px; width: 100%; padding: 32px 28px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.35); position: relative; }
.nudar-popup h3 { color: var(--nudar-forest); font-size: 26px; margin: 0 0 12px; }
.nudar-popup p { color: var(--nudar-ink); margin: 0 0 8px; }
.nudar-popup p strong { color: var(--nudar-forest); }
.nudar-popup-close { position: absolute; top: 10px; inset-inline-end: 14px; background: none; border: none; font-size: 26px; color: var(--nudar-ink); cursor: pointer; line-height: 1; }
.nudar-popup-actions { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.nudar-popup-actions .button { background: var(--nudar-gold); color: var(--nudar-emerald-deep); border-radius: 999px; padding: 10px 22px; font-weight: 700; border: none; text-decoration: none; }
.nudar-popup-actions .nudar-popup-dismiss { background: transparent; border: 1px solid var(--nudar-forest); color: var(--nudar-forest); border-radius: 999px; padding: 10px 22px; font-weight: 700; cursor: pointer; }

/* ============ NUDAR footer ============ */
.nudar-footer { background: var(--nudar-emerald-deep); color: var(--nudar-cream); margin-top: 0; }
.nudar-footer a { color: var(--nudar-cream); text-decoration: none; }
.nudar-footer a:hover { color: var(--nudar-gold); }
.nudar-footer-grid { max-width: 1200px; margin: 0 auto; padding: 48px 16px 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.nudar-footer h4 { color: var(--nudar-gold); font-size: 17px; margin: 0 0 14px; }
.nudar-footer ul { list-style: none; margin: 0; padding: 0; }
.nudar-footer li { margin-bottom: 8px; }
.nudar-footer-brand img { max-width: 150px; height: auto; }
.nudar-footer-brand p { font-size: 14px; line-height: 1.9; color: rgba(246,241,231,.82); margin-top: 12px; }
.nudar-social { display: flex; gap: 10px; margin-top: 14px; }
.nudar-social a { width: 38px; height: 38px; border: 1px solid rgba(202,161,49,.6); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; transition: all .2s; }
.nudar-social a:hover { background: var(--nudar-gold); border-color: var(--nudar-gold); }
.nudar-social svg { width: 17px; height: 17px; fill: var(--nudar-gold); transition: fill .2s; }
.nudar-social a:hover svg { fill: var(--nudar-emerald-deep); }
.nudar-copyright { border-top: 1px solid rgba(246,241,231,.14); text-align: center; padding: 16px; font-size: 13.5px; color: rgba(246,241,231,.72); }
.nudar-copyright b { color: var(--nudar-gold); font-weight: 700; }

/* WhatsApp floating button */
.nudar-wa-float { position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 9998; width: 56px; height: 56px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(0,0,0,.28); }
.nudar-wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* NUDAR logo proportion guard — keeps original Bfres header height */
.logo-in-theme img, .logo img { max-height: 64px; width: auto; }

/* Owner-supplied stacked mark: Bfres Logo has no native height control. */
#goal-header .nudar-owner-stacked-logo img {
	height: 78px;
	max-height: 78px;
	width: auto;
	object-fit: contain;
}
.elementor-156 .logo.nudar-owner-stacked-logo img {
	height: 106px;
	max-height: 106px;
	width: auto;
	object-fit: contain;
}
#goal-header-mobile .logo img,
#goal-mobile-menu .logo img {
	height: 56px;
	max-height: 56px;
	width: auto;
	object-fit: contain;
}
@media (max-width: 767px) {
	.elementor-156 .logo.nudar-owner-stacked-logo img { height: 92px; max-height: 92px; }
}

/* Footer headings follow their native Elementor alignment in both languages,
   instead of the site-wide English heading alignment rule above. */
#goal-footer :is(.elementor-heading-title, .widget-title) {
	text-align: inherit;
}

/* Search button: compact (no stretch) — scoped to the header search widget only */
.elementor-widget-bfres_element_search_form .btn-search {
	width: auto;
	min-width: 0;
	padding-left: 24px;
	padding-right: 24px;
	white-space: nowrap;
}

/* Commerce title bands: Bfres has no native height control. Keep its title and
   breadcrumb markup while avoiding the inherited 120px desktop padding. */
body.woocommerce-page #goal-breadscrumb {
	margin-bottom: 24px;
}
body.woocommerce-page #goal-breadscrumb .wrapper-breads {
	padding: 24px 0;
}
body.single-product #goal-breadscrumb .wrapper-breads {
	padding: 18px 0;
}
body.woocommerce-page #goal-breadscrumb .bread-title {
	font-size: 30px;
	line-height: 1.35;
}
body.single-product .breadcrumb-navigation-wrapper #goal-breadscrumb {
	margin-bottom: 0;
}
body.single-product .breadcrumb-navigation-wrapper #goal-breadscrumb .wrapper-breads {
	padding: 0;
}
@media (max-width: 767px) {
	body.woocommerce-page #goal-breadscrumb { margin-bottom: 16px; }
	body.woocommerce-page #goal-breadscrumb .wrapper-breads { padding: 16px 0; }
	body.woocommerce-page #goal-breadscrumb .bread-title { font-size: 25px; }
}

/* Native TranslatePress language menu, arranged inline in the announcement bar. */
#goal-header .nudar-language-links .menu {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
}
#goal-header .nudar-language-links .menu > li { margin: 0; padding: 0; }
#goal-header .nudar-language-links .menu > li > a { padding: 0; white-space: nowrap; }
#goal-header .nudar-language-links .current-language-menu-item > a { color: #DEBF6E; }
@media (min-width: 768px) {
	.trp-floating-switcher,
	#trp-floater-ls { display: none !important; }
}

/* These weight shortcuts share one WooCommerce category. The widget has no
   count toggle; its category count is not a count for each package weight. */
.elementor-407 .elementor-element-8543235 .product-nb { display: none; }

/* Bfres clamps list-card names to one line without an Elementor control. */
.elementor-407 .elementor-element-3f203f1 .shop-list-normal .name {
	display: block;
	-webkit-line-clamp: unset;
	overflow: visible;
	line-height: 1.5;
}

@media (max-width: 767px) {
	/* TranslatePress provides a corner setting, but no offset for the Bfres dock. */
	.trp-floating-switcher,
	#trp-floater-ls { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* Goal Categories has no image-mask control. */
.elementor-element-8543235 .cate-image img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: 50%; border: 5px solid #F6F0E5; box-shadow: 0 0 0 1px #DEBF6E; }
.elementor-element-8543235 .cat-title { text-align: right; padding-inline: 8px; }
.elementor-element-8543235 .categories-item:hover .cate-image img { border-color: #DEBF6E; }

/* Bfres's product widget has no full-label cart-button or per-product art
   direction controls. All labels below come from native WooCommerce buttons. */
.product-block.grid .title-wrapper { display: block; }
.product-block.grid .title-wrapper .ali-left, .product-block.grid .title-wrapper .ali-right { width: 100%; float: none; }
.product-block.grid .title-wrapper .ali-right { margin-top: 15px; }
.product-block.grid .add-cart .button { display: flex; width: 100%; height: auto; min-height: 44px; border-radius: 8px; justify-content: center; align-items: center; font-size: 15px !important; line-height: 1.5; padding: 10px 12px; background-color: #07261F !important; color: #FFFFFF !important; }
.product-block.grid .add-cart .button:before { margin-inline-end: 7px; position: static; font-size: 17px; }
.product-block .name { text-align: start; white-space: normal; overflow: visible; display: block; -webkit-line-clamp: unset; line-height: 1.6; min-height: 50px; }
.product-block .rating:has(.star-rating:empty) { display: none; }
.product-block.grid .image { padding: 16px; }
.product-block.grid .image img { aspect-ratio: 1; object-fit: contain; width: 100%; border-radius: 12px; }
.product-block[data-product-id="4899"] .image { background: linear-gradient(145deg,#0B352B,#1B5242); }
.product-block[data-product-id="4919"] .image { background: #F6F0E5; }
.product-block[data-product-id="4973"] .image { background: linear-gradient(135deg,#DEBF6E,#F6F0E5); }
.elementor-407 .widget-products .widget-title { text-align: right; }
.elementor-407 .sub-widget-title { font-style: normal; color: #1B5242; line-height: 1.8; }
.elementor-407 .products-tabs-title { line-height: 1.5; }
html[lang^="en"] .elementor-407 .widget-products .widget-title { text-align: left; }
@media(max-width:767px) {
 .product-block.grid .metas { padding: 12px; }
 .product-block.grid .image { padding: 10px; }
 .product-block.grid .add-cart .button { font-size: 14px !important; }
 .elementor-407 .widget-products .top-info { margin-bottom: 24px; }
 .elementor-element-f9196fd .row-products-wrapper > .product:last-child:nth-child(odd) { width: 100%; }
 .elementor-element-f9196fd .row-products-wrapper > .product:last-child:nth-child(odd) .grid-inner { display: flex; align-items: center; }
 .elementor-element-f9196fd .row-products-wrapper > .product:last-child:nth-child(odd) .block-inner { flex: 0 0 44%; }
 .elementor-element-f9196fd .row-products-wrapper > .product:last-child:nth-child(odd) .metas { flex: 1; min-width: 0; }
}
.product-block.list .add-cart .button { display: inline-flex; min-height: 44px; padding: 10px 16px; background-color: #07261F !important; color: #FFFFFF !important; font-size: 15px; line-height: 1.5; border-radius: 8px; margin-top: 12px; }
.elementor-407 :is(.elementor-element-4fc3ac7,.elementor-element-99aae67) .wrapper-banner .btn-theme { background-color: var(--nudar-gold-light) !important; color: var(--nudar-emerald-deep) !important; }
.elementor-407 :is(.elementor-element-4fc3ac7,.elementor-element-99aae67) .wrapper-banner:hover .btn-theme { background-color: var(--nudar-gold) !important; }
/* Bfres mixes inline links with an inline-block cart link and a cart-only
   top margin. Explicit rows avoid Safari's different inline baselines. */
@media (max-width: 991px) {
 .goal-footer-mobile > ul { display: flex; align-items: stretch; justify-content: center; }
 html .goal-footer-mobile > ul > li { display: flex; flex: 1 1 0; min-width: 0; padding: 0; }
 .goal-footer-mobile > ul > li > a {
  position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; gap: 5px; width: 100%; min-height: 44px;
  margin: 0; line-height: 1; text-align: center;
 }
 .goal-footer-mobile > ul > li > a > i {
  display: block; flex: 0 0 24px; height: 24px; line-height: 24px; font-size: 16px;
 }
 .goal-footer-mobile > ul > li > a > span:not(.count) { line-height: 15px; white-space: nowrap; }
 .goal-footer-mobile > ul > li > a.footer-mini-cart.mini-cart > .count {
  position: absolute; top: -2px; bottom: auto; left: auto; right: auto;
  inset-inline-start: calc(50% + 2px); inset-inline-end: auto;
  min-width: 15px; width: auto; height: 15px; padding: 0 3px; line-height: 15px;
 }
 html body.body-footer-mobile { padding-bottom: 64px; }
}
@media(max-width:767px) {
 .elementor-element-4fc3ac7 .content-banner { position: relative; }
 .elementor-element-4fc3ac7 .content-banner::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; aspect-ratio: 1784 / 882; background: linear-gradient(180deg,#07261F 0%,rgba(7,38,31,.9) 5%,rgba(7,38,31,0) 38%); pointer-events: none; }
}
