/* RTL (Right-to-Left) Styles for Arabic Language */

/* Base RTL Direction */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] body {
    text-align: right;
}

/* Keep numbers in correct LTR order */
html[dir="rtl"] .about-us p,
html[dir="rtl"] .who-we-are p,
html[dir="rtl"] .why-do-we p,
html[dir="rtl"] .feature-block-content p {
    direction: ltr;
    text-align: right;
    unicode-bidi: embed;
}

/* Font Family for Arabic */
html[dir="rtl"] body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Flexbox Direction Reversal */
html[dir="rtl"] .d-flex,
html[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .justify-content-start {
    justify-content: flex-end !important;
}

html[dir="rtl"] .justify-content-end {
    justify-content: flex-start !important;
}

/* Margin and Padding Adjustments */
html[dir="rtl"] .ms-1, html[dir="rtl"] .ms-2, html[dir="rtl"] .ms-3, html[dir="rtl"] .ms-4, html[dir="rtl"] .ms-5 {
    margin-right: inherit !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .me-1, html[dir="rtl"] .me-2, html[dir="rtl"] .me-3, html[dir="rtl"] .me-4, html[dir="rtl"] .me-5 {
    margin-left: inherit !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .ps-1, html[dir="rtl"] .ps-2, html[dir="rtl"] .ps-3, html[dir="rtl"] .ps-4, html[dir="rtl"] .ps-5 {
    padding-right: inherit !important;
    padding-left: 0 !important;
}

html[dir="rtl"] .pe-1, html[dir="rtl"] .pe-2, html[dir="rtl"] .pe-3, html[dir="rtl"] .pe-4, html[dir="rtl"] .pe-5 {
    padding-left: inherit !important;
    padding-right: 0 !important;
}

/* Navigation */
html[dir="rtl"] .navbar-nav {
    padding-right: 0;
}

html[dir="rtl"] .navbar .nav-link {
    text-align: right;
}

html[dir="rtl"] .dropdown-menu {
    text-align: right;
    left: auto;
    right: 0;
}

/* Header */
html[dir="rtl"] .header .container {
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 30px;
}

html[dir="rtl"] .header .logo {
    order: 2;
    margin-left: auto;
}

html[dir="rtl"] .header .navmenu {
    order: 1;
}

html[dir="rtl"] .header .lang-switch-text {
    order: 0;
}

html[dir="rtl"] .header > .container > .lang-switch-text {
    right: auto;
    left: -80px;
}

html[dir="rtl"] .header-logo {
    margin-left: auto;
    margin-right: 0;
}

html[dir="rtl"] .header-contact {
    text-align: left;
}

/* Buttons with Icons */
html[dir="rtl"] .btn i,
html[dir="rtl"] .btn svg {
    margin-left: 0.5rem;
    margin-right: 0;
}

html[dir="rtl"] .btn-icon-right i,
html[dir="rtl"] .btn-icon-right svg {
    margin-right: 0.5rem;
    margin-left: 0;
}

/* Forms */
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select,
html[dir="rtl"] textarea {
    text-align: right;
}

html[dir="rtl"] .form-check {
    padding-left: 0;
    padding-right: 1.5em;
}

html[dir="rtl"] .form-check-input {
    float: right;
    margin-left: 0;
    margin-right: -1.5em;
}

/* Input Groups */
html[dir="rtl"] .input-group > .form-control:not(:last-child),
html[dir="rtl"] .input-group > .form-select:not(:last-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: var(--bs-border-radius);
    border-bottom-right-radius: var(--bs-border-radius);
}

html[dir="rtl"] .input-group > .form-control:not(:first-child),
html[dir="rtl"] .input-group > .form-select:not(:first-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: var(--bs-border-radius);
    border-bottom-left-radius: var(--bs-border-radius);
}

/* Cards */
html[dir="rtl"] .card-body {
    text-align: right;
}

/* Lists */
html[dir="rtl"] ul,
html[dir="rtl"] ol {
    padding-right: 2rem;
    padding-left: 0;
}

html[dir="rtl"] .list-unstyled {
    padding-right: 0;
}

/* Text Alignment Overrides */
html[dir="rtl"] .text-start {
    text-align: right !important;
}

html[dir="rtl"] .text-end {
    text-align: left !important;
}

/* Float Overrides */
html[dir="rtl"] .float-start {
    float: right !important;
}

html[dir="rtl"] .float-end {
    float: left !important;
}

/* Hero Section */
html[dir="rtl"] .hero-content {
    text-align: right;
}

html[dir="rtl"] .hero-title,
html[dir="rtl"] .hero-subtitle {
    text-align: right;
}

/* Product Cards */
html[dir="rtl"] .product-card {
    text-align: right;
}

html[dir="rtl"] .product-details {
    text-align: right;
}

/* Products Page - Categories and Listings */
html[dir="rtl"] .product-listing h2 {
    text-align: center;
}

html[dir="rtl"] .product-tab {
    text-align: center;
}

/* Ensure tab buttons have same styling as English */
html[dir="rtl"] .tab-nav-custom .nav-link {
    line-height: 1.5;
    vertical-align: middle;
}

html[dir="rtl"] .product-listing .featured-products-list .row {
    flex-direction: row-reverse;
}

html[dir="rtl"] .featured-product-item {
    text-align: right;
}

html[dir="rtl"] .featured-product-name {
    text-align: right;
}

html[dir="rtl"] .featured-product-desc {
    text-align: right;
}

html[dir="rtl"] .featured-product-badge {
    right: auto;
    left: 15px;
}

html[dir="rtl"] .featured-prev {
    left: auto;
    right: -50px;
}

html[dir="rtl"] .featured-next {
    right: auto;
    left: -50px;
}

html[dir="rtl"] .featured-product-link {
    margin-left: 0;
    margin-right: auto;
}

/* Footer */
html[dir="rtl"] .footer-widget {
    text-align: right;
}

html[dir="rtl"] .footer-links {
    padding-right: 0;
}

html[dir="rtl"] .footer-links li {
    text-align: right;
}

html[dir="rtl"] .social-links {
    justify-content: flex-start;
}

/* Footer phone numbers and email - keep LTR */
html[dir="rtl"] .footer a[href^="tel"],
html[dir="rtl"] .footer a[href^="mailto"],
html[dir="rtl"] .footer-contact a,
html[dir="rtl"] .footer .phone-number,
html[dir="rtl"] .footer .contact-info a,
html[dir="rtl"] footer a[href^="tel"],
html[dir="rtl"] footer a[href^="mailto"],
html[dir="rtl"] .footer-contact-details p,
html[dir="rtl"] .footer-contact-details p a,
html[dir="rtl"] .footer-contact-details a {
    direction: ltr !important;
    display: inline-block;
    unicode-bidi: embed;
}

/* Breadcrumb */
html[dir="rtl"] .breadcrumb {
    padding-right: 0;
}

html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-left: 0.5rem;
    padding-right: 0;
    content: "\2190"; /* Left arrow for RTL */
}

/* Tables */
html[dir="rtl"] .table {
    text-align: right;
}

html[dir="rtl"] .table th,
html[dir="rtl"] .table td {
    text-align: right;
}

/* Swiper/Carousel */
html[dir="rtl"] .swiper-button-next {
    right: auto;
    left: 10px;
}

html[dir="rtl"] .swiper-button-prev {
    left: auto;
    right: 10px;
}

html[dir="rtl"] .swiper-pagination {
    direction: ltr;
}

/* Hero Banner Arrows - Keep original positions in RTL */
html[dir="rtl"] .hero-arrow {
    flex-direction: row !important;
    direction: ltr !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0 !important;
}

html[dir="rtl"] .hero-arrow i,
html[dir="rtl"] .hero-arrow .bi {
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
}

html[dir="rtl"] .hero-prev {
    left: 30px !important;
    right: auto !important;
}

html[dir="rtl"] .hero-next {
    right: 30px !important;
    left: auto !important;
}

@media (max-width: 991px) {
    html[dir="rtl"] .hero-prev {
        left: 20px !important;
    }
    html[dir="rtl"] .hero-next {
        right: 20px !important;
    }
}

@media (max-width: 576px) {
    html[dir="rtl"] .hero-prev {
        left: 15px !important;
    }
    html[dir="rtl"] .hero-next {
        right: 15px !important;
    }
}

/* Modals */
html[dir="rtl"] .modal-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .modal-header .btn-close {
    margin: -0.5rem auto -0.5rem -0.5rem;
}

/* Alerts */
html[dir="rtl"] .alert {
    text-align: right;
}

html[dir="rtl"] .alert-dismissible {
    padding-left: 3rem;
    padding-right: 1rem;
}

html[dir="rtl"] .alert-dismissible .btn-close {
    left: 0;
    right: auto;
}

/* Badges */
html[dir="rtl"] .badge {
    margin-left: 0;
    margin-right: 0.25rem;
}

/* Pagination */
html[dir="rtl"] .pagination {
    padding-right: 0;
}

/* Accordions */
html[dir="rtl"] .accordion-button::after {
    margin-left: 0;
    margin-right: auto;
}

/* Contact/Location Cards */
html[dir="rtl"] .location-card {
    text-align: right;
}

html[dir="rtl"] .location-card i {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Contact Page - Phone numbers and email */
html[dir="rtl"] .contact-info .value,
html[dir="rtl"] .contact-info .value a,
html[dir="rtl"] .contact-info a[href^="tel"],
html[dir="rtl"] .contact-info a[href^="mailto"],
html[dir="rtl"] .contact-info a[href^="https://wa.me"] {
    direction: ltr !important;
    display: inline-block;
    unicode-bidi: embed;
}

/* Contact Page - Location list phone/email - keep + at start */
html[dir="rtl"] .loc-list li a[href^="tel"],
html[dir="rtl"] .loc-list li a[href^="mailto"] {
    direction: ltr !important;
    unicode-bidi: embed;
}

/* Specifications Table */
html[dir="rtl"] .spec-label {
    text-align: right;
}

html[dir="rtl"] .spec-value {
    text-align: left;
}

/* Language Switcher - RTL adjustments */
html[dir="rtl"] .lang-switcher-simple {
    flex-direction: row-reverse;
}

/* Banner Text */
html[dir="rtl"] .banner-content {
    text-align: right;
}

html[dir="rtl"] .banner-title,
html[dir="rtl"] .banner-subtitle {
    text-align: right;
}

/* Icons Alignment */
html[dir="rtl"] .icon-text {
    flex-direction: row-reverse;
}

html[dir="rtl"] .icon-text i,
html[dir="rtl"] .icon-text svg {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Feature Box */
html[dir="rtl"] .feature-box {
    text-align: right;
}

/* About Section */
html[dir="rtl"] .about-content {
    text-align: right;
}

/* Section Titles */
html[dir="rtl"] .section-title {
    text-align: right;
}

html[dir="rtl"] .section-title::after {
    right: 0;
    left: auto;
}

/* Chairman Message */
html[dir="rtl"] .chairman-message {
    text-align: right;
}

/* Company Vision Section - RTL */
html[dir="rtl"] .company-vision {
    background-position: left center, right top;
}

html[dir="rtl"] .company-vision .row {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

html[dir="rtl"] .company-vision .col-lg-6 {
    margin-left: auto;
    margin-right: 0;
}

html[dir="rtl"] .company-vision-content {
    text-align: right;
}

/* Contact Form */
html[dir="rtl"] .contact-form {
    text-align: right;
}

/* Career Form */
html[dir="rtl"] .career-form {
    text-align: right;
}

/* File Input */
html[dir="rtl"] input[type="file"] {
    text-align: right;
}

/* Select Dropdown Arrow */
html[dir="rtl"] .form-select {
    background-position: left 0.75rem center;
    padding-left: 2.25rem;
    padding-right: 0.75rem;
}

/* Custom Scrollbar for RTL */
html[dir="rtl"] ::-webkit-scrollbar-track {
    margin-right: 0;
    margin-left: 2px;
}

/* Feature Block / Why Do We Do It Section - RTL */
html[dir="rtl"] .feature-block .section-small-title {
    padding-top: 4em;
}

html[dir="rtl"] .feature-block .row {
    margin-top: 0;
}

html[dir="rtl"] .feature-block .section-small-title h2 {
    direction: ltr;
    text-align: right;
}

html[dir="rtl"] .feature-block-content {
    text-align: right;
}

html[dir="rtl"] .feature-block-content p {
    direction: ltr;
    text-align: right;
}

/* Featured Products Section - RTL */
html[dir="rtl"] .featured-products .section-small-title,
html[dir="rtl"] .featured-products .section-small-title h2,
body.rtl .featured-products .section-small-title,
body.rtl .featured-products .section-small-title h2 {
    text-align: center !important;
}

html[dir="rtl"] .featured-products-list > .row,
html[dir="rtl"] .featured-products > .container > .row,
html[dir="rtl"] section.featured-products > .container > .row,
body.rtl .featured-products-list > .row,
body.rtl .featured-products > .container > .row,
body.rtl section.featured-products > .container > .row {
    flex-direction: row-reverse !important;
    direction: rtl !important;
}

html[dir="rtl"] .featured-product-item,
body.rtl .featured-product-item {
    text-align: right;
}

html[dir="rtl"] .featured-product-name,
body.rtl .featured-product-name {
    text-align: right;
}

html[dir="rtl"] .featured-product-desc,
body.rtl .featured-product-desc {
    text-align: right;
}

/* Animation Direction */
html[dir="rtl"] [data-aos="fade-left"] {
    transform: translate3d(50px, 0, 0);
}

html[dir="rtl"] [data-aos="fade-right"] {
    transform: translate3d(-50px, 0, 0);
}


html[dir="rtl"] .navmenu-offcanvas ul{
        margin-right: auto;
    margin-left: 0;
}
html[dir="rtl"] .footer-links {
    border-right: 0px solid #707070;
      border-left: 1px solid #707070;
}
html[dir="rtl"]  .footer-bottom p, html[dir="rtl"]  .footer-bottom ul{
    margin-bottom: 0;
}
html[dir="rtl"]  .footer-bottom ul{
       justify-content: flex-start;
}
html[dir="rtl"] .product-tab ul{
    padding: 0 !important;
}
html[dir="rtl"] .navmenu-bottom{
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

html[dir="rtl"] .navmenu-bottom ul {
    justify-content: center !important;
    margin-top: 20px !important;
    width: 100% !important;
    display: flex !important;
    padding: 0 !important;
}
html[dir="rtl"] .navmenu-bottom .lang-switcher-simple{
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-direction: row !important;
}

html[dir="rtl"] .navmenu-bottom .lang-switcher-simple .lang-switch-text {
    display: inline-block !important;
    border-bottom: 2px solid #fff !important;
    padding: 0 0 8px 0 !important;
    margin: 0 !important;
    text-align: center !important;
    background: transparent !important;
    color: #fff !important;
}

/* RTL Mobile Navigation - Off-canvas slides from left instead of right */
@media (max-width: 991px) {
    html[dir="rtl"] .navmenu .navmenu-offcanvas {
        inset: 0px auto 0px -410px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 100px;
    }

    html[dir="rtl"] .mobile-nav-active .navmenu {
        z-index: 99999;
    }

    html[dir="rtl"] .mobile-nav-active .navmenu .navmenu-offcanvas {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: auto !important;
        right: auto !important;
        z-index: 100001 !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 90%;
        max-width: 400px;
    }

    html[dir="rtl"] .mobile-nav-active .mobile-nav-toggle {
        right: auto;
        left: 15px;
        z-index: 100001;
    }

}

/* RTL - Google Maps InfoWindow fix */
html[dir="rtl"] .footer-map,
html[dir="rtl"] .contact-map {
    overflow: hidden !important;
    position: relative !important;
}

html[dir="rtl"] .footer-map #footer-map,
html[dir="rtl"] .contact-map #contact-map {
    overflow: hidden !important;
}

/* Ensure InfoWindow stays within bounds on RTL */
html[dir="rtl"] .gm-style-iw-c {
    max-width: 200px !important;
}

html[dir="rtl"] .gm-style .gm-style-iw {
    direction: ltr !important;
}

/* RTL - Move close button (X) to left */
html[dir="rtl"] .gm-style .gm-style-iw-chr {
    position: absolute !important;
    left: 0 !important;
    right: auto !important;
    top: 0 !important;
}

html[dir="rtl"] .gm-style button.gm-ui-hover-effect {
    left: 4px !important;
    right: auto !important;
    top: 4px !important;
}

/* RTL - Adjust InfoWindow content padding for left close button */
html[dir="rtl"] .gm-style-iw-d > div {
    padding-left: 25px !important;
    padding-right: 10px !important;
}

/* RTL Mobile - Smaller InfoWindow */
@media (max-width: 576px) {
    html[dir="rtl"] .gm-style-iw-c {
        max-width: 180px !important;
        transform: translateX(20px) !important;
    }

    html[dir="rtl"] .gm-style-iw-d {
        max-width: 180px !important;
    }

    html[dir="rtl"] .gm-style-iw-d > div {
        max-width: 170px !important;
        font-size: 12px !important;
    }
}

/* RTL Mobile - Feature Block layout fix */
@media (max-width: 992px) {
    /* Feature Block - Keep same layout as English on mobile (image first, text below) */
    html[dir="rtl"] .featured-products .feature-block .row,
    html[dir="rtl"] .feature-block .row,
    body.rtl .featured-products .feature-block .row,
    body.rtl .feature-block .row {
        -webkit-box-orient: vertical !important;
        -webkit-box-direction: reverse !important;
        -ms-flex-direction: column-reverse !important;
        flex-direction: column-reverse !important;
    }
}

/* ========================================
   PPGI Product Detail Page - RTL Layout
   ======================================== */

/* Flip the three-column grid layout - swap left and right sidebars */
html[dir="rtl"] .ppgi-three-column {
    grid-template-columns: 360px minmax(400px, 1fr) 340px !important;
    direction: rtl;
}

/* Product Info Box - Text alignment */
html[dir="rtl"] .product-info-box {
    text-align: right;
}

html[dir="rtl"] .product-title-main {
    text-align: right;
}

html[dir="rtl"] .product-description-text {
    text-align: right;
}

/* Sidebar Sections - Text alignment */
html[dir="rtl"] .sidebar-section h4 {
    text-align: right;
}

html[dir="rtl"] .sidebar-section {
    text-align: right;
}

/* Key Features */
html[dir="rtl"] .key-features-box-left ul {
    padding-right: 0;
    padding-left: 0;
    list-style: none;
}

html[dir="rtl"] .key-features-box-left li {
    display: flex;
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .key-features-box-left .feature-bullet {
    margin-left: 10px;
    margin-right: 0;
}

html[dir="rtl"] .key-features-box-left h4 i {
    margin-left: 8px;
    margin-right: 0;
}

/* E-Catalog Button - Icon first in RTL */
html[dir="rtl"] .e-catalog-btn,
html[dir="rtl"] .ppgi-download-btn,
html[dir="rtl"] .btn-catalog {
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: center !important;
    justify-content: center !important;
}

html[dir="rtl"] .e-catalog-btn i,
html[dir="rtl"] .ppgi-download-btn i,
html[dir="rtl"] .btn-catalog i {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

/* Available Profiles Grid */
html[dir="rtl"] .profiles-grid {
    direction: rtl;
}

html[dir="rtl"] .profile-item {
    text-align: right;
}

html[dir="rtl"] .profile-name {
    text-align: right;
}

/* Coatings Grid */
html[dir="rtl"] .coatings-grid-new {
    direction: rtl;
}

html[dir="rtl"] .coating-card {
    text-align: right;
}

html[dir="rtl"] .coating-card-label {
    text-align: right;
}

/* Colors Grid */
html[dir="rtl"] .ppgi-colors-grid {
    direction: rtl;
}

html[dir="rtl"] .ppgi-color-item {
    text-align: right;
}

html[dir="rtl"] .color-info {
    text-align: right;
}

html[dir="rtl"] .color-code,
html[dir="rtl"] .color-name {
    text-align: right;
}

/* Available Colors Section Title */
html[dir="rtl"] .available-colors h4 {
    text-align: right;
}

/* Description Modal */
html[dir="rtl"] .description-modal-content {
    text-align: right;
}

html[dir="rtl"] .description-modal-body p {
    text-align: right;
}

/* Color Modal */
html[dir="rtl"] .color-modal-content .color-details {
    text-align: right;
}

html[dir="rtl"] .color-modal-content .color-details h3,
html[dir="rtl"] .color-modal-content .color-details p {
    text-align: right;
}

/* Center Image - Keep centered */
html[dir="rtl"] .ppgi-center-image {
    text-align: center;
}

/* Responsive RTL - Tablet */
@media (max-width: 1199px) {
    html[dir="rtl"] .ppgi-three-column {
        grid-template-columns: 320px 1fr 300px !important;
        direction: rtl;
    }
}

/* Responsive RTL - Mobile Large (991px and below) */
@media (max-width: 991px) {
    /* Stack columns vertically on mobile, maintain RTL direction */
    html[dir="rtl"] .ppgi-three-column {
        grid-template-columns: 1fr !important;
        direction: rtl;
    }

    /* Maintain proper order - image first, then content */
    html[dir="rtl"] .ppgi-left-sidebar,
    html[dir="rtl"] .ppgi-right-sidebar {
        order: 2;
    }

    html[dir="rtl"] .ppgi-center-image {
        order: 1;
    }

    /* Colors grid - 4 columns on tablet */
    html[dir="rtl"] .ppgi-colors-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        direction: rtl;
    }
}

/* Responsive RTL - Mobile Small (767px and below) */
@media (max-width: 767px) {
    /* Maintain RTL direction for all grids */
    html[dir="rtl"] .coatings-grid-new,
    html[dir="rtl"] .ppgi-colors-grid,
    html[dir="rtl"] .profiles-grid {
        direction: rtl;
    }

    /* Profiles and Coatings - 2 columns on mobile */
    html[dir="rtl"] .profiles-grid,
    html[dir="rtl"] .coatings-grid,
    html[dir="rtl"] .coatings-grid-new {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Colors - 3 columns on mobile */
    html[dir="rtl"] .ppgi-colors-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    /* Sidebar padding */
    html[dir="rtl"] .ppgi-left-sidebar,
    html[dir="rtl"] .ppgi-right-sidebar {
        padding: 20px;
    }

    /* Product title smaller on mobile */
    html[dir="rtl"] .product-title-main {
        font-size: 1.3rem;
        text-align: right;
    }

    /* Description modal - proper mobile spacing */
    html[dir="rtl"] .description-modal-content {
        margin: 10% auto;
        padding: 20px;
        text-align: right;
    }

    html[dir="rtl"] .description-modal-body {
        text-align: right;
    }

    /* Color modal on mobile */
    html[dir="rtl"] .color-modal-content {
        margin: 15% auto;
        text-align: right;
    }

    html[dir="rtl"] .color-details {
        text-align: right;
        padding: 15px;
    }
}

/* Responsive RTL - Mobile Extra Small (480px and below) */
@media (max-width: 480px) {
    /* Ensure text stays readable on very small screens */
    html[dir="rtl"] .product-title-main {
        font-size: 1.1rem;
    }

    html[dir="rtl"] .sidebar-section h4 {
        font-size: 1rem;
    }

    /* Coating cards labels - smaller text */
    html[dir="rtl"] .coating-card-label {
        font-size: 0.65rem;
        padding: 6px 8px;
    }

    /* Color swatches - smaller on tiny screens */
    html[dir="rtl"] .color-swatch {
        width: 50px;
        height: 50px;
    }

    html[dir="rtl"] .color-code,
    html[dir="rtl"] .color-name {
        font-size: 0.7rem;
    }
}

/* Products Page Mobile - RTL */
@media (max-width: 991px) {
    html[dir="rtl"] .products-top-bar .search-box {
        margin-right: 0;
        margin-left: 8px;
    }

    html[dir="rtl"] .mobile-category-dropdown .form-select {
        padding-right: 16px !important;
        padding-left: 45px !important;
        background-position: left 16px center;
    }
}