/* ========================================
   RTL (Right-to-Left) Support Styles
   ========================================
   
   These styles handle RTL layout for Persian (FA) and Arabic (AR) languages
   Applied automatically when language is switched to RTL languages
*/

/* ========================================
   BASE RTL STYLES
   ======================================== */

[dir="rtl"],
.rtl {
    direction: rtl;
    text-align: right;
}

[dir="ltr"],
.ltr {
    direction: ltr;
    text-align: left;
}

/* ========================================
   LAYOUT ADJUSTMENTS
   ======================================== */

.rtl .navbar,
.rtl .nav-links,
.rtl .navbar-simple {
    flex-direction: row-reverse;
}

.rtl .header-right {
    order: -1;
}

.rtl .language-switcher {
    flex-direction: row-reverse;
}

/* ========================================
   TEXT ALIGNMENT
   ======================================== */

.rtl h1,
.rtl h2,
.rtl h3,
.rtl h4,
.rtl h5,
.rtl h6,
.rtl p,
.rtl span,
.rtl div {
    text-align: right;
}

.rtl .text-left {
    text-align: right !important;
}

.rtl .text-right {
    text-align: left !important;
}

/* ========================================
   NAVIGATION
   ======================================== */

.rtl .nav-links {
    padding-right: 0;
    padding-left: 2rem;
}

.rtl .nav-links li {
    margin-right: 0;
    margin-left: 1.5rem;
}

.rtl .dropdown-content {
    right: auto;
    left: 0;
}

/* ========================================
   HERO SECTION
   ======================================== */

.rtl .hero-content {
    text-align: right;
}

.rtl .hero-brand-name,
.rtl .hero-product-name,
.rtl .hero-product-description {
    text-align: right;
}

/* Increased line-height for Farsi and Arabic text in hero section - HOME PAGE ONLY */
body.home html[lang="fa"] .hero-product-name,
body.home html[lang="ar"] .hero-product-name,
html[lang="fa"] body.home .hero-product-name,
html[lang="ar"] body.home .hero-product-name {
    line-height: 1.4 !important;
}

body.home html[lang="fa"] .hero-product-description,
body.home html[lang="ar"] .hero-product-description,
html[lang="fa"] body.home .hero-product-description,
html[lang="ar"] body.home .hero-product-description {
    line-height: 1.8 !important;
}

body.home html[lang="fa"] .hero-brand-name,
body.home html[lang="ar"] .hero-brand-name,
html[lang="fa"] body.home .hero-brand-name,
html[lang="ar"] body.home .hero-brand-name {
    line-height: 1.3 !important;
}

/* Increased line-height for Farsi and Arabic text in diptych showcase section - HOME PAGE ONLY */
body.home html[lang="fa"] .brand-tagline,
body.home html[lang="ar"] .brand-tagline,
html[lang="fa"] body.home .brand-tagline,
html[lang="ar"] body.home .brand-tagline {
    line-height: 1.5 !important;
}

body.home html[lang="fa"] .brand-description,
body.home html[lang="ar"] .brand-description,
html[lang="fa"] body.home .brand-description,
html[lang="ar"] body.home .brand-description {
    line-height: 1.8 !important;
}

/* ========================================
   BRAND SHOWCASE (DIPTYCH)
   ======================================== */

.rtl .diptych-container {
    flex-direction: row-reverse;
}

.rtl .diptych-panel {
    text-align: right;
}

.rtl .diptych-content {
    align-items: flex-end;
}

/* ========================================
   PRODUCT SHOWCASE (3 CATEGORIES: CONDOMS, SPRAYS, GELS)
   ======================================== */

/* ========================================
   PRODUCTS PAGE
   ======================================== */

.rtl .split-layout-container {
    flex-direction: row-reverse;
}

.rtl .brand-partition {
    text-align: right;
}

.rtl .category-filters {
    justify-content: flex-end;
}

.rtl .category-btn {
    margin-right: 0;
    margin-left: 1rem;
}

.rtl .product-grid-split {
    justify-content: flex-end;
}

/* ========================================
   FORMS
   ======================================== */

.rtl input[type="text"],
.rtl input[type="email"],
.rtl input[type="tel"],
.rtl textarea {
    text-align: right;
    direction: rtl;
}

.rtl .form-group {
    flex-direction: row-reverse;
}

.rtl .form-group input:first-child {
    margin-right: 0;
    margin-left: 1rem;
}

/* ========================================
   BUTTONS
   ======================================== */

.rtl .btn-primary,
.rtl .btn-secondary {
    text-align: center;
}

/* ========================================
   FOOTER
   ======================================== */

.rtl .footer-main {
    flex-direction: row-reverse;
}

.rtl .footer-left {
    order: 2;
}

.rtl .footer-right {
    order: 1;
    text-align: left;
}

.rtl .social-links {
    flex-direction: row-reverse;
}

/* ========================================
   ABOUT PAGE
   ======================================== */

