/* ── 종합 커머스 홈 ── */
:root {
  --cm-max: 1280px;
  --cm-primary: #2563eb;
  --cm-primary-dark: #1d4ed8;
  --cm-black: #111827;
  --cm-gray: #6b7280;
  --cm-line: #e5e7eb;
  --cm-bg: #f3f4f6;
  --cm-card: #fff;
  --cm-radius: 12px;
  --cm-shadow: 0 2px 12px rgba(15, 23, 42, 0.07);
  --cm-shadow-lg: 0 8px 32px rgba(15, 23, 42, 0.1);
}

body.oz-commerce {
  background: var(--cm-bg);
}

/* ── 히어로 ── */
.cm-hero {
  max-width: var(--cm-max);
  margin: 0 auto;
  padding: 20px 20px 0;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 16px;
  align-items: stretch;
}
.cm-hero-slider {
  position: relative;
  border-radius: var(--cm-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--cm-shadow);
  min-height: 340px;
}
.cm-hero-track {
  display: flex;
  transition: transform 0.45s ease;
  height: 100%;
}
.cm-hero-slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 24px;
  padding: 36px 40px;
  min-height: 340px;
  text-decoration: none;
  color: inherit;
}
.cm-hero-slide.tone-0 { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); }
.cm-hero-slide.tone-1 { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); }
.cm-hero-slide.tone-2 { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }
.cm-hero-slide.tone-3 { background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%); }
.cm-hero-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  line-height: 1.35;
  color: var(--cm-black);
}
.cm-hero-copy p {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--cm-gray);
  line-height: 1.65;
}
.cm-hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--cm-black);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}
.cm-hero-img {
  display: flex;
  justify-content: center;
  align-items: center;
}
.cm-hero-img img {
  max-height: 260px;
  width: auto;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--cm-shadow-lg);
}
.cm-hero-arw {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--cm-shadow);
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
  color: var(--cm-black);
  line-height: 1;
}
.cm-hero-arw.prev { left: 12px; }
.cm-hero-arw.next { right: 12px; }
.cm-hero-arw:hover { background: #fff; }
.cm-hero-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.cm-hero-dots button {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 999px;
  background: rgba(0,0,0,.2);
  cursor: pointer;
  padding: 0;
  transition: width .2s, background .2s;
}
.cm-hero-dots button.is-active {
  width: 22px;
  background: var(--cm-primary);
}

/* 히어로 사이드 */
.cm-hero-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cm-side-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 20px;
  border-radius: var(--cm-radius);
  background: #fff;
  box-shadow: var(--cm-shadow);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--cm-line);
  transition: box-shadow .2s, transform .2s;
}
.cm-side-card:hover {
  box-shadow: var(--cm-shadow-lg);
  transform: translateY(-2px);
}
.cm-side-card strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--cm-black);
  margin-bottom: 4px;
}
.cm-side-card span {
  font-size: 12px;
  color: var(--cm-gray);
  line-height: 1.5;
}
.cm-side-card em {
  margin-top: 10px;
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: var(--cm-primary);
}
.cm-side-card.green {
  background: linear-gradient(135deg, var(--cm-primary), var(--cm-primary-dark));
  border-color: transparent;
}
.cm-side-card.green strong,
.cm-side-card.green span,
.cm-side-card.green em { color: #fff; }
.cm-side-card.green em { opacity: .85; }
.cm-side-cs {
  padding: 16px 20px;
  border-radius: var(--cm-radius);
  background: var(--cm-black);
  color: #fff;
  text-align: center;
}
.cm-side-cs strong {
  display: block;
  font-size: 12px;
  opacity: .7;
  margin-bottom: 4px;
}
.cm-side-cs b {
  display: block;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.cm-side-cs span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  opacity: .65;
}

/* ── 카테고리 ── */
.cm-section {
  max-width: var(--cm-max);
  margin: 0 auto;
  padding: 28px 20px;
}
.cm-cats {
  padding-top: 16px;
  padding-bottom: 8px;
}
.cm-cats-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}
.cm-cats-row::-webkit-scrollbar { display: none; }
.cm-cat {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 88px;
  text-decoration: none;
  color: inherit;
}
.cm-cat-thumb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--cm-line);
  display: grid;
  place-items: center;
  box-shadow: var(--cm-shadow);
  transition: transform .2s, box-shadow .2s;
}
.cm-cat:hover .cm-cat-thumb {
  transform: translateY(-3px);
  box-shadow: var(--cm-shadow-lg);
  border-color: var(--cm-primary);
}
.cm-cat-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cm-cat-fallback {
  font-size: 18px;
  font-weight: 900;
  color: var(--cm-primary);
}
.cm-cat-name {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  color: var(--cm-black);
}
.cm-cat-cnt {
  font-size: 11px;
  color: var(--cm-gray);
}

/* ── 신뢰 스트립 ── */
.cm-trust {
  background: #fff;
  border-top: 1px solid var(--cm-line);
  border-bottom: 1px solid var(--cm-line);
}
.cm-trust-inner {
  max-width: var(--cm-max);
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cm-trust-inner > div {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cm-trust-inner i {
  font-style: normal;
  font-size: 28px;
  flex-shrink: 0;
}
.cm-trust-inner strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--cm-black);
}
.cm-trust-inner span {
  display: block;
  font-size: 12px;
  color: var(--cm-gray);
  margin-top: 2px;
}

