/* ═══════════════════════════════════════════════════
   Homepage — 8-section layout
   Palette: #3B7A57 primary | #F4A261 accent | #FAFAF5 bg | #2C3E2D text
   ═══════════════════════════════════════════════════ */

/* ── Base overrides for homepage ──────────────────── */
.hp-page { padding: 0; }

.hp-section {
  padding: 3.5rem 0;
}
@media (min-width: 768px) {
  .hp-section { padding: 5rem 0; }
}

.hp-section--alt { background: #f0f5f1; }

.hp-section-head { margin-bottom: 2.5rem; }
.hp-section-head--center { text-align: center; }
.hp-section-head h2 {
  font-size: 1.7rem;
  color: var(--secondary);
  margin-bottom: .5rem;
}
@media (min-width: 768px) {
  .hp-section-head h2 { font-size: 2rem; }
}
.hp-section-head h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--primary);
  margin: .5rem 0 0;
}
.hp-section-head--center h2::after {
  margin: .5rem auto 0;
}
.hp-section-sub {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 0;
}
.hp-section-cta {
  text-align: center;
  margin-top: 2rem;
}

/* ── Shared button variants ───────────────────────── */
.hp-btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: .9rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: background .2s, transform .15s;
  text-decoration: none;
}
.hp-btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
}
.hp-btn-outline {
  display: inline-block;
  border: 2px solid rgba(255,255,255,.8);
  color: #fff;
  padding: .85rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: background .2s, border-color .2s;
  text-decoration: none;
}
.hp-btn-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
  color: #fff;
}
.btn-outline-primary {
  display: inline-block;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: .7rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  transition: background .2s, color .2s;
  text-decoration: none;
}
.btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
}
.hp-btn-cta-large {
  display: inline-block;
  padding: .875rem 2.5rem;
  border-radius: 50px;
  font-size: 1.05rem;
}

/* ══ S1: HERO ═════════════════════════════════════ */
.hp-hero {
  background: linear-gradient(140deg, #1e4d33 0%, #3B7A57 55%, #c06832 100%);
  color: #fff;
  text-align: center;
  padding: 5rem 1rem 4.5rem;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hp-hero { padding: 7rem 1rem 6rem; }
}

.hp-hero::before {
  content: '🥣';
  position: absolute;
  font-size: 14rem;
  opacity: .05;
  right: -2rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  line-height: 1;
}

.hp-hero__inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hp-hero__persona {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50px;
  padding: .3rem 1rem;
  font-size: .85rem;
  margin-bottom: 1.5rem;
  letter-spacing: .02em;
}

.hp-hero__h1 {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 1.25rem;
}
@media (min-width: 480px) {
  .hp-hero__h1 { font-size: 2rem; }
}
@media (min-width: 768px) {
  .hp-hero__h1 { font-size: 2.4rem; }
}

.hp-hero__sub {
  font-size: 1rem;
  opacity: .9;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 480px) {
  .hp-hero__sub { font-size: 1.05rem; }
}

.hp-hero__buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .875rem;
}
@media (min-width: 480px) {
  .hp-hero__buttons {
    flex-direction: row;
    justify-content: center;
  }
}

/* ══ S2: CALCULATOR ═══════════════════════════════ */
.hp-section--calc {
  background: #f0f5f1;
}
.hp-section--calc .hp-section-head p {
  color: var(--muted);
  font-size: .95rem;
}

/* ══ S3: INTENT NAV ═══════════════════════════════ */
.hp-intent__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 600px) {
  .hp-intent__grid { grid-template-columns: repeat(3, 1fr); }
}

