/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* ========== Reviews Slider ========== */
.home-reviews-swiper { font-family: 'Cairo', sans-serif; padding: 18px 10px; }
.home-reviews-swiper .swiper { padding-bottom: 30px; }
.home-reviews-swiper .swiper-wrapper { align-items: stretch; }
.home-reviews-swiper .swiper-slide { width: auto; display: flex; justify-content: center; }

.review-card {
    flex: 1 0 auto;
    background: #fff;
    border: 3px solid #d4af37 !important;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    font-family: 'Cairo', sans-serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 250px;
    max-width: 300px;
    margin: 0 auto;
}

.review-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.25) !important;
}

.review-author {
    font-weight: 600;
    margin-bottom: 10px;
    color: #222;
    font-size: 18px;
    text-align: center;
}

.review-product {
    font-weight: 400;
    margin-bottom: 10px;
    color: #555;
    font-size: 14px;
    text-align: center;
    font-style: italic;
}

.review-rating {
    margin-bottom: 12px;
    color: #ff9800;
    font-size: 16px;
    text-align: center;
}

.review-text {
    color: #333;
    font-size: 14px;
    line-height: 1.7;
    flex: 1 0 auto;
    text-align: center;
}

/* Reviews Slider Pagination */
.home-reviews-swiper .swiper-pagination-bullet {
    background: #d4af37;
    opacity: 0.6;
    width: 12px;
    height: 12px;
}

.home-reviews-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    width: 14px;
    height: 14px;
}

/* ========== Tags Menu ========== */
.tags-menu {
    margin: 20px 0;
}

.tags-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tags-menu li {
    margin-bottom: 8px;
}

.tags-menu a {
    display: block;
    padding: 8px 12px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    color: #333;
    transition: 0.3s;
}

/* ========== Arabic Font ========== */
html[lang="ar"] body,
html[lang="ar"] body * {
    font-family: 'Cairo', 'Gabriela', Arial, Helvetica, sans-serif !important;
}

/* ========== RTL / Arabic Layout Fixes ========== */

/* Base RTL direction */
html[lang="ar"] body {
    direction: rtl;
    text-align: right;
}

/* --- Header RTL --- */
html[lang="ar"] .whb-flex-equal .whb-col-left {
    text-align: right;
}
html[lang="ar"] .whb-flex-equal .whb-col-right {
    text-align: left;
}
html[lang="ar"] .whb-general-header .wd-tools-element {
    margin-left: 0;
    margin-right: auto;
}
html[lang="ar"] .wd-header-nav .wd-nav > li {
    float: right;
}
html[lang="ar"] .wd-nav > li > a {
    text-align: right;
}
/* Header icons spacing */
html[lang="ar"] .wd-tools-element + .wd-tools-element {
    margin-left: 0;
    margin-inline-start: 15px;
}

/* --- Navigation dropdowns RTL --- */
html[lang="ar"] .wd-nav .sub-menu,
html[lang="ar"] .wd-nav .wd-sub-menu {
    left: auto;
    right: 0;
    text-align: right;
}
html[lang="ar"] .wd-nav .sub-menu li > a {
    text-align: right;
    padding-left: 15px;
    padding-right: 20px;
}
/* Sub-menu arrows flip */
html[lang="ar"] .menu-item-has-children > a::after {
    float: left;
    transform: scaleX(-1);
}

/* --- Hero Banner RTL --- */
html[lang="ar"] .elementor-section .elementor-widget-text-editor {
    text-align: right;
}
html[lang="ar"] .elementor-button-wrapper {
    text-align: right;
}

/* --- Product Grid RTL --- */
html[lang="ar"] .products-thick-row {
    direction: rtl;
}
html[lang="ar"] .product-wrapper {
    text-align: right;
}
html[lang="ar"] .product-element-top {
    direction: ltr; /* images don't need RTL */
}
/* Product titles & prices */
html[lang="ar"] .wd-entities-title,
html[lang="ar"] .product-title,
html[lang="ar"] .woocommerce-loop-product__title {
    text-align: right;
}
html[lang="ar"] .price {
    direction: ltr;
    text-align: right;
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}
html[lang="ar"] .woocommerce-Price-currencySymbol {
    margin-left: 2px;
    margin-right: 0;
}
/* Star rating */
html[lang="ar"] .star-rating {
    direction: ltr;
    float: right;
    margin-left: 5px;
    margin-right: 0;
}
/* Add to cart button */
html[lang="ar"] .add_to_cart_button,
html[lang="ar"] .product_type_variable {
    text-align: center;
}
/* Sale badge */
html[lang="ar"] .onsale,
html[lang="ar"] .product-label {
    left: auto;
    right: 10px;
}
/* Product short description */
html[lang="ar"] .product-short-description {
    text-align: right;
}

/* --- Swatches / Variations RTL --- */
html[lang="ar"] .wd-swatches-grid {
    direction: rtl;
    justify-content: flex-start;
}

/* --- Cart & Wishlist icons on product --- */
html[lang="ar"] .wd-action-btn {
    left: 10px;
    right: auto;
}
html[lang="ar"] .wd-buttons.wd-pos-r {
    left: 10px;
    right: auto;
}
html[lang="ar"] .wd-buttons.wd-pos-l {
    right: 10px;
    left: auto;
}

