/* Accueil TalatYai — alignement sur la maquette fournie. */
:root {
  --ty-ref-blue: #2477c9;
  --ty-ref-blue-dark: #102e50;
  --ty-ref-orange: #f58220;
  --ty-ref-line: #dce5ee;
  --ty-ref-muted: #58708a;
}

body.sp-home-page {background: #fff; color: var(--ty-ref-blue-dark);}
body.sp-home-page main.sp-site-surface--home,
body.sp-home-page .sp-home-canvas {background: #fff;}
body.sp-home-page main.sp-site-surface--home > .container-100 > .index-container {
  width: var(--ty-col);
  padding-top: 0;
  padding-bottom: 28px;
}

/* En-tête : logo, recherche, raccourcis, dépôt, langue. */
@media (min-width: 961px) {
  body.sp-home-page {--ty-header-h: 88px; --ty-search-h: 58px;}
  body.sp-home-page header.header {border-bottom: 1px solid var(--ty-ref-line); box-shadow: 0 2px 8px rgba(16, 46, 80, .05);}
  body.sp-home-page header.header .sp-header-shell {width: var(--ty-col);}
  body.sp-home-page header.header .sp-header-shell > .sp-header-main {
    grid-template-columns: 150px minmax(360px, 1fr) max-content max-content 55px;
    gap: 24px;
  }
  body.sp-home-page header.header .sp-header-main .header-logo {width: 150px;}
  body.sp-home-page header.header .sp-header-main .header-logo img {display: block; width: 145px; height: auto; margin: 0;}
  body.sp-home-page header.header .sp-header-main > .sp-header-search-wrap {width: 100%; max-width: none; justify-self: stretch;}
  body.sp-home-page header.header .sp-header-shell .sp-header-main .sp-header-search {height: 58px; overflow: hidden; border: 1px solid #cbd9e7; border-radius: 12px; background: #fff;}
  body.sp-home-page header.header .sp-header-search input[type="search"] {padding: 0 20px; font-size: 18px;}
  body.sp-home-page header.header .sp-header-shell .sp-header-search button[type="submit"] {
    flex-basis: 68px;
    width: 68px;
    height: 57px;
    border-radius: 0 11px 11px 0;
    background: var(--ty-ref-orange);
  }
  body.sp-home-page header.header .sp-header-main .header-links {justify-self: end;}
  body.sp-home-page header.header .sp-header-main .header-links .menu {gap: 8px;}
  body.sp-home-page header.header .sp-header-main .header-links .menu > :is(.ring, .selection, .connexion, .deconnexion) {
    width: 66px;
    min-width: 66px;
    max-width: 78px;
    height: 58px;
    padding: 31px 4px 0;
    border: 0;
    background-color: transparent;
    color: #002b63;
    font-size: 12px;
    line-height: 1.05;
    text-align: center;
  }
  body.sp-home-page header.header .sp-header-main .header-links .menu > a.connexion.sp-header-login {
    position: relative;
    display: inline-flex;
    width: auto;
    min-width: 168px;
    max-width: none;
    height: 56px;
    padding: 0 20px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--ty-ref-blue);
    border-radius: 9px;
    background: #fff;
    color: var(--ty-ref-blue);
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
  }
  body.sp-home-page header.header .sp-header-main .header-links .menu > a.connexion.sp-header-login svg {
    position: static;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    transform: none;
  }
  body.sp-home-page header.header .sp-header-main .header-links .menu > a.connexion.sp-header-login:is(:hover, :focus-visible) {
    border-color: var(--ty-ref-blue);
    background: #eef6ff;
    color: var(--ty-ref-blue);
  }
  body.sp-home-page header.header .sp-header-main > .sp-header-deposit {
    min-width: 280px;
    min-height: 56px;
    padding: 0 22px;
    border-color: var(--ty-ref-orange) !important;
    border-radius: 9px;
    background: var(--ty-ref-orange) !important;
    font-size: 16px;
    text-transform: uppercase;
  }
  body.sp-home-page header.header .sp-header-main > .sp-header-deposit::after {content: '＋'; margin-left: 9px; font-size: 18px;}
}

/* Rangée d'icônes : ordre et aspect de la deuxième référence. */
body.sp-home-page .sp-home-category-navigation {
  position: relative;
  z-index: 70;
  margin: 0 0 32px;
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--ty-ref-line);
  background: #fff;
}
body.sp-home-page .sp-home-category-shortcuts {grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px;}
body.sp-home-page .sp-home-category-shortcut {position: static; min-width: 0;}
body.sp-home-page .sp-home-category-shortcut-link,
body.sp-home-page .sp-home-category-shortcuts > :is(a, button) {
  width: 100%;
  min-height: 82px;
  gap: 7px;
  padding: 8px 5px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #fbfdff, #f1f7ff);
  color: var(--ty-ref-blue);
  font-size: 16px;
  font-weight: 700;
}
body.sp-home-page .sp-home-category-shortcut-link svg,
body.sp-home-page .sp-home-category-shortcuts svg {width: 38px; height: 38px; flex-basis: 38px;}
body.sp-home-page .sp-home-category-shortcut:is(:hover, :focus-within, .is-open) > .sp-home-category-shortcut-link,
body.sp-home-page .sp-home-category-shortcut-link:is(:hover, :focus-visible) {
  background: #f3f7fc;
  color: var(--ty-ref-orange);
}

@media (min-width: 701px) {
  body.sp-home-page .sp-home-category-mega {
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    width: 100%;
    max-width: none;
    transform: none;
    grid-template-columns: 260px minmax(0, 1fr);
  }
  body.sp-home-page .sp-home-category-mega-aside {padding: 30px 26px;}
  body.sp-home-page .sp-home-category-mega-content {gap: 28px 42px; padding: 30px 40px 34px;}
}

/* Catégories illustrées. Les dimensions des images restent celles du site. */
body.sp-home-page .sp-home-featured-categories {margin: 0 0 52px;}
body.sp-home-page .sp-home-featured-category-grid {display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px;}
body.sp-home-page .sp-home-featured-category {
  display: flex;
  min-width: 0;
  flex-direction: column;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-bottom: 1px solid var(--ty-ref-line);
  border-radius: 7px 7px 0 0;
  background: #fff;
  color: var(--ty-ref-blue-dark);
  text-decoration: none;
}
body.sp-home-page .sp-home-featured-category img {
  display: block;
  width: 100%;
  height: calc(100% - 30px);
  min-height: 0;
  flex: 1 1 auto;
  object-fit: cover;
}
body.sp-home-page .sp-home-featured-category > span {
  position: static;
  display: block;
  width: auto;
  max-width: none;
  min-height: 30px;
  padding: 7px 4px 8px;
  border-radius: 0;
  background: #F7F7F7;
  box-shadow: none;
  color: var(--ty-ref-blue-dark);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}
body.sp-home-page .sp-home-featured-category:is(:hover, :focus-visible) img {transform: none;}

/* Titres et liens de section, sans changer le gabarit des vignettes. */
body.sp-home-page .index-container .sp-home-section-heading {margin-bottom: 18px;}
body.sp-home-page .index-container .sp-home-section-heading h2,
body.sp-home-page .index-container .sp-home-section-heading h2 a,
body.sp-home-page .sp-home-featured-categories h2 {font-size: 31px; line-height: 1.2;}
body.sp-home-page .index-container .sp-home-section-heading > a,
body.sp-home-page .index-container .sp-home-latest-all {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ty-ref-blue);
  font-size: 16px;
  font-weight: 500;
}
body.sp-home-page .index-container .sp-home-section-heading > a:is(:hover, :focus, :active),
body.sp-home-page .index-container .sp-home-latest-all:is(:hover, :focus, :active) {border: 0; background: transparent; color: var(--ty-ref-blue); text-decoration: underline;}
body.sp-home-page .index-container .sp-home-premium-heading {margin: 0 0 18px;}
body.sp-home-page .index-container > .list-premium {margin-bottom: 0 !important;}
body.sp-home-page .index-container .sp-home-latest > .sp-home-latest-heading {padding-top: 52px !important;}
body.sp-home-page .index-container .sp-home-latest,
body.sp-home-page .index-container .sp-home-seen {margin-bottom: 52px !important;}

