/* ========= 토큰 ========= */
:root {
  --bg: #fff;
  --: #f3f3f6;
  --surface: #fff;
  --text: #111;
  --muted: #6b7280;
  --border: #e6e8ee;
  --primary: #f0580f;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 64px;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow-1: 0 6px 16px rgba(0, 0, 0, 0.08);

  --tabbar-h: 64px;
  --rank-top3: #F0580F;
  --rank-normal: #111;
}

/* ========= 베이스 ========= */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* 앱 전체 – 반응형(폭 100%). 탭바와 겹치지 않도록 하단 패딩 확보 */
.app {
  width: 100%;
  min-height: 100dvh;
  padding-bottom: calc(
    var(--tabbar-h) + env(safe-area-inset-bottom, 0) + var(--s-4)
  );
}

/* 상단 앱바 */
.appbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f3f6;
}
.brand img {
  height: 22px;
  width: auto;
  display: block;
}

/* 제목 영역 (모바일 기준 → 큰 화면에서 자연 확대) */
.title {
  padding: var(--s-6) var(--s-8) var(--s-8);
}
.title strong {
  display: block;
  font-weight: 800;
  line-height: 1.25;
  font-size: clamp(18px, 5vw, 22px);
}
.title .accent {
  color: var(--primary);
}

.phone {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  margin-inline: auto;
}
.screen {
  padding: 0 40px var(--s-6);
}

/* 프로모션 카드 */
.promo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-1);
  padding: var(--s-8);
  width: 100%;
  margin: 0 auto;
}
.cc-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}
.cc-img {
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
}

.list {
  list-style: none;
  padding: 0;
  margin: 20px auto 0;
  width: 100%;
  max-width: 186px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list li {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 14px;
  color: #1f1f1f;
}

/* 아이콘 */
.list li img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

/* 강조 텍스트 */
.list li b {
  font-weight: 700;
}

/* 설명 */
.desc {
  margin: 30px 0 0;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.desc b {
  color: var(--primary);
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 20px;
  background: #f0580f;
  color: #fff;
  font-weight: 700;
  border: 0;
  border-radius: 0 0 24px 24px;
  cursor: pointer;
  font-size: 16px;
}
.cta:active {
  filter: brightness(0.95);
}
.cta-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

/* ========= 탭바 (footer.php에서 .tabbar/.tab 사용 가정) ========= */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--tabbar-h);
  background: #fff;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 999;
  overflow: visible;
}
:root {
  --active: #f0580f;
}

.tabbar::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: rgba(0, 0, 0, 0.04);
}

.tab {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: #9da3ad;
  font-size: 11px;
}
.tab .ico img {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}
.tabbar .tab--card {
  grid-column: 3; /* 1 2 [3] 4 5 → 중앙 칸 고정 */
  position: relative;
  left: auto;
  transform: none; /* 중앙 고정은 그리드가 해결 */
}

.tab--card .ico.badge {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f0580f, var(--active));
  display: grid;
  place-items: center;
  place-items: center;
  position: relative;
  transform: translateY(-18px);
  box-shadow: 0 0 0 4px #fff;
  margin: 0 auto;
}
.tab--card .ico.badge img {
  width: 45px;
  height: 45px;
  display: block;
  object-fit: contain;
}
.tab--card .label {
  color: var(--active);
  font-weight: 600;
  margin-top: 4px;
  display: block;
  text-align: center;
}

/* 나머지 4개: 선택됐을 때만 색 변경 */
.tab.is-current {
  color: var(--active);
  font-weight: 600;
}

/* 리스트 묶음 블록을 중앙으로 */
.benefits {
  display: flex;
  flex-direction: column;
  gap: 12px;

  width: 100%;
  max-width: 260px; /* ✅ 리스트 가로폭을 적당히 좁게 → 그러면 블록이 딱 중앙으로 보임 */
  margin: 20px auto 0; /* ✅ 좌우 auto → 리스트 자체가 중앙 정렬됨 */
}

:root {
  --accent: #f0580f;
  --field-border: #eceff3;
  --placeholder: #c7ced7;
  --text: #111;
}

.apply-form {
  width: 80%;
  margin: 0 auto;
  padding-bottom: 20px;
}
.apply-form .f-inout {
  margin: 0 auto;
}
.appbar__title {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}
.f-group {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid var(--field-border);
}

