/*
Theme Name: Green Roots FloSun
Template: astra
*/

/* ========== RTL overrides for FloSun + Green Roots ========== */

body.rtl {
	direction: rtl;
	text-align: right;
}

/* Header: logo on the right, nav cluster on the left — do NOT reverse menu item order */
body.rtl .main-header .row {
	flex-direction: row-reverse;
}

body.rtl .main-nav .nav,
body.rtl nav.main-nav > .nav {
	flex-direction: row;
	direction: rtl;
}

/* Utility icons keep natural RTL flow (no double reverse) */
body.rtl .header-right-area .nav {
	flex-direction: row;
	direction: rtl;
}

body.rtl .main-header .col-custom.d-flex.justify-content-end {
	justify-content: flex-start !important;
}

body.rtl .main-header .mr-5 {
	margin-right: 0 !important;
	margin-left: 3rem !important;
}

/* Floating sticky pill — same insets in RTL */
body.rtl .header-sticky.sticky {
	left: 18px;
	right: 18px;
}

@media (max-width: 991px) {
	body.rtl .header-right-area.main-nav > ul.nav {
		flex-direction: row;
		flex-wrap: nowrap !important;
	}

	body.rtl .header-right-area.main-nav > ul > li.sidemenu-wrap,
	body.rtl .header-right-area.main-nav > ul > li.minicart-wrap {
		margin: 0 !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
}

@media (max-width: 575px) {
	body.rtl .header-sticky.sticky {
		left: 8px;
		right: 8px;
	}
}

body.rtl .gr-lang-switch {
	margin-right: 0;
	margin-left: 12px;
}

/* ---- Header search / mini-cart icons ---- */
body.rtl .header-right-area.main-nav > ul > li.sidemenu-wrap,
body.rtl .header-right-area.main-nav > ul > li.minicart-wrap {
	position: relative;
	margin-right: 0;
	margin-left: 0;
}

/* Anchor panels to the icon's right edge so they open inward (stay on-screen).
   Previous left:0 made the 280px search fly off the right edge on mobile. */
body.rtl .header-right-area .dropdown-search.dropdown-hover-2,
body.rtl .header-right-area .cart-item-wrapper.dropdown-hover-2,
body.rtl .cart-item-wrapper {
	right: 0 !important;
	left: auto !important;
}

body.rtl .dropdown-search form {
	position: relative;
}

body.rtl .dropdown-search form input {
	padding: 10px 10px 10px 36px;
	text-align: right;
}

body.rtl .dropdown-search form button {
	right: auto;
	left: 0;
}

body.rtl .header-right-area.main-nav > ul > li.minicart-wrap .minicart-btn .cart-item_count {
	right: auto;
	left: -10px;
}

/* Mobile offcanvas search */
body.rtl .search-box-offcanvas form input {
	padding: 0 10px 0 40px;
	text-align: right;
}

body.rtl .search-box-offcanvas form .search-btn {
	right: auto;
	left: 1px;
}

/* ---- Desktop nav dropdown ---- */
body.rtl .main-nav > ul > li > .dropdown-submenu.dropdown-hover {
	text-align: right;
	right: 0;
	left: auto;
	top: 100%;
	z-index: 10050;
}

/* Nested flyout toward page center in RTL */
body.rtl .dropdown-submenu .dropdown-submenu,
body.rtl .greenroots-flosun .dropdown-submenu .dropdown-submenu {
	top: 0 !important;
	right: calc(100% - 6px);
	left: auto;
}

body.rtl .dropdown-submenu > li > a {
	text-align: right;
}

body.rtl .dropdown-submenu > li > a > i {
	right: auto;
	left: 2%;
	padding-right: 0;
	padding-left: 15px;
	transform: translateY(-50%) scaleX(-1);
}

body.rtl .main-nav > ul > li > a i.fa-angle-down {
	margin-left: 0;
	margin-right: 4px;
}

body.rtl .mobile-menu .dropdown {
	padding-right: 15px;
	padding-left: 0;
	text-align: right;
}

body.rtl .intro11-content.text-left,
body.rtl .section-title.text-left,
body.rtl .collection-content {
	text-align: right !important;
}

body.rtl .intro11-content-2.text-center {
	text-align: center !important;
}

body.rtl .single-product .add-action {
	left: 10px;
	right: auto;
}

body.rtl .single-product span.onsale,
body.rtl span.onsale,
body.rtl ul.products li.product .onsale {
	right: 10px;
	left: auto;
}

body.rtl .gr-banner-caption {
	left: auto;
	right: 20px;
	text-align: right;
}

/* Breadcrumb trail: rely on direction:rtl — do NOT row-reverse (that swaps Home/page) */
body.rtl .breadcrumb-content ul,
body.rtl .gr-woo-breadcrumb,
body.rtl .breadcrumbs-area .breadcrumb-content ul {
	flex-direction: row;
	direction: rtl;
	justify-content: center;
}

/* Separator points toward the next crumb when reading RTL (right → left) */
body.rtl .breadcrumbs-area .breadcrumb-content ul li:after,
body.rtl .breadcrumb-content ul li:after {
	content: '<';
}

body.rtl .off-canvas-wrapper .off-canvas-inner-content,
body.rtl .off-canvas-menu-wrapper .off-canvas-inner-content,
html[dir="rtl"] .off-canvas-wrapper .off-canvas-inner-content {
	direction: rtl;
	text-align: right;
}

/* Mobile off-canvas: pin to the right edge in RTL (absolute — not margin) */
body.rtl .off-canvas-wrapper .off-canvas-inner-content,
html[dir="rtl"] .off-canvas-wrapper .off-canvas-inner-content {
	position: absolute;
	top: 0;
	right: 0;
	left: auto;
	margin: 0 !important;
	-webkit-transform: translateX(105%);
	-ms-transform: translateX(105%);
	transform: translateX(105%);
}

body.rtl .off-canvas-wrapper.open .off-canvas-inner-content,
html[dir="rtl"] .off-canvas-wrapper.open .off-canvas-inner-content {
	-webkit-transform: translateX(0);
	-ms-transform: translateX(0);
	transform: translateX(0);
}

body.rtl .off-canvas-wrapper .off-canvas-inner,
html[dir="rtl"] .off-canvas-wrapper .off-canvas-inner {
	margin-left: 0;
	margin-right: 0;
	height: 100%;
}

body.rtl .off-canvas-wrapper .btn-close-off-canvas,
html[dir="rtl"] .off-canvas-wrapper .btn-close-off-canvas {
	left: 12px;
	right: auto;
	inset-inline-end: auto;
	inset-inline-start: 12px;
}

/* Expand on the visual LEFT in Arabic (text is on the right) */
body.rtl .greenroots-flosun .mobile-menu .has-children .menu-expand,
body.rtl .greenroots-flosun .mobile-menu .menu-item-has-children .menu-expand,
html[dir="rtl"] .greenroots-flosun .mobile-menu .has-children .menu-expand,
html[dir="rtl"] .greenroots-flosun .mobile-menu .menu-item-has-children .menu-expand,
body.rtl .mobile-menu .has-children .menu-expand,
body.rtl .mobile-menu .menu-item-has-children .menu-expand {
	top: 4px !important;
	left: 4px !important;
	right: auto !important;
	transform: none !important;
}

body.rtl .greenroots-flosun .mobile-menu .dropdown,
html[dir="rtl"] .greenroots-flosun .mobile-menu .dropdown {
	padding: 0 8px 8px;
	border: none;
	text-align: right;
}

/* Nested flyout — keep visible on hover in RTL */
body.rtl .greenroots-flosun .main-nav > ul > li:hover .dropdown-submenu > li:hover > .dropdown-submenu,
body.rtl .greenroots-flosun .main-nav > ul > li:hover .dropdown-submenu > li:hover > .dropdown-submenu.dropdown-hover,
body.rtl .greenroots-flosun .main-nav > ul > li .dropdown-submenu > li:hover > .dropdown-submenu {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto;
	top: 0 !important;
	right: calc(100% - 6px);
	left: auto;
}

body.rtl .footer-area,
body.rtl .footer-area .widget-list,
body.rtl .footer-area .social-links ul {
	text-align: right;
}

body.rtl .footer-area {
	direction: rtl;
}

body.rtl .footer-area .widget-list {
	padding: 0;
	margin: 0;
}

body.rtl .footer-area .single-footer-widget,
body.rtl .footer-area .widget-title,
body.rtl .footer-area .desc-content,
body.rtl .footer-area .widget-body,
body.rtl .footer-area .footer-logo {
	text-align: right;
}

body.rtl .footer-area .footer-logo {
	display: flex;
	justify-content: flex-start;
}

body.rtl .footer-area .widget-list li a:hover {
	margin-left: 0 !important;
	margin-right: 5px;
}

body.rtl .footer-area .social-links ul {
	justify-content: flex-start;
}

body.rtl .footer-area .social-links ul li a {
	margin-right: 0 !important;
	margin-left: 0 !important;
}

body.rtl .footer-copyright-area,
body.rtl .footer-copyright-area .copyright-content,
body.rtl .footer-copyright-area .text-center {
	text-align: center !important;
}

body.rtl .footer-area .gr-footer-row > [class*="col-"] {
	text-align: right;
}

body.rtl ul.products {
	direction: rtl;
}

body.rtl ul.products li.product {
	float: none;
}

body.rtl .product-area .single-product .product-content .product-cart,
body.rtl .product-area .single-product .product-content a.button {
	text-align: center;
}

/* About / Contact RTL */
body.rtl .gr-about-row .gr-about-copy {
	order: 2;
}

body.rtl .gr-about-row .gr-about-media {
	order: 1;
}

body.rtl .gr-about-row-alt .gr-about-copy {
	order: 1;
}

body.rtl .gr-about-row-alt .gr-about-media {
	order: 2;
}

body.rtl .gr-contact-form-wrap input,
body.rtl .gr-contact-form-wrap textarea,
body.rtl .gr-contact-form-wrap select {
	text-align: right;
}

body.rtl .contact-info-item,
body.rtl .con-info-txt {
	text-align: center;
}

body.rtl.gr-account-page .woocommerce-MyAccount-navigation ul li a,
body.rtl.gr-account-page .woocommerce-MyAccount-content,
body.rtl.gr-cart-page .cart-collaterals,
body.rtl.gr-checkout-page #order_review {
	text-align: right;
}