/* Cartes : même largeur/hauteur que le site, habillage aligné sur la maquette. */
body.sp-home-page .index-container .list-premium > a.background-ads-premium {
  display: flex;
  height: auto;
  align-self: start;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ty-ref-line) !important;
  border-radius: 7px;
  background: #fff;
}
body.sp-home-page .index-container .list-premium > a.background-ads-premium > .sp-premium-photo {order: 1;}
body.sp-home-page .index-container .list-premium {align-items: start;}
body.sp-home-page .index-container .list-premium > a.background-ads-premium > .bloc-premium-infos {
  order: 2;
  box-sizing: border-box;
  min-height: 0;
  flex: 0 0 auto;
  padding: 10px 12px;
}
body.sp-home-page .index-container .list-premium > a.background-ads-premium > .sp-premium-seller {
  order: 3;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 8px 10px;
  border-top: 1px solid #eef2f6;
}
body.sp-home-page .index-container .sp-premium-seller-avatar {width: 32px; height: 32px; border-width: 1px; font-size: 12px;}
body.sp-home-page .index-container .sp-premium-seller-name {min-width: 0; overflow: hidden; font-size: 15px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap;}
body.sp-home-page .index-container .sp-premium-seller-rating {
  display: inline-flex;
  min-height: 32px;
  margin: 0;
  padding: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}