.f-label {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 6px;
}

/* 입력 */
.f-input {
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 0 10px;
  font-size: 16px;
  color: var(--text);
}
.f-input::placeholder {
  color: var(--placeholder);
}

/* 포커스 or 값 있음 → 하단 라인 주황 강조 */
.f-group:focus-within {
  border-bottom-color: var(--accent);
}

/* 비활성(배송지, 연락처) */
.f-group.is-disabled {
  opacity: 0.7;
}

.f-group.is-disabled .f-input {
  color: var(--placeholder);
}
.f-input:disabled {
  cursor: not-allowed;
}

/* 제출 버튼(비활성 기본) */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 45px;
  font-weight: 700;
  background: #ffd9c7;
  color: #fff;
  box-shadow: none;
  cursor: default;
  font-size: 18px;
}
.apply-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 45px;
  font-weight: 700;
  background: #ffd9c7;
  color: #fff;
  box-shadow: none;
  cursor: default;
  font-size: 18px;
}

.apply-submit:not(:disabled) {
  background: var(--accent);
  cursor: pointer;
}

.appbar-apply {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 48px;
  display: flex;
  align-items: center;
  background: #fff;
}

.appbar__inner {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  width: 100%;
  padding: 0 16px;
}

.appbar__inner .home-btn {
  margin-left: auto; /* ← 이것만 주면 오른쪽 끝으로 이동 */
}

.form-actions {
  margin-top: 20px;
}

.complete-msg p {
  margin-top: 8px;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}
.apply-ok {
  inline-size: clamp(320px, 85vw, 600px);
  margin-inline: auto;
  padding-inline: 16px;
  box-sizing: border-box;
}
.complete-card-box {
  width: 100%;
  margin: 24px auto;
  padding: 24px;
  border: 2px solid var(--primary);
  border-radius: 20px;
  text-align: center;
  box-sizing: border-box;
}

.card-img-wrap {
  display: flex;
  justify-content: center;
  margin: 24px;
}

.card-img {
  width: 200px;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.15);
  z-index: 99;
}

.card-info {
  margin-top: 8px;
}
.card-name {
  font-size: 18px;
  font-weight: 700;
  margin: 24px;
  display: block;
}

.info-list {
  display: grid;
  gap: 8px;
  text-align: left;
  font-size: 15px;
  color: #666;
  margin-bottom: 18px;
}
.info-list div {
  display: flex;
  justify-content: space-between;
}
.info-list b {
  font-weight: 700;
}

.btn-home {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 48px;
  margin: 40px auto 0;
  border-radius: 45px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  font-size: 18px;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .complete-card-box {
    padding: 28px;
  }
  .btn-home {
    height: 52px;
  }
}

.owned-ok {
  inline-size: clamp(320px, 85vw, 600px);
  margin-inline: auto;
  padding-inline: 16px;
  box-sizing: border-box;
}

.owned-card-box {
  width: 100%;
  padding: 24px;
  background: transparent linear-gradient(180deg, #ff7634 0%, #f0580f 100%) 0%
    0% no-repeat padding-box;
  border-radius: 20px;
  text-align: center;
  box-sizing: border-box;
}

.owned-card-box .badge {
  padding: 4px 10px;
  background: #ffeb00;
  color: #e24f09;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  width: 23%;
  margin: 0 auto;
}

/* 타이틀 */
.owned-title {
  margin: 15px 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  padding-bottom: 10%;
}

.owned-art {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0;
}

.owned-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(160px, 45vw, 260px);
  height: clamp(160px, 45vw, 260px);
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.8;
}
.owned-img {
  position: relative;
  z-index: 1;
  width: min(80%, 260px);
  height: auto;
  border-radius: 12px;
}
.owend-info-list {
  display: grid;
  gap: 8px;
  text-align: left;
  font-size: 15px;
  color: #fff;
  margin-bottom: 18px;
  padding-top: 18px;
}
.owend-info-list div {
  display: flex;
  justify-content: space-between;
}
.owend-info-list b {
  font-weight: 700;
}

.login-logo {
  text-align: center;
  margin: 40px 0 32px;
}
.login-logo img {
  width: 110px;
  height: 76px;
  margin-bottom: 8px;
}
.login-logo h2 {
  font-size: 20px;
  font-weight: 800;
}
.login-logo p {
  margin-top: 4px;
  font-size: 14px;
  color: #676d75;
}

