/**
 * Light Arabic site styles.
 * Do NOT flip Bootstrap floats globally — that breaks the layout.
 */

html[dir="rtl"] body.lang-ar {
  font-family: "Cairo", "Tahoma", sans-serif;
}

/* Top bar only */
body.lang-ar .topbsp > .container > .row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  direction: ltr;
}

body.lang-ar .topbsp .col-sm-6 {
  float: none !important;
  width: 50% !important;
  max-width: 50%;
  flex: 0 0 50%;
}

body.lang-ar .topbsp .col-sm-6.text-right {
  order: 1;
  text-align: left !important;
  direction: ltr;
}

body.lang-ar .topbsp .col-sm-6:first-child {
  order: 2;
  text-align: right !important;
  direction: rtl;
}

body.lang-ar .topbsp li {
  display: inline-block;
  vertical-align: middle;
  list-style: none;
}

/* Search bar */
body.lang-ar .wbSearch #search_block_top {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  direction: rtl;
}

body.lang-ar #madebyhand-search-category {
  float: none;
  order: 1;
  flex: 0 0 200px;
  width: 200px;
  max-width: 200px;
  border-radius: 0 30px 30px 0;
  background-position: left 18px center;
  text-align: right;
  padding: 10px 14px 10px 28px;
  height: 42px;
  border: none;
}

body.lang-ar #search_block_top .input-group.input_search {
  display: flex;
  flex: 1 1 auto;
  float: none;
  width: auto;
  order: 2;
  position: relative;
}

body.lang-ar .input_search::before {
  left: auto;
  right: 0;
  border-left: none;
  border-right: 1px solid #c2c2c2;
}

body.lang-ar #search .input-lg {
  float: none;
  width: 100%;
  flex: 1 1 auto;
  border-radius: 0 !important;
  text-align: right;
  order: 1;
}

body.lang-ar #search_block_top .input-group-btn {
  display: block;
  width: auto;
  float: none;
  order: 2;
}

body.lang-ar #search .btn-lg {
  border-radius: 30px 0 0 30px !important;
  margin: 0;
  height: 42px;
}

/* Simple text alignment helpers for account pages */
body.lang-ar .breadcrumb,
body.lang-ar .accolumn,
body.lang-ar .well,
body.lang-ar legend,
body.lang-ar .form-horizontal .control-label {
  text-align: right;
}

body.lang-ar .langcdrop img {
  margin-left: 6px;
  margin-right: 0;
}

@media (max-width: 767px) {
  body.lang-ar #madebyhand-search-category {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    border-radius: 30px 30px 0 0;
  }

  body.lang-ar #search .btn-lg {
    border-radius: 0 0 0 30px !important;
  }

  body.lang-ar .input_search::before {
    display: none;
  }
}