body.sp-home-page .index-container .sp-premium-seller-rating[data-shop-reviews-url] {
  min-height: 0;
  margin: 0;
  padding: 4px 0;
  align-self: center;
}
body.sp-home-page .index-container .sp-premium-seller-star {position: static; color: var(--ty-ref-orange); font-size: 20px; line-height: 1;}
body.sp-home-page .index-container .sp-premium-featured-label {background: var(--ty-ref-orange);}
body.sp-home-page .index-container :is(.sp-home-latest-cards, .sp-home-category-ads, .sp-home-seen-cards) .sp-premium-title {font-size: 13px;}
body.sp-home-page .index-container .list-premium .sp-premium-price {
  color: var(--ty-ref-blue) !important;
  font-size: 22px !important;
  font-weight: 700;
  line-height: 1.4;
}
body.sp-home-page .index-container :is(.sp-home-latest-cards, .sp-home-category-ads, .sp-home-seen-cards) .sp-premium-location {color: var(--ty-ref-muted); font-size: 11px;}
body.sp-home-page .sp-home-seo {display: none;}

/* Footer sombre de la référence. */
body.sp-home-page .footer.sp-footer-v2 {box-sizing: border-box; width: 100%; margin-top: 0; overflow: visible; border-radius: 0 !important; background: var(--ty-ref-blue-dark);}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-shell {box-sizing: border-box; width: var(--ty-col); grid-template-columns: minmax(250px, 1.25fr) repeat(4, minmax(0, 1fr)); align-items: start; gap: 48px; padding: 48px 0 40px;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-brand > a.sp-footer-logo {margin-bottom: 16px; font-size: 46px; line-height: 1; letter-spacing: -1px; color: var(--ty-ref-orange) !important;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-logo span {color: #fff;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-tagline {max-width: 260px; margin-bottom: 24px; font-size: 17px; line-height: 1.55;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-socials {display: flex; align-items: center; gap: 12px;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-socials > a {display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 0; border-radius: 50%;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-socials > a svg {display: block; width: 24px; height: 24px; fill: #fff;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-socials > a.facebook-networks {background: #1877f2 !important; background-image: none !important;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-socials > a.line-networks {background: #06c755 !important; background-image: none !important;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-socials > a.line-networks svg {width: 30px; height: 30px;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-socials > a.line-networks text {fill: #06c755; font: 700 5px/1 Arial, sans-serif;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-socials > a:is(.facebook-networks, .line-networks):is(:hover, :focus-visible) {filter: brightness(.9);}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-links {min-width: 0;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-links h2 {margin: 0 0 16px; font-size: 18px; line-height: 1.3;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-links ul {gap: 8px;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-links a {font-size: 16px; line-height: 1.5;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-bottom {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  columns: auto;
  column-gap: normal;
}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-bottom-inner {box-sizing: border-box; display: grid; width: var(--ty-col); grid-template-columns: minmax(0, 1fr) auto; padding: 18px 0 20px; align-items: center; gap: 18px 36px;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-copyright {min-width: 0; flex: 1 1 340px; line-height: 1.45;}
body.sp-home-page .footer.sp-footer-v2 .sp-footer-legal {flex: 0 1 auto; justify-content: flex-end; gap: 10px 28px;}
body.sp-home-page .footer.sp-footer-v2 :is(.sp-footer-copyright, .sp-footer-legal a) {font-size: 14px;}

@media (min-width: 961px) and (max-width: 1180px) {
  body.sp-home-page header.header .sp-header-shell {width: var(--ty-col);}
  body.sp-home-page header.header .sp-header-shell > .sp-header-main {grid-template-columns: 108px minmax(250px, 1fr) max-content max-content 42px; gap: 10px;}
  body.sp-home-page header.header .sp-header-main > .sp-header-deposit {min-width: 174px; padding-right: 12px; padding-left: 12px; font-size: 13px;}
  body.sp-home-page header.header .sp-header-main .header-links .menu > a.connexion.sp-header-login {min-width: 122px; padding-right: 12px; padding-left: 12px; font-size: 13px;}
}

@media (max-width: 960px) {
  body.sp-home-page .sp-home-category-navigation {margin-right: 0; margin-left: 0; padding-right: 0; padding-left: 0; overflow-x: auto;}
  body.sp-home-page .sp-home-category-shortcuts {display: flex; width: max-content; min-width: 100%;}
  body.sp-home-page .sp-home-category-shortcut {width: 112px; flex: 0 0 112px;}
  body.sp-home-page .sp-home-featured-category-grid {display: flex; overflow-x: auto; scroll-snap-type: x mandatory;}
  body.sp-home-page .sp-home-featured-category {flex: 0 0 210px; scroll-snap-align: start;}
  body.sp-home-page .footer.sp-footer-v2 .sp-footer-shell {grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px;}
  body.sp-home-page .footer.sp-footer-v2 .sp-footer-brand {grid-column: 1 / -1;}
  body.sp-home-page .footer.sp-footer-v2 .sp-footer-bottom-inner {grid-template-columns: 1fr; align-items: flex-start;}
  body.sp-home-page .footer.sp-footer-v2 .sp-footer-legal {justify-content: flex-start;}
}

@media (max-width: 560px) {
  body.sp-home-page .footer.sp-footer-v2 .sp-footer-shell {grid-template-columns: 1fr;}
  body.sp-home-page .footer.sp-footer-v2 .sp-footer-brand {grid-column: auto;}
}

/* Accueil : vignettes alignées (même hauteur, vendeur en bas), pastille du vendeur centrée sur le nom */
body.sp-home-page .index-container .list-premium {align-items: stretch;}
body.sp-home-page .index-container .list-premium > a.background-ads-premium {align-self: stretch;}
body.sp-home-page .index-container .list-premium > a.background-ads-premium > .bloc-premium-infos {flex: 1 1 auto;}
body.sp-home-page .index-container .list-premium > a.background-ads-premium > .sp-premium-seller {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 48px !important;
  margin-top: auto;
  padding: 8px 10px !important;
  box-sizing: border-box;
}
body.sp-home-page .index-container .sp-premium-seller-avatar {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  margin: 0; align-self: center;
  border: 0; box-shadow: none;
  font-size: 14px; line-height: 1;
}
body.sp-home-page .index-container .sp-premium-seller-name {
  flex: 1 1 0; min-width: 0; margin: 0; align-self: center;
  font-size: 15px !important; line-height: 1.2 !important;
}
body.sp-home-page .index-container .sp-premium-seller-rating,
body.sp-home-page .index-container .sp-premium-seller-rating[data-shop-reviews-url] {
  flex: 0 0 auto; align-self: center; min-height: 0; margin: 0; padding: 0;
  font-size: 14px !important; line-height: 1 !important;
}
body.sp-home-page .index-container .sp-premium-seller-star {font-size: 16px !important; line-height: 1 !important;}
body.sp-home-page .index-container .list-premium > a.sp-home-more-card,
body.sp-home-page .index-container .sp-home-latest .sp-home-latest-cards > a.sp-home-more-card {
  align-self: stretch; aspect-ratio: auto; height: auto; margin-top: 0;
}
@media (max-width: 360px) {
  body.sp-home-page .index-container .list-premium > a.background-ads-premium > .sp-premium-seller {gap: 6px !important; padding: 8px !important;}
  body.sp-home-page .index-container .sp-premium-seller-avatar {width: 26px; height: 26px; font-size: 13px;}
  body.sp-home-page .index-container .sp-premium-seller-count {display: none;}
}