/* Story Section - Only text content RTL (keep layout LTR) */
html[lang="fa"] body.about-page .story-text,
html[lang="ar"] body.about-page .story-text,
body.about-page html[lang="fa"] .story-text,
body.about-page html[lang="ar"] .story-text {
    direction: rtl !important;
    text-align: right !important;
}

html[lang="fa"] body.about-page .story-text h3,
html[lang="ar"] body.about-page .story-text h3,
body.about-page html[lang="fa"] .story-text h3,
body.about-page html[lang="ar"] .story-text h3 {
    text-align: right !important;
    direction: rtl !important;
}

html[lang="fa"] body.about-page .story-text p,
html[lang="ar"] body.about-page .story-text p,
body.about-page html[lang="fa"] .story-text p,
body.about-page html[lang="ar"] .story-text p {
    text-align: right !important;
    direction: rtl !important;
    line-height: 1.8 !important;
}

/* ========================================
   CONTACT PAGE
   ======================================== */

/* Contact Section RTL for Farsi and Arabic */
html[lang="fa"] .contact-section,
html[lang="ar"] .contact-section {
    flex-direction: row-reverse !important;
    direction: rtl !important;
}

html[lang="fa"] .contact-info,
html[lang="ar"] .contact-info {
    text-align: right !important;
    direction: rtl !important;
}

html[lang="fa"] .contact-info h2,
html[lang="ar"] .contact-info h2 {
    text-align: right !important;
    direction: rtl !important;
}

html[lang="fa"] .contact-info p,
html[lang="ar"] .contact-info p {
    text-align: right !important;
    direction: rtl !important;
    line-height: 1.8 !important;
}

html[lang="fa"] .contact-info ul,
html[lang="ar"] .contact-info ul {
    direction: rtl !important;
    text-align: right !important;
}

html[lang="fa"] .contact-info li,
html[lang="ar"] .contact-info li {
    direction: rtl !important;
    text-align: right !important;
}

html[lang="fa"] .contact-form,
html[lang="ar"] .contact-form {
    direction: rtl !important;
}

html[lang="fa"] .contact-form input,
html[lang="fa"] .contact-form textarea,
html[lang="fa"] .contact-form select,
html[lang="ar"] .contact-form input,
html[lang="ar"] .contact-form textarea,
html[lang="ar"] .contact-form select {
    direction: rtl !important;
    text-align: right !important;
}

html[lang="fa"] .contact-form select,
html[lang="ar"] .contact-form select {
    background-position: left 1rem center !important;
    padding-left: 2.5rem !important;
    padding-right: 1rem !important;
}

html[lang="fa"] .form-group,
html[lang="ar"] .form-group {
    direction: rtl !important;
}

/* New Contact Page Layout RTL Styles */
html[lang="fa"] .contact-info-section,
html[lang="ar"] .contact-info-section {
    direction: rtl !important;
}

html[lang="fa"] .contact-info-container h2,
html[lang="ar"] .contact-info-container h2 {
    text-align: center !important;
    direction: rtl !important;
}

html[lang="fa"] .contact-description,
html[lang="ar"] .contact-description {
    text-align: center !important;
    direction: rtl !important;
}

html[lang="fa"] .contact-locations-grid,
html[lang="ar"] .contact-locations-grid {
    direction: rtl !important;
}

html[lang="fa"] .contact-office,
html[lang="fa"] .contact-factory,
html[lang="ar"] .contact-office,
html[lang="ar"] .contact-factory {
    direction: rtl !important;
    text-align: right !important;
}

html[lang="fa"] .contact-office h3,
html[lang="fa"] .contact-factory h3,
html[lang="ar"] .contact-office h3,
html[lang="ar"] .contact-factory h3 {
    text-align: center !important;
    direction: rtl !important;
}

html[lang="fa"] .contact-details-grid,
html[lang="ar"] .contact-details-grid {
    direction: rtl !important;
    text-align: right !important;
}

html[lang="fa"] .contact-label,
html[lang="ar"] .contact-label {
    text-align: right !important;
    direction: rtl !important;
    padding-right: 0 !important;
    padding-left: 0.5rem !important;
}

html[lang="fa"] .contact-value,
html[lang="ar"] .contact-value {
    text-align: right !important;
    direction: rtl !important;
}