.hp-intent__card {
  display: block;
  border-radius: 16px;
  padding: 2rem;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.hp-intent__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(44,62,45,.15);
}
.hp-intent__card--green { background: linear-gradient(135deg, #e6f2ec 0%, #d0e8da 100%); }
.hp-intent__card--orange { background: linear-gradient(135deg, #fef3ea 0%, #fde4cc 100%); }
.hp-intent__card--cream { background: linear-gradient(135deg, #fafaf5 0%, #f0ede5 100%); border: 1px solid var(--border); }

.hp-intent__emoji {
  font-size: 2rem;
  margin-bottom: .75rem;
  display: block;
}
.hp-intent__title {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--secondary);
  margin: 0 0 .5rem;
}
.hp-intent__desc {
  font-size: .9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.hp-intent__arrow {
  display: inline-block;
  margin-top: .75rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
}

/* ══ S4: TOP 3 SP (reuses existing .top-products-grid) ══ */
/* existing styles in main.css handle the cards */

/* ══ S5: CATEGORIES TABS ══════════════════════════ */
.hp-section--tabs { background: #fff; }

.hp-tab-nav {
  display: flex;
  gap: .5rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hp-tab-nav::-webkit-scrollbar { display: none; }

.hp-tab-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: .65rem 1.25rem;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.hp-tab-btn:hover { color: var(--primary); }
.hp-tab-btn[aria-selected="true"] {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.hp-tab-panel { display: none; }
.hp-tab-panel.is-active { display: block; }

.hp-post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 600px) {
  .hp-post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .hp-post-grid { grid-template-columns: repeat(4, 1fr); }
}

.hp-post-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.hp-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(44,62,45,.12);
}
.hp-post-card__img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #d0e8da, #e6f2ec);
  overflow: hidden;
  flex-shrink: 0;
}
.hp-post-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hp-post-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.hp-post-card__body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.hp-post-card__date {
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: .4rem;
}
.hp-post-card__title {
  font-family: 'Fraunces', serif;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: .4rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hp-post-card__title a {
  color: var(--secondary);
  text-decoration: none;
}
.hp-post-card__title a:hover { color: var(--primary); }
.hp-post-card__excerpt {
  font-size: .83rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.hp-tab-footer {
  text-align: center;
  margin-top: 1.75rem;
}
.hp-tab-footer a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.hp-tab-footer a:hover { text-decoration: underline; }

/* ══ S6: COMPARE PREVIEW ══════════════════════════ */
.hp-section--compare { background: #f0f5f1; }

.hp-compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hp-compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: #fff;
  font-size: .88rem;
}
.hp-compare-table thead th {
  background: var(--primary);
  color: #fff;
  padding: .75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .82rem;
  white-space: nowrap;
}
.hp-compare-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.hp-compare-table thead th:last-child { border-radius: 0 var(--radius) 0 0; }
.hp-compare-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.hp-compare-table tbody tr:last-child { border-bottom: none; }
.hp-compare-table tbody tr:hover { background: #f7fbf8; }
.hp-compare-table td { padding: .75rem 1rem; vertical-align: middle; }

.hct-img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; display: block; }
.hct-img-placeholder { width: 56px; height: 56px; border-radius: 8px; background: #d0e8da; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }

.hct-name { font-weight: 600; color: var(--secondary); line-height: 1.4; max-width: 220px; }
.hct-name small { display: block; font-weight: 400; font-size: .78rem; margin-top: .15rem; }
.hct-mall {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .45rem;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: .3rem;
}
.hct-price { font-weight: 700; color: var(--primary); white-space: nowrap; }
.hct-sold { color: var(--muted); white-space: nowrap; }
.hct-rating { color: #f5a623; white-space: nowrap; }
.hct-buy {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: .35rem .85rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: background .2s;
}
.hct-buy:hover { background: var(--accent-dark); color: #fff; }

/* ══ S7: FAQ ACCORDION ════════════════════════════ */
.hp-accordion { max-width: 720px; margin: 0 auto; }

.hp-accordion__item {
  border-bottom: 1px solid var(--border);
}
.hp-accordion__item:first-child {
  border-top: 1px solid var(--border);
}

.hp-accordion__toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.1rem 0;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  gap: 1rem;
  transition: color .2s;
}
.hp-accordion__toggle:hover { color: var(--primary); }

.hp-accordion__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  transition: background .2s, border-color .2s, transform .25s;
}
.hp-accordion__item.is-open .hp-accordion__icon {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: rotate(45deg);
}

.hp-accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease;
}
.hp-accordion__item.is-open .hp-accordion__panel {
  grid-template-rows: 1fr;
}
.hp-accordion__panel-inner {
  overflow: hidden;
}
.hp-accordion__answer {
  padding: 0 0 1.25rem;
  color: var(--text);
  font-size: .93rem;
  line-height: 1.7;
}
.hp-accordion__answer p { margin: 0 0 .5rem; }
.hp-accordion__answer p:last-child { margin: 0; }
.hp-accordion__link {
  display: inline-block;
  margin-top: .4rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary);
}

/* ══ S8: ABOUT TEASER ════════════════════════════ */
.hp-section--about { background: #fff; }

.hp-about-card {
  max-width: 680px;
  margin: 0 auto;
  background: linear-gradient(135deg, #e6f2ec, #fef3ea);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  display: flex;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 540px) {
  .hp-about-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }
}
.hp-about-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-family: 'Fraunces', serif;
  font-size: 2.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hp-about-content h2 {
  font-size: 1.35rem;
  margin-bottom: .75rem;
}
.hp-about-content p {
  font-size: .93rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}