body.rtl.gr-single-product-page div.product .woocommerce-tabs,
body.rtl.gr-single-product-page .related.products,
body.rtl.gr-single-product-page .upsells.products {
	flex: 0 0 100%;
	width: 100%;
}

/* ---- Shop archive ---- */
body.rtl .shop_toolbar_wrapper,
body.rtl .woocommerce-result-count,
body.rtl .woocommerce-ordering {
	flex-direction: row-reverse;
}

body.rtl .shop_toolbar_wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

body.rtl .woocommerce-pagination {
	direction: rtl;
}

body.rtl .woocommerce-pagination .page-numbers {
	margin: 0 4px;
}

/* ---- Single product ---- */
body.rtl .product-content,
body.rtl .astra-shop-summary-wrap,
body.rtl .single-product-main-area .summary {
	text-align: right;
}

body.rtl.gr-single-product-page div.product .woocommerce-product-gallery {
	float: right;
}

body.rtl.gr-single-product-page div.product .summary {
	float: left;
}

body.rtl .woocommerce div.product .woocommerce-tabs ul.tabs {
	padding-right: 0;
}

body.rtl .woocommerce div.product .woocommerce-tabs ul.tabs li {
	margin-right: 0;
	margin-left: 8px;
}

body.rtl .flex-control-thumbs {
	direction: rtl;
}

