/* src/CitySystemsKSA/Bundle/ThemeBundle/Resources/public/css/styles.css */

/* Import Arabic fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Roboto:wght@300;400;500;700&display=swap');

/* Root Variables */
:root {
    --cs-navy: #14375a;
    --cs-navy-dark: #0c2240;
    --cs-green: #6fa12b;
    --cs-green-dark: #5a8a1f;
    --cs-gold: #ffd700;
    --cs-text: #333333;
    --cs-text-light: #5a7184;
    --cs-bg: #ffffff;
    --cs-border: #e0e0e0;
    --cs-gray-light: #cbd5e0;
    --font-primary: 'Cairo', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    --cs-radius-sm: 4px;
    --cs-radius-md: 6px;
    --cs-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --cs-shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --cs-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --cs-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --cs-container-width: 1320px;
}

/* Base Styles */
body {
    font-family: var(--font-primary);
    color: var(--cs-text);
    background-color: var(--cs-bg);
    direction: ltr;
}

body[dir="rtl"] {
    direction: rtl;
    font-family: var(--font-primary);
}

/* RTL overflow is handled in the RTL section below */

/* ==========================================================================
   HEADER
   ========================================================================== */

.cs-header {
    width: 100%;
    z-index: 1000;
}

.cs-header--sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: var(--cs-shadow-md);
}

.cs-header--sticky .cs-header__topbar {
    display: none;
}

.cs-header__container {
    max-width: var(--cs-container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Top Bar */
.cs-header__topbar {
    background: var(--cs-navy-dark);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cs-header__topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-header__topbar-contact {
    display: flex;
    gap: 1.25rem;
}

.cs-header__topbar-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--cs-transition);
}

.cs-header__topbar-link:hover {
    color: #fff;
}

.cs-header__topbar-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.78rem;
}

.cs-header__topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cs-header__topbar-sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.78rem;
}

.cs-header__topbar-util {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.78rem;
    transition: color var(--cs-transition);
}

.cs-header__topbar-util:hover {
    color: #fff;
}

.cs-header__icon {
    flex-shrink: 0;
}

/* Language Switcher */
.cs-header__lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: var(--cs-radius-sm);
    cursor: pointer;
    transition: all var(--cs-transition);
    letter-spacing: 0.02em;
    line-height: 1;
}

.cs-header__lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}

.cs-header__lang-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

.cs-header__lang-icon {
    opacity: 0.7;
    flex-shrink: 0;
}

/* Main Bar */
.cs-header__main {
    background: #fff;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--cs-border);
}

.cs-header__main-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: space-around;
}

.cs-header__logo-link {
    flex-shrink: 0;
}

.cs-header__logo {
    max-height: 50px;
    transition: opacity var(--cs-transition);
}

.cs-header__logo:hover {
    opacity: 0.85;
}

/* Search */
.cs-header__search {
    flex: 1;
    max-width: 600px;
}

.cs-header__search-form {
    display: flex;
    border: 2px solid var(--cs-border);
    border-radius: var(--cs-radius-md);
    overflow: hidden;
    transition: border-color var(--cs-transition), box-shadow var(--cs-transition);
    background: #fff;
}

.cs-header__search-form:focus-within {
    border-color: var(--cs-green);
    box-shadow: 0 0 0 3px rgba(111, 161, 43, 0.1);
}

.cs-header__search-input {
    flex: 1;
    border: none;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    outline: none;
    background: transparent;
}

.cs-header__search-btn {
    background: var(--cs-green);
    border: none;
    padding: 0.6rem 1rem;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    border-radius: 0 var(--cs-radius-md) var(--cs-radius-md) 0;
    transition: background var(--cs-transition);
}

.cs-header__search-btn:hover {
    background: var(--cs-green-dark);
}

/* Talk to Sales */
.cs-header__sales-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    text-decoration: none;
    color: var(--cs-navy);
    flex-shrink: 0;
    transition: color var(--cs-transition);
}

.cs-header__sales-phone span {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.cs-header__sales-phone small {
    font-size: 0.7rem;
    color: var(--cs-text-light);
    font-weight: 400;
}

.cs-header__sales-phone strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cs-navy);
}

.cs-header__sales-phone:hover {
    color: var(--cs-green);
}

.cs-header__sales-phone:hover strong {
    color: var(--cs-green);
}

/* ---- Header Actions (icon buttons) ---- */
.cs-header__actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.cs-header__action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: var(--cs-navy);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem 0.55rem;
    transition: color var(--cs-transition);
    font-family: var(--font-primary);
    position: relative;
}

.cs-header__action-btn:hover {
    color: var(--cs-green);
}

/* Icon circle wrap — gives each icon a visible touch target area */
.cs-header__action-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cs-bg);
    border: 1px solid var(--cs-border);
    transition: background var(--cs-transition), border-color var(--cs-transition), color var(--cs-transition);
}

.cs-header__action-btn:hover .cs-header__action-icon-wrap {
    background: rgba(111, 161, 43, 0.08);
    border-color: var(--cs-green);
    color: var(--cs-green);
}

/* Legacy wrapper kept for backwards compat */
.cs-header__cart-icon-wrap {
    position: relative;
    display: inline-flex;
}

.cs-header__action-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
}

.cs-header__search-toggle {
    display: none;
}

