/* Candidate: scoped by initializer to the existing HOME blocks only.
   Desktop >=768px keeps original theme rules and markup. */
.atg-mobile-promo-controls { display:none; }
@media (max-width:767.98px) {
  .atg-mobile-category-viewport {
    overflow-x:auto; overflow-y:hidden; scrollbar-width:none;
    scroll-snap-type:x mandatory; scroll-padding-left:16px;
    -webkit-overflow-scrolling:touch;
  }
  .atg-mobile-category-viewport::-webkit-scrollbar,
  .atg-mobile-promo-list::-webkit-scrollbar { display:none; }
  .atg-mobile-categories.row {
    --atg-cell:calc((100vw - 60px) / 3);
    display:grid; grid-template-rows:repeat(2,minmax(116px,auto));
    grid-auto-columns:var(--atg-cell); grid-auto-flow:column;
    gap:8px; margin:0; padding:0 28px 0 16px; width:max-content;
    flex-wrap:initial;
  }
  .atg-mobile-categories.row::after { display:none; content:none; }
  .atg-mobile-categories.row > div {
    grid-row:var(--atg-row); grid-column:var(--atg-col);
    padding:0; margin:0; width:auto; max-width:none;
    scroll-snap-align:start;
  }
  .atg-mobile-categories .index-category {
    width:100%; height:100%; min-height:116px; min-width:0;
    padding:8px 2px; border:1px solid #e9e9e9; border-radius:12px;
    display:flex; flex-direction:column; align-items:center;
    justify-content:flex-start; gap:4px; text-align:center;
  }
  .atg-mobile-categories .index-category__img {
    width:72px; height:48px; min-height:48px; padding:0; margin:0;
  }
  .atg-mobile-categories .index-category__img img {
    width:72px; height:48px; max-width:100%; object-fit:contain;
  }
  .atg-mobile-categories .index-category__title {
    font-size:clamp(11px,3.077vw,12px); line-height:15px;
    font-weight:700; margin:0; padding:0; overflow:visible;
    white-space:normal; overflow-wrap:anywhere; display:block;
    -webkit-line-clamp:unset; -webkit-box-orient:initial; text-overflow:clip;
    min-height:0; max-height:none;
  }
  .atg-mobile-promos > .atg-mobile-promo-heading {
    height:32px; min-height:32px; margin-bottom:12px !important;
  }
  .atg-mobile-promo-heading .h1 { font-size:24px; line-height:32px; }
  .atg-mobile-promo-heading .atg-mobile-all { display:block !important; margin-left:8px !important; }
  .atg-mobile-all a.btn {
    padding:0; background:transparent; color:#247cff; border:0;
    white-space:nowrap; font-size:13px; line-height:32px; box-shadow:none;
  }
  .atg-mobile-all a::after { content:' →'; }
  .atg-mobile-promos .atg-mobile-all-bottom { display:none !important; }
  .atg-mobile-promos .atg-mobile-promo-list.row {
    display:flex; flex-wrap:nowrap; gap:12px; overflow-x:auto;
    overflow-y:hidden; scroll-snap-type:x mandatory;
    scroll-padding-left:16px; scrollbar-width:none;
    margin:0 -16px; padding:0 16px; -webkit-overflow-scrolling:touch;
  }
  .atg-mobile-promo-list.row > div {
    flex:0 0 min(280px,calc(100vw - 68px)); width:min(280px,calc(100vw - 68px));
    max-width:none; margin:0; padding:0; scroll-snap-align:start;
  }
  .atg-mobile-promo-list .news-card {
    display:block; height:216px; border:1px solid #e9e9e9; border-radius:10px;
    overflow:hidden;
  }
  .atg-mobile-promo-list .news-card__img { height:156px; padding:0; }
  .atg-mobile-promo-list .news-card__img canvas { display:none; }
  .atg-mobile-promo-list .news-card__img img {
    position:static; transform:none; inset:auto; width:100%; height:156px;
    object-fit:contain; display:block;
  }
  .atg-mobile-promo-list .news-card__body {
    height:58px; padding:0 12px; display:flex; align-items:center;
  }
  .atg-mobile-promo-list .news-card__date { display:none; }
  .atg-mobile-promo-list .news-card__title {
    width:100%; display:flex; align-items:center; justify-content:space-between;
    gap:8px; font-size:15px; line-height:21px; font-weight:700; margin:0;
  }
  .atg-mobile-promo-list .news-card__title::after { content:'→'; color:#247cff; }
  .atg-mobile-promo-controls {
    height:28px; display:flex; justify-content:center; align-items:center; gap:0;
  }
  .atg-mobile-promo-dot {
    width:16px; height:28px; border:0; padding:0; background:transparent;
    display:grid; place-items:center;
  }
  .atg-mobile-promo-dot::after { content:''; width:6px; height:6px; border-radius:6px; background:#dce5f1; }
  .atg-mobile-promo-dot[aria-pressed=true] { width:28px; }
  .atg-mobile-promo-dot[aria-pressed=true]::after { width:20px; background:#247cff; }
  .atg-mobile-promo-next { width:28px; height:28px; margin-left:8px; border:0; background:none; color:#247cff; }
  .atg-mobile-promo-controls button:focus-visible { outline:2px solid #247cff; outline-offset:1px; }
}

/* News uses the existing promo rail; retain dates and complete longer titles. */
@media (max-width:767.98px) {
  .atg-mobile-news .news-card { height:100%; min-height:216px; }
  .atg-mobile-news .news-card__body {
    height:auto; min-height:58px; padding:8px 12px;
    flex-direction:column; align-items:stretch; gap:4px;
  }
  .atg-mobile-news .news-card__date { display:block; font-size:11px; line-height:16px; }
  .atg-mobile-news .news-card__title {
    flex:1; height:auto; min-height:0; max-height:none; overflow:visible;
    -webkit-line-clamp:unset; -webkit-box-orient:initial;
  }
  .atg-mobile-news .news-card__date { margin:0; }
}
