/* Arabic (RTL) Stylesheet Overrides for Electro Theme */

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

/* 1. Header Navigation & Links */
@media only screen and (min-width: 992px) {
    .header-links.pull-left {
        float: right !important;
    }

    .header-links.pull-right {
        float: left !important;
    }
}

.header-links li {
    margin-left: 15px !important;
    margin-right: 0 !important;
}

.header-links li:last-child {
    margin-left: 0 !important;
}

.header-links li i {
    margin-left: 5px !important;
    margin-right: 0 !important;
}

.language-dropdown a.dropdown-toggle i.fa-caret-down {
    margin-right: 3px !important;
    margin-left: 0 !important;
}

/* 2. Main Header (Logo, Search, Cart) */
@media only screen and (min-width: 992px) {
    .header-logo {
        float: right !important;
    }
}

.header-search {
    padding: 15px 0px;
}

.header-search form .input-select {
    border-radius: 0px 40px 40px 0px !important;
    margin-left: -4px !important;
    margin-right: 0 !important;
}

.header-search form .input {
    margin-left: -4px !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
}

.header-search form .search-btn {
    border-radius: 40px 0px 0px 40px !important;
}

@media only screen and (min-width: 992px) {
    .header-ctn {
        float: left !important;
    }
}

.header-ctn>div+div {
    margin-right: 15px !important;
    margin-left: 0 !important;
}

.header-ctn>div>a>.qty {
    left: 15px !important;
    right: auto !important;
}

.cart-dropdown {
    right: auto !important;
    left: 0 !important;
}

/* 3. Navigation Menu */
.main-nav {
    padding-right: 0 !important;
}

@media only screen and (min-width: 992px) {
    .main-nav>li {
        float: right !important;
    }
}

.main-nav>li+li {
    margin-right: 30px !important;
    margin-left: 0 !important;
}

/* 4. Section & Breadcrumbs */
.section-title {
    text-align: right !important;
}

@media only screen and (min-width: 768px) {
    .section-title .section-nav {
        float: left !important;
    }
}

.products-slick-nav {
    left: 15px !important;
    right: auto !important;
}

/* 5. Product Widgets & Sliders */
.product-widget {
    text-align: right !important;
}

.product-widget .product-img {
    right: 0px !important;
    left: auto !important;
}

.product-widget .product-body {
    padding-right: 75px !important;
    padding-left: 0 !important;
}

.product-widget .product-body .product-price .qty {
    margin-left: 10px !important;
    margin-right: 0 !important;
}

.product-widget .delete {
    right: auto !important;
    left: 0 !important;
}

/* 6. Footer Layout */
.footer {
    text-align: right !important;
}

.footer-links li i {
    margin-left: 5px !important;
    margin-right: 0 !important;
}

/* 7. Authentication Pages */
.billing-details {
    text-align: right !important;
}

.billing-details .section-title {
    text-align: center !important;
}

.form-group label {
    text-align: right !important;
    display: block !important;
    width: 100% !important;
}

.form-group input.input {
    text-align: right !important;
}

/* Checkboxes and radio buttons custom positioning */
.input-checkbox label,
.input-radio label {
    padding-right: 20px !important;
    padding-left: 0 !important;
    text-align: right !important;
}

.input-checkbox input[type="checkbox"]+label span,
.input-radio input[type="radio"]+label span {
    right: 0px !important;
    left: auto !important;
}

.input-checkbox input[type="checkbox"]+label span:after {
    left: 1px !important;
    right: auto !important;
}

/* Auth links & error messages */
.text-danger {
    text-align: right !important;
}

.alert-success {
    text-align: right !important;
    border-right: 4px solid #28a745 !important;
    border-left: 0 !important;
}

/* 8. Newsletter Section RTL & Mobile Fixes */
.newsletter form {
    width: 100% !important;
}

.newsletter form:after {
    left: auto !important;
    right: -90px !important;
    -webkit-transform: translateY(-50%) rotate(-15deg) !important;
    -ms-transform: translateY(-50%) rotate(-15deg) !important;
    transform: translateY(-50%) rotate(-15deg) !important;
}

.newsletter form .input {
    margin-right: 0 !important;
    margin-left: -4px !important;
    border-radius: 0px 40px 40px 0px !important;
}

.newsletter form .newsletter-btn {
    border-radius: 40px 0px 0px 40px !important;
}

@media only screen and (max-width: 991px) {
    .newsletter form:after {
        display: none !important;
    }
}

@media only screen and (max-width: 480px) {
    .newsletter form .input {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 40px !important;
        text-align: center;
        margin-bottom: 10px !important;
    }
    
    .newsletter form .newsletter-btn {
        width: 100% !important;
        border-radius: 40px !important;
    }
}

/* =========================================================
   ABOUT PAGE — RTL Overrides
   ========================================================= */

/* Story layout: image moves to the left in RTL */
.story-wrapper {
    flex-direction: row-reverse;
}

/* Branch card badge flips to right side in RTL */
.branch-map-frame .branch-number {
    left: auto !important;
    right: 14px;
}

/* Section heading underline aligns right */
.section-heading::after {
    margin-left: auto;
    margin-right: 0;
}

/* Specialty card text */
.specialty-card h3,
.specialty-card p {
    direction: rtl;
}

/* Stat accents — ensure letter-spacing doesn't break Arabic */
.stat-item .stat-accent {
    letter-spacing: 0;
    direction: rtl;
}

/* Hero text direction */
.about-hero-content h1,
.about-hero-content p {
    direction: rtl;
}

/* About badge direction */
.story-text .about-badge {
    direction: rtl;
}

@media (max-width: 768px) {
    .story-wrapper {
        flex-direction: column;
    }
}