/* --- WooCommerce Cart & Checkout RTL --- */
html[lang="ar"] .woocommerce-cart table.cart th,
html[lang="ar"] .woocommerce-cart table.cart td {
    text-align: right;
}
html[lang="ar"] .woocommerce table.cart td.product-remove {
    text-align: center;
}
html[lang="ar"] .cart_totals table th {
    text-align: right;
}
html[lang="ar"] .woocommerce-checkout .form-row label {
    text-align: right;
    display: block;
}
html[lang="ar"] .woocommerce-checkout .form-row input,
html[lang="ar"] .woocommerce-checkout .form-row select,
html[lang="ar"] .woocommerce-checkout .form-row textarea {
    text-align: right;
}

/* --- Breadcrumbs RTL --- */
html[lang="ar"] .woocommerce-breadcrumb {
    text-align: right;
}
html[lang="ar"] .woocommerce-breadcrumb .breadcrumb-separator {
    transform: scaleX(-1);
}

/* --- Sidebar & Widgets RTL --- */
html[lang="ar"] .sidebar-inner .widget {
    text-align: right;
}
html[lang="ar"] .widget ul li {
    text-align: right;
    padding-left: 0;
    padding-right: 15px;
}

/* --- Footer RTL --- */
html[lang="ar"] .wd-footer .container {
    text-align: right;
}
html[lang="ar"] .wd-footer .widget {
    text-align: right;
}
html[lang="ar"] .wd-footer .widget ul li {
    text-align: right;
}

/* --- WPML Language Switcher RTL --- */
html[lang="ar"] .wpml-ls-statics-footer {
    text-align: right;
}
html[lang="ar"] .wd-header-text .wcml-cs-item-toggle::after {
    right: auto;
    left: 10px;
}

/* --- Elementor Sections RTL --- */
html[lang="ar"] .elementor-widget-heading .elementor-heading-title {
    text-align: right;
}
html[lang="ar"] .elementor-widget-text-editor {
    text-align: right;
}
html[lang="ar"] .elementor-icon-list-items {
    text-align: right;
}
html[lang="ar"] .elementor-icon-list-item {
    direction: rtl;
}
html[lang="ar"] .elementor-icon-list-icon {
    margin-left: 10px;
    margin-right: 0;
}

/* --- Shipping & Discount Progress bars RTL --- */
html[lang="ar"] .rfhya-progress-bar {
    direction: rtl;
}

/* --- Reviews Slider RTL --- */
html[lang="ar"] .home-reviews-swiper {
    direction: rtl;
}
html[lang="ar"] .review-card {
    text-align: center;
}

/* --- Mobile Menu RTL --- */
html[lang="ar"] .wd-offscreen-nav {
    left: auto;
    right: -100%;
    transform: none;
}
html[lang="ar"] .wd-offscreen-nav.wd-opened {
    right: 0;
}
html[lang="ar"] .wd-close-side {
    left: auto;
    right: 15px;
}

/* --- Search form RTL --- */
html[lang="ar"] .wd-search-form input[type="text"] {
    text-align: right;
    padding-right: 15px;
    padding-left: 40px;
}
html[lang="ar"] .wd-search-form button {
    left: 5px;
    right: auto;
}

/* --- WooCommerce Account RTL --- */
html[lang="ar"] .woocommerce-MyAccount-navigation ul li a {
    text-align: right;
    padding-right: 15px;
}
html[lang="ar"] .woocommerce-MyAccount-content {
    text-align: right;
}

/* --- Quantity buttons RTL --- */
html[lang="ar"] .quantity {
    direction: ltr;
}

/* --- General RTL utility --- */
html[lang="ar"] .text-left {
    text-align: right !important;
}
html[lang="ar"] .text-right {
    text-align: left !important;
}
html[lang="ar"] .float-left {
    float: right !important;
}
html[lang="ar"] .float-right {
    float: left !important;
}

/* --- Fix icons that need mirroring in RTL --- */
html[lang="ar"] .wd-nav-arrows .wd-btn-arrow-left {
    transform: scaleX(-1);
}
html[lang="ar"] .wd-nav-arrows .wd-btn-arrow-right {
    transform: scaleX(-1);
}

/* --- Woodmart features icons section RTL --- */
html[lang="ar"] .wd-info-box {
    text-align: right;
}
html[lang="ar"] .wd-info-box .info-box-icon {
    margin-left: 15px;
    margin-right: 0;
}
html[lang="ar"] .wd-info-box.wd-icon-pos-left {
    flex-direction: row-reverse;
}

/* --- Product single page RTL --- */
html[lang="ar"] .product-summary .entry-title {
    text-align: right;
}
html[lang="ar"] .product-summary .woocommerce-product-details__short-description {
    text-align: right;
}
html[lang="ar"] .product-summary .cart {
    text-align: right;
}
html[lang="ar"] .woocommerce-tabs .tabs li {
    float: right;
}
html[lang="ar"] .woocommerce-tabs .panel {
    text-align: right;
}
html[lang="ar"] .product_meta {
    text-align: right;
}

/* --- Woodmart categories RTL --- */
html[lang="ar"] .wd-cat .wd-cat-title {
    text-align: right;
}
html[lang="ar"] .wd-cat .wd-cat-count {
    text-align: right;
}