/* ---- Hamburger ---- */
.cs-header__hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--cs-navy);
    cursor: pointer;
    padding: 0.4rem;
    margin-left: 0.5rem;
    border-left: 1px solid var(--cs-border);
    padding-left: 0.75rem;
}

.cs-header__hamburger-close {
    display: none;
}

.cs-header__hamburger--active .cs-header__hamburger-open {
    display: none;
}

.cs-header__hamburger--active .cs-header__hamburger-close {
    display: flex;
}

/* ---- Mini-Cart Dropdown ---- */
.cs-header__cart-wrapper {
    position: relative;
}

.cs-header__mini-cart {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    padding-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.15s ease, visibility 0.2s;
    z-index: 1000;
}

.cs-header__cart-wrapper:hover .cs-header__mini-cart {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.cs-header__mini-cart-inner {
    background: #fff;
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-md);
    box-shadow: var(--cs-shadow-lg);
    padding: 1rem;
}

.cs-header__mini-cart-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--cs-navy);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--cs-border);
}

.cs-header__mini-cart-header strong {
    font-size: 0.85rem;
}

.cs-header__mini-cart-text {
    font-size: 0.82rem;
    color: var(--cs-text-light);
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.cs-header__mini-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.55rem 1rem;
    background: var(--cs-green);
    color: #fff;
    border: none;
    border-radius: var(--cs-radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--cs-transition);
    font-family: var(--font-primary);
}

.cs-header__mini-cart-btn:hover {
    background: var(--cs-green-dark);
}

/* Drawer Header (hidden on desktop) */
.cs-header__drawer-header {
    display: none;
}

/* Overlay (hidden on desktop) */
.cs-overlay {
    display: none;
}

/* Navigation Bar */
.cs-header__nav {
    background: linear-gradient(135deg, var(--cs-navy) 0%, var(--cs-navy-dark) 100%);
    box-shadow: var(--cs-shadow-sm);
}

.cs-header__nav-inner {
    display: flex;
    align-items: center;
    gap: 0;
}

.cs-header__nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.7rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background var(--cs-transition), color var(--cs-transition);
    white-space: nowrap;
    position: relative;
}

.cs-header__nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--cs-radius-sm) var(--cs-radius-sm) 0 0;
    color: #fff;
}

/* Active Nav State */
.cs-header__nav-link--active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.cs-header__nav-link--active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-bottom: 3px solid var(--cs-green);
}

/* Register / Sign In CTA */
.cs-header__nav-link--cta {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--cs-radius-sm);
    margin-left: auto;
    padding: 0.45rem 1rem;
    transition: background var(--cs-transition), color var(--cs-transition);
}

.cs-header__nav-link--cta:hover {
    background: #fff;
    color: var(--cs-navy);
}

/* Mega Menu */
.cs-header__mega-trigger {
    position: relative;
}

.cs-header__nav-link--mega {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-primary);
}

.cs-header__chevron {
    transition: transform var(--cs-transition);
}

.cs-header__mega-trigger--open .cs-header__chevron {
    transform: rotate(180deg);
}

.cs-header__mega-panel {
    position: fixed;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 999;
    box-shadow: var(--cs-shadow-lg);
    border-top: 3px solid var(--cs-green);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.15s ease, visibility 0.2s;
}

.cs-header__mega-trigger--open .cs-header__mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.cs-header__mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.cs-header__mega-heading {
    display: block;
    color: var(--cs-navy);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--cs-border);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--cs-transition);
}

.cs-header__mega-heading:hover {
    color: var(--cs-green);
}

.cs-header__mega-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cs-header__mega-list li {
    margin-bottom: 0.35rem;
}

.cs-header__mega-list a {
    color: var(--cs-text-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--cs-transition);
    display: block;
    padding: 0.15rem 0;
}

.cs-header__mega-list a:hover {
    color: var(--cs-navy);
}

.cs-header__mega-view-all {
    color: var(--cs-green) !important;
    font-weight: 600;
}

.cs-header__mega-view-all:hover {
    color: var(--cs-green-dark) !important;
}

/* Mega Menu — Featured Promo Strip */
.cs-header__mega-featured {
    border-top: 1px solid var(--cs-border);
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f0f7e8 0%, #f8faf5 100%);
}

.cs-header__mega-promo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cs-header__mega-promo > svg {
    color: var(--cs-gold);
    flex-shrink: 0;
}

.cs-header__mega-promo-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.cs-header__mega-promo-text strong {
    font-size: 0.88rem;
    color: var(--cs-navy);
}

.cs-header__mega-promo-text span {
    font-size: 0.78rem;
    color: var(--cs-text-light);
}

.cs-header__mega-promo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    padding: 0.45rem 1rem;
    background: var(--cs-green);
    color: #fff;
    border-radius: var(--cs-radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--cs-transition);
    font-family: var(--font-primary);
}

.cs-header__mega-promo-link:hover {
    background: var(--cs-green-dark);
}

/* Focus Visible */
.cs-header__nav-link:focus-visible,
.cs-header__action-btn:focus-visible,
.cs-header__search-btn:focus-visible,
.cs-header__hamburger:focus-visible,
.cs-header__topbar-link:focus-visible,
.cs-header__topbar-util:focus-visible,
.cs-header__sales-phone:focus-visible,
.cs-header__mega-heading:focus-visible,
.cs-header__mega-list a:focus-visible,
.cs-footer__links a:focus-visible,
.cs-footer__social-link:focus-visible,
.cs-footer__cta-btn:focus-visible,
.cs-footer__legal-links a:focus-visible,
.cs-back-to-top:focus-visible {
    outline: 2px solid var(--cs-green);
    outline-offset: 2px;
}