/* RTL Responsive Styles for Contact Details Grid */
@media (max-width: 480px) {
    html[lang="fa"] .contact-label,
    html[lang="ar"] .contact-label {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

html[lang="fa"] .contact-form-section,
html[lang="ar"] .contact-form-section {
    direction: rtl !important;
}

html[lang="fa"] .contact-form-container h2,
html[lang="ar"] .contact-form-container h2 {
    text-align: center !important;
    direction: rtl !important;
}

.rtl .map-wrapper-redesigned {
    flex-direction: row-reverse;
}

.rtl .map-info-card {
    text-align: right;
}

.rtl .location-item {
    flex-direction: row-reverse;
    text-align: right;
}

.rtl .location-item i {
    margin-right: 0;
    margin-left: 0.75rem;
}

/* ========================================
   BLOG PAGE RTL
   ======================================== */

/* Blog Hero Section (RTL) */
html[lang="fa"] body.blog-page .blog-hero-content,
html[lang="ar"] body.blog-page .blog-hero-content,
body.blog-page html[lang="fa"] .blog-hero-content,
body.blog-page html[lang="ar"] .blog-hero-content {
    direction: rtl !important;
}

/* Desktop: put media on the left, text on the right (more natural RTL scan) */
@media (min-width: 769px) {
    html[lang="fa"] body.blog-page .blog-hero-layout,
    html[lang="ar"] body.blog-page .blog-hero-layout,
    body.blog-page html[lang="fa"] .blog-hero-layout,
    body.blog-page html[lang="ar"] .blog-hero-layout {
        grid-template-areas: "media text" !important;
    }
}

html[lang="fa"] body.blog-page .blog-hero-text,
html[lang="ar"] body.blog-page .blog-hero-text,
body.blog-page html[lang="fa"] .blog-hero-text,
body.blog-page html[lang="ar"] .blog-hero-text {
    text-align: right !important;
    direction: rtl !important;
    align-items: flex-end !important; /* Align text to right in RTL */
}

html[lang="fa"] body.blog-page .blog-subtitle,
html[lang="ar"] body.blog-page .blog-subtitle,
body.blog-page html[lang="fa"] .blog-subtitle,
body.blog-page html[lang="ar"] .blog-subtitle {
    line-height: 1.9 !important;
}

/* Featured Article Section */
html[lang="fa"] body.blog-page .featured-content,
html[lang="ar"] body.blog-page .featured-content,
body.blog-page html[lang="fa"] .featured-content,
body.blog-page html[lang="ar"] .featured-content {
    text-align: right !important;
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .featured-content h2,
html[lang="ar"] body.blog-page .featured-content h2,
body.blog-page html[lang="fa"] .featured-content h2,
body.blog-page html[lang="ar"] .featured-content h2 {
    text-align: right !important;
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .featured-content p,
html[lang="ar"] body.blog-page .featured-content p,
body.blog-page html[lang="fa"] .featured-content p,
body.blog-page html[lang="ar"] .featured-content p {
    text-align: right !important;
    direction: rtl !important;
    line-height: 1.8 !important;
}

html[lang="fa"] body.blog-page .featured-overlay,
html[lang="ar"] body.blog-page .featured-overlay,
body.blog-page html[lang="fa"] .featured-overlay,
body.blog-page html[lang="ar"] .featured-overlay {
    left: auto !important;
    right: 20px !important;
}

/* Article Meta */
html[lang="fa"] body.blog-page .article-meta,
html[lang="ar"] body.blog-page .article-meta,
body.blog-page html[lang="fa"] .article-meta,
body.blog-page html[lang="ar"] .article-meta {
    flex-direction: row-reverse !important;
    direction: rtl !important;
    justify-content: flex-start !important;
}

html[lang="fa"] body.blog-page .article-overlay,
html[lang="ar"] body.blog-page .article-overlay,
body.blog-page html[lang="fa"] .article-overlay,
body.blog-page html[lang="ar"] .article-overlay {
    left: auto !important;
    right: 15px !important;
}

/* Article Content */
html[lang="fa"] body.blog-page .article-content,
html[lang="ar"] body.blog-page .article-content,
body.blog-page html[lang="fa"] .article-content,
body.blog-page html[lang="ar"] .article-content {
    text-align: right !important;
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .article-content h3,
html[lang="ar"] body.blog-page .article-content h3,
body.blog-page html[lang="fa"] .article-content h3,
body.blog-page html[lang="ar"] .article-content h3 {
    text-align: right !important;
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .article-content p,
html[lang="ar"] body.blog-page .article-content p,
body.blog-page html[lang="fa"] .article-content p,
body.blog-page html[lang="ar"] .article-content p {
    text-align: right !important;
    direction: rtl !important;
    line-height: 1.8 !important;
}

html[lang="fa"] body.blog-page .read-more,
html[lang="ar"] body.blog-page .read-more,
body.blog-page html[lang="fa"] .read-more,
body.blog-page html[lang="ar"] .read-more {
    text-align: right !important;
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .read-more:hover,
html[lang="ar"] body.blog-page .read-more:hover,
body.blog-page html[lang="fa"] .read-more:hover,
body.blog-page html[lang="ar"] .read-more:hover {
    transform: translateX(-5px) !important;
}

/* Blog Filters */
html[lang="fa"] body.blog-page .blog-filters,
html[lang="ar"] body.blog-page .blog-filters,
body.blog-page html[lang="fa"] .blog-filters,
body.blog-page html[lang="ar"] .blog-filters {
    direction: ltr !important;
    justify-content: center !important;
    text-align: center !important;
}

html[lang="fa"] body.blog-page .filter-btn,
html[lang="ar"] body.blog-page .filter-btn,
body.blog-page html[lang="fa"] .filter-btn,
body.blog-page html[lang="ar"] .filter-btn {
    direction: ltr !important;
    text-align: center !important;
}

/* Newsletter Section */
html[lang="fa"] body.blog-page .newsletter-content,
html[lang="ar"] body.blog-page .newsletter-content,
body.blog-page html[lang="fa"] .newsletter-content,
body.blog-page html[lang="ar"] .newsletter-content {
    text-align: center !important;
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .newsletter-content h2,
html[lang="ar"] body.blog-page .newsletter-content h2,
body.blog-page html[lang="fa"] .newsletter-content h2,
body.blog-page html[lang="ar"] .newsletter-content h2 {
    text-align: center !important;
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .newsletter-content p,
html[lang="ar"] body.blog-page .newsletter-content p,
body.blog-page html[lang="fa"] .newsletter-content p,
body.blog-page html[lang="ar"] .newsletter-content p {
    text-align: center !important;
    direction: rtl !important;
    line-height: 1.8 !important;
}

html[lang="fa"] body.blog-page .newsletter-form,
html[lang="ar"] body.blog-page .newsletter-form,
body.blog-page html[lang="fa"] .newsletter-form,
body.blog-page html[lang="ar"] .newsletter-form {
    direction: rtl !important;
    flex-direction: row-reverse !important;
}

html[lang="fa"] body.blog-page .newsletter-form input,
html[lang="ar"] body.blog-page .newsletter-form input,
body.blog-page html[lang="fa"] .newsletter-form input,
body.blog-page html[lang="ar"] .newsletter-form input {
    direction: rtl !important;
    text-align: right !important;
}

/* Load More Button */
html[lang="fa"] body.blog-page .load-more-container,
html[lang="ar"] body.blog-page .load-more-container,
body.blog-page html[lang="fa"] .load-more-container,
body.blog-page html[lang="ar"] .load-more-container {
    text-align: center !important;
    direction: ltr !important;
}

/* Article Modal */
html[lang="fa"] body.blog-page .article-modal .modal-content,
html[lang="ar"] body.blog-page .article-modal .modal-content,
body.blog-page html[lang="fa"] .article-modal .modal-content,
body.blog-page html[lang="ar"] .article-modal .modal-content {
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-header,
html[lang="ar"] body.blog-page .article-modal .modal-header,
body.blog-page html[lang="fa"] .article-modal .modal-header,
body.blog-page html[lang="ar"] .article-modal .modal-header {
    flex-direction: row-reverse !important;
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-header h2,
html[lang="ar"] body.blog-page .article-modal .modal-header h2,
body.blog-page html[lang="fa"] .article-modal .modal-header h2,
body.blog-page html[lang="ar"] .article-modal .modal-header h2 {
    text-align: right !important;
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .article-modal .close-btn,
html[lang="ar"] body.blog-page .article-modal .close-btn,
body.blog-page html[lang="fa"] .article-modal .close-btn,
body.blog-page html[lang="ar"] .article-modal .close-btn {
    left: 1rem !important;
    right: auto !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content,
html[lang="ar"] body.blog-page .article-modal .modal-article-content,
body.blog-page html[lang="fa"] .article-modal .modal-article-content,
body.blog-page html[lang="ar"] .article-modal .modal-article-content {
    text-align: right !important;
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content h3,
html[lang="ar"] body.blog-page .article-modal .modal-article-content h3,
body.blog-page html[lang="fa"] .article-modal .modal-article-content h3,
body.blog-page html[lang="ar"] .article-modal .modal-article-content h3 {
    text-align: right !important;
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content p,
html[lang="ar"] body.blog-page .article-modal .modal-article-content p,
body.blog-page html[lang="fa"] .article-modal .modal-article-content p,
body.blog-page html[lang="ar"] .article-modal .modal-article-content p {
    text-align: right !important;
    direction: rtl !important;
    line-height: 1.8 !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content ul,
html[lang="fa"] body.blog-page .article-modal .modal-article-content ol,
html[lang="ar"] body.blog-page .article-modal .modal-article-content ul,
html[lang="ar"] body.blog-page .article-modal .modal-article-content ol {
    margin-right: 2rem !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content ul li,
html[lang="ar"] body.blog-page .article-modal .modal-article-content ul li {
    padding-right: 1.8rem !important;
    padding-left: 0 !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content ul li::before,
html[lang="ar"] body.blog-page .article-modal .modal-article-content ul li::before {
    right: 0 !important;
    left: auto !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content ol li,
html[lang="ar"] body.blog-page .article-modal .modal-article-content ol li {
    padding-right: 2rem !important;
    padding-left: 0 !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content ol li::before,
html[lang="ar"] body.blog-page .article-modal .modal-article-content ol li::before {
    right: 0 !important;
    left: auto !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content ul ul,
html[lang="fa"] body.blog-page .article-modal .modal-article-content ol ol,
html[lang="fa"] body.blog-page .article-modal .modal-article-content ul ol,
html[lang="fa"] body.blog-page .article-modal .modal-article-content ol ul,
html[lang="ar"] body.blog-page .article-modal .modal-article-content ul ul,
html[lang="ar"] body.blog-page .article-modal .modal-article-content ol ol,
html[lang="ar"] body.blog-page .article-modal .modal-article-content ul ol,
html[lang="ar"] body.blog-page .article-modal .modal-article-content ol ul {
    margin-right: 1.5rem !important;
    margin-left: 0 !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content .callout,
html[lang="ar"] body.blog-page .article-modal .modal-article-content .callout {
    border-right: 4px solid !important;
    border-left: none !important;
    padding-right: 1.5rem !important;
    padding-left: 1.5rem !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content blockquote,
html[lang="ar"] body.blog-page .article-modal .modal-article-content blockquote {
    border-right: 4px solid var(--color-burgundy) !important;
    border-left: none !important;
    padding-right: 2rem !important;
    padding-left: 1.5rem !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content h2,
html[lang="ar"] body.blog-page .article-modal .modal-article-content h2,
html[lang="fa"] body.blog-page .article-modal .modal-article-content h3,
html[lang="ar"] body.blog-page .article-modal .modal-article-content h3,
html[lang="fa"] body.blog-page .article-modal .modal-article-content h4,
html[lang="ar"] body.blog-page .article-modal .modal-article-content h4,
html[lang="fa"] body.blog-page .article-modal .modal-article-content h5,
html[lang="ar"] body.blog-page .article-modal .modal-article-content h5 {
    text-align: right !important;
    direction: rtl !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content ul,
html[lang="fa"] body.blog-page .article-modal .modal-article-content ol,
html[lang="ar"] body.blog-page .article-modal .modal-article-content ul,
html[lang="ar"] body.blog-page .article-modal .modal-article-content ol,
body.blog-page html[lang="fa"] .article-modal .modal-article-content ul,
body.blog-page html[lang="fa"] .article-modal .modal-article-content ol,
body.blog-page html[lang="ar"] .article-modal .modal-article-content ul,
body.blog-page html[lang="ar"] .article-modal .modal-article-content ol {
    direction: rtl !important;
    text-align: right !important;
}

html[lang="fa"] body.blog-page .article-modal .modal-article-content blockquote,
html[lang="ar"] body.blog-page .article-modal .modal-article-content blockquote,
body.blog-page html[lang="fa"] .article-modal .modal-article-content blockquote,
body.blog-page html[lang="ar"] .article-modal .modal-article-content blockquote {
    border-right: 4px solid var(--color-burgundy) !important;
    border-left: none !important;
    padding-right: 1.5rem !important;
    padding-left: 0 !important;
    text-align: right !important;
    direction: rtl !important;
}

/* Mobile responsive styles for blog page */
@media (max-width: 768px) {
    html[lang="fa"] body.blog-page .blog-hero-content,
    html[lang="ar"] body.blog-page .blog-hero-content,
    body.blog-page html[lang="fa"] .blog-hero-content,
    body.blog-page html[lang="ar"] .blog-hero-content {
        text-align: center !important;
        direction: rtl !important;
    }
    
    html[lang="fa"] body.blog-page .featured-content,
    html[lang="ar"] body.blog-page .featured-content,
    body.blog-page html[lang="fa"] .featured-content,
    body.blog-page html[lang="ar"] .featured-content {
        text-align: right !important;
        direction: rtl !important;
    }
    
    html[lang="fa"] body.blog-page .article-content,
    html[lang="ar"] body.blog-page .article-content,
    body.blog-page html[lang="fa"] .article-content,
    body.blog-page html[lang="ar"] .article-content {
        text-align: right !important;
        direction: rtl !important;
    }
    
    html[lang="fa"] body.blog-page .newsletter-content,
    html[lang="ar"] body.blog-page .newsletter-content,
    body.blog-page html[lang="fa"] .newsletter-content,
    body.blog-page html[lang="ar"] .newsletter-content {
        text-align: center !important;
        direction: rtl !important;
    }
}

.rtl .filter-group {
    text-align: right;
}

.rtl .filter-buttons {
    justify-content: flex-end;
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.rtl .breadcrumb {
    flex-direction: row-reverse;
}

.rtl .breadcrumb span {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* ========================================
   MODALS
   ======================================== */

.rtl .modal-content {
    text-align: right;
}

.rtl .modal-header {
    flex-direction: row-reverse;
}

.rtl .close-btn {
    right: auto;
    left: 1rem;
}

/* ========================================
   SWIPER CAROUSEL
   ======================================== */

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

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

/* ========================================
   MOBILE NAVIGATION
   ======================================== */

.rtl .mobile-nav {
    right: auto;
    left: 0;
    transform: translateX(-100%);
}

.rtl .mobile-nav.active {
    transform: translateX(0);
}

.rtl .mobile-nav-links {
    text-align: right;
}

.rtl .mobile-nav-links li {
    padding-right: 0;
    padding-left: 1.5rem;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.rtl .float-left {
    float: right !important;
}

.rtl .float-right {
    float: left !important;
}

.rtl .ml-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

.rtl .mr-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    /* Contact section RTL for mobile */
    html[lang="fa"] .contact-section,
    html[lang="ar"] .contact-section {
        flex-direction: column !important;
        direction: rtl !important;
    }
    
    html[lang="fa"] .contact-info,
    html[lang="ar"] .contact-info {
        text-align: right !important;
        direction: rtl !important;
    }
    
    html[lang="fa"] .contact-form,
    html[lang="ar"] .contact-form {
        direction: rtl !important;
    }
    
    html[lang="fa"] .contact-form input,
    html[lang="fa"] .contact-form textarea,
    html[lang="fa"] .contact-form select,
    html[lang="ar"] .contact-form input,
    html[lang="ar"] .contact-form textarea,
    html[lang="ar"] .contact-form select {
        direction: rtl !important;
        text-align: right !important;
    }
    
    html[lang="fa"] .contact-form select,
    html[lang="ar"] .contact-form select {
        background-position: left 0.75rem center !important;
        padding-left: 2rem !important;
        padding-right: 1rem !important;
    }
    
    /* Story text RTL for mobile */
    html[lang="fa"] body.about-page .story-text,
    html[lang="ar"] body.about-page .story-text,
    body.about-page html[lang="fa"] .story-text,
    body.about-page html[lang="ar"] .story-text {
        text-align: right !important;
        direction: rtl !important;
    }
    
    html[lang="fa"] body.about-page .story-text h3,
    html[lang="ar"] body.about-page .story-text h3,
    html[lang="fa"] body.about-page .story-text p,
    html[lang="ar"] body.about-page .story-text p,
    body.about-page html[lang="fa"] .story-text h3,
    body.about-page html[lang="ar"] .story-text h3,
    body.about-page html[lang="fa"] .story-text p,
    body.about-page html[lang="ar"] .story-text p {
        text-align: right !important;
        direction: rtl !important;
    }
}

/* ========================================
   PRODUCT DETAIL PAGE RTL
   ======================================== */

/* ROOT: Main container RTL - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] main,
body.product-detail-page html[lang="ar"] main,
html[lang="fa"] body.product-detail-page main,
html[lang="ar"] body.product-detail-page main {
    direction: rtl;
}

/* Breadcrumb Navigation RTL - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] .breadcrumb,
body.product-detail-page html[lang="ar"] .breadcrumb,
html[lang="fa"] body.product-detail-page .breadcrumb,
html[lang="ar"] body.product-detail-page .breadcrumb {
    direction: rtl;
    text-align: right;
}

body.product-detail-page html[lang="fa"] .breadcrumb a,
body.product-detail-page html[lang="ar"] .breadcrumb a,
html[lang="fa"] body.product-detail-page .breadcrumb a,
html[lang="ar"] body.product-detail-page .breadcrumb a {
    direction: rtl;
}

body.product-detail-page html[lang="fa"] .breadcrumb span,
body.product-detail-page html[lang="ar"] .breadcrumb span,
html[lang="fa"] body.product-detail-page .breadcrumb span,
html[lang="ar"] body.product-detail-page .breadcrumb span {
    margin: 0 0.5rem;
    direction: rtl;
}

/* Breadcrumb separator flip for RTL - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] .breadcrumb span:not(:last-child)::after,
body.product-detail-page html[lang="ar"] .breadcrumb span:not(:last-child)::after,
html[lang="fa"] body.product-detail-page .breadcrumb span:not(:last-child)::after,
html[lang="ar"] body.product-detail-page .breadcrumb span:not(:last-child)::after {
    content: '';
}

/* ROOT: Product Detail Container RTL - Flip image and info positions - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] .product-detail-container,
body.product-detail-page html[lang="ar"] .product-detail-container,
html[lang="fa"] body.product-detail-page .product-detail-container,
html[lang="ar"] body.product-detail-page .product-detail-container {
    flex-direction: row-reverse !important;
    direction: rtl !important;
    padding-right: 4rem !important;
    padding-left: 2rem !important;
}

/* Override RTL layout on smaller screens - stack vertically with image on top */
@media (max-width: 1024px) {
    html[lang="fa"] body.product-detail-page .product-detail-container,
    html[lang="ar"] body.product-detail-page .product-detail-container {
        flex-direction: column !important; /* Stack vertically on smaller screens */
        padding-right: clamp(1.5rem, 4vw, 2rem) !important;
        padding-left: clamp(1.5rem, 4vw, 2rem) !important;
    }
}

/* Product Images Section RTL - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] .product-images,
body.product-detail-page html[lang="ar"] .product-images,
html[lang="fa"] body.product-detail-page .product-images,
html[lang="ar"] body.product-detail-page .product-images {
    direction: rtl !important;
    order: 2 !important; /* Image on right side in RTL (desktop) */
}

/* ROOT: Product Information Section RTL - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] .product-info,
body.product-detail-page html[lang="ar"] .product-info,
html[lang="fa"] body.product-detail-page .product-info,
html[lang="ar"] body.product-detail-page .product-info {
    direction: rtl !important;
    text-align: right !important;
    order: 1 !important; /* Info on left side in RTL (desktop) */
    align-items: flex-start !important; /* Align content to start (right side in RTL) */
}

/* Override RTL order on smaller screens - image on top, text below */
@media (max-width: 1024px) {
    body.product-detail-page html[lang="fa"] .product-images,
    body.product-detail-page html[lang="ar"] .product-images,
    html[lang="fa"] body.product-detail-page .product-images,
    html[lang="ar"] body.product-detail-page .product-images {
        order: 1 !important; /* Image first on mobile */
    }
    
    body.product-detail-page html[lang="fa"] .product-info,
    body.product-detail-page html[lang="ar"] .product-info,
    html[lang="fa"] body.product-detail-page .product-info,
    html[lang="ar"] body.product-detail-page .product-info {
        order: 2 !important; /* Text second on mobile */
    }
}

/* Brand and Category Row RTL - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] .brand-category-row,
body.product-detail-page html[lang="ar"] .brand-category-row,
html[lang="fa"] body.product-detail-page .brand-category-row,
html[lang="ar"] body.product-detail-page .brand-category-row {
    direction: rtl !important;
    flex-direction: row !important; /* Keep row direction, RTL will reverse naturally */
}

/* Brand Tag RTL - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] .brand-tag,
body.product-detail-page html[lang="ar"] .brand-tag,
html[lang="fa"] body.product-detail-page .brand-tag,
html[lang="ar"] body.product-detail-page .brand-tag {
    direction: rtl;
    text-align: center;
    align-self: flex-start;
}

/* Product Name RTL - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] .product-info h1,
body.product-detail-page html[lang="ar"] .product-info h1,
html[lang="fa"] body.product-detail-page .product-info h1,
html[lang="ar"] body.product-detail-page .product-info h1 {
    text-align: right;
    direction: rtl;
    align-self: flex-start;
}

/* Product Category RTL - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] .product-category,
body.product-detail-page html[lang="ar"] .product-category,
html[lang="fa"] body.product-detail-page .product-category,
html[lang="ar"] body.product-detail-page .product-category {
    text-align: right;
    direction: rtl;
    align-self: flex-start;
}

body.product-detail-page html[lang="fa"] .product-category span,
body.product-detail-page html[lang="ar"] .product-category span,
html[lang="fa"] body.product-detail-page .product-category span,
html[lang="ar"] body.product-detail-page .product-category span {
    direction: rtl;
}

/* Product Description RTL - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] .product-description,
body.product-detail-page html[lang="ar"] .product-description,
html[lang="fa"] body.product-detail-page .product-description,
html[lang="ar"] body.product-detail-page .product-description {
    direction: rtl;
    text-align: right;
    align-self: flex-start;
    width: 100%;
}

body.product-detail-page html[lang="fa"] .product-description h3,
body.product-detail-page html[lang="ar"] .product-description h3,
html[lang="fa"] body.product-detail-page .product-description h3,
html[lang="ar"] body.product-detail-page .product-description h3 {
    text-align: right;
    direction: rtl;
}

body.product-detail-page html[lang="fa"] .product-description p,
body.product-detail-page html[lang="ar"] .product-description p,
html[lang="fa"] body.product-detail-page .product-description p,
html[lang="ar"] body.product-detail-page .product-description p {
    text-align: right;
    direction: rtl;
    line-height: 1.8 !important; /* Increased line-height for better readability in RTL */
}

/* Product Actions RTL - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] .product-actions,
body.product-detail-page html[lang="ar"] .product-actions,
html[lang="fa"] body.product-detail-page .product-actions,
html[lang="ar"] body.product-detail-page .product-actions {
    direction: rtl;
    justify-content: flex-end;
    align-self: flex-start;
    width: 100%;
    flex-wrap: wrap;
}

body.product-detail-page html[lang="fa"] .product-actions .btn-primary,
body.product-detail-page html[lang="fa"] .product-actions .btn-secondary,
body.product-detail-page html[lang="ar"] .product-actions .btn-primary,
body.product-detail-page html[lang="ar"] .product-actions .btn-secondary,
html[lang="fa"] body.product-detail-page .product-actions .btn-primary,
html[lang="fa"] body.product-detail-page .product-actions .btn-secondary,
html[lang="ar"] body.product-detail-page .product-actions .btn-primary,
html[lang="ar"] body.product-detail-page .product-actions .btn-secondary {
    direction: rtl;
    text-align: center;
    flex: 1;
    min-width: 200px;
    width: 100%;
}

/* Main Image Wrapper RTL - PRODUCT DETAIL PAGE ONLY */
body.product-detail-page html[lang="fa"] .main-image-wrapper,
body.product-detail-page html[lang="ar"] .main-image-wrapper,
html[lang="fa"] body.product-detail-page .main-image-wrapper,
html[lang="ar"] body.product-detail-page .main-image-wrapper {
    direction: rtl;
}

/* Responsive adjustments for product detail RTL - PRODUCT DETAIL PAGE ONLY */
@media (max-width: 768px) {
    body.product-detail-page html[lang="fa"] .product-detail-container,
    body.product-detail-page html[lang="ar"] .product-detail-container,
    html[lang="fa"] body.product-detail-page .product-detail-container,
    html[lang="ar"] body.product-detail-page .product-detail-container {
        flex-direction: column !important; /* Override desktop row-reverse */
        padding-right: clamp(1.5rem, 4vw, 2rem) !important;
        padding-left: clamp(1.5rem, 4vw, 2rem) !important;
    }
    
    body.product-detail-page html[lang="fa"] .product-images,
    body.product-detail-page html[lang="ar"] .product-images,
    html[lang="fa"] body.product-detail-page .product-images,
    html[lang="ar"] body.product-detail-page .product-images {
        order: 1 !important; /* Image first on mobile - override desktop order */
    }
    
    body.product-detail-page html[lang="fa"] .product-info,
    body.product-detail-page html[lang="ar"] .product-info,
    html[lang="fa"] body.product-detail-page .product-info,
    html[lang="ar"] body.product-detail-page .product-info {
        order: 2 !important; /* Info second on mobile - override desktop order */
        align-items: flex-start;
    }
    
    body.product-detail-page html[lang="fa"] .product-actions,
    body.product-detail-page html[lang="ar"] .product-actions,
    html[lang="fa"] body.product-detail-page .product-actions,
    html[lang="ar"] body.product-detail-page .product-actions {
        justify-content: stretch;
    }
    
    body.product-detail-page html[lang="fa"] .product-actions .btn-primary,
    body.product-detail-page html[lang="fa"] .product-actions .btn-secondary,
    body.product-detail-page html[lang="ar"] .product-actions .btn-primary,
    body.product-detail-page html[lang="ar"] .product-actions .btn-secondary,
    html[lang="fa"] body.product-detail-page .product-actions .btn-primary,
    html[lang="fa"] body.product-detail-page .product-actions .btn-secondary,
    html[lang="ar"] body.product-detail-page .product-actions .btn-primary,
    html[lang="ar"] body.product-detail-page .product-actions .btn-secondary {
        width: 100%;
    }
}

/* ========================================
   PRODUCTS PAGE RTL
   ======================================== */

/* ROOT: Main container RTL - PRODUCTS PAGE ONLY */
body.products-page html[lang="fa"] main,
body.products-page html[lang="ar"] main,
html[lang="fa"] body.products-page main,
html[lang="ar"] body.products-page main {
    direction: rtl;
}

/* Products Page Layout RTL */
body.products-page html[lang="fa"] .split-layout-container,
body.products-page html[lang="ar"] .split-layout-container,
html[lang="fa"] body.products-page .split-layout-container,
html[lang="ar"] body.products-page .split-layout-container {
    flex-direction: row-reverse;
    direction: rtl;
}

body.products-page html[lang="fa"] .brand-partition,
body.products-page html[lang="ar"] .brand-partition,
html[lang="fa"] body.products-page .brand-partition,
html[lang="ar"] body.products-page .brand-partition {
    text-align: right;
    direction: rtl;
}

body.products-page html[lang="fa"] .category-filters,
body.products-page html[lang="ar"] .category-filters,
html[lang="fa"] body.products-page .category-filters,
html[lang="ar"] body.products-page .category-filters {
    justify-content: center !important;
    direction: ltr !important;
    text-align: center;
}

body.products-page html[lang="fa"] .category-btn,
body.products-page html[lang="ar"] .category-btn,
html[lang="fa"] body.products-page .category-btn,
html[lang="ar"] body.products-page .category-btn {
    margin-right: 0;
    margin-left: 0;
    direction: ltr !important;
}

body.products-page html[lang="fa"] .product-grid-split,
body.products-page html[lang="ar"] .product-grid-split,
html[lang="fa"] body.products-page .product-grid-split,
html[lang="ar"] body.products-page .product-grid-split {
    justify-content: flex-end;
    direction: rtl;
}

body.products-page html[lang="fa"] .product-name-label,
body.products-page html[lang="ar"] .product-name-label,
html[lang="fa"] body.products-page .product-name-label,
html[lang="ar"] body.products-page .product-name-label {
    text-align: right;
    direction: rtl;
}

body.products-page html[lang="fa"] .no-products,
body.products-page html[lang="ar"] .no-products,
html[lang="fa"] body.products-page .no-products,
html[lang="ar"] body.products-page .no-products {
    text-align: right;
    direction: rtl;
}

/* ========================================
   FORCE LTR FOR OTHER PAGES
   (About, Contact, Blog, Catalog)
   ======================================== */

/* Force LTR direction for pages that should always be LTR */
body.about-page,
body.catalog-page,
body:not(.home):not(.product-detail-page):not(.products-page):not(.blog-page) {
    direction: ltr !important;
}

/* Override any RTL styles for pages that should be LTR */
body.about-page html[lang="fa"],
body.about-page html[lang="ar"],
html[lang="fa"] body.about-page,
html[lang="ar"] body.about-page {
    direction: ltr !important;
}

/* Contact page (no body class) - force LTR */
body:not(.home):not(.product-detail-page):not(.products-page):not(.about-page):not(.blog-page) {
    direction: ltr !important;
}

