:root {
  --bg: #f6f4f1;
  --paper: #ffffff;
  --ink: #2a211d;
  --muted: #7a6a62;
  --soft: #f0ebe5;
  --line: #ded8cf;
  --accent: #e36f75;
  --accent-dark: #a9424c;
  --gold: #d99a3d;
  --rose: #f7efeb;
  --green: #4f806d;
  --shadow: 0 20px 48px rgba(43, 34, 29, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 244, 241, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.main-header {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 22px 14px;
  display: grid;
  grid-template-columns: auto minmax(260px, 460px);
  align-items: center;
  gap: 28px;
}

.top-nav {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid rgba(227, 111, 117, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  scroll-snap-align: start;
}

.top-nav a:first-child {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 18px rgba(227, 111, 117, 0.24));
}

.brand span {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 24px;
  font-weight: 950;
}

.brand small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-box {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(135, 75, 63, 0.06);
}

.search-box svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 750;
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 22px 64px;
}

.promo {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: stretch;
  padding: 56px 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(54, 35, 32, 0.84), rgba(111, 64, 65, 0.48)),
    url("assets/gift-hero.webp") center/cover;
  color: #fff;
  box-shadow: var(--shadow);
}

.promo-copy {
  max-width: 710px;
  align-self: end;
}

.promo-copy p,
.section-title p,
.panel-head p,
.promo-card p {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.promo-copy p,
.promo-card p {
  color: #ffd8bd;
}

.promo h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  font-weight: 950;
}

.promo-copy > span {
  display: block;
  max-width: 720px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 950;
}

.hero-actions a:first-child {
  background: #fff;
  color: var(--accent-dark);
  border-color: #fff;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 850;
}

.hero-metrics strong {
  font-size: 20px;
}

.promo-card {
  align-self: end;
  min-height: 190px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.promo-card strong {
  font-size: 28px;
  line-height: 1.25;
}

.promo-card span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
}

.curation-picks {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.curation-picks button {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  margin-top: 22px;
  align-items: start;
}

.filter-panel,
.catalog-panel,
.experience-section,
.seo-intent-section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(34, 29, 23, 0.05);
}

.filter-panel {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 22px;
}

.panel-head h2,
.section-title h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

fieldset {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.segmented button,
.category-row button,
.pagination button {
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.segmented button.active,
.category-row button.active,
.pagination button.active {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
}

.occasion-panel {
  padding: 14px;
  border: 1px solid rgba(169, 66, 76, 0.18);
  border-radius: 12px;
  background: var(--rose);
}

.occasion-panel legend {
  display: flex;
  align-items: center;
  gap: 8px;
}

.occasion-panel legend::after {
  content: "단독 카테고리";
  padding: 4px 7px;
  border-radius: 4px;
  background: var(--accent-dark);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

#budget {
  width: 100%;
  accent-color: var(--accent);
}

#budget-label {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 950;
}

.catalog-panel {
  padding: 24px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.catalog-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.catalog-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.catalog-toolbar select {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(135, 75, 63, 0.06);
}

.product-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff0e7;
}

.product-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(164, 66, 76, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 14px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(42, 33, 29, 0.08);
}

.product-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.category-chip {
  color: #766b64;
}

.price-chip {
  justify-content: center;
  color: var(--accent-dark);
  font-weight: 950;
}

.product-copy {
  display: grid;
  gap: 9px;
  padding: 12px 14px 16px;
}

.product-copy h3 {
  margin: 0;
  min-height: 44px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 950;
}

.product-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.buy-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0 14px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 950;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  max-width: 100%;
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: default;
}

.pagination button {
  min-width: 42px;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 34px;
  color: var(--muted);
  font-weight: 950;
}

.experience-section,
.seo-intent-section {
  margin-top: 22px;
  padding: 22px;
}

.experience-grid,
.seo-intent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.experience-grid article,
.seo-intent-grid a,
.trust-section > div {
  display: grid;
  gap: 9px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.seo-intent-grid a {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(180deg, #fff 0%, #fff3f0 100%);
}

.experience-grid span,
.seo-intent-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.experience-grid article > span {
  color: var(--accent-dark);
  font-weight: 950;
}

.experience-grid h3,
.seo-intent-grid strong,
.trust-section strong {
  margin: 0;
  font-size: 18px;
  line-height: 1.32;
}

.experience-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
}

.trust-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  padding-bottom: 6px;
}

.trust-section > div {
  background: linear-gradient(135deg, #3a2824, #6d3b3f);
  color: #fff;
}

.trust-section span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 750;
}

