/* TalatYai header and category menu. Scoped to the shared site header. */
header#ty-site-header.header {
  z-index: 500;
  border-bottom: 1px solid #dce4ec;
  background: #fff;
  color: #102f59;
  font-family: var(--ty-font, "Roboto Regular", "Noto Sans Thai", Arial, sans-serif);
  overflow: visible;
}
header#ty-site-header .sp-header-shell {overflow: visible;}
header#ty-site-header .sp-header-search-wrap {z-index: 530; max-width: none;}
header#ty-site-header .sp-header-search {
  height: 52px;
  border: 2px solid #9fb5cc !important;
  border-radius: 18px !important;
  background: #fff !important;
}
header#ty-site-header .sp-header-search input[type="search"] {padding: 0 22px; color: #102f59; font-size: 17px;}
header#ty-site-header .sp-header-search button[type="submit"] {
  flex-basis: 66px;
  width: 66px;
  height: 52px;
  margin: -2px -2px -2px 0;
  border-radius: 0 17px 17px 0 !important;
}
header#ty-site-header .sp-header-search button[type="submit"] svg {width: 27px; height: 27px; transform: none;}

.ty-header-navigation {position: relative; z-index: 520; box-sizing: border-box; min-width: 0;}
.ty-header-navigation * {box-sizing: border-box;}
.ty-header-navigation-row {--ty-header-control-height: 36px; display: flex; height: 64px; align-items: center; gap: clamp(12px, 1.6vw, 34px);}
.ty-header-navigation-row :is(button, a) {font-family: inherit;}
.ty-categories-trigger {
  display: inline-flex;
  height: var(--ty-header-control-height);
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #b0c7e0;
  border-radius: 12px;
  background: #fff;
  color: #0f5dbd;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.ty-categories-trigger:is(:hover, :focus-visible, [aria-expanded="true"]) {border-color: #0f5dbd;}
.ty-categories-trigger svg {width: 19px; height: 19px;}
.ty-categories-trigger b {margin-left: auto; font-size: 18px; font-weight: 500; transform: rotate(180deg); transition: transform .16s ease;}
.ty-categories-trigger[aria-expanded="true"] b {transform: rotate(0);}
.ty-header-shortcuts {display: flex; flex: 1 1 auto; align-items: center; gap: 8px;}
#ty-site-header .ty-header-shortcuts a {
  display: inline-flex;
  flex: 1 1 auto;
  height: var(--ty-header-control-height);
  align-items: center;
  justify-content: center;
  padding: 6px 11px;
  border: 1px solid #dce7f2;
  border-radius: 999px;
  background: #f3f7fc;
  color: #102f59 !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
#ty-site-header .ty-header-shortcuts a:is(:hover, :focus-visible) {border-color: #97b4d1; background: #e3eef9;}
.ty-header-deposit {
  display: inline-flex !important;
  height: var(--ty-header-control-height);
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-left: auto;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #f58220 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.ty-header-deposit:is(:hover, :focus-visible) {outline: 0; background: #d9680f !important;}
.ty-header-deposit svg {width: 19px; height: 19px;}

.ty-category-mega-menu {
  position: absolute;
  z-index: 550;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: min(650px, calc(100vh - 156px));
  padding: 14px;
  overflow: hidden;
  border: 1px solid #d5e0ea;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 47, 89, .18) !important;
}
.ty-category-mega-menu[hidden], .ty-category-panel[hidden] {display: none !important;}
.ty-category-mobile-bar {display: none;}
.ty-category-mega-layout {display: grid; grid-template-columns: minmax(250px, 31%) minmax(0, 1fr); min-height: 460px; max-height: min(620px, calc(100vh - 186px));}
.ty-category-roots {min-width: 0; padding: 5px 14px 5px 0; overflow-y: auto; border-right: 1px solid #dce7f2;}
.ty-category-roots button {
  display: grid;
  width: 100%;
  min-height: 43px;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #102f59;
  font: 600 16px/1.25 var(--ty-font, "Roboto Regular", "Noto Sans Thai", Arial, sans-serif);
  text-align: left;
  cursor: pointer;
}
.ty-category-roots button svg {width: 26px; height: 26px; color: #0f5dbd;}
.ty-category-roots button b {font-size: 27px; font-weight: 400; text-align: right;}
.ty-category-roots button:is(:hover, :focus-visible), .ty-category-roots button[aria-selected="true"] {outline: 0; background: #dce7f2; color: #102f59;}
.ty-category-details {min-width: 0; padding-left: 16px; overflow-y: auto;}
.ty-category-panel {min-width: 0;}
.ty-category-panel-heading {
  position: relative;
  display: flex;
  min-height: 86px;
  align-items: center;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(120deg, #dceeff, #edf6fb);
  color: #102f59;
}
.ty-category-panel-heading > img {position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .54;}
.ty-category-panel-heading.has-image::after {position: absolute; inset: 0; background: linear-gradient(90deg, rgba(220,238,255,.98) 0%, rgba(220,238,255,.84) 44%, rgba(220,238,255,.06) 78%); content: '';}
.ty-category-panel-heading > span {position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; padding: 18px 28px;}
.ty-category-panel-heading svg {width: 38px; height: 38px; color: #0f5dbd;}
.ty-category-panel-heading strong {font-size: clamp(23px, 2vw, 31px); line-height: 1.15;}
.ty-category-card-grid {display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px;}
.ty-category-card-grid a {
  display: grid;
  min-height: 94px;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d7e2ec;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f3f7fb);
  color: #102f59 !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}
.ty-category-card-grid a svg {width: 36px; height: 36px; color: #3269a3;}
.ty-category-card-grid a b {font-size: 24px; font-weight: 400;}
.ty-category-card-grid a:is(:hover, :focus-visible) {border-color: #8db0d2; outline: 0; background: #edf5fc; color: #0f5dbd !important;}
.ty-category-view-all {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 18px 12px 6px;
  border-top: 1px solid #dce7f2;
  color: #0f5dbd !important;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}
.ty-category-view-all svg {width: 30px; height: 30px;}
.ty-category-view-all b {font-size: 28px; font-weight: 400;}
.ty-category-view-all:is(:hover, :focus-visible) {outline: 0; color: #102f59 !important;}

html[data-theme="dark"] header#ty-site-header.header {border-color: #455368; background: #252c37; color: #fff;}
html[data-theme="dark"] header#ty-site-header .sp-header-search {border-color: #59687b !important; background: #364354 !important;}
html[data-theme="dark"] .ty-header-navigation-row {border-color: #455368;}
html[data-theme="dark"] #ty-site-header .ty-header-shortcuts a {border-color: #455368; background: #303b4c; color: #fff !important;}
html[data-theme="dark"] #ty-site-header .ty-header-shortcuts a:is(:hover, :focus-visible) {border-color: #81a5c9; background: #39495c;}
html[data-theme="dark"] .ty-category-mega-menu {border-color: #455368; background: #252c37; box-shadow: 0 18px 42px rgba(0,0,0,.34) !important;}
html[data-theme="dark"] .ty-category-roots {border-color: #455368;}
html[data-theme="dark"] .ty-category-roots button {color: #fff;}
html[data-theme="dark"] .ty-category-roots button svg {color: #60b5ff;}
html[data-theme="dark"] .ty-category-roots button:is(:hover, :focus-visible),
html[data-theme="dark"] .ty-category-roots button[aria-selected="true"] {background: #364354; color: #fff;}
html[data-theme="dark"] .ty-category-panel-heading {background: #303b4c; color: #fff;}
html[data-theme="dark"] .ty-category-panel-heading.has-image::after {background: linear-gradient(90deg, rgba(48,59,76,.98), rgba(48,59,76,.84) 48%, rgba(48,59,76,.16) 82%);}
html[data-theme="dark"] .ty-category-panel-heading svg {color: #60b5ff;}
html[data-theme="dark"] .ty-category-card-grid a {border-color: #455368; background: #303b4c; color: #fff !important;}
html[data-theme="dark"] .ty-category-card-grid a svg {color: #60b5ff;}
html[data-theme="dark"] .ty-category-card-grid a:is(:hover, :focus-visible) {border-color: #60b5ff; background: #364354; color: #fff !important;}
html[data-theme="dark"] .ty-category-view-all {border-color: #455368; color: #60b5ff !important;}

@media (min-width: 961px) {
  header#ty-site-header.header {height: 143px;}
  header#ty-site-header + .header-end {height: 143px;}
  header#ty-site-header .sp-header-shell {
    display: grid;
    grid-template-rows: 78px 64px;
    height: 142px;
    margin: 0 auto;
  }
  header#ty-site-header .sp-header-main {
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
    height: 78px !important;
    grid-template-columns: minmax(170px, 230px) minmax(330px, 1fr) max-content 104px !important;
    align-items: center;
    gap: 22px !important;
  }
  header#ty-site-header .sp-header-main > .toggle-menu {display: none !important;}
  header#ty-site-header .sp-header-search-wrap {width: 100%; min-width: 0;}
  header#ty-site-header .header-links {position: static !important; display: block !important; width: auto !important; height: auto !important; margin: 0 !important; background: transparent !important;}
  header#ty-site-header .header-links .menu {position: static !important; display: flex !important; width: auto !important; height: auto !important; gap: 14px !important; padding: 0 !important; overflow: visible !important; background: transparent !important;}
  header#ty-site-header .header-links .ring {display: none !important;}
  header#ty-site-header .header-links :is(.selection, .connexion) {
    position: relative;
    display: flex !important;
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
    height: 58px !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    margin: 0 !important;
    padding: 31px 2px 0 !important;
    overflow: hidden;
    color: #102f59 !important;
    font-size: 14px !important;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-overflow: ellipsis;
    text-decoration: none;
    white-space: nowrap;
  }
  header#ty-site-header .header-links .selection::before {position: absolute !important; top: 2px !important; left: 50% !important; width: 29px !important; height: 29px !important; margin: 0 0 0 -14.5px !important; background-color: #102f59;}
  header#ty-site-header .header-links .connexion::before {display: none !important;}
  header#ty-site-header .header-links .sp-header-login svg {position: absolute; top: 0; left: 50%; width: 31px; height: 31px; margin-left: -15.5px; color: #102f59;}
  header#ty-site-header .sp-favorites-count {position: absolute; z-index: 2; top: 0; left: calc(50% + 8px); min-width: 15px; height: 15px; padding: 0 3px; border: 2px solid #fff; border-radius: 999px; background: #f58220; color: #fff; font-size: 10px; line-height: 15px;}
  header#ty-site-header .dashboard-menu-mobile {display: none !important;}
  header#ty-site-header .sp-language-desktop {display: none !important;}
  header#ty-site-header .sp-language-mobile {position: relative; z-index: 540; display: block !important; min-width: 44px;}
  header#ty-site-header .sp-language-trigger {display: flex; width: 44px; height: 36px; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; cursor: pointer;}
  header#ty-site-header .sp-language-trigger::before {
    content: "";
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    width: 36px;
    height: 28px;
    margin: auto;
    border: 1px solid var(--ty-header-divider);
    border-radius: 7px;
    pointer-events: none;
  }
  header#ty-site-header .sp-language-trigger img {width: 27px; height: 19px; object-fit: cover;}
  html[data-theme="dark"] header#ty-site-header .header-links :is(.selection, .connexion),
  html[data-theme="dark"] header#ty-site-header .header-links .sp-header-login svg {color: #fff !important;}
  html[data-theme="dark"] header#ty-site-header .header-links .selection::before {background-color: #fff;}
  html[data-theme="dark"] header#ty-site-header .sp-favorites-count {border-color: #252c37;}
}

@media (max-width: 1100px) and (min-width: 961px) {
  header#ty-site-header .sp-header-main {grid-template-columns: 165px minmax(250px, 1fr) max-content 74px !important; gap: 12px !important;}
  header#ty-site-header .header-links .menu {gap: 4px !important;}
  header#ty-site-header .header-links :is(.selection, .connexion) {width: 72px !important; min-width: 72px !important; max-width: 72px !important;}
}

@media (max-width: 960px) {
  header#ty-site-header.header {height: 174px;}
  header#ty-site-header + .header-end {height: 174px;}
  header#ty-site-header .sp-header-shell {display: grid; grid-template-rows: 116px 58px; width: 100%; height: 174px;}
  header#ty-site-header .sp-header-main {
    display: grid !important;
    width: calc(100% - 24px) !important;
    max-width: none !important;
    min-height: 116px !important;
    grid-template-columns: 38px minmax(90px, 1fr) auto auto;
    grid-template-rows: 58px 50px;
    gap: 4px 8px !important;
    margin: 0 auto !important;
  }
  header#ty-site-header .sp-header-main > .toggle-menu {display: flex !important; grid-column: 1; grid-row: 1; width: 38px;}
  header#ty-site-header .header-logo {grid-column: 2; grid-row: 1; min-width: 0;}
  header#ty-site-header .sp-header-search-wrap {grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0;}
  header#ty-site-header .sp-header-search {height: 44px;}
  header#ty-site-header .sp-header-search button[type="submit"] {flex-basis: 50px; width: 50px; height: 44px;}
  header#ty-site-header .header-links {position: static !important; display: block !important; grid-column: 3; grid-row: 1; width: auto !important; height: auto !important; background: transparent !important;}
  header#ty-site-header .header-links .menu {position: static !important; display: flex !important; width: auto !important; height: auto !important; gap: 4px !important; padding: 0 !important; overflow: visible !important; background: transparent !important;}
  header#ty-site-header .header-links .ring, header#ty-site-header .dashboard-menu-mobile {display: none !important;}
  header#ty-site-header .header-links :is(.selection, .connexion) {position: relative; display: grid !important; width: 42px !important; min-width: 42px !important; height: 42px !important; place-items: center; margin: 0 !important; padding: 0 !important; overflow: visible; color: #102f59; font-size: 0 !important;}
  html body.sp-site-page.sp-modern-header header#ty-site-header.header .sp-header-main .header-links .menu > a.selection {display: grid !important;}
  header#ty-site-header .header-links .selection::before {width: 26px; height: 26px; margin: 0; background-color: #102f59;}
  header#ty-site-header .header-links .connexion::before {display: none !important;}
  header#ty-site-header .header-links .sp-header-login svg {width: 29px; height: 29px; color: #102f59;}
  header#ty-site-header .sp-favorites-count {position: absolute; top: -1px; right: 0; min-width: 15px; height: 15px; padding: 0 2px; border: 2px solid #fff; border-radius: 999px; background: #f58220; color: #fff; font-size: 9px; line-height: 15px;}
  header#ty-site-header .sp-language-desktop {display: none !important;}
  header#ty-site-header .sp-language-mobile {position: relative; display: block !important; grid-column: 4; grid-row: 1; width: 46px; height: 42px;}
  header#ty-site-header .sp-language-trigger {display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; cursor: pointer;}
  header#ty-site-header .sp-language-trigger img {width: 25px; height: 18px; object-fit: cover;}
  html[data-theme="dark"] header#ty-site-header .header-links :is(.selection, .connexion),
  html[data-theme="dark"] header#ty-site-header .header-links .sp-header-login svg,
  html[data-theme="dark"] header#ty-site-header .sp-language-trigger {color: #fff;}
  html[data-theme="dark"] header#ty-site-header .header-links .selection::before {background-color: #fff;}
  html[data-theme="dark"] header#ty-site-header .sp-favorites-count {border-color: #252c37;}
  .ty-header-navigation {width: 100%;}
  .ty-header-navigation-row {--ty-header-control-height: 46px; height: 58px; gap: 6px; padding: 5px 12px; overflow: hidden;}
  .ty-categories-trigger {min-width: 0; flex: 1 1 170px; padding: 0 14px;}
  .ty-categories-trigger svg {width: 21px; height: 21px;}
  .ty-header-deposit {min-width: 48px; padding: 0 11px !important; font-size: 14px !important;}
  .ty-header-deposit svg {width: 22px; height: 22px;}
  .ty-category-mega-menu {
    position: fixed;
    top: var(--ty-category-menu-top, 174px);
    right: 0;
    left: 0;
    width: var(--ty-col, calc(100% - 24px));
    margin-inline: auto;
    max-height: var(--ty-category-menu-height, calc(100dvh - 182px));
    padding: 0;
    border-radius: 14px;
  }
  .ty-category-mobile-bar {display: grid; height: 54px; grid-template-columns: minmax(70px, 1fr) auto minmax(70px, 1fr); align-items: center; padding: 0 10px; border-bottom: 1px solid #dce7f2;}
  .ty-category-mobile-bar button {min-height: 40px; padding: 4px 8px; border: 0; background: transparent; color: #102f59; font: 700 15px/1 var(--ty-font, Arial, sans-serif); cursor: pointer;}
  .ty-category-mobile-bar strong {font-size: 16px; text-align: center;}
  .ty-category-back {justify-self: start; visibility: hidden;}
  .ty-category-close {justify-self: end; font-size: 28px !important; font-weight: 400 !important;}
  .ty-category-mega-menu.is-detail .ty-category-back {visibility: visible;}
  .ty-category-mega-layout {display: block; min-height: 0; max-height: calc(var(--ty-category-menu-height, 70dvh) - 54px); overflow-y: auto;}
  .ty-category-roots {padding: 8px; border: 0;}
  .ty-category-roots button {min-height: 52px; grid-template-columns: 32px minmax(0, 1fr) 18px; padding: 8px 12px; font-size: 17px;}
  .ty-category-details {display: none; padding: 10px; overflow: visible;}
  .ty-category-mega-menu.is-detail .ty-category-roots {display: none;}
  .ty-category-mega-menu.is-detail .ty-category-details {display: block;}
  .ty-category-panel-heading {min-height: 80px;}
  .ty-category-panel-heading > span {padding: 16px 20px;}
  .ty-category-panel-heading strong {font-size: 23px;}
  .ty-category-card-grid {grid-template-columns: minmax(0, 1fr); gap: 8px;}
  .ty-category-card-grid a {min-height: 64px; grid-template-columns: 32px minmax(0, 1fr) 14px; padding: 10px 12px;}
  .ty-category-card-grid a svg {width: 30px; height: 30px;}
  .ty-category-view-all {padding: 16px 8px 8px; font-size: 16px;}
  html[data-theme="dark"] .ty-category-mobile-bar {border-color: #455368;}
  html[data-theme="dark"] .ty-category-mobile-bar button {color: #fff;}
}

@media (max-width: 700px) {
  .ty-header-deposit span {display: none;}
  .ty-header-deposit {flex: 0 0 46px; width: 46px;}
}

@media (prefers-reduced-motion: reduce) {
  .ty-categories-trigger b {transition: none;}
}

/* Override the shared legacy header geometry without changing the wordmark. */
#ty-site-header#ty-site-header.header.ty-header-redesign {
  --ty-header-surface: #fff;
  --ty-header-divider: #dde3e8;
  --ty-header-top: 64px;
  --ty-header-nav: 52px;
  --ty-redesign-height: calc(var(--ty-header-top) + var(--ty-header-nav) + 1px);
  height: var(--ty-redesign-height) !important;
  min-height: var(--ty-redesign-height) !important;
  box-sizing: border-box;
  background: var(--ty-header-surface) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ty-header-divider) !important;
}
html[data-theme="dark"] #ty-site-header.header.ty-header-redesign {
  --ty-header-surface: #252c37;
  --ty-header-divider: #455368;
}
html body.sp-site-page.sp-modern-header #ty-site-header.ty-header-redesign + .header-end {
  height: 117px !important;
  min-height: 117px !important;
}
#ty-site-header.header.ty-header-redesign .sp-header-shell {
  display: grid !important;
  width: var(--ty-col, min(calc(100% - 48px), 1080px)) !important;
  max-width: none !important;
  margin-inline: auto !important;
  height: auto !important;
  min-height: 0 !important;
  grid-template: var(--ty-header-top) var(--ty-header-nav) / minmax(0, 1fr) !important;
}
#ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-shell > .sp-header-main {
  display: grid !important;
  width: 100% !important;
  height: var(--ty-header-top) !important;
  min-height: 0 !important;
  grid-template: minmax(0, 1fr) / 146px minmax(0, 1fr) max-content max-content !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
}
#ty-site-header#ty-site-header.header.ty-header-redesign :is(.sp-header-shell, .sp-header-main, .ty-header-navigation) {
  background: var(--ty-header-surface) !important;
  border: 0 !important;
}
#ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-main > .sp-header-search-wrap {grid-area: 1 / 2 !important;}
#ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-main > .header-links {grid-area: 1 / 3 !important; width: 100% !important;}
#ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu {
  display: grid !important;
  width: 100% !important;
  grid-template-columns: repeat(2, 80px);
  gap: 0 !important;
  align-items: center !important;
}
#ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu:has(> .ty-header-saved-searches) {
  grid-template-columns: 80px 100px 80px;
}
#ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu > :is(a.selection, a.sp-header-login, a.ty-header-saved-searches) {
  display: flex !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  justify-content: center !important;
  align-items: center !important;
  flex-direction: column !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 3px !important;
  line-height: 1.2 !important;
  background: transparent !important;
}
#ty-site-header .header-links a.ty-header-saved-searches {
  color: #102f59;
  font-weight: 700;
  text-decoration: none;
}
html[data-theme="dark"] #ty-site-header .header-links a.ty-header-saved-searches {color: #fff;}
#ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu > :is(a.selection, a.sp-header-login, a.ty-header-saved-searches) > span:not(.sp-favorites-count) {
  display: block;
  max-width: 100% !important;
  overflow: hidden !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu > :is(a.selection, a.sp-header-login)::before {display: none !important;}
#ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu > a > svg {
  position: static !important;
  width: 27px !important;
  height: 27px !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  color: currentColor !important;
  background: transparent !important;
}
#ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-main > .sp-language-mobile {
  z-index: 740;
  display: block !important;
  grid-area: 1 / 4 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
}
#ty-site-header .ty-language-disclosure {position: relative;}
#ty-site-header#ty-site-header.header.ty-header-redesign .sp-language-trigger {position: static !important; min-width: 0; margin: 0 !important;}
#ty-site-header .ty-language-disclosure > summary {list-style: none;}
#ty-site-header .ty-language-disclosure > summary::-webkit-details-marker {display: none;}
#ty-site-header .ty-language-disclosure:not([open]) > #sp-language-menu {display: none;}
#ty-site-header .ty-language-disclosure > #sp-language-menu {
  position: absolute;
  inset: 100% 0 auto auto;
  width: max-content;
  max-width: calc(100vw - 24px);
  height: auto;
  margin: 0;
  padding: 3px;
  list-style: none;
  background: var(--ty-header-surface);
  border: 1px solid var(--ty-header-divider);
  border-radius: 12px;
}
#ty-site-header .ty-language-disclosure > #sp-language-menu > li {width: auto !important; height: auto !important;}
#ty-site-header .ty-language-disclosure > #sp-language-menu a {
  display: flex;
  width: 44px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0;
  border-radius: 7px;
}
#ty-site-header .ty-language-disclosure > #sp-language-menu a:is(:hover, :focus-visible) {background: #dce7f2;}
html[data-theme="dark"] #ty-site-header .ty-language-disclosure > #sp-language-menu a:is(:hover, :focus-visible) {background: #364354;}
#ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-search {
  width: 100% !important;
  max-width: none !important;
  overflow: hidden !important;
  border-radius: 12px !important;
}
#ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-search > button[type="submit"] {
  --ty-primary-action-color: #0f5dbd;

  flex: 0 0 54px !important;
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: var(--ty-primary-action-color) !important;
  color: #fff !important;
}
#ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-search > button[type="submit"]:is(:hover, :focus-visible, :active) {
  --ty-primary-action-color: #0b4f9f;
}
#ty-site-header.header.ty-header-redesign .ty-header-deposit {text-transform: none;}
@media (min-width: 961px) {
  #ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-main > .sp-language-mobile {height: max-content !important;}
  #ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-search {height: 48px !important; min-height: 48px !important;}
  .ty-header-navigation-row {height: var(--ty-header-nav); gap: 12px;}
  .ty-header-deposit {min-width: 206px; height: 48px; gap: 11px; padding-inline: 12px !important; font-size: 17px !important;}
  .ty-header-deposit svg {width: 24px; height: 24px;}
}
@media (min-width: 961px) and (max-width: 1150px) {
  .ty-header-navigation-row {gap: 8px;}
  .ty-header-shortcuts {gap: 5px;}
  #ty-site-header .ty-header-shortcuts a {padding-inline: 6px; font-size: 13px;}
  .ty-header-deposit {min-width: 0; gap: 6px; font-size: 15px !important;}
}
.ty-category-mega-layout {
  min-height: 0;
}
.ty-category-card-grid > a {min-width: 0;}
.ty-category-view-all {grid-template-columns: 34px auto 18px; justify-content: start;}
#ty-site-header .ty-category-mega-menu {max-height: max(90px, calc(100dvh - var(--ty-redesign-height) - 7px));}
.ty-category-card-grid {grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));}
.ty-category-card-grid a {grid-template: auto auto / minmax(0, 1fr); justify-items: center; text-align: center; overflow-wrap: anywhere;}
.ty-category-card-grid a b {display: none;}
#ty-site-header .ty-header-navigation :is(a, button):focus-visible {outline: 2px solid #3269a3; outline-offset: -3px;}

@media (max-width: 960px) {
  #ty-site-header#ty-site-header.header.ty-header-redesign {--ty-header-top: 104px; --ty-header-nav: 66px;}
  html body.sp-site-page.sp-modern-header #ty-site-header.ty-header-redesign + .header-end {height: 171px !important; min-height: 171px !important;}
  #ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-shell > .sp-header-main {
    grid-template: 48px 48px / 36px minmax(124px, 1fr) 80px 44px !important;
    gap: 3px !important;
  }
  #ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-main > .toggle-menu {display: flex !important;}
  #ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-main > .sp-header-search-wrap {display: block !important; grid-area: 2 / 1 / 3 / -1 !important;}
  #ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-main > .header-links {height: auto !important;}
  #ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu,
  #ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu:has(> .ty-header-saved-searches) {grid-template-columns: repeat(2, minmax(0, 1fr));}
  #ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu > :is(a.selection, a.sp-header-login, a.ty-header-saved-searches) {height: 44px !important; min-height: 44px !important; font-size: 0 !important;}
  #ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu > :is(a.selection, a.sp-header-login, a.ty-header-saved-searches) > span:not(.sp-favorites-count) {display: none !important;}
  #ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu > a.ty-header-saved-searches {display: none !important;}
  #ty-site-header.header.ty-header-redesign .ty-header-navigation-row {padding-inline: 0;}
  .ty-category-mega-layout {min-height: 0;}
  .ty-category-card-grid {grid-template-columns: minmax(0, 1fr);}
  .ty-category-card-grid a {grid-template: auto / 32px minmax(0, 1fr) 14px; justify-items: start; text-align: left;}
  .ty-category-card-grid a b {display: inline;}
  .ty-header-shortcuts {display: none;}
  #ty-site-header .ty-category-mega-menu {max-height: calc(100dvh - var(--ty-redesign-height) - 7px);}
  .ty-header-navigation-row {height: var(--ty-header-nav); gap: 6px;}
  .ty-categories-trigger {min-width: 0; flex: 1 1 auto;}
  .ty-header-deposit {min-width: 46px;}
}
@media (min-width: 390px) and (max-width: 960px) {
  #ty-site-header#ty-site-header.header.ty-header-redesign .sp-header-shell > .sp-header-main:has(.ty-header-saved-searches) {
    grid-template-columns: 36px minmax(124px, 1fr) 132px 44px !important;
  }
  #ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu:has(> .ty-header-saved-searches) {grid-template-columns: repeat(3, minmax(0, 1fr));}
  #ty-site-header#ty-site-header.header.ty-header-redesign .header-links .menu > a.ty-header-saved-searches {display: flex !important;}
}