/* ── 섹션 헤더 ── */
.cm-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.cm-sec-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  color: var(--cm-black);
}
.cm-sec-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--cm-gray);
}
.cm-more {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--cm-gray);
  text-decoration: none;
  white-space: nowrap;
}
.cm-more:hover { color: var(--cm-primary); }

/* ── 상품 카드 ── */
.cm-card {
  background: var(--cm-card);
  border-radius: var(--cm-radius);
  overflow: hidden;
  box-shadow: var(--cm-shadow);
  border: 1px solid var(--cm-line);
  transition: transform .2s, box-shadow .2s;
}
.cm-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--cm-shadow-lg);
}
.cm-card a { text-decoration: none; color: inherit; display: block; }
.cm-card-thumb {
  position: relative;
  aspect-ratio: 1/1;
  background: #f9fafb;
  overflow: hidden;
}
.cm-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.cm-card:hover .cm-card-thumb img { transform: scale(1.04); }
.cm-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--cm-black);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  display: grid;
  place-items: center;
  z-index: 1;
}
.cm-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--cm-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  z-index: 1;
}
.cm-card-body { padding: 12px 14px 16px; }
.cm-card-cat {
  display: block;
  font-size: 11px;
  color: var(--cm-gray);
  margin-bottom: 4px;
}
.cm-card-name {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--cm-black);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cm-card-price {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  color: var(--cm-primary-dark);
}
.cm-card-price .unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--cm-gray);
}

/* ── 그리드 / 스크롤 ── */
.cm-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cm-scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 8px;
}
.cm-scroll-row .cm-card {
  flex: 0 0 200px;
}

/* ── 알뜰 특가 배경 ── */
.cm-deal-wrap {
  background: #fff;
  border-radius: var(--cm-radius);
  margin-top: 8px;
  box-shadow: var(--cm-shadow);
}

/* ── 기획전 듀얼 ── */
.cm-promo-dual {
  max-width: var(--cm-max);
  margin: 0 auto;
  padding: 0 20px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cm-promo-card {
  border-radius: var(--cm-radius);
  padding: 32px 28px;
  color: #fff;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.cm-promo-card.dark {
  background: linear-gradient(135deg, #1e293b, #0f172a);
}
.cm-promo-card.green {
  background: linear-gradient(135deg, var(--cm-primary), var(--cm-primary-dark));
}
.cm-promo-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
}
.cm-promo-card p {
  margin: 0 0 16px;
  font-size: 13px;
  opacity: .85;
  line-height: 1.6;
}
.cm-promo-card a {
  display: inline-flex;
  padding: 8px 16px;
  background: rgba(255,255,255,.18);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  width: fit-content;
}
.cm-promo-card a:hover { background: rgba(255,255,255,.28); }

/* ── 공지 + CS ── */
.cm-info {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}
.cm-info-notice,
.cm-info-cs {
  background: #fff;
  border-radius: var(--cm-radius);
  padding: 24px;
  box-shadow: var(--cm-shadow);
  border: 1px solid var(--cm-line);
}
.cm-info-notice ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cm-info-notice li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #f3f4f6;
}
.cm-info-notice li:last-child { border-bottom: none; }
.cm-info-notice li a {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--cm-black);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-info-notice li a:hover { color: var(--cm-primary); }
.cm-info-notice li span {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--cm-gray);
}
.cm-info-cs h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 900;
}
.cm-info-cs .tel {
  display: block;
  font-size: 26px;
  font-weight: 900;
  color: var(--cm-primary);
  margin-bottom: 8px;
}
.cm-info-cs p {
  margin: 0;
  font-size: 13px;
  color: var(--cm-gray);
  line-height: 1.7;
}
.cm-info-cs-links {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.cm-info-cs-links a {
  flex: 1;
  min-width: calc(33% - 6px);
  text-align: center;
  padding: 10px 8px;
  border: 1px solid var(--cm-line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cm-black);
  text-decoration: none;
}
.cm-info-cs-links a:hover {
  border-color: var(--cm-primary);
  color: var(--cm-primary);
}

/* ── 반응형 ── */
@media (max-width: 1024px) {
  .cm-hero { grid-template-columns: 1fr; }
  .cm-hero-side {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .cm-side-card { flex: 1; min-width: calc(50% - 5px); }
  .cm-side-cs { flex: 1 1 100%; }
  .cm-grid { grid-template-columns: repeat(3, 1fr); }
  .cm-trust-inner { grid-template-columns: repeat(2, 1fr); }
  .cm-info { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .cm-hero-slide {
    grid-template-columns: 1fr;
    padding: 28px 24px 48px;
    min-height: 280px;
  }
  .cm-hero-img { display: none; }
  .cm-hero-copy h2 { font-size: 22px; }
  .cm-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cm-scroll-row .cm-card { flex: 0 0 160px; }
  .cm-promo-dual { grid-template-columns: 1fr; }
  .cm-trust-inner { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cm-sec-head h2 { font-size: 18px; }
  .cm-side-card { min-width: 100%; }
}

@media (max-width: 480px) {
  .cm-trust-inner { grid-template-columns: 1fr; }
  .cm-cat { width: 72px; }
  .cm-cat-thumb { width: 60px; height: 60px; }
}