/* ---- Cart / Checkout ---- */
body.rtl.gr-cart-page .wc-empty-cart-message,
body.rtl.gr-cart-page .wc-empty-cart-message .cart-empty.woocommerce-info,
body.rtl.gr-cart-page .cart-empty.woocommerce-info,
body.rtl.gr-cart-page .return-to-shop {
	text-align: center !important;
}

body.rtl.gr-cart-page .woocommerce-cart-form .actions {
	flex-direction: row-reverse;
}

body.rtl.gr-cart-page .woocommerce-cart-form .coupon {
	flex-direction: row-reverse;
}

body.rtl.gr-cart-page .cart-collaterals {
	margin-inline-start: auto;
	margin-inline-end: 0;
}

body.rtl.gr-cart-page table.shop_table .product-thumbnail {
	text-align: center;
}

body.rtl .woocommerce .col2-set .col-1,
body.rtl .woocommerce-page .col2-set .col-1,
body.rtl .woocommerce .col2-set .col-2,
body.rtl .woocommerce-page .col2-set .col-2 {
	float: right;
}

body.rtl .woocommerce form .form-row-first,
body.rtl .woocommerce form .form-row-last,
body.rtl .woocommerce-page form .form-row-first,
body.rtl .woocommerce-page form .form-row-last {
	float: right;
}

