/* ===== CSS Variables ===== */
:root {
  --red: #e60010;
  --red-pastel: #ff6b73;
  --red-light: #ffe5e7;
  --bg: #ffffff;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-mid: #444444;
  --text-light: #888888;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 20px rgba(230, 0, 16, 0.15);
  --radius: 12px;
  --transition: 0.25s ease;
  --header-pad-top: 40px;
  --logo-h: 30px;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  background-color: var(--bg);
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
}

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

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

/* ===== Layout ===== */
.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Header ===== */
.header {
  background: var(--bg);
  padding: var(--header-pad-top) 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.header .logo {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.logo-fallback {
  font-size: 20px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.5px;
}

.btn-back {
  position: absolute;
  left: 16px;
  top: calc(var(--header-pad-top) + var(--logo-h) / 2);
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-mid);
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: background var(--transition);
}

.btn-back:hover {
  background: var(--red-light);
  color: var(--red);
}

.btn-back svg {
  width: 20px;
  height: 20px;
}

/* ===== Main Content ===== */
.main {
  flex: 1;
  padding: 8px 16px 16px;
}

/* ===== Index: Hero ===== */
.hero {
  text-align: center;
  padding: 4px 0 12px;
}

.hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== Index: Card List ===== */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== Product Cards ===== */
.product-card {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-left: 4px solid var(--red);
  transition:
    transform var(--transition),
    box-shadow var(--transition);
  cursor: pointer;
}

.product-card:active {
  transform: scale(0.98);
}

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

.product-card__inner {
  padding: 10px 20px 6px;
}

.product-card__solution {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  background: var(--red-light);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.product-card__name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.product-card__desc {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.4;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 6px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
}

.product-card__footer svg {
  width: 16px;
  height: 16px;
}

/* ===== Action Buttons ===== */
.action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: opacity var(--transition);
}

.action-btn:active {
  opacity: 0.8;
}

.action-btn__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn__left svg,
.action-btn__chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.action-btn--fill {
  background: var(--red);
  color: var(--white);
}

.action-btn--outline {
  background: var(--white);
  color: var(--text-dark);
  border: 1px solid var(--border);
}

/* ===== Gift Section ===== */
.gift-section {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--red-light);
  border-radius: var(--radius);
}

.gift-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-icon svg {
  width: 20px;
  height: 20px;
  color: var(--red);
}

.gift-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 2px;
}

.gift-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 2px;
}

.gift-desc {
  font-size: 12px;
  color: var(--text-mid);
  margin: 0;
}

/* ===== Detail Page: Product Title ===== */
.product-heading {
  padding: 20px 0 0;
}

.product-heading__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.product-heading h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0;
}

.cta-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
}

.cta-link:hover {
  color: var(--red);
}

.cta-link svg {
  width: 20px;
  height: 20px;
}

.divider {
  height: 2px;
  background: var(--red);
  border: none;
  margin-bottom: 24px;
}

/* ===== Section Guide ===== */
.section-guide {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}

/* ===== Accordion ===== */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.accordion-item.is-open {
  box-shadow: 0 4px 16px rgba(230, 0, 16, 0.12);
}

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 12px;
  transition: background var(--transition);
}

.accordion-trigger:hover {
  background: #fafafa;
}

.accordion-item.is-open .accordion-trigger {
  background: var(--red-light);
}

.accordion-trigger__label {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.accordion-trigger__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--red-light);
  color: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition:
    background var(--transition),
    color var(--transition);
}

.accordion-item.is-open .accordion-trigger__num {
  background: var(--red);
  color: var(--white);
}

.accordion-trigger__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  flex: 1;
  min-width: 0;
}

.accordion-trigger__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--text-light);
  transition:
    transform var(--transition),
    color var(--transition);
}

.accordion-item.is-open .accordion-trigger__icon {
  transform: rotate(180deg);
  color: var(--red);
}

.accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.accordion-item.is-open .accordion-body {
  grid-template-rows: 1fr;
}

.accordion-body__inner {
  overflow: hidden;
}

.accordion-content {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
}

.accordion-desc {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.7;
  padding: 14px 0 16px;
}

/* ===== YouTube Wrapper ===== */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
}

/* ===== Responsive: Desktop ===== */
@media (min-width: 768px) {
  .page {
    max-width: 600px;
  }

  .hero-title {
    font-size: 28px;
  }

  .product-card__name {
    font-size: 22px;
  }

  .accordion-trigger__title {
    font-size: 16px;
  }
}

/* ===== Footer ===== */
.footer {
  background: #f9f9f9;
  border-top: 1px solid #ebebeb;
  padding: 16px 20px;
  text-align: center;
}

.footer p {
  font-size: 12px;
  color: #888888;
  line-height: 1.7;
  margin: 0;
}

.footer a {
  color: #888888;
  text-decoration: none;
}