/* Panneau de catégorie : colonne gauche (icône + nom + espace libre) et liste à droite */
.ty-category-panel:not([hidden]) {display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 28px; min-height: 100%;}
.ty-category-panel-side {
  display: flex;
  grid-row: 1 / 3;
  flex-direction: column;
  gap: 16px;
  padding: 20px 16px;
  border-radius: 12px;
  background: #f1f4f8;
}
.ty-category-panel-title {display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 3px solid #0f5dbd; color: #102f59;}
.ty-category-panel-title svg {flex: none; width: 22px; height: 22px; color: #0f5dbd;}
.ty-category-panel-title strong {font-size: 19px; line-height: 1.25;}
.ty-category-panel-extra {flex: 1;}
.ty-category-panel-extra:empty {display: none;}
.ty-category-panel .ty-category-view-all {align-self: start; padding-inline: 0;}
html[data-theme="dark"] .ty-category-panel-side {background: #303b4c;}
html[data-theme="dark"] .ty-category-panel-title {border-color: #60b5ff; color: #fff;}
html[data-theme="dark"] .ty-category-panel-title svg {color: #60b5ff;}
@media (max-width: 960px) {
  .ty-category-panel:not([hidden]) {display: block; min-height: 0;}
  .ty-category-panel-side {padding: 14px 12px; margin-bottom: 6px;}
  .ty-category-panel-extra {display: none;}
  .ty-category-panel .ty-category-view-all {padding-inline: 8px;}
}

/* Sous-catégories avec aperçu de leurs propres sous-catégories (style « titre + 5 liens + Voir tout ») */
.ty-category-groups {padding-top: 8px; columns: 3 190px; column-gap: 28px;}
.ty-category-group {padding: 4px 0 16px; break-inside: avoid;}
.ty-category-group-title {display: block; padding: 4px 0; color: #102f59 !important; font-size: 15px; font-weight: 700; line-height: 1.3; text-decoration: none;}
.ty-category-group ul {margin: 2px 0 0; padding: 0; list-style: none;}
.ty-category-group li {margin: 0; padding: 0;}
.ty-category-group li a {display: block; padding: 4px 0; color: #3b4f6b !important; font-size: 14px; line-height: 1.3; text-decoration: none;}
.ty-category-group li a.ty-category-group-more {color: #0f5dbd !important; font-weight: 600;}
.ty-category-group a:is(:hover, :focus-visible) {outline: 0; color: #0f5dbd !important; text-decoration: underline; text-underline-offset: 3px;}
html[data-theme="dark"] .ty-category-group-title {color: #fff !important;}
html[data-theme="dark"] .ty-category-group li a {color: #c9d4e2 !important;}
html[data-theme="dark"] .ty-category-group li a.ty-category-group-more,
html[data-theme="dark"] .ty-category-group a:is(:hover, :focus-visible) {color: #60b5ff !important;}
@media (min-width: 961px) and (max-width: 1150px) {
  .ty-category-groups {columns: 2;}
}
@media (max-width: 960px) {
  .ty-category-groups {padding: 0; columns: 1;}
  .ty-category-group {padding: 0;}
  .ty-category-group ul {display: none;}
  .ty-category-group-title {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #e6edf4;
    font-size: 16px;
    font-weight: 500;
  }
  .ty-category-group-title::after {color: #6b7f96; font-size: 22px; font-weight: 400; content: '›';}
  html[data-theme="dark"] .ty-category-group-title {border-color: #455368;}
}

/* Sélecteur de langue : drapeaux sans fond (ni cadre autour du drapeau actuel, ni case colorée au survol) */
header#ty-site-header .sp-language-trigger::before {display: none !important;}
#ty-site-header .ty-language-disclosure > #sp-language-menu {border: 0; box-shadow: 0 8px 24px rgba(16, 47, 89, .14);}
#ty-site-header .ty-language-disclosure > #sp-language-menu a,
#ty-site-header .ty-language-disclosure > #sp-language-menu a:is(:hover, :focus-visible),
html[data-theme="dark"] #ty-site-header .ty-language-disclosure > #sp-language-menu a:is(:hover, :focus-visible) {background: transparent !important;}
#ty-site-header .ty-language-disclosure > #sp-language-menu a img {transition: transform .15s ease;}
#ty-site-header .ty-language-disclosure > #sp-language-menu a:is(:hover, :focus-visible) img {transform: scale(1.12);}
#ty-site-header .ty-language-disclosure > #sp-language-menu a:focus-visible {outline: 2px solid #3269a3; outline-offset: -2px;}
@media (prefers-reduced-motion: reduce) {
  #ty-site-header .ty-language-disclosure > #sp-language-menu a img {transition: none;}
}

/* Pages hors accueil (recherche, catégories…) : même espace de 24px entre le header et la bannière que sur l'accueil.
   Avant, cet écart était réduit seulement quand l'ancienne barre #ty-home-nav était présente ; elle n'existe plus. */
html body.sp-site-page:not(.sp-home-page) main.sp-site-surface:has(.adv-banner-head) {padding-top: 24px !important;}
html body.sp-site-page:not(.sp-home-page) main.sp-site-surface .adv-banner-head {margin-top: 0 !important;}

/* Menu catégories (ordinateur) : fond gris et tailles de texte alignés sur leboncoin */
@media (min-width: 961px) {
  .ty-category-mega-layout {
    height: min(520px, calc(100dvh - var(--ty-redesign-height) - 36px));
    max-height: none;
  }
  .ty-category-roots button {height: 38px; min-height: 38px; grid-template-columns: 26px minmax(0, 1fr) 16px; gap: 10px; font-size: 15px;}
  .ty-category-roots button span {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
  .ty-category-roots button svg {width: 22px; height: 22px;}
  .ty-category-roots button b {font-size: 22px;}
  .ty-category-panel:not([hidden]) {grid-template-columns: 200px minmax(0, 1fr); column-gap: 24px;}
  .ty-category-panel-side {padding: 16px 14px; background: #e9ecf1;}
  .ty-category-panel-title {gap: 8px; padding-left: 10px;}
  .ty-category-panel-title svg {width: 20px; height: 20px;}
  .ty-category-panel-title strong {font-size: 16px;}
  .ty-category-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 32px;
    columns: auto;
  }
  .ty-category-group {padding: 2px 0 0;}
  .ty-category-group:nth-child(n + 5) {display: none;}
  .ty-category-group-title {padding: 0 0 6px; font-size: 16px; font-weight: 700;}
  .ty-category-group li a {padding: 4px 0; font-size: 15px; line-height: 20px;}
  .ty-category-group li a.ty-category-group-more {font-weight: 500;}
  .ty-category-view-all {margin-top: 12px; padding-top: 14px; font-size: 15px; grid-template-columns: 24px auto 16px;}
  .ty-category-view-all svg {width: 22px; height: 22px;}
  .ty-category-view-all b {font-size: 22px;}
}

/* Fenêtre du menu catégories : fond gris clair plutôt que blanc pur (moins fatigant pour les yeux) */
html:not([data-theme="dark"]) #ty-site-header .ty-category-mega-menu {background: #f5f6f8;}
html:not([data-theme="dark"]) .ty-category-roots button:is(:hover, :focus-visible),
html:not([data-theme="dark"]) .ty-category-roots button[aria-selected="true"] {background: #e3e9f1;}

/* Accueil mobile : garder les images, masquer uniquement le texte éditorial,
   les catégories et les provinces. */
@media (max-width: 960px) {
  html body.sp-site-page.sp-home-page main.sp-site-surface .index-container .sp-home-hero:not(:has(img)),
  html body.sp-site-page.sp-home-page main.sp-site-surface .index-container .sp-home-seo,
  html body.sp-site-page.sp-home-page main.sp-site-surface .index-container .sp-home-category-navigation,
  html body.sp-site-page.sp-home-page .sp-home-directory-shell,
  html body.sp-site-page.sp-home-page .categories,
  html body.sp-site-page.sp-home-page .sp-province-footer,
  html body.sp-site-page.sp-home-page footer.footer.sp-footer-v2 .sp-footer-shell > nav.sp-footer-links:nth-of-type(2) {
    display: none !important;
  }
  html body.sp-site-page.sp-home-page #ty-site-header ~ main.sp-site-surface .index-container .sp-home-featured-categories {
    display: block !important;
  }
  html body.sp-site-page.sp-home-page main.sp-site-surface .index-container .sp-home-hero-copy > h1,
  html body.sp-site-page.sp-home-page main.sp-site-surface .index-container .sp-home-hero-copy > .sp-home-deposit-link,
  html body.sp-site-page.sp-home-page main.sp-site-surface .index-container .sp-home-hero-richtext > :not(:has(img)) {
    display: none !important;
  }
  html body.sp-site-page.sp-home-page main.sp-site-surface .index-container .sp-home-hero-richtext {
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
  }
  html body.sp-site-page.sp-home-page main.sp-site-surface .index-container .sp-home-hero--with-image {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html body.sp-site-page.sp-home-page main.sp-site-surface .index-container .sp-home-hero--with-image .sp-home-hero-copy:not(:has(img)) {
    display: none !important;
  }
}

/* Mobile : appel à l'action principal, pleine largeur sous Catégories. */
@media (max-width: 700px) {
  #ty-site-header#ty-site-header.header.ty-header-redesign {--ty-header-nav: 126px;}
  html body.sp-site-page.sp-modern-header #ty-site-header.ty-header-redesign + .header-end {
    height: 231px !important;
    min-height: 231px !important;
  }
  #ty-site-header.header.ty-header-redesign .ty-header-navigation-row {
    display: grid;
    height: var(--ty-header-nav);
    grid-template: 46px 54px / minmax(0, 1fr);
    align-content: center;
    gap: 10px;
    padding: 8px 0;
    overflow: visible;
  }
  #ty-site-header.header.ty-header-redesign .ty-categories-trigger {
    width: 100%;
    min-width: 0;
  }
  #ty-site-header.header.ty-header-redesign .ty-header-deposit {
    width: 100%;
    min-width: 0;
    height: 54px;
    margin: 0;
    gap: 0;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #ff8a1d, #f57a13) !important;
    box-shadow: 0 5px 14px rgba(245, 130, 32, .22);
    font-size: 17px !important;
  }
  #ty-site-header.header.ty-header-redesign .ty-header-deposit span {display: inline !important;}
  #ty-site-header.header.ty-header-redesign .ty-header-deposit svg {display: none;}
  #ty-site-header.header.ty-header-redesign .ty-header-deposit:is(:hover, :focus-visible, :active) {
    background: linear-gradient(135deg, #ed7511, #d9680f) !important;
  }

  /* iOS Safari zoome automatiquement les champs dont le texte fait moins de 16 px. */
  html body.sp-site-page :is(
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
    select,
    textarea
  ) {
    font-size: 16px !important;
  }
}