body.rtl .woocommerce form .form-row label,
body.rtl .woocommerce-page form .form-row label {
	text-align: right;
}

body.rtl .woocommerce form .form-row input.input-text,
body.rtl .woocommerce form .form-row textarea,
body.rtl .woocommerce form .form-row select,
body.rtl .woocommerce-page form .form-row input.input-text,
body.rtl .woocommerce-page form .form-row textarea,
body.rtl .woocommerce-page form .form-row select {
	text-align: right;
}

body.rtl .woocommerce table.shop_table th,
body.rtl .woocommerce table.shop_table td {
	text-align: right;
}

body.rtl .woocommerce-cart-form .actions,
body.rtl .cart-collaterals,
body.rtl .woocommerce-checkout-review-order {
	text-align: right;
}

body.rtl .woocommerce #payment ul.payment_methods {
	text-align: right;
	padding-right: 0;
}

body.rtl .price del,
body.rtl .single-product .price del {
	margin-right: 0;
	margin-left: 6px;
}

body.rtl .swiper-button-next {
	left: 10px;
	right: auto;
}

body.rtl .swiper-button-prev {
	right: 10px;
	left: auto;
}

body.rtl .categories-content {
	text-align: right;
}

body.rtl .gr-help-cta .text-md-end,
body.rtl .gr-shop-cta {
	text-align: center;
}

@media (min-width: 768px) {
	body.rtl .gr-help-cta .text-md-end {
		text-align: left !important;
	}
}

body.rtl .header-logo {
	justify-content: flex-end;
}

body.rtl .countdown-wrapper {
	direction: ltr; /* keep timer digits LTR */
}

/* Newsletter RTL */
body.rtl .gr-newsletter-panel::before {
	inset-inline-start: auto;
	inset-inline-end: 0;
	left: auto;
	right: 0;
}

@media (max-width: 767px) {
	body.rtl .footer-area,
	body.rtl .footer-area .widget-list,
	body.rtl .footer-area .widget-title,
	body.rtl .intro11-content {
		text-align: center;
	}

	body.rtl.gr-single-product-page div.product .woocommerce-product-gallery,
	body.rtl.gr-single-product-page div.product .summary {
		float: none;
		text-align: right;
	}
}


body.rtl .gr-newsletter-copy,
body.rtl .gr-newsletter-desc,
body.rtl .gr-newsletter-feature-label,
body.rtl .gr-newsletter-form-label,
body.rtl .gr-newsletter-note {
	text-align: right;
}

body.rtl .gr-newsletter-form-shell .wpforms-field-label,
body.rtl .gr-newsletter-form-shell input[type="email"],
body.rtl .gr-newsletter-form-shell input[type="text"],
body.rtl .gr-newsletter-form-shell input[type="tel"],
body.rtl .gr-newsletter-form-shell textarea,
body.rtl .gr-newsletter-form-shell select {
	text-align: right;
}

body.rtl .gr-newsletter-form-shell input[type="email"],
body.rtl .gr-newsletter-form-shell input[type="text"],
body.rtl .gr-newsletter-form-shell input[type="tel"],
body.rtl .gr-newsletter-form-shell textarea,
body.rtl .gr-newsletter-form-shell select {
	border-inline-end: 1px solid #e5e5e5 !important;
	border-inline-start: 1px solid #e5e5e5 !important;
}

/* Deal of the day RTL */
body.rtl .gr-deal-header,
body.rtl .gr-deal-subtitle {
	text-align: center;
}

body.rtl .gr-deal-shelf::before {
	inset-inline-start: 0;
	inset-inline-end: 0;
}