.cs-header__nav-link:focus:not(:focus-visible),
.cs-header__action-btn:focus:not(:focus-visible),
.cs-header__hamburger:focus:not(:focus-visible),
.cs-back-to-top:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.cs-footer {
    margin-top: auto;
}

/* Trust Badges */
.cs-footer__badges {
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 1.25rem 0;
}

.cs-footer__container {
    max-width: var(--cs-container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.cs-footer__badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.cs-footer__badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    border-left: 3px solid var(--cs-green);
    padding-left: 1rem;
}

.cs-footer__badge-icon {
    color: var(--cs-green);
    flex-shrink: 0;
}

.cs-footer__badge-content {
    display: flex;
    flex-direction: column;
}

.cs-footer__badge-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cs-navy);
}

.cs-footer__badge-subtitle {
    font-size: 0.78rem;
    color: var(--cs-text-light);
    font-weight: 400;
}

.cs-footer__badge-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cs-navy);
}

/* CTA Bar */
.cs-footer__cta-bar {
    background: linear-gradient(135deg, var(--cs-navy) 0%, #1a4a6e 100%);
}

.cs-footer__cta-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
}

.cs-footer__cta-text {
    color: #fff;
}

.cs-footer__cta-text strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.cs-footer__cta-text span {
    font-size: 0.88rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

.cs-footer__cta-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cs-footer__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.5rem;
    border-radius: var(--cs-radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--cs-transition), color var(--cs-transition);
    white-space: nowrap;
    font-family: var(--font-primary);
}

.cs-footer__cta-btn--phone,
.cs-footer__cta-btn--email {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.cs-footer__cta-btn--phone:hover,
.cs-footer__cta-btn--email:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cs-footer__cta-btn--quote {
    background: var(--cs-green);
    color: #fff;
    border: 1px solid var(--cs-green);
}

.cs-footer__cta-btn--quote:hover {
    background: var(--cs-green-dark);
    border-color: var(--cs-green-dark);
}

.cs-footer__cta-btn--register {
    background: #fff;
    color: var(--cs-navy);
    border: 1px solid #fff;
}

.cs-footer__cta-btn--register:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Main Footer */
.cs-footer__main {
    background: var(--cs-navy);
    color: rgba(255, 255, 255, 0.75);
    padding: 2.5rem 0 2rem;
}

.cs-footer__grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.3fr;
    gap: 2.5rem;
}

.cs-footer__col:nth-child(-n+3) {
    border-right: 1px solid rgba(255,255,255,0.08);
    padding-right: 1.5rem;
}

.cs-footer__logo {
    max-height: 40px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.cs-footer__desc {
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.65);
}

.cs-footer__social {
    display: flex;
    gap: 0.75rem;
}

.cs-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    transition: background var(--cs-transition), color var(--cs-transition);
}

.cs-footer__social-link:hover {
    background: var(--cs-green);
    color: #fff;
}

.cs-footer__heading {
    color: var(--cs-green);
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    letter-spacing: 0.04em;
    border-left: 3px solid var(--cs-green);
    padding-left: 0.75rem;
}

.cs-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cs-footer__links li {
    margin-bottom: 0.6rem;
}

.cs-footer__links a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color var(--cs-transition);
    display: block;
}

.cs-footer__links a:hover {
    color: var(--cs-green);
}

.cs-footer__contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cs-footer__contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.65);
}

.cs-footer__contact-list li svg {
    flex-shrink: 0;
    color: var(--cs-green);
    margin-top: 0.15rem;
}

.cs-footer__contact-list a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color var(--cs-transition);
}

.cs-footer__contact-list a:hover {
    color: #fff;
}

.cs-footer__branches {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cs-footer__branches-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cs-green);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cs-footer__branches-cities {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

/* Bottom Bar */
.cs-footer__bottom {
    background: var(--cs-navy-dark);
    padding: 1.25rem 0;
}

.cs-footer__bottom-inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.cs-footer__legal-links {
    display: flex;
    gap: 1.5rem;
}

.cs-footer__legal-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.78rem;
    transition: color var(--cs-transition);
}

.cs-footer__legal-links a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.cs-footer__copyright {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.cs-footer__cr-number {
    display: inline-block;
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

/* Back to Top */
.cs-back-to-top {
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    z-index: 900;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--cs-navy);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--cs-shadow-md);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s, background var(--cs-transition);
}

.cs-back-to-top--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cs-back-to-top:hover {
    background: var(--cs-navy-dark);
}

/* ==========================================================================
   PRODUCT GRID (preserved)
   ========================================================================== */

.product-item {
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.product-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
    border-color: var(--cs-navy);
}

.product-image {
    border-radius: 6px;
    overflow: hidden;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cs-text);
    margin: 15px 0 10px;
}

.product-price {
    color: var(--cs-green);
    font-size: 24px;
    font-weight: 700;
}

.product-price .currency {
    font-size: 16px;
    margin-left: 5px;
}