.login-form {
  width: 100%;
  gap: 12px;
}

.btn-submit {
  height: 48px;
  border-radius: 12px;
  background: #F0580F;
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  margin-top: 4px;
}

.login-options {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #555;
}
.keep-login input {
  vertical-align: middle;
  margin-right: 4px;
}
.find-link {
  color: #888888;
  text-decoration: none;
}

.copyright {
  text-align: center;
  font-size: 12px;
  margin-top: 40%;
  color: #999;
}

.login-form {
  gap: 12px;
  width: 90%;
  margin: 0 auto;
}

.login-form .f-group {
  border: 0;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e6e8ee;
  padding: 10px 14px 5px 14px;
  min-height: 48px;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.login-form .login-id {
  border-radius: 10px 10px 0 0;
}
.login-form .login-pw {
  border-radius: 0 0 10px 10px;
}
.login-form .login-id:focus-within {
  box-shadow: inset 0 0 0 2px #F0580F;
  background: #fff;
}

.login-form .login-pw:focus-within {
  box-shadow: inset 0 0 0 2px #F0580F;
  background: #fff;
}

.login-form .f-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  color: #111;
  height: 35px;
  line-height: 35px;
}

.login-form .f-input::placeholder {
  color: #c7ced7;
}

.login-form .f-group.is-error {
  box-shadow: inset 0 0 0 2px #ff4747;
}

.login-form .btn-submit {
  height: 48px;
  border-radius: 24px;
  background:#F0580F;
  color: #fff;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  margin-top: 5%;
}
.login-form .btn-submit:disabled {
  background: #ffd9c7;
  cursor: default;
}

.login-keep {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #555;
}

/* 라벨 왼쪽에 아이콘 표시 */
.keep-label {
  position: relative;
  padding-left: 28px; /* 아이콘 자리 확보 */
  cursor: pointer;
}

/* OFF 상태 아이콘 */
.keep-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  background: url('/assets/icons/check_off.svg') no-repeat center/contain;
}

/* ✅ ON 상태 아이콘 */
#keepLogin:checked + .keep-label::before {
  background-image: url('/assets/icons/check_on.svg');
}

.shop-banner img {
  width: 100%;
  border-radius: 12px;
  margin: 0 0 24px;
  display: block;
}
.shop-now {
  min-width: 0;
  width: 90%;
  margin: 0 auto;
  overflow: visible;
}
.shop-now-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.shop-categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 0 4px;
  scroll-snap-type: x mandatory;
  height: 100px;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 5%;
  margin-inline: -16px;
  padding-inline: 16px;
  scroll-padding-inline-start: 16px;
}
.shop-categories::-webkit-scrollbar {
  display: none;
}
.shop-categories > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
}

.shop-categories::after {
  content: '';
  flex: 0 0 16px;
}

.cat {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 82px;
  border-radius: 20px;
  background: #f5f6f8;
  border: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #555;
  font-size: 13px;
  font-weight: 500;
  scroll-snap-align: start;
  transition: background 0.2s, color 0.2s;
}

.cat .ico {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* ✅ 선택된 상태 */
.cat.is-active {
  background: #111;
  color: #fff;
  font-weight: 700;
}

/* ✅ 선택된 상태 → 말풍선 꼬리 추가 */
.cat.is-active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #111 transparent transparent transparent;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.product {
  position: relative;
  background: #fff;
  overflow: hidden;
  padding-bottom: 10px;
}

.product img {
  width: 100%;
  display: block;
  margin-bottom: 8px;
  border: 1px solid #eeeeee;
  border-radius: 10px;
  opacity: 1;
}

/* 순번 뱃지 */
.product .badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--rank-top3);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 5px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product:nth-child(n + 4) .badge {
  background: var(--rank-normal);
}
/* 상품명 */
.product .name {
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 4px;
  color: #111;
  font-weight: 500;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 2px;
  font-size: 16px;
}
.price .discount {
  color: #ff7634;
  font-weight: 700;
  font-size: 16px;
}
.price .sale {
  font-weight: 700;
  font-size: 16px;
}
.price .origin {
  color: #aaa;
  font-size: 11px;
  text-decoration: line-through;
}