@media (max-width: 980px) {
  .main-header,
  .promo,
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .main-header {
    gap: 14px;
  }

  .search-box {
    width: 100%;
  }

  .filter-panel {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .category-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .category-row::-webkit-scrollbar {
    display: none;
  }

  .category-row button {
    flex: 0 0 auto;
  }

  .product-grid,
  .experience-grid,
  .seo-intent-grid,
  .trust-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 640px) {
  :root {
    --shadow: 0 12px 30px rgba(43, 34, 29, 0.1);
  }

  .topbar {
    position: sticky;
    background: rgba(246, 244, 241, 0.98);
  }

  .main-header {
    padding: 14px 14px 10px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .brand {
    width: 100%;
  }

  .brand-icon {
    width: 44px;
    height: 44px;
  }

  .brand strong {
    font-size: 21px;
  }

  .brand small {
    font-size: 12px;
  }

  .search-box {
    height: 46px;
    padding: 0 13px;
    border-radius: 14px;
  }

  .search-box input {
    font-size: 14px;
  }

  .top-nav {
    padding: 0 14px 12px;
    gap: 7px;
    mask-image: linear-gradient(90deg, #000 0%, #000 calc(100% - 28px), transparent 100%);
  }

  .top-nav a {
    min-height: 38px;
    padding: 9px 12px;
    font-size: 12px;
  }

  main {
    padding: 14px 12px 42px;
  }

  .promo {
    min-height: auto;
    gap: 18px;
    padding: 30px 18px 22px;
    border-radius: 12px;
    background-position: center top;
  }

  .promo h1 {
    font-size: 36px;
    line-height: 1.08;
  }

  .promo-copy > span {
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.55;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
  }

  .hero-actions a {
    justify-content: center;
    min-height: 44px;
    padding: 0 10px;
    font-size: 13px;
    text-align: center;
  }

  .hero-metrics {
    gap: 7px;
    margin-top: 18px;
  }

  .hero-metrics span {
    flex: 1 1 96px;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12px;
  }

  .hero-metrics strong {
    font-size: 17px;
  }

  .promo-card {
    min-height: 0;
    padding: 18px;
    border-radius: 10px;
  }

  .promo-card strong {
    font-size: 23px;
  }

  .curation-picks {
    grid-template-columns: 1fr;
  }

  .catalog-layout {
    gap: 14px;
    margin-top: 16px;
  }

  .filter-panel,
  .catalog-panel,
  .ranking-section,
  .experience-section,
  .seo-intent-section {
    border-radius: 10px;
  }

  .filter-panel,
  .catalog-panel {
    padding: 14px;
  }

  .filter-panel fieldset {
    margin-top: 16px;
  }

  .panel-head h2,
  .section-title h2 {
    font-size: 21px;
  }

  legend {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .segmented {
    gap: 6px;
  }

  .segmented button,
  .category-row button,
  .pagination button {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .segmented button {
    flex: 1 1 auto;
  }

  .occasion-panel {
    padding: 12px;
  }

  #budget {
    min-height: 32px;
  }

  .catalog-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 0;
  }

  .catalog-toolbar p {
    font-size: 13px;
  }

  .catalog-toolbar label {
    width: 100%;
    justify-content: space-between;
  }

  .catalog-toolbar select {
    min-width: 112px;
    height: 40px;
  }

  .product-grid,
  .experience-grid,
  .seo-intent-grid,
  .trust-section,
  .trust-section {
    grid-template-columns: 1fr;
  }

  .product-grid {
    gap: 12px;
  }

  .product-visual {
    aspect-ratio: 4 / 3;
  }

  .product-meta {
    padding-top: 11px;
  }

  .product-copy h3 {
    min-height: auto;
    font-size: 16px;
  }

  .product-copy p {
    font-size: 13px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .buy-link {
    min-height: 44px;
  }

  .pagination {
    gap: 6px;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 2px 2px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .pagination::-webkit-scrollbar {
    display: none;
  }

  .pagination button {
    flex: 0 0 auto;
    min-width: 40px;
  }
}

@media (max-width: 420px) {
  .main-header {
    padding-inline: 12px;
  }

  main {
    padding-inline: 10px;
  }

  .brand {
    gap: 10px;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
  }

  .promo h1 {
    font-size: 31px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    display: grid;
    grid-template-columns: 1fr;
  }

  .product-meta {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .pagination button {
    min-width: 38px;
    padding-inline: 9px;
  }
}

@media (max-width: 360px) {
  .promo h1 {
    font-size: 28px;
  }

  .promo,
  .filter-panel,
  .catalog-panel,
  .experience-section,
  .seo-intent-section {
    border-radius: 9px;
  }

  .product-copy,
  .product-meta {
    margin-inline: 12px;
  }

  .product-copy {
    padding-inline: 0;
  }

  .buy-link {
    margin-inline: 12px;
  }
}
