* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR",
    "Segoe UI", sans-serif;
  background: #ffffff;
  color: #111;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.inner {
  width: min(940px, 92vw);
  margin: 0 auto;
}

.top-header {
  background: #ffffff;
  padding: 10px 20px;
  border-bottom: 1px solid #eceff5;
}

.header-inner {
  width: min(1200px, 92vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  display: none;
}
.brand-logo { height: 48px; width: auto; display: block; }

.brand-text {
  color: #1d4ed8;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

/* Desktop default: hide mobile menu button */
.mobile-menu-btn {
  display: none;
}

.icon-bell {
  text-decoration: none;
  font-size: 16px;
  line-height: 1;
}

.login-btn {
  display: inline-block;
  text-decoration: none;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 9px 12px;
  border-radius: 10px;
}

.header-nav {
  flex: 1 1 auto;
  margin: 0;
  width: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.header-nav .flat-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
}

/* Desktop: hide categorized menu by default */
.menu-cats {
  display: none;
}

.header-nav-item {
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  color: #404040;
  line-height: 1.1;
  padding: 8px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.header-nav-item.active {
  color: #1d4ed8;
  background: #eff6ff;
}
.header-nav-item.header-nav-store {
  font-size: 15px;
  font-weight: 800;
  color: #1d4ed8;
  background: #eff6ff;
  padding: 9px 14px;
}
.header-nav-item.header-nav-store:hover,
.header-nav-item.header-nav-store.active {
  background: #dbeafe;
  color: #1e40af;
}
.header-nav-item .nav-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  vertical-align: middle;
}

/* Mobile: PC와 동일 flat-links 메뉴 */
@media (max-width: 980px) {
  .header-inner {
    flex-wrap: nowrap;
  }
  .header-nav .flat-links { display: none; }
  .header-nav.open .flat-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .header-nav .menu-cats { display: none !important; }
  .header-nav.open .header-nav-item {
    display: block;
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 10px;
    background: #f9fafb;
    text-align: left;
    white-space: normal;
  }
  .header-nav.open .header-nav-item.active,
  .header-nav.open .header-nav-item:active {
    background: #eff6ff;
    color: #1d4ed8;
  }
}
.menu-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5b6b;
}

.page {
  padding: 18px 0 0;
}

.banner {
  height: 250px;
  margin-bottom: 26px;
}

.btn-banner {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: none;
  color: #c4dfff;
  display: block;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.chip {
  display: inline-block;
  border: 1px solid #fff;
  border-radius: 999px;
  padding: 5px 16px;
  color: #fff;
  font-weight: 700;
}

.banner h2 {
  margin: 12px 0 0;
  font-size: 64px;
  line-height: 1.05;
}

.banner-media {
  position: relative;
  width: 100%;
  height: 100%;
  background: #fff;
}

.banner-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 500ms ease;
  opacity: 0;
  pointer-events: none;
}

.banner-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.banner-slide .banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 흰 여백 없이 꽉 차게 */
  object-position: center;
  display: block;
}

.section-grid {
  display: grid;
  grid-template-columns: 460px 460px;
  column-gap: 20px;
  row-gap: 10px;
  justify-content: center;
  margin-bottom: 26px;
}

h3 {
  margin: 0 0 8px;
  color: #333;
  background: #fff;
  padding: 12px 0 8px;
  font-size: 32px;
}

.tile {
  height: 373px;
  border-radius: 12px;
  overflow: hidden;
}

.second {
  grid-template-columns: 461px 461px;
  column-gap: 18px;
  align-items: stretch;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-card {
  border-radius: 12px;
  overflow: hidden;
  height: 182px;
}

.mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}

.btn-card {
  display: block;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  filter: brightness(1.02);
}

.btn-card:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.15);
}

.site-footer {
  margin-top: 34px;
  padding: 34px 0 48px;
  background: #2f2e3b;
}

.site-footer p {
  margin: 0 0 10px;
  color: rgba(246, 245, 255, 0.5);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  /* Mobile banner uses the image's native ratio to avoid cropping */
  .banner {
    height: auto;
  }

  .btn-banner {
    height: auto;
  }

  .banner-media {
    height: auto;
    aspect-ratio: 1080 / 1440;
    max-height: 520px;
  }
  .top-header {
    padding: 14px 14px 16px;
  }

  /* 모바일: PC와 동일 flat-links 메뉴 */
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbeafe;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
  }
  .header-nav { display: none; }
  .header-nav.open { display: block; background: #ffffff; border-top: 1px solid #e5e7eb; padding: 12px 16px; margin: 8px -4vw 0; width: calc(100% + 8vw); }
  .header-nav .flat-links { display: none; }
  .header-nav.open .flat-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .header-nav .menu-cats { display: none !important; }
  .header-nav.open .header-nav-item {
    display: block;
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 10px;
    background: #f9fafb;
    text-align: left;
    white-space: normal;
  }
  .header-nav.open .header-nav-item.active,
  .header-nav.open .header-nav-item:active {
    background: #eff6ff;
    color: #1d4ed8;
  }

  .brand-mark {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    font-size: 16px;
  }

  .brand-logo {
    height: 42px;
  }

  .brand-text {
    font-size: 26px;
  }

  .icon-bell {
    font-size: 16px;
  }

  .login-btn {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 10px;
  }

  .header-nav {
    margin-top: 0;
    gap: 10px;
  }

  .header-nav-item {
    font-size: 16px;
  }

  .menu-dot {
    width: 8px;
    height: 8px;
  }

  h3 {
    font-size: 24px;
  }

  .section-grid {
    grid-template-columns: 1fr;
    row-gap: 10px;
    grid-template-areas:
      "title1"
      "card1"
      "title2"
      "card2";
  }

  .second {
    grid-template-columns: 1fr;
  }

  .section-grid > :nth-child(1) {
    grid-area: title1;
  }

  .section-grid > :nth-child(2) {
    grid-area: title2;
  }

  .section-grid > :nth-child(3) {
    grid-area: card1;
  }

  .section-grid > :nth-child(4) {
    grid-area: card2;
  }

  .tile {
    height: auto;
    aspect-ratio: auto;
  }

  .mini-card {
    height: auto;
    aspect-ratio: auto;
  }

  .tile img,
  .mini-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .banner h2 {
    font-size: 32px;
  }

  /* Mobile: 잘림 없이 원본 그대로 */
  .banner-slide .banner-img {
    object-fit: cover;
    object-position: center;
  }
}
