/* ==========================================================================
   Send Birthday Flowers to Korea — self-contained lightweight CSS (no Tabler/Bootstrap)
   Reset + tokens + minimal grid/utilities + components + brand + e-book type.
   ========================================================================== */

:root {
  --brand: #d6336c;        /* rose */
  --brand-2: #f06595;
  --gold: #f59f00;         /* amber accent (decorative: borders, button bg) */
  --gold-ink: #8a5a00;     /* dark amber — accessible gold for text on light bg */
  --ink: #1f2937;
  --heading: #20141a;      /* near-black (warm) — long-form headings & glossary terms */
  --muted: #6b7280;
  --line: #f0e3e9;
  --bg-soft: #fff5f8;
  --celebration: #d6336c;
  --condolence: #f59f00;
  --maxw: 1140px;
  --radius: 14px;
}

/* ---- reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  color: var(--ink); line-height: 1.6; background: #fff;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; }
ul { padding-left: 1.25rem; }
button { font: inherit; cursor: pointer; }

/* ---- layout: container + 12-col flex grid ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 16px; }
/* Bootstrap-style gutter: fixed horizontal padding keeps percentage widths exact at any gap. */
.row { display: flex; flex-wrap: wrap; margin-inline: -.5rem; }
/* Mobile-first: columns are full width by default and only narrow at md/lg breakpoints. */
[class^="col-"], [class*=" col-"] { flex: 0 0 100%; max-width: 100%; padding-inline: .5rem; min-width: 0; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6  { flex: 0 0 50%;  max-width: 50%; }
.g-2 { row-gap: .5rem; } .g-3 { row-gap: 1rem; } .g-4 { row-gap: 1.5rem; }
@media (min-width: 768px) {
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
}
@media (min-width: 992px) {
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-5 { flex: 0 0 41.666%; max-width: 41.666%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-7 { flex: 0 0 58.333%; max-width: 58.333%; }
  .col-lg-8 { flex: 0 0 66.666%; max-width: 66.666%; }
}

/* ---- flex / spacing / text utilities (only those in use) ---- */
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: 1rem; }
.text-center { text-align: center; } .text-start { text-align: left; }
.w-100 { width: 100%; } .h-100 { height: 100%; }
.text-muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { font-size: 1.18rem; color: #374151; }
.fw-bold { font-weight: 700; }
.fs-4 { font-size: 1.5rem; } .fs-5 { font-size: 1.25rem; }
.h3 { font-size: 1.6rem; } .h4 { font-size: 1.35rem; } .h5 { font-size: 1.15rem; } .h6 { font-size: 1rem; }
.display-5 { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; }
.display-6 { font-size: 2rem; font-weight: 800; }
.text-decoration-none { text-decoration: none; }
.text-white-50 { color: rgba(255,255,255,.6); }
.rounded-3 { border-radius: var(--radius); }
.sticky-top { position: sticky; top: 80px; }
.py-2 { padding-block: .5rem; } .py-4 { padding-block: 1.5rem; } .py-5 { padding-block: 3rem; }
.px-3 { padding-inline: 1rem; } .pt-2 { padding-top: .5rem; }
.p-3 { padding: 1rem; } .p-4 { padding: 1.5rem; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; }
.overflow-hidden { overflow: hidden; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.1rem; border-radius: 10px; border: 1px solid transparent; font-weight: 600;
  background: #eef0f2; color: var(--ink); transition: filter .15s, background .15s; text-decoration: none; }
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn-lg { padding: .8rem 1.5rem; font-size: 1.05rem; }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-2); color: #fff; }
.btn-gold { background: var(--gold); color: #2b1a00; }
.btn-gold:hover { color: #2b1a00; filter: brightness(.96); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.65); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-outline-secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-outline-secondary:hover { background: #f3f4f6; }
.btn-link { background: transparent; color: var(--brand-2); padding-inline: .25rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---- cards / alerts / badges / spinner ---- */
.card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card-body { padding: 1rem; }
a.card:hover { text-decoration: none; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.text-success { color: #16a34a; }
.alert { padding: .8rem 1rem; border-radius: 10px; border: 1px solid transparent; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.badge { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; color: #fff; background: var(--muted); }
.bg-secondary { background: #6b7280; } .bg-success { background: #16a34a; }
.bg-info { background: #0ea5e9; } .bg-primary { background: #2563eb; } .bg-danger { background: #dc2626; }
.spinner-border { width: 2rem; height: 2rem; border: 3px solid rgba(0,0,0,.12); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- forms ---- */
.form-label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.form-control, .form-select { width: 100%; padding: .6rem .75rem; border: 1px solid var(--line);
  border-radius: 10px; font: inherit; color: var(--ink); background: #fff; }
.form-control:focus, .form-select:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(214,51,108,.12); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2rem; }
.ratio { position: relative; width: 100%; }
.ratio-4x3 { aspect-ratio: 4 / 3; }

/* ---- nav (desktop horizontal · mobile hamburger + left offcanvas) ---- */
.site-nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .65rem; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--brand); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--gold-ink); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; }
.nav-links a { color: var(--ink); margin-left: 1.25rem; font-size: .92rem; font-weight: 500; }
.nav-links a:hover { color: var(--brand); text-decoration: none; }
.nav-links .nav-home { display: none; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 11px 10px; border-radius: 10px; }
.nav-toggle span { display: block; height: 2.5px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s; }
.nav-toggle span + span { margin-top: 5px; }
.nav-backdrop { display: none; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(82vw, 320px);
    flex-direction: column; flex-wrap: nowrap; align-items: stretch;
    background: #fff; box-shadow: 2px 0 34px rgba(0,0,0,.20);
    padding: 4.75rem 1.25rem 2rem; gap: 0;
    transform: translateX(-100%); transition: transform .28s ease;
    z-index: 60; overflow-y: auto;
  }
  .nav-links a { margin-left: 0; font-size: 1.05rem; padding: .85rem .25rem; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links .nav-home { display: block; }
  .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.42); opacity: 0; pointer-events: none; transition: opacity .28s; z-index: 55; }
  .site-nav.nav-open .nav-links { transform: translateX(0); }
  .site-nav.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .site-nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .site-nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* ---- centered page helpers (contact / my-orders / guide hub) ---- */
.page-narrow { max-width: 680px; margin-inline: auto; }
.page-head { text-align: center; margin-bottom: 1.75rem; }
.page-head p { color: var(--muted); max-width: 560px; margin-inline: auto; }
.form-card { margin-inline: auto; }
.guide-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1.5rem; text-align: left; }
.guide-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; background: #fff; color: var(--ink); transition: box-shadow .15s, transform .15s, border-color .15s; }
.guide-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.08); transform: translateY(-2px); border-color: var(--brand-2); text-decoration: none; }
.guide-card .gnum { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--bg-soft); color: var(--brand); font-weight: 800; margin-bottom: .6rem; }
.guide-card h2 { font-size: 1.15rem; margin: 0 0 .35rem; color: var(--brand); font-weight: 800; }
.guide-card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.6; }

@media (max-width: 640px) {
  .brand { font-size: 1.05rem; }
  .display-5 { font-size: 1.95rem; }
  .product-title { font-size: 1.45rem; }
  .pull-quote { font-size: 1.2rem; }
  .guide-cards { grid-template-columns: 1fr; }
}

/* ---- hero (background-image slideshow) ---- */
.hero { position: relative; overflow: hidden; color: #fff; min-height: 580px; display: flex; align-items: center; }
.hero-slides, .hero-slide, .hero-overlay { position: absolute; inset: 0; }
.hero-slides { z-index: 0; }
.hero-slide { background-size: cover; background-position: center; opacity: 0; transition: opacity 1.4s ease-in-out; }
.hero-slide.is-active { opacity: 1; }
.hero-overlay { z-index: 1; background: linear-gradient(90deg, rgba(106,26,58,.82) 0%, rgba(122,31,69,.56) 50%, rgba(122,31,69,.26) 100%); }
.hero-content { position: relative; z-index: 2; width: 100%; }
.hero h1 { font-weight: 800; letter-spacing: -.02em; color: #fff; }
.hero .lead { color: rgba(255,255,255,.92); }
.hero-dots { display: flex; gap: .45rem; margin-top: 1.2rem; }
.hero-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); padding: 0; cursor: pointer; transition: width .2s, background .2s; }
.hero-dots button.is-active { background: #fff; width: 22px; border-radius: 5px; }

/* ---- sections ---- */
.section-title { font-weight: 800; color: var(--brand); letter-spacing: -.01em; }
.bg-soft { background: var(--bg-soft); }

/* ---- responsive PRODUCT GRID (landing: 6/cat desktop, mobile 2×3) ---- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 768px)  { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .product-grid { grid-template-columns: repeat(6, 1fr); } }
.product-card { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .15s, transform .15s; color: var(--ink); background: #fff; }
.product-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,.08); transform: translateY(-2px); text-decoration: none; }
.product-img { aspect-ratio: 1/1; overflow: hidden; background: #f3f4f6; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: .7rem .8rem .9rem; }
.product-cat { font-size: .68rem; color: var(--gold-ink); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.product-name { font-weight: 600; font-size: .9rem; margin: .15rem 0; line-height: 1.3; }
.product-price { font-weight: 800; color: var(--brand); }

/* ---- product detail ---- */
.breadcrumb-bar { font-size: .85rem; color: var(--muted); }
.breadcrumb-bar a { color: var(--muted); }
.gallery-main { aspect-ratio: 1/1; border-radius: 16px; overflow: hidden; background: #f3f4f6; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: none; }
.thumb.active { border-color: var(--brand); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge-cat { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .2rem .6rem; border-radius: 999px; color: #fff; }
.cat-celebration { background: var(--celebration); } .cat-condolence { background: var(--condolence); }
.product-title { font-weight: 800; font-size: 1.8rem; margin: .5rem 0 .1rem; }
.product-title-kr { color: var(--muted); margin-bottom: .6rem; }
.product-price-lg { font-size: 1.8rem; font-weight: 800; color: var(--brand); margin-bottom: .8rem; }
.product-desc { color: #374151; line-height: 1.7; }
.trust-list { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.trust-list li { padding: .35rem 0 .35rem 1.6rem; position: relative; color: #374151; }
.trust-list li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-2); font-weight: 800; }

/* ---- e-book reading (guide + landing long-read) ---- */
.guide-body, .ebook { max-width: 760px; margin-inline: auto; }
.ebook-wide { max-width: 920px; margin-inline: auto; }
.guide-body h2, .ebook h2 { color: var(--heading); font-weight: 800; margin-top: 2.2rem; font-size: 1.7rem; }
.guide-body h3, .ebook h3 { color: var(--heading); font-weight: 700; margin-top: 1.6rem; font-size: 1.25rem; }
.guide-body p, .ebook p, .guide-body li, .ebook li { line-height: 1.9; color: #374151; }
.guide-body p, .ebook p { margin-bottom: 1rem; }
.guide-body .kr, .ebook .kr { color: var(--gold-ink); font-weight: 600; }
.callout { background: var(--bg-soft); border-left: 4px solid var(--gold); padding: 1rem 1.25rem; border-radius: 0 10px 10px 0; margin: 1.5rem 0; }
.pull-quote { font-size: 1.45rem; line-height: 1.5; font-weight: 700; color: var(--brand); border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold); padding: 1.2rem 0; margin: 2rem 0; text-align: center; }
.chapter-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--gold-ink); }
.divider { height: 1px; background: var(--line); margin: 2.5rem 0; border: 0; }
.term-grid { display: grid; grid-template-columns: 1fr; gap: .5rem; margin: 1rem 0; }
@media (min-width: 640px) { .term-grid { grid-template-columns: 1fr 1fr; } }
.term { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; }
.term b { color: var(--heading); }

/* ---- forms card / steps ---- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; }
.char-count { font-size: .8rem; color: var(--muted); text-align: right; }
.step-num { display: inline-flex; width: 26px; height: 26px; border-radius: 999px; background: var(--brand); color: #fff; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; margin-right: .5rem; }

/* ---- footer (always at bottom, readable light text) ---- */
.site-footer { background: #7a1f45; color: #ffe9f1; margin-top: auto; }
.site-footer strong { color: #fff; }
.site-footer .text-muted { color: rgba(255,255,255,.85); }
.site-footer a { color: #ffe0ec; margin-left: 1rem; font-size: .88rem; display: inline-block; padding-block: .3rem; }
.site-footer a:first-child { margin-left: 0; }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; }

/* ---- CTA band ---- */
.cta-band { background: linear-gradient(160deg, #d6336c, #f06595); color: #fff; border-radius: 18px; padding: 2.5rem 1.5rem; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band .btn { margin-top: 1rem; }

/* ---- mobile hero & footer (placed last so it wins source order over base hero rules) ---- */
@media (max-width: 640px) {
  /* full-bleed hero, but swap to portrait crops made for mobile */
  .hero { min-height: 540px; }
  .hero-overlay { background: linear-gradient(180deg, rgba(106,26,58,.72) 0%, rgba(122,31,69,.6) 100%); }
  .hero-slide:nth-child(1) { background-image: url('/assets/hero/hero-1-m.webp') !important; }
  .hero-slide:nth-child(2) { background-image: url('/assets/hero/hero-2-m.webp') !important; }
  .hero-slide:nth-child(3) { background-image: url('/assets/hero/hero-3-m.webp') !important; }
  /* larger dot tap targets (white dots on the dark hero) */
  .hero-dots { gap: .3rem; }
  .hero-dots button { width: 32px; height: 32px; background: transparent; border-radius: 8px; padding: 0; }
  .hero-dots button::before { content: ""; display: block; width: 9px; height: 9px; margin: 0 auto; border-radius: 50%; background: rgba(255,255,255,.55); transition: background .2s; }
  .hero-dots button.is-active { background: transparent; width: 32px; border-radius: 8px; }
  .hero-dots button.is-active::before { background: #fff; }
  /* footer link tap targets */
  .footer-links { gap: .1rem 1.5rem; }
  .site-footer a { margin-left: 0; padding-block: .5rem; }
}