/* Buttons */
.btn-primary {
    background-color: var(--cs-navy);
    border: none;
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-primary:hover {
    background-color: var(--cs-navy-dark);
    box-shadow: 0 4px 12px rgba(20, 55, 90, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--cs-green);
    border: none;
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--cs-green-dark);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Hide Talk to Sales at 1280px */
@media (max-width: 1280px) {
    .cs-header__sales-phone {
        display: none;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .cs-header__search {
        max-width: 360px;
    }

    /* Hide labels, tighten icon buttons */
    .cs-header__action-label {
        display: none;
    }

    .cs-header__action-icon-wrap {
        width: 36px;
        height: 36px;
    }

    .cs-footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .cs-footer__col:nth-child(-n+3) {
        border-right: none;
        padding-right: 0;
    }

    .cs-footer__cta-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .cs-footer__cta-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Mobile — 820px breakpoint for nav/drawer */
@media (max-width: 820px) {
    /* Header */
    .cs-header__topbar-contact {
        gap: 0.75rem;
    }

    .cs-header__topbar-link span {
        display: none;
    }

    .cs-header__search {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--cs-border);
        max-width: 100%;
        z-index: 10;
    }

    .cs-header__search--open {
        display: block;
    }

    .cs-header__main-inner {
        position: relative;
    }

    .cs-header__search-toggle {
        display: flex;
    }

    .cs-header__action-label {
        display: none;
    }

    /* Smaller icon circles on mobile */
    .cs-header__action-icon-wrap {
        width: 36px;
        height: 36px;
    }

    .cs-header__action-btn {
        padding: 0.3rem 0.35rem;
    }

    /* Hamburger — visually separated from icons, pushed to far right */
    .cs-header__hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-left: auto;
        padding-left: 0;
        border-left: none;
        background: var(--cs-navy);
        color: #fff;
        border-radius: var(--cs-radius-sm);
    }

    .cs-header__hamburger:active {
        background: var(--cs-navy-dark);
    }

    /* Hide mini-cart hover on mobile (tap goes directly to cart) */
    .cs-header__mini-cart {
        display: none;
    }

    /* Mobile Drawer Nav */
    .cs-header__nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        background: var(--cs-navy);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        z-index: 1100;
        display: flex;
        flex-direction: column;
        box-shadow: none;
    }

    .cs-header__nav--open {
        transform: translateX(0);
    }

    /* Drawer Header */
    .cs-header__drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .cs-header__drawer-logo {
        height: 32px;
        filter: brightness(0) invert(1);
    }

    .cs-header__drawer-close {
        color: white;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.25rem;
    }

    /* Overlay */
    .cs-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1050;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }

    .cs-overlay--active {
        opacity: 1;
        pointer-events: auto;
    }

    .cs-header__nav-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cs-header__nav-link {
        padding: 0.8rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .cs-header__nav-link--active::after {
        display: none;
    }

    .cs-header__nav-link--cta {
        margin-left: 0;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.08);
    }

    /* Mega Menu Mobile */
    .cs-header__mega-trigger {
        position: static;
    }

    .cs-header__mega-panel {
        position: static;
        box-shadow: none;
        border-top: none;
        transform: none;
        background: rgba(255, 255, 255, 0.05);
        display: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .cs-header__mega-trigger--open .cs-header__mega-panel {
        display: block;
        transform: none;
    }

    .cs-header__mega-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }

    .cs-header__mega-heading {
        color: rgba(255, 255, 255, 0.9);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 0.6rem 2rem;
        margin-bottom: 0;
        font-size: 0.85rem;
    }

    .cs-header__mega-heading:hover {
        color: #fff;
    }

    .cs-header__mega-list {
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .cs-header__mega-list--open {
        max-height: 500px;
    }

    .cs-header__mega-list a {
        color: rgba(255, 255, 255, 0.7);
        padding: 0.4rem 3rem;
        font-size: 0.82rem;
    }

    .cs-header__mega-list a:hover {
        color: #fff;
    }

    .cs-header__mega-col {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Hide mega featured on mobile */
    .cs-header__mega-featured {
        display: none;
    }

    /* Footer */
    .cs-footer__badges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .cs-footer__badge {
        flex-direction: column;
        text-align: center;
        border-left: none;
        padding-left: 0;
    }

    .cs-footer__badge-content {
        align-items: center;
    }

    .cs-footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cs-footer__col:nth-child(-n+3) {
        border-right: none;
        padding-right: 0;
    }

    .cs-footer__legal-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .cs-footer__bottom-inner {
        flex-direction: column;
        text-align: center;
    }

    .product-item {
        margin-bottom: 20px;
    }

    /* Footer Accordion */
    .cs-footer__heading {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cs-footer__heading::after {
        content: '+';
        font-size: 1.2rem;
        transition: transform 0.3s;
    }

    .cs-footer__heading--open::after {
        content: '\2212';
    }

    .cs-footer__links,
    .cs-footer__contact-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .cs-footer__list--open {
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .cs-footer__badges-grid {
        grid-template-columns: 1fr;
    }

    .cs-header__topbar {
        text-align: center;
    }

    .cs-header__topbar-inner {
        justify-content: center;
    }

    .cs-header__topbar-right {
        display: none;
    }

    /* Stack CTA buttons on small screens */
    .cs-footer__cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cs-footer__cta-btn {
        justify-content: center;
    }
}

/* ==========================================================================
   RTL
   ========================================================================== */

/* ===== Global RTL Fixes ===== */
[dir="rtl"] {
    text-align: right;
}



/* ===== Forms & Inputs ===== */
[dir="rtl"] input[type="text"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="password"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="number"],
[dir="rtl"] input[type="search"],
[dir="rtl"] textarea,
[dir="rtl"] select {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .form-control,
[dir="rtl"] .input-widget {
    text-align: right;
}

[dir="rtl"] label {
    text-align: right;
}

[dir="rtl"] .control-label {
    text-align: right;
}

[dir="rtl"] .form-horizontal .control-label {
    text-align: right;
}

/* ===== Buttons RTL ===== */
[dir="rtl"] .btn {
    text-align: center;
}

[dir="rtl"] .btn svg,
[dir="rtl"] .btn i {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* ===== Checkout Pages RTL ===== */
[dir="rtl"] .checkout-order-summary,
[dir="rtl"] .checkout-content,
[dir="rtl"] .checkout__container {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .checkout-order-summary__item {
    text-align: right;
}

[dir="rtl"] .checkout-order-summary__title {
    text-align: right;
}

[dir="rtl"] .checkout-order-summary__price {
    text-align: left;
}

[dir="rtl"] .checkout-order-summary__table td {
    text-align: right;
}

[dir="rtl"] .checkout-order-summary__table td:last-child {
    text-align: left;
}

[dir="rtl"] .order-checkout-widget__title {
    text-align: right;
}

[dir="rtl"] .grid-row {
    direction: rtl;
}

[dir="rtl"] .grid-cell {
    text-align: right;
}

/* Checkout steps */
[dir="rtl"] .checkout-step {
    text-align: right;
}

[dir="rtl"] .checkout-step__title {
    text-align: right;
}

[dir="rtl"] .checkout-step__content {
    direction: rtl;
}

/* Checkout sidebar */
[dir="rtl"] .checkout-sidebar {
    text-align: right;
}

[dir="rtl"] .checkout-sidebar__title {
    text-align: right;
    border-right: 3px solid var(--cs-green);
    border-left: none;
    padding-right: 0.75rem;
    padding-left: 0;
}

/* ===== RFQ (Request for Quote) RTL ===== */
[dir="rtl"] .rfq-form,
[dir="rtl"] .rfq-content,
[dir="rtl"] .request-form {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .rfq-form__title,
[dir="rtl"] .page-title {
    text-align: right;
}

[dir="rtl"] .rfq-form .control-label {
    text-align: right;
}

[dir="rtl"] .rfq-product-line-item {
    text-align: right;
}

[dir="rtl"] .product-item__title {
    text-align: right;
}

/* ===== Product Grid & Lists RTL ===== */
[dir="rtl"] .product-item {
    text-align: right;
}

[dir="rtl"] .product-item__title,
[dir="rtl"] .product-title {
    text-align: right;
}

[dir="rtl"] .product-item__price,
[dir="rtl"] .product-price {
    text-align: right;
}

[dir="rtl"] .product-item__sku {
    text-align: right;
}

[dir="rtl"] .product-view {
    direction: rtl;
}

[dir="rtl"] .product-view__title {
    text-align: right;
}

/* ===== Category Pages RTL ===== */
[dir="rtl"] .category-list,
[dir="rtl"] .catalog-index {
    direction: rtl;
}

[dir="rtl"] .category-list__item {
    text-align: right;
}

[dir="rtl"] .category-title {
    text-align: right;
}

/* ===== Tables RTL ===== */
[dir="rtl"] table {
    direction: rtl;
}

[dir="rtl"] th,
[dir="rtl"] td {
    text-align: right;
}

[dir="rtl"] .grid-header-cell {
    text-align: right;
}

[dir="rtl"] .grid-body-cell {
    text-align: right;
}

/* ===== Navigation & Menus RTL ===== */
[dir="rtl"] .main-menu,
[dir="rtl"] .navigation {
    direction: rtl;
}

[dir="rtl"] .menu-item {
    text-align: right;
}

[dir="rtl"] .dropdown-menu {
    text-align: right;
    left: auto;
    right: 0;
}

/* ===== Breadcrumbs RTL ===== */
[dir="rtl"] .breadcrumbs {
    direction: rtl;
}

[dir="rtl"] .breadcrumb-item::before {
    content: "\\";
    padding: 0 0.5rem;
}

[dir="rtl"] .breadcrumb-item {
    float: right;
}

/* ===== Page Content RTL ===== */
[dir="rtl"] .page-content,
[dir="rtl"] .page-main,
[dir="rtl"] .content-wrapper {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .page-title {
    text-align: right;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
    text-align: right;
}

[dir="rtl"] p {
    text-align: right;
}

/* ===== Alerts & Messages RTL ===== */
[dir="rtl"] .alert,
[dir="rtl"] .message {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .alert-icon {
    margin-left: 0.75rem;
    margin-right: 0;
    float: right;
}

/* ===== Filters & Sidebar RTL ===== */
[dir="rtl"] .sidebar,
[dir="rtl"] .filter-box {
    text-align: right;
}

[dir="rtl"] .filter-item {
    text-align: right;
}

[dir="rtl"] .filter-criteria {
    direction: rtl;
}

/* ===== Pagination RTL ===== */
[dir="rtl"] .pagination {
    direction: rtl;
}

[dir="rtl"] .page-link {
    margin-left: 0;
    margin-right: -1px;
}

/* ===== Lists RTL ===== */
[dir="rtl"] ul,
[dir="rtl"] ol {
    padding-right: 1.5rem;
    padding-left: 0;
}

[dir="rtl"] li {
    text-align: right;
}

/* ===== Icons & Arrows RTL ===== */
[dir="rtl"] .arrow-right::before {
    content: "←";
}

[dir="rtl"] .arrow-left::before {
    content: "→";
}

[dir="rtl"] .icon-chevron-right::before {
    content: "‹";
}

[dir="rtl"] .icon-chevron-left::before {
    content: "›";
}

/* ===== Homepage Elements RTL ===== */
[dir="rtl"] .hp-section-header {
    text-align: right;
}

[dir="rtl"] .hp-section-title {
    text-align: right;
}

[dir="rtl"] .hp-section-desc {
    text-align: right;
}

[dir="rtl"] .hp-brand {
    text-align: right;
}

[dir="rtl"] .hp-category-card__title {
    text-align: right;
}

/* ===== Footer (existing + additions) ===== */
[dir="rtl"] .cs-footer__links a:hover {
    color: var(--cs-green);
}

[dir="rtl"] .cs-footer__contact-list li {
    flex-direction: row-reverse;
    text-align: right;
}

/* RTL: Footer contact list numbers in LTR */
[dir="rtl"] .cs-footer__contact-list a {
    direction: ltr;
    unicode-bidi: embed;
    text-align: left;
}

/* RTL: Footer icon spacing */
[dir="rtl"] .cs-footer__contact-list li svg {
    margin-left: 0.6rem;
    margin-right: 0;
}

/* RTL: Footer bottom bar */
[dir="rtl"] .cs-footer__bottom-inner {
    flex-direction: row-reverse;
}

/* RTL: Footer legal links */
[dir="rtl"] .cs-footer__legal-links {
    flex-direction: row-reverse;
}

/* RTL: Footer social icons */
[dir="rtl"] .cs-footer__social-link {
    direction: ltr;
}

/* RTL: Footer badges grid items */
[dir="rtl"] .cs-footer__badge {
    text-align: right;
}

/* RTL: Footer badge icon */
[dir="rtl"] .cs-footer__badge-icon {
    margin-left: 0.75rem;
    margin-right: 0;
}

/* RTL: Footer links alignment */
[dir="rtl"] .cs-footer__links {
    text-align: right;
}

/* RTL: Footer CTA buttons */
[dir="rtl"] .cs-footer__cta-btns {
    flex-direction: row-reverse;
}

/* RTL: Branches text */
[dir="rtl"] .cs-footer__branches {
    text-align: right;
}

/* ===== RTL: Account/Profile Page Fixes ===== */
/* Prevent layout shifts and "shaking" on profile pages */
[dir="rtl"] .account-title,
[dir="rtl"] .page-title,
[dir="rtl"] .customer-profile-title {
    text-align: right;
}

/* Fix form layouts */
[dir="rtl"] .form-row,
[dir="rtl"] .oro-row {
    direction: rtl;
}

/* Prevent float conflicts */
[dir="rtl"] .clearfix::after {
    clear: both;
}

/* Fix sidebar layouts */
[dir="rtl"] .sidebar,
[dir="rtl"] .account-sidebar {
    float: right;
}

[dir="rtl"] .main-content,
[dir="rtl"] .account-content {
    float: left;
}

/* Stabilize grid layouts */
[dir="rtl"] .grid-container,
[dir="rtl"] .grid-row {
    direction: rtl;
}

/* Fix button groups */
[dir="rtl"] .btn-group {
    direction: ltr;
}

/* Prevent input width shifts */
[dir="rtl"] input[type="text"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] select,
[dir="rtl"] textarea {
    text-align: right;
    direction: rtl;
}

/* Fix checkbox and radio alignment */
[dir="rtl"] input[type="checkbox"],
[dir="rtl"] input[type="radio"] {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Prevent table layout shifts */
[dir="rtl"] table {
    direction: rtl;
}

[dir="rtl"] th,
[dir="rtl"] td {
    text-align: right;
}

/* Fix navigation tabs */
[dir="rtl"] .nav-tabs,
[dir="rtl"] .tabs {
    direction: rtl;
}

/* Prevent dropdown shifts */
[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
    text-align: right;
}

/* Fix breadcrumbs */
[dir="rtl"] .breadcrumb {
    direction: rtl;
}

/* Stabilize form groups */
[dir="rtl"] .form-group,
[dir="rtl"] .control-group {
    text-align: right;
}

[dir="rtl"] .form-label,
[dir="rtl"] .control-label {
    text-align: right;
    float: right;
}

/* Fix help text */
[dir="rtl"] .help-block,
[dir="rtl"] .field-help {
    text-align: right;
}

/* Prevent icon shifts in forms */
[dir="rtl"] .input-group-addon,
[dir="rtl"] .input-append,
[dir="rtl"] .input-prepend {
    direction: ltr;
}

/* Fix pagination */
[dir="rtl"] .pagination {
    direction: ltr;
}

/* Prevent animation loops */
/* [dir="rtl"] * {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
} */

/* Force GPU acceleration to prevent repaints */
/* [dir="rtl"] .page-container,
[dir="rtl"] .main-container {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
} */

/* ===== RTL: Scrollbar Stability ===== */
[dir="rtl"] html {
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

[dir="rtl"] body {
    overflow-x: hidden;
    position: static;
}

[dir="rtl"] .cs-header__topbar-contact,
[dir="rtl"] .cs-header__topbar-link {
    flex-direction: row-reverse;
}

/* RTL: Ensure numbers display in LTR (Western numerals) */
[dir="rtl"] .cs-header__topbar-link span {
    direction: ltr;
    unicode-bidi: embed;
}

/* RTL: Icon spacing adjustment */
[dir="rtl"] .cs-header__icon {
    margin-left: 0.4rem;
    margin-right: 0;
}

/* RTL: Contact section on the right */
[dir="rtl"] .cs-header__topbar-inner {
    flex-direction: row-reverse;
}

/* RTL: Language button icon spacing */
[dir="rtl"] .cs-header__lang-icon {
    margin-left: 0;
    margin-right: 0.35rem;
}

[dir="rtl"] .cs-header__nav-link {
    text-align: right;
}

[dir="rtl"] .product-price .currency {
    margin-left: 0;
    margin-right: 5px;
}

[dir="rtl"] .cs-footer__social {
    flex-direction: row-reverse;
}

/* RTL: Badge accent */
[dir="rtl"] .cs-footer__badge {
    border-left: none;
    border-right: 3px solid var(--cs-green);
    padding-left: 0;
    padding-right: 1rem;
    text-align: right;
}

/* RTL: Footer heading accent */
[dir="rtl"] .cs-footer__heading {
    border-left: none;
    border-right: 3px solid var(--cs-green);
    padding-left: 0;
    padding-right: 0.75rem;
}

/* RTL: Footer column dividers */
[dir="rtl"] .cs-footer__col:nth-child(-n+3) {
    border-right: none;
    border-left: 1px solid rgba(255,255,255,0.08);
    padding-right: 0;
    padding-left: 1.5rem;
}

/* RTL: CR number */
[dir="rtl"] .cs-footer__cr-number {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-right: 0.75rem;
    padding-right: 0.75rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

/* RTL: Back to top */
[dir="rtl"] .cs-back-to-top {
    right: auto;
    left: 2rem;
}

/* RTL: Register CTA */
[dir="rtl"] .cs-header__nav-link--cta {
    margin-left: 0;
    margin-right: auto;
}

/* RTL: Topbar right */
[dir="rtl"] .cs-header__topbar-right {
    flex-direction: row-reverse;
}

/* RTL: Hamburger separator flip */
[dir="rtl"] .cs-header__hamburger {
    margin-left: 0;
    margin-right: auto;
}

/* RTL: Mini-cart dropdown */
[dir="rtl"] .cs-header__mini-cart {
    right: auto;
    left: 0;
}

/* ===== RTL: Mega Menu Fixes (CRITICAL for preventing shaking) ===== */
/* Fix mega menu direction */
[dir="rtl"] .cs-header__mega-grid {
    direction: rtl;
}

/* Fix mega menu headings */
[dir="rtl"] .cs-header__mega-heading {
    text-align: right;
    direction: rtl;
}

/* Fix mega menu lists */
[dir="rtl"] .cs-header__mega-list {
    direction: rtl;
    text-align: right;
}

/* Fix mega menu promo section */
[dir="rtl"] .cs-header__mega-featured {
    direction: rtl;
}

[dir="rtl"] .cs-header__mega-promo {
    flex-direction: row-reverse;
}

/* RTL: Mobile drawer from right */
@media (max-width: 820px) {
    [dir="rtl"] .cs-header__nav {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }

    [dir="rtl"] .cs-header__nav--open {
        transform: translateX(0);
    }

    /* Fix mega menu on mobile */
    [dir="rtl"] .cs-header__mega-panel {
        position: static;
        left: auto;
        right: auto;
    }

    [dir="rtl"] .cs-footer__badge {
        border-right: none;
        padding-right: 0;
    }

    [dir="rtl"] .cs-footer__col:nth-child(-n+3) {
        border-left: none;
        padding-left: 0;
    }

    [dir="rtl"] .cs-header__hamburger {
        margin-right: 0;
        margin-left: 0;
    }
}

/* ===== Additional Oro Checkout RTL ===== */
[dir="rtl"] .checkout-container,
[dir="rtl"] .checkout-wrapper,
[dir="rtl"] .checkout-layout {
    direction: rtl !important;
}

[dir="rtl"] .checkout-layout__main,
[dir="rtl"] .checkout-layout__sidebar {
    direction: rtl;
}

[dir="rtl"] .checkout__payment,
[dir="rtl"] .checkout__shipping {
    text-align: right;
}

[dir="rtl"] .checkout__payment-methods,
[dir="rtl"] .checkout__shipping-methods {
    direction: rtl;
}

[dir="rtl"] .payment-method,
[dir="rtl"] .shipping-method {
    text-align: right;
}

[dir="rtl"] .order-total,
[dir="rtl"] .subtotal {
    direction: rtl;
}

[dir="rtl"] .order-line-item {
    text-align: right;
    direction: rtl;
}

/* ===== Cart Page RTL ===== */
[dir="rtl"] .shopping-list-view,
[dir="rtl"] .shopping-list-container {
    direction: rtl;
}

[dir="rtl"] .shopping-list__item {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .cart-table {
    direction: rtl;
}

[dir="rtl"] .cart-item {
    text-align: right;
}

[dir="rtl"] .cart-item__name,
[dir="rtl"] .cart-item__sku {
    text-align: right;
}

[dir="rtl"] .cart-summary {
    text-align: right;
}

/* ===== Additional RFQ RTL ===== */
[dir="rtl"] .request-create,
[dir="rtl"] .request-view {
    direction: rtl;
}

[dir="rtl"] .rfq-request-form {
    direction: rtl !important;
}

[dir="rtl"] .line-item-form {
    direction: rtl;
}

[dir="rtl"] .line-item {
    text-align: right;
}

[dir="rtl"] .line-item__product-name {
    text-align: right;
}

/* ===== Product Pages Additional RTL ===== */
[dir="rtl"] .product-view__main-info,
[dir="rtl"] .product-view__details {
    direction: rtl;
}

[dir="rtl"] .product-view__description {
    text-align: right;
}

[dir="rtl"] .product-view__specs {
    direction: rtl;
}

[dir="rtl"] .product-spec {
    text-align: right;
}

[dir="rtl"] .product-spec__label {
    text-align: right;
}

[dir="rtl"] .product-spec__value {
    text-align: right;
}

[dir="rtl"] .product-view__price {
    direction: rtl;
}

[dir="rtl"] .product-view__add-to-cart {
    direction: rtl;
}

/* ===== Category Pages Additional RTL ===== */
[dir="rtl"] .catalog-grid,
[dir="rtl"] .product-grid {
    direction: rtl;
}

[dir="rtl"] .catalog-grid__item,
[dir="rtl"] .product-grid__item {
    text-align: right;
}

[dir="rtl"] .category-view {
    direction: rtl;
}

[dir="rtl"] .category-view__description {
    text-align: right;
}

[dir="rtl"] .filter-panel {
    text-align: right;
}

[dir="rtl"] .filter-panel__title {
    text-align: right;
}

/* ===== Oro Layout Components RTL ===== */
[dir="rtl"] .oro-layout,
[dir="rtl"] .page-container {
    direction: rtl;
}

[dir="rtl"] .page-main {
    direction: rtl;
}

[dir="rtl"] .page-main__inner {
    direction: rtl;
}

[dir="rtl"] .oro-content {
    direction: rtl;
}

[dir="rtl"] .layout-content {
    direction: rtl;
}

[dir="rtl"] .widget-content {
    direction: rtl;
}

/* ===== Additional Form RTL ===== */
[dir="rtl"] .form-row {
    direction: rtl;
}

[dir="rtl"] .form-group {
    text-align: right;
}

[dir="rtl"] .form-horizontal .form-group {
    direction: rtl;
}

[dir="rtl"] .field-row {
    direction: rtl;
}

[dir="rtl"] .validation-failed {
    text-align: right;
}

/* ===== Price & Currency RTL ===== */
[dir="rtl"] .price,
[dir="rtl"] .price-value {
    direction: rtl;
}

[dir="rtl"] .currency {
    margin-right: 0.25rem;
    margin-left: 0;
}

/* ===== Customer Account RTL ===== */
[dir="rtl"] .customer-profile,
[dir="rtl"] .customer-account {
    direction: rtl;
}

[dir="rtl"] .account-nav {
    text-align: right;
}

[dir="rtl"] .order-history {
    direction: rtl;
}

[dir="rtl"] .order-item {
    text-align: right;
}

/* ===== Mega Menu RTL ===== */
[dir="rtl"] .cs-header__mega-panel {
    direction: rtl;
}

[dir="rtl"] .cs-header__mega-grid {
    direction: rtl;
}

[dir="rtl"] .cs-header__mega-heading {
    text-align: right;
}

[dir="rtl"] .cs-header__mega-list {
    text-align: right;
}

[dir="rtl"] .cs-header__mega-list li {
    text-align: right;
}

[dir="rtl"] .cs-header__mega-list a {
    text-align: right;
}

[dir="rtl"] .cs-header__mega-promo {
    direction: rtl;
}

[dir="rtl"] .cs-header__mega-promo-text {
    text-align: right;
}

/* ===== All Content Blocks RTL ===== */
[dir="rtl"] .content-block {
    direction: rtl;
}

[dir="rtl"] .cms-content {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .wysiwyg-content {
    direction: rtl;
    text-align: right;
}

/* ===== Additional UI Elements RTL ===== */
[dir="rtl"] .badge {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .label {
    text-align: right;
}

[dir="rtl"] .help-text,
[dir="rtl"] .hint-text {
    text-align: right;
}

[dir="rtl"] .error-message {
    text-align: right;
}

[dir="rtl"] .success-message {
    text-align: right;
}

[dir="rtl"] .info-message {
    text-align: right;
}

/* ===== Quantity Widget RTL ===== */
[dir="rtl"] .qty-control {
    direction: rtl;
}

[dir="rtl"] .qty-input {
    text-align: center;
}

/* ===== Select2 Dropdown RTL ===== */
[dir="rtl"] .select2-container {
    text-align: right;
}

[dir="rtl"] .select2-results {
    text-align: right;
}

/* ===== Additional table RTL ===== */
[dir="rtl"] .table-responsive {
    direction: rtl;
}

[dir="rtl"] thead th {
    text-align: right;
}

[dir="rtl"] tbody td {
    text-align: right;
}