/* 주문수 */
.sold {
  font-size: 12px;
  color: #888;
}

/* 반응형 조정 */
@media (min-width: 768px) {
  .shop-grid {
    gap: 18px;
  }
  .product .name {
    font-size: 15px;
  }
}

.btn-more {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dddddd;
  background: #ffffff 0% 0% no-repeat padding-box;
  border: 1px solid #dddddd;
  border-radius: 4px;
  opacity: 1;
  font-size: 15px;
  color: #666;
  height: 42px;
  width: 100%;
}
.btn-more img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #888;
  text-decoration: none;
}

.more-link img {
  width: 14px;
  height: 14px;
  display: block;
}
.shop-pick {
  margin-top: 40px;
}
.point-section {
  background: #fff4ef;
  padding: 24px 0;
}

/* 타이틀 */
.point-title {
  font-size: 22px;
  font-weight: 800;
  color: #111;
  padding: 0 16px;
  line-height: 1.4;
  margin-bottom: 0;
}
.point-title .label {
  font-size: 16px;
  font-weight: 700;
  color: #ff7634;
}

.point-sub {
  font-size: 15px;
  color: #555;
  padding: 2px 16px 0;
}

/* 가로 스크롤 리스트 */
.point-list {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 12px 0 4px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 5%;
  padding-inline: 16px;
  scroll-padding-inline-start: 16px;
}

.point-list > .point-item {
  scroll-snap-align: start;
}

.point-list::-webkit-scrollbar {
  display: none;
}

.point-list::before,
.point-list::after {
  content: '';
  flex: 0 0 16px;
}

.point-item {
  flex: 0 0 160px;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  scroll-snap-align: start;
  position: relative;
  background: #fff;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0px 0px 10px #0000001a;
}

.point-item img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

.point-item .name {
  font-size: 16px;
  color: #111;
  line-height: 1.4;
  margin-bottom: 6px;
}

/* 가격 */
.price {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.sale {
  font-weight: 700;
  font-size: 14px;
}

.discount {
  font-size: 13px;
  color: #ff7634;
  font-weight: 700;
}

.origin {
  font-size: 12px;
  color: #bbb;
  text-decoration: line-through;
}

/* 포인트 뱃지 */
.point-badge {
  display: inline-block;
  margin-top: 6px;
  background: #ff7634;
  color: #fff;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 600;
}

.best-section {
  padding: 24px 16px;
}

.best-label {
  color: #ff7634;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.best-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
}

.best-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 0;
}

.best-item {
  position: relative;
  display: flex;
  gap: 14px;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

/* 순번 뱃지 */
.best-item .rank {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--rank-top3);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.best-list .best-item:nth-child(n + 4) .rank {
  background: var(--rank-normal);
}
.thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border: 1px solid #eee;
}

.info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.shop-best .name {
  font-size: 14px;
  color: #111;
  line-height: 1.35;
  margin-bottom: 6px;
  margin-top: 0;
  padding: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price {
  display: flex;
  gap: 4px;
  align-items: baseline;
}

.discount {
  color: #ff7634;
  font-weight: 700;
}
.sale {
  font-weight: 700;
}
.origin {
  text-decoration: line-through;
  color: #aaa;
  font-size: 12px;
}

.best-more {
  margin-top: 18px;
  width: 100%;
  padding: 14px 0;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  color: #666;
  font-size: 14px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.best-more img {
  width: 14px;
  height: 14px;
  display: block;
}

/* -------------- */

:root {
  --text: #111;
  --muted: #9aa0a6;
  --gap: 16px;
  --radius: 12px;
}

/* 섹션 */
.weekly-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 28px;
  background: #fff;
}

/* 라벨/타이틀 */
.weekly-label {
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}
.weekly-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 16px;
}
.weekly-title span {
  box-shadow: inset 0 -10px 0 rgba(255, 118, 52, 0.15); /* 스샷처럼 밑줄 하이라이트 */
}

/* ✅ 항상 3열 (화면 넓이에 따라 카드 폭만 유동) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

/* 카드 */
.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1; /* 정사각형 썸네일 */
  object-fit: cover; /* 중앙 크롭 */
  display: block;
  border-radius: var(--radius);
  margin-bottom: 8px;
}

