/**
 * Cagri Yetkin Fasteners - Comprehensive Arabic RTL Stylesheet
 * Language: Arabic (ar) | Direction: RTL
 */

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

html[dir="rtl"] body {
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Arial, 'Traditional Arabic', sans-serif;
}

/* Header & Navigation RTL */
html[dir="rtl"] .header--four .header__bottom .area {
    flex-direction: row-reverse;
}

html[dir="rtl"] .header--four .header__bottom .area .logo {
    margin-left: 0;
    margin-right: clamp(28px, 4vw, 82px);
}

html[dir="rtl"] .header--four .header__bar {
    margin-left: 0;
    margin-right: 14px;
}

html[dir="rtl"] .main-menu .menu > ul {
    direction: rtl;
    padding-right: 0;
}

html[dir="rtl"] .main-menu .menu ul li {
    text-align: right;
}

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

html[dir="rtl"] .main-menu .menu ul li ul li ul {
    left: auto;
    right: 100%;
}

html[dir="rtl"] .search_cart ul {
    display: flex;
    flex-direction: row-reverse;
    padding-right: 0;
}

html[dir="rtl"] .search_cart ul li {
    margin-left: 0;
    margin-right: 15px;
}

/* Header Top Info */
html[dir="rtl"] .header__top .info ul {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    padding-right: 0;
}

html[dir="rtl"] .header__top .info ul li {
    margin-right: 0;
    margin-left: 20px;
}

html[dir="rtl"] .header__top .info ul li i {
    margin-right: 0;
    margin-left: 8px;
}

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

html[dir="rtl"] .header__top .social ul {
    justify-content: flex-start;
    padding-right: 0;
}

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

html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-left: 0.5rem;
    padding-right: 0;
}

/* Category Grid & Product Sliders */
html[dir="rtl"] :is(.product-category-grid, .urunkat__slider) .portfolio-three__title-box::before {
    left: auto;
    right: -13px;
}

html[dir="rtl"] :is(.product-category-grid, .urunkat__slider) .portfolio-three__arrow {
    right: auto;
    left: 16px;
}

html[dir="rtl"] :is(.product-category-grid, .urunkat__slider) .portfolio-three__arrow span {
    transform: rotate(-135deg);
}

/* Coffee Invitation CTA */
html[dir="rtl"] .coffee-invitation .download-wrapper::before {
    transform: scaleX(-1);
}

html[dir="rtl"] .coffee-invitation .site-title-tagline {
    justify-content: flex-end;
}

/* Arrows & Icons Flip */
html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-angle-right,
html[dir="rtl"] .fa-caret-right {
    transform: scaleX(-1);
}

html[dir="rtl"] .fa-arrow-left,
html[dir="rtl"] .fa-chevron-left,
html[dir="rtl"] .fa-angle-left,
html[dir="rtl"] .fa-caret-left {
    transform: scaleX(-1);
}

/* Product Details & Badges */
html[dir="rtl"] .product-badges-position {
    left: auto;
    right: 12px;
}

html[dir="rtl"] .product-badges-position-right {
    right: auto;
    left: 12px;
}

html[dir="rtl"] .flat-product-detail .footer-detail .countadd {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

html[dir="rtl"] .flat-product-detail .footer-detail .countadd .sepeteEkleBtn {
    margin-left: 0;
    margin-right: 15px;
}

/* Input Fields & Forms */
html[dir="rtl"] :is(input[type="email"], input[type="tel"]) {
    direction: ltr;
    text-align: right;
}

html[dir="rtl"] .form-group label {
    text-align: right;
    display: block;
}

html[dir="rtl"] .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

/* Footer Section */
html[dir="rtl"] .footer .newsletter {
    padding-left: 0;
    padding-right: 50px;
}

html[dir="rtl"] .footer .footer__about {
    margin-right: 0 !important;
    margin-left: 1.5rem !important;
    text-align: right;
}

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

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

html[dir="rtl"] .footer .info__item {
    display: flex;
    flex-direction: row;
    text-align: right;
}

html[dir="rtl"] .footer .info__icon {
    margin-right: 0;
    margin-left: 15px;
}

/* Search Dropdown / Modal */
html[dir="rtl"] .search__area form button {
    right: auto;
    left: 15px;
}

html[dir="rtl"] .search__close {
    left: 40px;
    right: auto;
}

/* Responsive Overrides */
@media (max-width: 1199px) {
    html[dir="rtl"] .header--four .header__bottom .area .logo {
        margin-right: 0;
    }
}

@media (max-width: 767px) {
    html[dir="rtl"] .footer .newsletter {
        padding-right: 0;
    }
    html[dir="rtl"] :is(.product-category-grid, .urunkat__slider) .portfolio-three__arrow {
        left: 12px;
    }
}
