/* 최근 화면 피드백으로 추가한 전환 효과, 카드 표현, 홈 배너 레이아웃입니다. */
.hero-slides {
  position: relative;
}
.hero-slide,
.hero-slide:not([hidden]) {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--hero-transition, 550ms) ease;
  animation: none;
  background: #66685f;
}
.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.hero-slide.is-previous {
  opacity: 1;
  z-index: 1;
}
.hero-image {
  object-position: var(--hero-position, center);
}
.hero-controls {
  z-index: 3;
}
.product-image-wrap,
.md-grid .product-image-wrap {
  aspect-ratio: 1;
  background: var(--white);
}
.product-image {
  object-fit: contain;
}
.product-open:hover .product-image {
  transform: none;
}
.product-card .product-info {
  padding-right: 0;
}
.product-card .product-name {
  padding-right: 30px;
}
.product-card .product-save {
  top: 0;
  bottom: auto;
  right: 0;
  margin-top: calc(100% + 12px);
  position: absolute;
  transform: none;
}
.product-card {
  display: flex;
  flex-direction: column;
}
.product-colors {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
}
.color-swatches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.color-swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid #00000018;
  background: var(--swatch);
}
.color-caption,
.product-colors-pending {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 400;
}
.product-colors-pending {
  display: block;
  margin-top: 14px;
}
.category-tiles img {
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--white);
}
.category-tiles small {
  line-height: 1.6;
  word-break: keep-all;
}
.brand-lines {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 760px) {
  .hero-image {
    object-position: var(--hero-mobile-position, center);
  }
  .hero-content {
    max-width: calc(100% - 48px);
  }
  .color-caption {
    font-size: 9px;
  }
  .brand-lines {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide:not([hidden]) {
    transition: none;
  }
}

/* 홈 화면에만 적용하는 추가 간격과 배너·상품 카드 조정입니다. */
body[data-page="home"] .hero {
  margin-top: 18px;
}
body[data-page="home"] .hero-slides {
  height: clamp(260px, 22vw, 340px);
}
body[data-page="home"] .hero h1,
body[data-page="home"] .hero h2 {
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1.35;
  letter-spacing: -1.4px;
}
body[data-page="home"] .hero .eyebrow {
  margin-bottom: 14px;
  font-size: 10px;
}
body[data-page="home"] .hero-description {
  margin-top: 14px;
  font-size: 14px;
}
body[data-page="home"] .hero-link {
  margin-top: 20px;
  padding-bottom: 7px;
}
body[data-page="home"] .hero-controls {
  bottom: 18px;
}
body[data-page="home"] .product-section {
  padding-top: 64px;
}
body[data-page="home"] .home-best {
  padding-top: 28px;
}
body[data-page="home"] .section-heading {
  margin-bottom: 24px;
}
body[data-page="home"] .section-heading h2 {
  font-size: 25px;
}
body[data-page="home"] .announcement {
  margin-top: 58px;
}
body[data-page="home"] .category-section {
  padding-top: 70px;
  padding-bottom: 0;
}
body[data-page="home"] .brand-story {
  margin-top: 80px;
  padding-block: 60px;
}
body[data-page="home"] .brand-photo img {
  max-height: 340px;
  object-fit: cover;
}
@media (max-width: 760px) {
  body[data-page="home"] .hero {
    width: 100%;
    margin-top: 0;
  }
  body[data-page="home"] .hero-slides {
    height: 330px;
  }
  body[data-page="home"] .hero-content {
    top: 50%;
    bottom: auto;
    left: 24px;
    transform: translateY(-50%);
  }
  body[data-page="home"] .hero h1,
  body[data-page="home"] .hero h2 {
    font-size: 28px;
  }
  body[data-page="home"] .hero-description {
    font-size: 12px;
    max-width: 260px;
  }
  body[data-page="home"] .hero-link {
    font-size: 12px;
  }
  body[data-page="home"] .product-section {
    padding-top: 42px;
  }
  body[data-page="home"] .home-best {
    padding-top: 28px;
  }
  body[data-page="home"] .section-heading h2 {
    font-size: 21px;
  }
  body[data-page="home"] .section-heading {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
  }
  body[data-page="home"] .announcement {
    margin-top: 38px;
  }
  body[data-page="home"] .category-section {
    padding-top: 44px;
  }
  body[data-page="home"] .brand-story {
    margin-top: 50px;
    padding-block: 40px;
  }
}

.product-variants {
  display: block;
  margin-top: 13px;
}
.product-card-supplied .product-badge {
  left: auto;
  right: 12px;
}
.product-page-copy .variant-name {
  font-size: 12px;
}
.variant-caption {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  color: var(--muted);
}
.variant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.variant-name {
  padding: 3px 6px;
  background: var(--warm-gray);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}
/* 기존 배너는 왼쪽 설명과 오른쪽 이미지를 분리해 겹침을 줄입니다. */
.hero-visual-link {
  display: block;
  position: absolute;
  inset: 0;
}
.hero-slide.hero-split {
  color: var(--ink);
  background: #f2f0eb;
}
.hero-split .hero-shade {
  display: none;
}
.hero-split .hero-visual-link {
  inset: 0;
  background: #f2f0eb;
  z-index: 0;
}
.hero-split picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-split .hero-image {
  position: static;
  object-fit: contain;
}
body[data-page="home"] .hero-split .hero-content {
  left: 4%;
  width: 29%;
  max-width: none;
  top: 47%;
  transform: translateY(-50%);
}
body[data-page="home"] .hero-split .eyebrow {
  color: var(--olive);
  letter-spacing: 1.6px;
}
body[data-page="home"] .hero-split h1,
body[data-page="home"] .hero-split h2 {
  font-size: clamp(23px, 2.3vw, 34px);
}
body[data-page="home"] .hero-split .hero-description {
  font-size: 12px;
  color: var(--muted);
  word-break: keep-all;
}
.hero-split .hero-link {
  border-bottom-color: #71765f66;
  gap: 24px;
}
body[data-page="home"] .hero-controls {
  left: 4%;
  right: auto;
}
body[data-page="home"] .slide-dots button::before {
  background: #777d6944;
}
body[data-page="home"] .slide-dots button[aria-pressed="true"]::before {
  background: #777d69;
}
@media (max-width: 760px) {
  .variant-name {
    font-size: 9px;
  }
  body[data-page="home"] .hero-slides {
    height: calc((100vw - 16px) * 458 / 1022 + 210px);
  }
  .hero-split .hero-visual-link {
    inset: 0 0 auto;
    aspect-ratio: 1022 / 458;
    height: auto;
  }
  body[data-page="home"] .hero-split .hero-content {
    top: auto;
    bottom: 32px;
    left: 24px;
    width: calc(100% - 48px);
    transform: none;
  }
  body[data-page="home"] .hero-split h1,
  body[data-page="home"] .hero-split h2 {
    font-size: 24px;
  }
  body[data-page="home"] .hero-split .eyebrow {
    margin-bottom: 8px;
  }
  body[data-page="home"] .hero-split .hero-description {
    margin-top: 8px;
    max-width: none;
  }
  body[data-page="home"] .hero-split .hero-link {
    margin-top: 10px;
  }
  body[data-page="home"] .hero-controls {
    left: 24px;
    bottom: 9px;
  }
}

body[data-page="home"] .home-featured { padding-top: 56px; }
body[data-page="home"] .section-heading h2 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.4; }
body[data-page="home"] .section-heading p:not(.eyebrow) { font-size: 15px; }
.featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; max-width: 1120px; margin-inline: auto; }
.featured-grid .product-image-wrap { aspect-ratio: 6 / 5; }
.featured-grid .product-image { object-fit: cover; object-position: center bottom; }
.featured-grid .product-save { margin-top: calc(100% * 5 / 6 + 12px); }
.featured-grid .product-name { font-size: 19px; line-height: 1.55; }
.featured-grid .product-brand { font-size: 12px; }
.featured-grid .product-price { font-size: 14px; }
.featured-grid .variant-name { font-size: 12px; padding: 4px 8px; }
.featured-grid .variant-caption { font-size: 11px; }
.featured-grid .product-info { padding-top: 20px; }
body[data-page="home"] .category-section { margin-top: 90px; }
.material-discovery { margin-top: 64px; }
.material-discovery h3 { font-size: 24px; margin-bottom: 22px; font-weight: 600; }
.material-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.material-tiles a { position: relative; display: block; overflow: hidden; aspect-ratio: 1.55; background: var(--warm-gray); }
.material-tiles img { width: 100%; height: 100%; object-fit: cover; }
.material-tiles a::after { content: ""; position: absolute; inset: 0; background: #20241f32; }
.material-tiles a > span { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: white; text-shadow: 0 1px 8px #0008; }
.material-tiles strong { font-size: 28px; font-weight: 600; }
.material-tiles small { font-size: 12px; letter-spacing: 1.6px; }
.texture-banner { margin-top: 90px; display: grid; grid-template-columns: 1.4fr 1fr; background: var(--warm-gray); min-height: 360px; }
.texture-banner > img { width: 100%; height: 360px; object-fit: cover; object-position: center; }
.texture-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 36px 48px; gap: 18px; }
.texture-copy > strong { font-size: clamp(28px, 3vw, 40px); line-height: 1.4; font-weight: 500; }
.texture-copy > span:not(.eyebrow) { font-size: 14px; }
.texture-link { display: inline-flex; align-items: center; gap: 22px; border-bottom: 1px solid currentColor; padding-bottom: 8px; }
.texture-link .icon { width: 20px; height: 20px; }
@media (max-width: 760px) {
  body[data-page="home"] .home-featured { padding-top: 36px; }
  .featured-grid { grid-template-columns: 1fr; gap: 34px; }
  .featured-grid .product-name { font-size: 18px; }
  body[data-page="home"] .category-section, .texture-banner { margin-top: 56px; }
  .material-discovery { margin-top: 42px; }
  .material-discovery h3 { font-size: 22px; }
  .material-tiles { gap: 12px; grid-template-columns: 1fr; }
  .material-tiles a { aspect-ratio: 1.9; }
  .texture-banner { grid-template-columns: 1fr; }
  .texture-banner > img { height: 230px; }
  .texture-copy { padding: 28px; gap: 15px; }
}

@media (min-width: 761px) { #md-products { grid-auto-columns: calc((100% - 2 * var(--rail-gap)) / 3); } #md-products .product-name { font-size: 16px; } }

@media (max-width: 760px) { .home-featured .section-heading > div { width: 100%; } .home-featured .section-heading > .text-link { white-space: nowrap; flex-shrink: 0; width: auto; align-self: flex-start; } }
.campaign-hero {
  --campaign-gap: 16px;
  --campaign-card-width: calc((var(--campaign-viewport, 100vw) - 6 * var(--campaign-gap)) / 6);
  --campaign-gutter: calc(var(--campaign-card-width) / 2 + var(--campaign-gap));
  padding-top: 12px;
  overflow: hidden;
}
.campaign-track {
  position: relative;
  display: flex;
  gap: var(--campaign-gap);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 var(--campaign-gutter) 8px;
  scroll-padding-inline: var(--campaign-gutter);
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  cursor: grab;
  touch-action: pan-x pan-y;
}
.campaign-track::-webkit-scrollbar { display: none; }
.campaign-track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.campaign-card {
  flex: 0 0 var(--campaign-card-width);
  min-width: 0;
  aspect-ratio: 3 / 4;
  height: calc(var(--campaign-card-width) * 4 / 3);
  border-radius: 18px;
  overflow: hidden;
  background: var(--warm-gray);
  scroll-snap-align: start;
}
.campaign-card > a { display: flex; height: 100%; flex-direction: column; }
.campaign-card > a:focus-visible { outline-offset: -5px; }
.campaign-card picture { display: block; height: 100%; flex-shrink: 0; overflow: hidden; }
.campaign-card img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.campaign-controls { width: min(1060px, calc(100% - 48px)); margin: 6px auto 0; }
.campaign-navigation { display: grid; grid-template-columns: minmax(0, 1fr) 36px 36px; align-items: center; gap: 4px; }
.campaign-navigation > button { width: 36px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 0; }
.campaign-navigation > button:hover { background: var(--cream); }
.campaign-previous .icon { transform: rotate(180deg); }
.campaign-navigation .icon { width: 16px; height: 16px; }
.campaign-bar-label { display: flex; min-width: 0; align-items: center; margin-right: 12px; }
.campaign-bar { appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; }
.campaign-bar::-webkit-slider-runnable-track { height: 3px; background: var(--line); border-radius: 0; }
.campaign-bar::-webkit-slider-thumb { appearance: none; width: var(--campaign-segment-width, 16.6667%); height: 3px; margin-top: 0; border-radius: 0; background: var(--ink); }
.campaign-bar::-moz-range-track { height: 3px; background: var(--line); }
.campaign-bar::-moz-range-thumb { width: var(--campaign-segment-width, 16.6667%); height: 3px; border: 0; border-radius: 0; background: var(--ink); }
.texture-banner { border-radius: 24px; overflow: hidden; }
.material-tiles a { border-radius: 16px; }
@media (min-width: 761px) and (max-width: 1279px) {
  .campaign-hero { --campaign-card-width: calc((var(--campaign-viewport, 100vw) - 4 * var(--campaign-gap)) / 4); }
}
@media (min-width: 761px) and (max-width: 1023px) {
  .campaign-hero { --campaign-card-width: calc((var(--campaign-viewport, 100vw) - 3 * var(--campaign-gap)) / 3); }
}
@media (max-width: 760px) {
  .campaign-hero { --campaign-gap: 12px; --campaign-card-width: calc(var(--campaign-viewport, 100vw) * .72); --campaign-gutter: calc((var(--campaign-viewport, 100vw) - var(--campaign-card-width)) / 2); padding-top: 10px; }
  .campaign-card { border-radius: 20px; }
  .campaign-controls { width: calc(100% - 40px); }
  .texture-banner { border-radius: 20px; }
}