/* 텍스트 */
.product-card .name {
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
  margin: 0 4px 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* 2줄 말줄임 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .origin {
  margin: 0 4px 2px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}
.product-card .price {
  margin: 0 4px 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.product-card .discount {
  color: var(--accent);
  font-weight: 800;
}

/* 페이지네이션: 좌/우 화살표만 */
.pager {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
.pager__arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff center/16px no-repeat;
  border: 1px solid #e5e7eb;
}
.pager__arrow.prev {
  background-image: url('/assets/icons/btn-next-arrow-left-dg.svg');
}
.pager__arrow.next {
  background-image: url('/assets/img/btn-next-arrow-right-dg.png');
}
.pager__arrow.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.pager__arrow.is-disabled.prev {
  background-image: url('/assets/img/btn-next-arrow-left-dg.png');
}
.pager__arrow.is-disabled.next {
  background-image: url('/assets/img/btn-next-arrow-right-dg2.png');
}

/* 안전장치 */
html,
body {
  overflow-x: hidden;
}

.reviews {
  padding: 20px 0;
  position: relative;
}
.reviews__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}
.reviews__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}
.reviews__more {
  font-size: 13px;
  color: #9aa0a6;
  text-decoration: none;
}
.reviews__sub {
  font-size: 16px;
  color: var(--muted);
  padding: 4px 16px 10px;
  margin: 0;
}

/* 가로 레일 */
.reel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 12px 0 4px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 5%;
  padding-inline: 16px;
  scroll-padding-inline-start: 16px;
}
.reel > .r-card {
  scroll-snap-align: start;
}
.reel::-webkit-scrollbar {
  display: none;
}

/* 좌우 여백(패딩 없이) 스페이서 */
.reel::before,
.reel::after {
  content: '';
  flex: 0 0 16px;
}

/* 카드 */
.r-card {
  flex: 0 0 200px;
  background: #fff;
  border-radius: 10px;
  scroll-snap-align: start;
  position: relative;
  background: #fff;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0px 0px 10px #0000001a;
}
.r-thumb {
  background: #f5f6f8;
}
.r-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius:10px 10px 0 0;
}

.r-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 10px 12px 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.r-excerpt {
  font-size: 12px;
  color: #61666d;
  margin: 0 12px 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.r-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 12px;
  justify-content: space-between;
}
.r-stars {
  color: #ffb400;
  font-size: 13px;
  letter-spacing: 1px;
}
.r-buyer {
  font-size: 12px;
  color: #7a8088;
}

/* 왼/오른쪽 가장자리 그라데이션 힌트 */
.reviews {
  --mask: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0) 0,
    #000 16px,
    #000 calc(100% - 16px),
    rgba(0, 0, 0, 0) 100%
  );
  background: #f5f7f8;
  -webkit-mask-image: var(--mask);
  mask-image: var(--mask);
}

/* 별 평점 표시 */
.rating {
  width: 80px; /* 별 5개 총 너비(별 크기 × 5) */
  height: 16px;
  position: relative;
  background: url('/assets/icons/icon-star-off.svg') repeat-x 0 0 / 16px auto;
}

/* 채워진 별 레이어 */
.rating::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/icons/icon-star-on.svg') repeat-x 0 0 / 16px auto;
  width: calc((var(--rate, 0) / 5) * 100%);
  overflow: hidden;
}

/* 구매자 이름 */
.r-buyer {
  font-size: 12px;
  color: #7a8088;
}

/* ============ 구분선 ============ */
.r-divider {
  border: 0;
  height: 1px;
  margin: 52px 12px 14px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06));
}

/* ============ 연결 상품 ============ */
.r-prod {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 14px;
  text-decoration: none;
}
.r-prod__thumb {
  flex: 0 0 50px;
  height: 50px;
  border-radius: 5px;
  overflow: hidden;
  background: #f5f6f8;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
  border:1px solid #eee;s
}
.r-prod__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.r-prod__title {
  flex: 1 1 auto;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* 한 줄 말줄임 */
}

/* 카드 안 여백 톤 맞추기(선택) */
.r-card {
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* 다크모드 대비(옵션) */
@media (prefers-color-scheme: dark) {
  .r-divider {
    background: rgba(255, 255, 255, 0.08);
  }
  .r-nick {
    color: #a3a9b3;
  }
  .r-prod__title {
    color: #a3a9b3;
  }
}
