:root {
  --color-primary: #6c5ce7;
  --color-primary-dark: #4834b0;
  --color-accent: #00b894;
  --color-text: #1a1a2e;
  --color-text-muted: #6b7280;
  --color-border: #eceef1;
  --color-surface: #ffffff;
  --color-bg: #f7f7fb;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-card-hover: 0 16px 32px rgba(26, 26, 46, 0.12);
  --container: 1160px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* top bar */

.top-bar {
  background: #f1f1f7;
  border-bottom: 1px solid var(--color-border);
}

.top-bar .inner {
  display: flex;
  justify-content: flex-end;
  height: 36px;
  align-items: center;
}

.auth-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.auth-links a {
  font-weight: 600;
}

.auth-links a:hover {
  color: var(--color-primary-dark);
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-user[hidden] {
  display: none;
}

.auth-user strong {
  color: var(--color-text);
}

.auth-user button {
  border: 0;
  background: none;
  color: var(--color-text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.search-form {
  flex: 1;
  display: flex;
  max-width: 420px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--color-bg);
}

.search-form input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 10px 8px 10px 18px;
  font-size: 14px;
  outline: none;
}

.search-form button {
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  padding: 0 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.header-call {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary-dark);
  white-space: nowrap;
}

/* category nav */

.category-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.category-nav .inner {
  padding: 0 24px;
}

.category-toggle {
  display: none;
}

.category-list {
  margin: 0;
  padding: 4px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-list a {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.category-list a:hover {
  background: var(--color-bg);
  color: var(--color-primary-dark);
}

.category-list a.active {
  background: var(--color-primary);
  color: #fff;
}

.category-list a.active:hover {
  color: #fff;
}

/* banner */

.banner {
  position: relative;
  background: linear-gradient(160deg, #7c6ef2, #4834b0);
  color: #fff;
  padding: 72px 0 56px;
  overflow: hidden;
  text-align: center;
}

.banner::before,
.banner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.banner::before {
  width: 420px;
  height: 420px;
  top: -220px;
  right: -120px;
}

.banner::after {
  width: 280px;
  height: 280px;
  bottom: -160px;
  left: -80px;
}

.banner .inner {
  position: relative;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.banner h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.banner p {
  margin: 0 0 28px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

.banner-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: #fff;
  color: var(--color-primary-dark);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn:hover {
  transform: translateY(-2px);
}

/* highlight strip */

.highlight-strip {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.highlight-strip .inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.highlight {
  text-align: center;
  padding: 0 12px;
  border-right: 1px solid var(--color-border);
}

.highlight:last-child {
  border-right: none;
}

.highlight strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.highlight span {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* product section */

.product-section {
  padding: 64px 0 80px;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-muted);
}

.product-grid {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.thumb {
  position: relative;
  aspect-ratio: 1.5 / 1;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px;
  color: #fff;
  overflow: hidden;
}

.thumb::before {
  content: "상품권";
  position: absolute;
  right: -8px;
  bottom: -18px;
  font-size: 36px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.16);
  white-space: nowrap;
}

.brand-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.denom {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.denom small {
  font-size: 12px;
  font-weight: 400;
  margin-left: 2px;
  opacity: 0.85;
}

.brand-lotte { background: linear-gradient(135deg, #e0335d, #97173a); }
.brand-shinsegae { background: linear-gradient(135deg, #545b70, #24262f); }
.brand-hyundai { background: linear-gradient(135deg, #1e7ee0, #0a3e78); }
.brand-galleria { background: linear-gradient(135deg, #9270c9, #5c3f92); }
.brand-guk { background: linear-gradient(135deg, #14a3e0, #0a6a9c); }
.brand-keumkang { background: linear-gradient(135deg, #d4a017, #8a600d); }

.card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 0 4px;
}

.product-card .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.product-card .discount {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
  background: rgba(0, 184, 148, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
}

.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* footer */

.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 40px 0 48px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.footer-logo {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-text);
}

.util-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.util-menu li {
  white-space: nowrap;
}

.biz-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 32px;
  margin: 0 0 20px;
}

.biz-info > div {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 14px;
  line-height: 1.7;
}

.biz-info dt {
  white-space: nowrap;
  color: var(--color-text);
  font-weight: 600;
}

.biz-info dd {
  margin: 0;
}

.biz-info a {
  color: var(--color-primary-dark);
  font-weight: 600;
}

.copyright {
  margin: 0;
}

/* auth pages */

.auth-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px 36px;
}

.auth-card h1 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
  text-align: center;
}

.auth-sub {
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-group input:focus {
  border-color: var(--color-primary);
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  cursor: pointer;
}

.form-check input {
  margin-top: 2px;
}

.form-message {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.form-message.error {
  background: rgba(224, 51, 93, 0.1);
  color: #c81e4c;
}

.form-message.success {
  background: rgba(0, 184, 148, 0.1);
  color: #00926f;
}

.btn-block {
  width: 100%;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: none;
}

.auth-switch {
  margin: 24px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}

.auth-switch a {
  color: var(--color-primary-dark);
  font-weight: 700;
}

/* responsive */

@media (max-width: 860px) {
  .highlight-strip .inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .highlight {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 16px;
  }

  .highlight:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .biz-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header .inner {
    height: auto;
    padding: 14px 20px;
    flex-wrap: wrap;
  }

  .logo {
    order: 1;
  }

  .header-call {
    order: 2;
    margin-left: 0;
  }

  .search-form {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }

  .category-toggle {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 14px 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
  }

  .category-list {
    display: none;
    flex-direction: column;
    padding-bottom: 8px;
  }

  .category-list.open {
    display: flex;
  }

  .category-list a {
    border-radius: var(--radius-sm);
  }

  .banner h1 {
    font-size: 26px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}
