/* atm-goods.css — ATM 굿즈몰 공통 진열 위젯 스타일. 사이트마다 아래 --g-* 변수만 덮어쓴다. */
.atmg {
  --g-bg: transparent;
  --g-card: #ffffff;
  --g-img-bg: #f6f6f6;
  --g-text: #0a0a0a;
  --g-muted: #767a82;
  --g-line: #e6e7e8;
  --g-accent: #0098b1;
  --g-accent-ink: #ffffff;
  --g-badge: #ffd53d;
  --g-badge-ink: #050038;
  --g-radius: 14px;
  --g-font: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --g-display: var(--g-font);
  --g-outline: 0px;
  --g-outline-color: transparent;
  --g-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  --g-cols: repeat(auto-fill, minmax(168px, 1fr));
  font-family: var(--g-font);
  color: var(--g-text);
  background: var(--g-bg);
}
.atmg *, .atmg *::before, .atmg *::after { box-sizing: border-box; }

.atmg-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; }
.atmg-tabs::-webkit-scrollbar { display: none; }
.atmg-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  font: 600 14px/1 var(--g-font); color: var(--g-muted);
  background: var(--g-card); border: 1px solid var(--g-line); border-radius: 999px;
  padding: 9px 14px; cursor: pointer;
}
.atmg-tab em { font-style: normal; font-size: 12px; opacity: .7; }
.atmg-tab[aria-selected="true"] { background: var(--g-accent); border-color: var(--g-accent); color: var(--g-accent-ink); }
.atmg-tab:focus-visible, .atmg-card:focus-visible, .atmg-all:focus-visible { outline: 3px solid var(--g-accent); outline-offset: 2px; }

.atmg-grid { display: grid; grid-template-columns: var(--g-cols); gap: 14px; }
.atmg--strip .atmg-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(150px, 180px); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.atmg--strip .atmg-card { scroll-snap-align: start; }
.atmg--strip .atmg-grid { scrollbar-width: thin; scrollbar-color: var(--g-line) transparent; }
.atmg--strip .atmg-grid::-webkit-scrollbar { height: 6px; }
.atmg--strip .atmg-grid::-webkit-scrollbar-thumb { background: var(--g-line); border-radius: 3px; }
.atmg--strip .atmg-go { display: none; }

.atmg-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--g-card); border-radius: var(--g-radius); overflow: hidden;
  border: var(--g-outline) solid var(--g-outline-color); box-shadow: var(--g-shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.atmg-card[hidden] { display: none; }
.atmg-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .12); }
.atmg-img { position: relative; aspect-ratio: 1 / 1; background: var(--g-img-bg); }
.atmg-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.atmg-badge {
  position: absolute; left: 10px; top: 10px; font: 800 11px/1 var(--g-font); letter-spacing: .04em;
  background: var(--g-badge); color: var(--g-badge-ink); padding: 5px 8px; border-radius: 6px;
}
.atmg-soldout { position: absolute; inset: auto 0 0 0; background: rgba(0, 0, 0, .6); color: #fff; text-align: center; font: 700 12px/2.2 var(--g-font); }
.atmg-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 14px; flex: 1; }
.atmg-name { font: 600 14px/1.4 var(--g-display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.atmg-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.atmg-price { font: 800 15px/1 var(--g-font); }
.atmg-go { font: 600 11.5px/1 var(--g-font); color: var(--g-accent); white-space: nowrap; }

.atmg-more-wrap { display: flex; justify-content: center; margin-top: 18px; }
.atmg-more {
  font: 700 14px/1 var(--g-font); color: var(--g-text); background: var(--g-card);
  border: 1px solid var(--g-line); border-radius: 999px; padding: 13px 26px; cursor: pointer;
}
.atmg-more:hover { border-color: var(--g-accent); color: var(--g-accent); }
.atmg-more:focus-visible { outline: 3px solid var(--g-accent); outline-offset: 2px; }
.atmg-more[hidden] { display: none; }

.atmg-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 22px; text-align: center; }
.atmg-all {
  display: inline-block; text-decoration: none; font: 700 15px/1 var(--g-font);
  background: var(--g-accent); color: var(--g-accent-ink); padding: 14px 22px; border-radius: 999px;
}
.atmg-note, .atmg-msg { margin: 0; font-size: 12.5px; color: var(--g-muted); }

@media (max-width: 480px) {
  .atmg.atmg--grid { --g-cols: repeat(2, minmax(0, 1fr)); }
  .atmg-grid { gap: 10px; }
  .atmg-body { padding: 10px 10px 12px; }
  .atmg-name { font-size: 13px; }
  .atmg-go { display: none; }
}
@media (prefers-reduced-motion: reduce) { .atmg-card { transition: none; } .atmg-card:hover { transform: none; } }
