/* Header logo sizing and phone-only quick navigation. */
@media (min-width: 1101px) {
  html body .red-header #brandLogo { height: 64px !important; max-height: 64px !important; }
}
@media (max-width: 1100px) {
  html body .red-header .brand { max-width: 240px !important; height: 60px !important; }
  html body .red-header #brandLogo { width: 100% !important; height: 60px !important; max-height: 60px !important; max-width: 100% !important; }
}
.mobile-bottom-nav { display: none; }
@media (max-width: 640px) {
  html body { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }
  .mobile-bottom-nav { position: fixed; inset: auto 0 0; z-index: 1000; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: 74px; padding: 0 4px env(safe-area-inset-bottom, 0px); box-sizing: content-box; background: #fff; box-shadow: 0 -3px 16px #14203712; isolation: isolate; }
  .mobile-bottom-nav::before { content: ''; position: absolute; z-index: -1; top: -24px; left: 50%; width: 100px; height: 52px; transform: translateX(-50%); border-radius: 55px 55px 0 0; background: #fff; }
  .mobile-bottom-nav .mobile-bottom-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; padding: 9px 0 13px; border: 0; background: transparent; color: #111; text-decoration: none; font: 700 clamp(8px, 2.35vw, 11px)/1.2 Arial, sans-serif; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .mobile-bottom-item svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-bottom-item[aria-current="page"], .mobile-bottom-nav .mobile-bottom-guide { color: #d50826; }
  .mobile-bottom-home { display: grid; place-content: center; width: 28px; height: 29px; border-radius: 8px; background: #d50826; color: #fff; font: 900 20px/.85 Arial, sans-serif; text-align: center; }
  .mobile-bottom-home small { font-size: 5px; line-height: 1.5; letter-spacing: .3px; }
  .mobile-bottom-orb { position: absolute; bottom: 35px; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 62px; height: 62px; box-sizing: border-box; border: 4px solid white; border-radius: 50%; background: linear-gradient(145deg, #ec192b, #c40019); box-shadow: 0 5px 18px #d5082635; color: white; font: 900 10px/1.1 Arial, sans-serif; }
  .mobile-bottom-orb small { font-size: 8px; letter-spacing: 1.2px; }
  .mobile-bottom-badge { position: absolute; top: 3px; left: calc(50% + 7px); min-width: 18px; padding: 2px 4px; border: 2px solid #fff; border-radius: 12px; background: #e81937; color: #fff; font-size: 11px; text-align: center; }
  .mobile-bottom-badge[hidden] { display: none; }
  .mobile-bottom-item:focus-visible { outline: 3px solid #dc3650; outline-offset: -3px; border-radius: 8px; }
  html body .site-permission-back-to-top { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 640px) {
  html body .kvkk-consent-bar { bottom: calc(102px + env(safe-area-inset-bottom, 0px)); }
}

/* Phone header: search followed by the existing account action. */
@media (max-width: 640px) {
  html body .red-header .header-row,
  html body .red-header .header-row.no-header-media {
    grid-template-areas: "menu brand search profile" "nav nav nav nav" !important;
  }
  html body .red-header .language-switcher { display: none !important; }
  /* The account renderer hides this legacy control; it is always visible on phones. */
  html body .red-header #headerProfileBtn {
    display: inline-flex !important; grid-area: profile !important;
    position: relative !important; align-self: center !important; justify-self: center !important;
    width: 44px !important; height: 44px !important; margin: 0 !important;
    transform: none !important; color: #fff !important; background: transparent;
    align-items: center; justify-content: center;
  }
  html body .red-header #headerProfileBtn svg { width: 28px; height: 28px; fill: currentColor; }
  html body .red-header .header-site-search-btn svg { width: 30px !important; height: 30px !important; }
  html body .red-header #headerProfileBtn:is(:hover, :focus-visible) { background: #ffffff26; }
}

/* Mobile account entry is already available in the header's top row. */
@media (max-width: 640px) {
  html body .red-header #mainNav > .nav-login-dropdown {
    display: none !important;
  }
}

/* mobile-nav-video-20261024: menu beside logo, existing notification action in header. */
@media (max-width: 640px) {
  html body .red-header .header-row.header-row.header-row {
    grid-template-columns: 30px minmax(0, 1fr) repeat(4, 32px) !important;
    grid-template-areas: "menu brand search share notify profile" "nav nav nav nav nav nav" !important;
    column-gap: 3px !important;
  }
  html body .red-header .header-row #brandLink { width: 100% !important; max-width: 100% !important; min-width: 0 !important; justify-self: start !important; margin: 0 !important; }
  html body .red-header .header-row #brandLogo { width: 100% !important; min-width: 0 !important; max-width: 100% !important; object-fit: contain !important; object-position: left center !important; --favori-logo-mask-position: left center; }
  html body .red-header .header-row #headerMenuToggle { width: 30px !important; margin: 0 !important; justify-self: start !important; }
  html body .red-header .header-row #headerSearchForm,
  html body .red-header .header-row #mobileCategoryShare,
  html body .red-header .header-row #headerProfileBtn,
  html body .red-header .header-row #headerNotificationsBtn { width: 32px !important; height: 44px !important; min-width: 0 !important; margin: 0 !important; justify-self: center !important; }
  html body .red-header .header-row #headerSearchForm .header-site-search-btn { width: 32px !important; min-width: 0 !important; }
  html body .red-header .header-row #headerNotificationsBtn { display: inline-flex !important; grid-area: notify !important; position: relative !important; align-self: center !important; color: #fff !important; }
  html body .red-header .header-row #headerNotificationsBtn::before { width: 25px !important; height: 25px !important; }
  html body .red-header .header-row #headerNotificationsBtn.has-badge::after { top: 0; right: -3px; min-width: 15px; height: 17px; padding: 0 3px; border: 1px solid #fff; background: #d50826; color: #fff; font-size: 10px; line-height: 17px; }
  html body .red-header .header-row #headerProfileBtn svg,
  html body .red-header .header-row #mobileCategoryShare svg,
  html body .red-header .header-row .header-site-search-btn svg { width: 25px !important; height: 25px !important; }
}

/* Blink only the crescent; keep the logo lettering fully visible. */
@property --favori-crescent-alpha {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}
@keyframes favori-crescent-blink {
  0%, 100% { --favori-crescent-alpha: 1; }
  50% { --favori-crescent-alpha: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  html body .red-header #brandLogo[src*="1791270267848-09dcc8ef6821"],
  html body .red-header #brandLogo[src*="1791269717016-6725d7b8d562"] {
    /* Match the 450x150 logo's contained image, not the wider img box.
       Crescent ends at x35; cutlery starts at x40. Keep x36 onward opaque. */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='450' height='150' viewBox='0 0 450 150'%3E%3Cpath fill='black' d='M36 0H450V150H36Z'/%3E%3C/svg%3E"), linear-gradient(rgba(0,0,0,var(--favori-crescent-alpha)), rgba(0,0,0,var(--favori-crescent-alpha)));
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='450' height='150' viewBox='0 0 450 150'%3E%3Cpath fill='black' d='M36 0H450V150H36Z'/%3E%3C/svg%3E"), linear-gradient(rgba(0,0,0,var(--favori-crescent-alpha)), rgba(0,0,0,var(--favori-crescent-alpha)));
    -webkit-mask-size: contain, 100% 100%;
    mask-size: contain, 100% 100%;
    -webkit-mask-position: var(--favori-logo-mask-position, center), center;
    mask-position: var(--favori-logo-mask-position, center), center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-composite: source-over;
    mask-composite: add;
    animation: favori-crescent-blink 2.4s ease-in-out infinite;
  }
}

/* Keep the menu before the brand on tablet and desktop as on phones. */
@media (min-width: 641px) and (max-width: 1100px) {
  html body .red-header .header-row,
  html body .red-header .header-row.no-header-media {
    grid-template-columns: 44px minmax(0, 1fr) 44px 48px !important;
    grid-template-areas: "menu brand search lang" !important;
  }
}
@media (min-width: 1101px) {
  html body .red-header .header-row,
  html body .red-header .header-row.no-header-media {
    grid-template-columns: 36px clamp(150px,15vw,236px) minmax(0,1fr) 36px 36px 48px !important;
    grid-template-areas: "menu brand nav search notify lang" !important;
  }
}
