/* İnci Yağ / Premium language selector • 2026-10-15 / v4: compact authentic flag icons */
.inci-language-switch {
  --locale-navy: #0a2f69;
  --locale-muted: #7d8ba4;
  position: relative;
  display: flex;
  align-items: center;
  flex: none;
  z-index: 80;
  direction: ltr;
  font-family: var(--font, 'Manrope', Arial, sans-serif);
}
.inci-language-switch__trigger {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  height: 47px;
  min-width: 157px;
  padding: 0 15px 0 12px;
  border: 1px solid #d5deec;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #fcfdff 100%);
  color: var(--locale-navy);
  font: 700 13.5px/1.2 var(--font, 'Manrope', Arial, sans-serif);
  letter-spacing: -0.015em;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(10, 39, 82, .055), 0 1px 1px rgba(10, 39, 82, .025);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.inci-language-switch__trigger:hover,
.inci-language-switch__trigger[aria-expanded="true"] {
  background: #fff;
  border-color: #b4c7e4;
  box-shadow: 0 7px 22px rgba(10, 39, 82, .105), 0 1px 2px rgba(10, 39, 82, .035);
}
.inci-language-switch__trigger:active { transform: translateY(1px); }
.inci-language-switch__flag {
  width: 28px;
  height: 20px;
  flex: 0 0 28px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(13, 36, 70, .13);
  box-shadow: none;
  background: #f2f6fc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.inci-language-switch__flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* General Arabic is a language, not a Saudi Arabia locale. Use a neutral AR mark. */
.inci-language-switch__flag-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .045em;
  color: #153d7d;
  background: #eaf1fb;
}
.inci-language-switch__selected-name { display: block; flex: 1; unicode-bidi: plaintext; }
.inci-language-switch__selected-code { display: none; }
.inci-language-switch__chevron {
  display: inline-flex;
  width: 15px;
  height: 15px;
  margin-left: auto;
  flex: 0 0 15px;
  color: #1b4d8c;
  transition: transform .2s ease;
}
.inci-language-switch__chevron svg { display: block; width: 100%; height: 100%; }
.inci-language-switch__trigger[aria-expanded="true"] .inci-language-switch__chevron { transform: rotate(180deg); }
.inci-language-switch__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 11px);
  width: 245px;
  max-width: calc(100vw - 24px);
  padding: 9px;
  border: 1px solid #e5ebf4;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 20px 52px rgba(7, 35, 81, .17), 0 5px 13px rgba(7, 35, 81, .065);
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 100;
  animation: inci-locale-reveal .17s ease-out both;
}
.inci-language-switch__menu::before {
  content: '';
  position: absolute;
  right: 26px;
  top: -6px;
  width: 11px;
  height: 11px;
  transform: rotate(45deg);
  background: #fff;
  border-top: 1px solid #e5ebf4;
  border-left: 1px solid #e5ebf4;
}
.inci-language-switch__menu[hidden] { display: none !important; }
.inci-language-switch__option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 62px;
  padding: 8px 12px;
  border-radius: 12px;
  background: transparent;
  color: var(--locale-navy);
  text-decoration: none !important;
  text-align: left;
  transition: background .18s ease, color .18s ease;
}
.inci-language-switch__option:hover,
.inci-language-switch__option:focus-visible { background: #f5f8fd; }
.inci-language-switch__option[aria-current="page"] { background: #edf4ff; }
.inci-language-switch__option[aria-current="page"]:hover { background: #e5efff; }
.inci-language-switch__option-copy { display: flex; flex: 1; flex-direction: column; justify-content: center; min-width: 0; gap: 4px; }
.inci-language-switch__option-name { font-size: 14px; font-weight: 750; line-height: 1.2; letter-spacing: -.018em; unicode-bidi: plaintext; }
.inci-language-switch__option small { font-size: 10.5px; font-weight: 750; letter-spacing: .08em; color: var(--locale-muted); line-height: 1.3; }
.inci-language-switch__check { width: 20px; height: 20px; color: #1477dd; flex: 0 0 20px; }
.inci-language-switch__check svg { display: block; width: 100%; height: 100%; }
.inci-language-switch__trigger:focus-visible,
.inci-language-switch__option:focus-visible { outline: 3px solid rgba(233, 177, 15, .65); outline-offset: 3px; }
@keyframes inci-locale-reveal { from { opacity: 0; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .inci-language-switch__menu { animation: none; }
  .inci-language-switch__chevron, .inci-language-switch__trigger, .inci-language-switch__option { transition: none; }
}
/* Maintain header balance without overriding page design */
.header .header__inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: clamp(12px, 1.2vw, 22px); width: min(calc(100% - 2 * clamp(20px, 3.2vw, 58px)), 1500px); }
.header .navigation { justify-content: center; gap: clamp(12px, 1.35vw, 26px); }
.header .header__actions { gap: clamp(10px, .85vw, 15px); min-width: 0; }
.header .cta--header { min-width: 0; }
@media (min-width: 1131px) and (max-width: 1450px) {
  .header .navigation { gap: clamp(10px, .85vw, 15px); }
  .header .navigation__item { font-size: 12.5px; }
  .header .cta--header { padding-inline: 12px; font-size: 12px; }
  .inci-language-switch__trigger { min-width: 144px; gap: 9px; padding-inline: 10px 12px; }
}
@media (max-width: 1130px) {
  .header .header__inner { grid-template-columns: minmax(0, 1fr) auto; }
  .header .navigation { justify-content: flex-start; }
  .header .header__actions { gap: 12px; }
}
@media (max-width: 780px) {
  .header .header__actions { gap: 10px; }
  .inci-language-switch__trigger { min-width: 140px; height: 42px; padding: 0 11px; }
  .inci-language-switch__menu { top: calc(100% + 12px); }
}
@media (max-width: 430px) {
  .header .header__inner { width: calc(100% - 30px); }
  .header .header__actions { gap: 8px; }
  .inci-language-switch__trigger { min-width: 88px; height: 40px; padding-inline: 9px; gap: 7px; }
  .inci-language-switch__selected-name { display: none; }
  .inci-language-switch__selected-code { display: block; font: 750 12px/1 var(--font, Arial, sans-serif); }
  .inci-language-switch__flag { width: 27px; height: 19px; flex-basis: 27px; }
  .inci-language-switch__menu { width: 233px; }
}

/* On Arabic pages the locale control sits at the LEFT edge of the RTL header. */
html[dir="rtl"] .inci-language-switch__menu { left: 0; right: auto; }
html[dir="rtl"] .inci-language-switch__menu::before { left: 25px; right: auto; }
html[dir="rtl"]{direction:rtl}
html[dir="rtl"] .header__inner,html[dir="rtl"] .inci-footer__container{direction:rtl}
html[dir="rtl"] input[type="email"],html[dir="rtl"] input[type="tel"],html[dir="rtl"] [dir="ltr"]{direction:ltr;text-align:left}

/* Respect right-to-left reading without flipping product imagery or icons. */
html[lang="ar"] body{font-family:Tahoma,Arial,sans-serif}
html[dir="rtl"] p,html[dir="rtl"] h1,html[dir="rtl"] h2,html[dir="rtl"] h3,html[dir="rtl"] li{unicode-bidi:plaintext}
html[dir="rtl"] input,html[dir="rtl"] textarea,html[dir="rtl"] select{text-align:start}


/* FAZ 4-5: RTL COMPOSITION FIX / 2026-10-15
   Original photography has protected copy-space on the physical left.
   Keep the image placement fixed; set the text inside the protected space RTL. */
@media (min-width: 781px) {
  html[dir="rtl"] .catalog-hero__inner,
  html[dir="rtl"] .about-banner__inner {direction:ltr;}
  html[dir="rtl"] .catalog-hero__copy {direction:rtl;text-align:right;margin-right:auto;margin-left:0;width:min(49%,580px);}
  html[dir="rtl"] .about-banner__copy {direction:rtl;text-align:right;margin-right:auto;margin-left:0;width:min(50%,620px);}
  html[dir="rtl"] .catalog-hero__copy h1,
  html[dir="rtl"] .catalog-hero__copy p,
  html[dir="rtl"] .about-banner__copy h1 {text-align:right;}
  html[dir="rtl"] .ir-list-hero__inner {direction:ltr;}
  html[dir="rtl"] .ir-list-hero__inner > :is(.ir-crumbs,h1,p) {direction:rtl;text-align:right;width:min(46%,535px);max-width:min(46%,535px);margin-right:auto;margin-left:0;}
  html[dir="rtl"] .ir-list-hero__inner > .ir-crumbs {justify-content:flex-start;}
  html[dir="rtl"] .inci-ecatalog__wrap {direction:ltr;}
  html[dir="rtl"] .inci-ecatalog__content {direction:rtl;text-align:right;}
  html[dir="rtl"] .inci-ecatalog__content h2,
  html[dir="rtl"] .inci-ecatalog__content p {text-align:right;}
  html[dir="rtl"] .inci-ecatalog__detail + .inci-ecatalog__detail {padding-left:0;padding-right:15px;border-left:0;border-right:1px solid #cbd6ea;}
  html[dir="rtl"] .inci-ecatalog__actions {justify-content:flex-start;}
}
/* Catalogue images are physically on the right; keep the text on the left light-field.
   Do not flip the photography when the interface language changes. */
html[dir="rtl"] .catalog-card__content {direction:rtl;text-align:right;margin-right:auto;margin-left:0;align-items:flex-end;padding-left:22px;padding-right:12px;}
html[dir="rtl"] .catalog-card__veil {background:linear-gradient(90deg,rgba(255,255,255,.99) 0%,rgba(255,255,255,.965) 29%,rgba(255,255,255,.90) 43%,rgba(255,255,255,.48) 63%,transparent 83%);}
html[dir="rtl"] .catalog-card__content :is(h3,p) {text-align:right;max-width:100%;}
html[dir="rtl"] .catalog-card__link {white-space:normal;text-align:center;}
/* Product image composed for copy on the physical right. Keep that placement. */
html[dir="rtl"] .inci-detail-hero__inner {direction:ltr;}
html[dir="rtl"] .inci-detail-hero__copy {direction:rtl;text-align:right;}
html[dir="rtl"] .inci-specs__panel :is(th,td),
html[dir="rtl"] .inci-specs__note {text-align:right;}
html[dir="rtl"] .inci-detail-hero__more {float:left;}
html[dir="rtl"] .inci-detail-hero__volume {direction:rtl;}
/* Additional recipe detail pages share the physical left image-free text region. */
@media (min-width: 781px) {
  html[dir="rtl"] .ir-detail-page .ir-detail-hero__inner {direction:ltr;align-items:flex-start;}
  html[dir="rtl"] .ir-detail-page .ir-detail-hero__copy,
  html[dir="rtl"] .ir-detail-page .ir-detail-hero .ir-crumbs {direction:rtl;text-align:right;width:min(49%,550px);max-width:min(49%,550px);}
}
@media (max-width: 780px) {
  html[dir="rtl"] .catalog-hero__copy,
  html[dir="rtl"] .about-banner__copy,
  html[dir="rtl"] .ir-list-hero__inner,
  html[dir="rtl"] .inci-ecatalog__content {direction:rtl;text-align:right;}
  html[dir="rtl"] .inci-ecatalog__wrap {direction:ltr;}
  html[dir="rtl"] .catalog-hero__copy {max-width:100%;}
  html[dir="rtl"] .ir-list-hero__inner > :is(.ir-crumbs,h1,p) {max-width:min(100%,560px);text-align:right;}
  html[dir="rtl"] .catalog-card__content {padding-right:12px;padding-left:14px;}
  html[dir="rtl"] .inci-detail-hero__inner {direction:rtl;}
  html[dir="rtl"] .inci-detail-hero__copy {width:100%;}
}
/* Arabic body glyph readability independent of Latin tracking */
html[lang="ar"] :is(.catalog-hero h1,.about-banner h1,.ir-list-hero h1,.inci-ecatalog__content h2,.inci-detail-hero h1) {letter-spacing:0;line-height:1.3;}

/* Maintain readable white copy over the dark blue product-detail hero. */
.inci-detail-hero__copy .inci-detail-hero__intro { color:#f5f8ff; }
html[lang="ar"] .inci-detail-hero__copy .inci-detail-hero__intro {line-height:1.8;font-size:clamp(14px,1.12vw,17px);}
@media (max-width: 780px) {
  /* The Arabic recipe introduction needs an opaque reading surface on narrow screens. */
  html[lang="ar"] .ir-list-hero__background {
    background-image:linear-gradient(90deg,rgba(255,253,249,.97),rgba(255,253,249,.93) 64%,rgba(255,253,249,.58)),url('../images/recipes-v2/tarifler-hero.webp');
  }
  html[lang="ar"] .ir-list-hero__bottle {opacity:.25;}
  html[lang="ar"] .ir-list-hero p {max-width:100%;}
  html[lang="ar"] .ir-list-hero__inner > :is(.ir-crumbs,h1,p) {position:relative;z-index:2;}
}

/* 21.10.2026 | Header soldan taşmıyor: tarifler sayfasının referans hizası tüm sayfalarda aynı. */
@media(min-width:1131px){
 .header .header__inner{width:min(calc(100% - 2 * clamp(20px,3.2vw,58px)),1420px);max-width:1420px;}
}

/* 2026-10-21 | Header brand inset: stable visual alignment across all pages.
   Desktop-only so the mobile menu, language selector and logo keep their space. */
@media(min-width:1451px){
  html:not([dir="rtl"]) .header .brand{transform:translateX(32px)}
  html[dir="rtl"] .header .brand{transform:translateX(-32px)}
}
@media(min-width:1131px) and (max-width:1450px){
  html:not([dir="rtl"]) .header .brand{transform:translateX(18px)}
  html[dir="rtl"] .header .brand{transform:translateX(-18px)}
}
