/* ============================================================
   광주약국 동물약국 — 브랜드 스타일
   포스터 기준 토큰: 크림 배경, 블롭 도형, 둥근 제목 서체
   ============================================================ */
:root {
  --cream: #F6EFE3;
  --paper: #FFFDF8;
  --sand: #E9D5BE;
  --peach: #EFC09A;
  --apricot: #E8A96F;
  --ink: #463C2D;
  --ink-soft: #6E6353;
  --olive: #9BA174;
  --olive-deep: #71774E;
  --badge: #57503F;
  --kakao: #FAE100;
  --radius: 22px;
  --display: 'Jua', sans-serif;
  --body: 'Noto Sans KR', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.75;
  font-size: 16px;
}

a { color: var(--olive-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--apricot); outline-offset: 2px; border-radius: 4px; }

/* ---------- 상단바 ---------- */
.site-header { position: sticky; top: 0; z-index: 30; }

/* ---------- 운영시간 안내 띠 ---------- */
.hours-strip {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 4px 12px;
  background: var(--paper);
  border-bottom: 1px solid rgba(70, 60, 45, .08);
  padding: 6px clamp(16px, 4vw, 40px);
  font-size: .82rem; color: var(--ink-soft);
  text-align: center;
}
.hours-strip-info { font-weight: 500; }
.hours-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; padding: 2px 11px; border-radius: 999px;
  white-space: nowrap;
}
.hours-status .hours-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.hours-status.is-open { color: #2F6B2F; background: rgba(155, 161, 116, .22); }
.hours-status.is-open .hours-dot {
  background: #3FAE3F; box-shadow: 0 0 0 3px rgba(63, 174, 63, .18);
}
.hours-status.is-closed { color: var(--ink-soft); background: rgba(70, 60, 45, .08); }
.hours-status.is-closed .hours-dot { background: #B0A48F; }
@media (max-width: 420px) {
  .hours-strip { font-size: .76rem; gap: 3px 8px; padding: 5px 12px; }
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: var(--cream);
  border-bottom: 1px solid rgba(70, 60, 45, .08);
}
.search-bar {
  background: var(--cream);
  padding: 10px clamp(16px, 4vw, 40px) 12px;
  border-bottom: 1px solid rgba(70, 60, 45, .08);
}
.brand {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.brand-dot {
  width: 14px; height: 14px; background: var(--olive);
  border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
}
.topbar nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.topbar nav a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .95rem; }
.nav-kakao {
  background: var(--kakao); color: #3A2929 !important;
  padding: 6px 14px; border-radius: 999px; font-weight: 700;
}

/* ---------- 히어로 (포스터 재현) ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 110px) 20px 64px; text-align: center; }
.hero-blob {
  position: absolute; border-radius: 58% 42% 55% 45% / 45% 58% 42% 55%;
  z-index: 0; pointer-events: none;
}
.hero-blob-a { width: 320px; height: 260px; background: var(--sand); top: -90px; right: -70px; }
.hero-blob-b { width: 230px; height: 200px; background: var(--peach); bottom: -80px; left: -60px; opacity: .8; }
.hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.hero-eyebrow { font-weight: 700; font-size: clamp(1rem, 2.6vw, 1.3rem); margin: 0 0 18px; }
.hero-title {
  font-family: var(--display);
  font-size: clamp(3.4rem, 12vw, 6.2rem);
  margin: 0; line-height: 1.15; letter-spacing: -0.01em;
  padding-top: 0.12em;
}
.hero-title span { color: var(--olive); }
.hero-pill {
  display: inline-block; background: var(--badge); color: var(--cream);
  font-weight: 700; font-size: clamp(.95rem, 2.4vw, 1.15rem);
  padding: 10px 26px; border-radius: 999px; margin: 18px 0 10px;
}
.hero-sub { color: var(--ink-soft); max-width: 520px; margin: 10px auto 0; }
.hero-notice {
  display: inline-block; margin-top: 18px;
  background: var(--paper); border: 1.5px dashed var(--apricot);
  padding: 8px 18px; border-radius: 14px; font-size: .92rem; font-weight: 500;
}

/* ---------- 공통 레이아웃 ---------- */
.container { max-width: 860px; margin: 0 auto; padding: 24px 20px 80px; }

.cat { margin-top: 48px; }
.cat-title {
  font-family: var(--display); font-size: 1.7rem; margin: 0 0 18px;
  display: flex; align-items: center; gap: 10px;
}
.cat-title::before {
  content: ""; width: 18px; height: 18px; background: var(--peach);
  border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--paper); border-radius: var(--radius);
  padding: 20px 20px 18px; text-decoration: none; color: var(--ink);
  border: 1px solid rgba(70, 60, 45, .07);
  box-shadow: 0 2px 0 rgba(70, 60, 45, .05);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column; gap: 6px;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(70, 60, 45, .12); }
.card h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.25rem; }
.card-animal {
  margin: 0; font-size: .78rem; font-weight: 700; color: var(--olive-deep);
  background: rgba(155, 161, 116, .16); align-self: flex-start;
  padding: 2px 10px; border-radius: 999px;
}
.card-summary { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.card-meta { margin: 0; font-size: .8rem; color: var(--ink-soft); opacity: .85; }
.card-more { margin-top: auto; font-size: .85rem; font-weight: 700; color: var(--olive-deep); }

.ask {
  margin-top: 64px; text-align: center; background: var(--sand);
  border-radius: 28px; padding: 36px 24px;
}
.ask h2 { font-family: var(--display); font-weight: 400; margin: 0 0 8px; }
.ask p { margin: 0 0 18px; color: var(--ink-soft); }
.btn-kakao {
  display: inline-block; background: var(--kakao); color: #3A2929;
  font-weight: 700; text-decoration: none; padding: 12px 26px; border-radius: 999px;
}

/* ---------- 약 상세 ---------- */
.crumbs { font-size: .85rem; color: var(--ink-soft); margin: 8px 0 26px; }
.crumbs a { color: var(--ink-soft); }

.article-head { margin-bottom: 26px; }
.article-animal {
  display: inline-block; margin: 0 0 10px; font-size: .82rem; font-weight: 700;
  color: var(--olive-deep); background: rgba(155, 161, 116, .16);
  padding: 3px 12px; border-radius: 999px;
}
.article-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 6vw, 2.8rem); margin: 0 0 8px; line-height: 1.2; }
.article-summary { font-size: 1.12rem; color: var(--ink-soft); margin: 0 0 10px; }
.article-dates { font-size: .82rem; color: var(--ink-soft); opacity: .8; margin: 0; }

.facts {
  background: var(--paper); border-radius: var(--radius);
  border: 1px solid rgba(70, 60, 45, .08); padding: 22px 24px; margin-bottom: 34px;
}
.facts-title { font-family: var(--display); font-weight: 400; font-size: 1.15rem; margin: 0 0 12px; }
.facts dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 22px; }
.facts dl > div { display: flex; gap: 10px; align-items: baseline; }
.facts dt { font-weight: 700; font-size: .85rem; color: var(--olive-deep); white-space: nowrap; }
.facts dd { margin: 0; font-size: .93rem; }

.body h2 {
  font-family: var(--display); font-weight: 400; font-size: 1.45rem;
  margin: 40px 0 12px; display: flex; align-items: center; gap: 9px;
}
.body h2::before {
  content: ""; width: 13px; height: 13px; background: var(--apricot);
  border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%; flex: none;
}
.body h3 { font-size: 1.05rem; margin: 24px 0 8px; }
.body p, .body li { color: #51483A; }
.body table { border-collapse: collapse; width: 100%; margin: 14px 0; background: var(--paper); border-radius: 12px; overflow: hidden; font-size: .92rem; }
.body th, .body td { border: 1px solid rgba(70, 60, 45, .12); padding: 9px 12px; text-align: left; }
.body th { background: var(--sand); font-weight: 700; }
.body strong { color: var(--ink); }

/* ---------- 체중별 투여량 표 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 14px 0; }
.table-wrap > table { margin: 0; }
.body .dose-table th, .body .dose-table td { text-align: center; white-space: nowrap; }
.body .dose-table th:first-child, .body .dose-table td:first-child {
  text-align: left; font-weight: 600;
}
.body .dose-table .dose-dash { color: var(--ink-soft); opacity: .5; }
.body .dose-table .dose-on { font-weight: 700; color: var(--olive-deep); }
.body .dose-table-vial td:last-child { text-align: left; white-space: normal; }
.dose-note { font-size: .88rem; color: var(--ink-soft); margin: 12px 0 6px; line-height: 1.55; }

.faq { margin-top: 48px; }
.faq h2, .buy h2, .related h2 { font-family: var(--display); font-weight: 400; font-size: 1.45rem; margin: 0 0 14px; }
.faq details {
  background: var(--paper); border-radius: 16px; padding: 4px 18px;
  border: 1px solid rgba(70, 60, 45, .08); margin-bottom: 10px;
}
.faq summary { font-weight: 700; cursor: pointer; padding: 10px 0; }
.faq details p { margin: 4px 0 14px; color: #51483A; }

.buy { margin-top: 48px; background: var(--sand); border-radius: 24px; padding: 26px 26px 28px; }
.buy p { margin: 6px 0 12px; }

.related { margin-top: 48px; }
.sources { margin-top: 44px; font-size: .8rem; color: var(--ink-soft); opacity: .85; border-top: 1px dashed rgba(70, 60, 45, .2); padding-top: 16px; }

/* ---------- 푸터 ---------- */
.footer { background: var(--badge); color: #EFE8DA; margin-top: 40px; }
.footer a { color: #F4DCB8; }
.footer-inner { max-width: 860px; margin: 0 auto; padding: 40px 20px 48px; }
.footer-title { font-family: var(--display); font-size: 1.3rem; margin: 0 0 8px; }
.footer-notice { font-weight: 700; }
.footer-legal { font-size: .78rem; opacity: .75; line-height: 1.7; }

@media (max-width: 560px) {
  .topbar nav a:not(.nav-kakao) { display: none; }
  .facts dl { grid-template-columns: 1fr; }
}

/* ---------- 검색 ---------- */
.search { position: relative; width: 100%; max-width: 560px; margin: 0 auto; text-align: left; }
.search input {
  width: 100%; padding: 14px 20px; font: inherit; font-size: 1rem;
  border: 2px solid var(--badge); border-radius: 999px;
  background: var(--paper); color: var(--ink); outline: none;
}
.search input:focus { border-color: var(--olive-deep); box-shadow: 0 0 0 4px rgba(155,161,116,.25); }
#search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20;
  margin: 0; padding: 8px; list-style: none;
  background: var(--paper); border-radius: 18px;
  border: 1px solid rgba(70,60,45,.12); box-shadow: 0 14px 34px rgba(70,60,45,.18);
  max-height: 320px; overflow-y: auto;
}
#search-results li a, #search-results li > div {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; border-radius: 12px; text-decoration: none; color: var(--ink);
}
#search-results li a:hover { background: var(--cream); }
#search-results li span { font-size: .8rem; color: var(--ink-soft); }
#search-results mark { background: #f6e6b3; color: var(--ink); border-radius: 4px; padding: 0 2px; font-weight: 700; }
.sr-none { padding: 12px 14px; font-size: .9rem; color: var(--ink-soft); }

/* ---------- 약국 소개 ---------- */
.about { margin-top: 72px; }
.about-photo { margin: 0 0 20px; }
.about-photo img {
  width: 100%; height: auto; display: block;
  border-radius: 26px; border: 1px solid rgba(70,60,45,.1);
  box-shadow: 0 10px 30px rgba(70,60,45,.12);
}
.about-lead { text-align: center; font-size: 1.08rem; line-height: 2; }

.onnuri {
  margin: 28px auto 0; max-width: 560px; text-align: center;
  background: var(--paper); border-radius: 24px; padding: 28px 24px;
  border: 1px solid rgba(70,60,45,.08); box-shadow: 0 2px 0 rgba(70,60,45,.05);
}
.onnuri-quote { font-weight: 700; margin: 0 0 10px; color: var(--ink-soft); }
.onnuri-deal { font-family: var(--display); font-size: 1.6rem; margin: 0 0 10px; }
.onnuri-deal strong { color: #E0622E; font-weight: 400; }
.onnuri-link { font-size: .9rem; font-weight: 700; }

.address {
  margin: 28px auto 0; max-width: 560px; text-align: center;
  background: var(--sand); border-radius: 24px; padding: 24px;
}
.address h3 { font-family: var(--display); font-weight: 400; font-size: 1.2rem; margin: 0 0 8px; }
.address p { margin: 4px 0; }
.address-maps { font-weight: 700; }

/* ---------- 가이드 ---------- */
.guide-banner-wrap { margin-top: 36px; }
.guide-banner {
  display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(120deg, var(--badge), #6E6450);
  color: var(--cream); text-decoration: none;
  border-radius: 24px; padding: 24px 28px;
  box-shadow: 0 8px 24px rgba(70,60,45,.18);
  transition: transform .15s ease;
  margin-bottom: 18px;
}
.guide-banner:hover { transform: translateY(-3px); }
.guide-banner-tag {
  align-self: flex-start; font-size: .75rem; font-weight: 700;
  background: rgba(246,239,227,.18); padding: 3px 12px; border-radius: 999px;
}
.guide-banner strong { font-family: var(--display); font-weight: 400; font-size: 1.3rem; line-height: 1.4; }
.guide-banner-sub { font-size: .88rem; opacity: .85; }
.guide-inline {
  background: var(--paper); border: 1.5px dashed var(--olive);
  border-radius: 16px; padding: 12px 18px; font-size: .95rem; margin: 0 0 28px;
}

/* ---------- 제품 사진 ---------- */
.drug-photo { margin: 0 0 28px; }
.drug-photo img {
  width: 100%; max-width: 480px; height: auto; display: block;
  border-radius: 20px; border: 1px solid rgba(70,60,45,.1);
  box-shadow: 0 6px 20px rgba(70,60,45,.1);
}

/* ---------- 주문 가능(도매 주문) 품목 ---------- */
.order-banner {
  background: var(--paper);
  border: 1.5px dashed var(--apricot);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 22px;
}
.order-banner-tag {
  display: inline-block;
  background: var(--apricot);
  color: #3A2929;
  font-family: var(--display);
  font-size: .95rem;
  padding: 3px 12px;
  border-radius: 999px;
  margin: 0 0 8px;
}
.order-banner p { margin: 0 0 12px; color: var(--ink-soft); line-height: 1.7; }
.order-banner .btn-kakao { margin: 0; }

.orderable-intro {
  background: var(--paper);
  border: 1.5px solid var(--sand);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.orderable-intro-text {
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: 680px;
  margin: 0 0 16px;
}
.cat-badge {
  display: inline-block;
  vertical-align: middle;
  background: var(--apricot);
  color: #3A2929;
  font-family: var(--body);
  font-weight: 700;
  font-size: .75rem;
  padding: 2px 10px;
  border-radius: 999px;
  margin-left: 6px;
}

/* ── 고정 카톡 문의 버튼 (방문 전환 장치) ── */
.floating-kakao {
  position: fixed;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FEE500;
  color: #3C1E1E;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
  transition: transform .15s, box-shadow .15s;
  /* 데스크톱: 우측 하단에 떠 있는 알약 버튼 */
  right: 24px;
  bottom: 24px;
  padding: 13px 22px;
  font-size: 1rem;
}
.floating-kakao:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
}
.floating-kakao-icon { font-size: 1.15rem; line-height: 1; }
.floating-kakao-body { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.18; }
.floating-kakao-text { font-weight: 700; }
.floating-kakao-status {
  font-weight: 600; font-size: .72rem; margin-top: 1px;
}
.floating-kakao-status:empty { display: none; }
.floating-kakao-status.is-open { color: #1F6B1F; }
.floating-kakao-status.is-open::before {
  content: ""; display: inline-block; vertical-align: middle;
  width: 7px; height: 7px; border-radius: 50%; margin-right: 5px;
  background: #2Fae2F; box-shadow: 0 0 0 2px rgba(47, 174, 47, .22);
}
.floating-kakao-status.is-closed { color: #6B4A2E; opacity: .92; }

/* 모바일: 화면 하단 가로 전체 바 형태 (엄지로 누르기 쉬운 위치) */
@media (max-width: 560px) {
  .floating-kakao {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-content: center;
    padding: 15px 18px;
    font-size: 1.05rem;
    border-radius: 16px;
  }
  .floating-kakao-body { align-items: center; text-align: center; }
  /* 버튼이 푸터 마지막 내용을 가리지 않도록 여백 확보 */
  .footer { padding-bottom: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  .floating-kakao { transition: none; }
  .floating-kakao:hover { transform: none; }
}

/* ── 주문 가능 약 블록 접기 (전체 보기) ── */
.order-wrap {
  border: 1px dashed rgba(70,60,45,.2); border-radius: 24px;
  padding: 20px 18px 18px; background: rgba(246,239,227,.35);
  margin-bottom: 30px;
}
.order-wrap .orderable-intro { margin-bottom: 18px; }
.order-wrap .cat { margin-bottom: 18px; }
.order-rest { margin-top: 4px; }
.btn-expand {
  margin-top: 6px; width: 100%;
  background: var(--paper); color: var(--ink);
  border: 1px solid rgba(70,60,45,.15); border-radius: 14px;
  padding: 12px 18px; font: inherit; font-weight: 700; cursor: pointer;
  transition: background .15s;
}
.btn-expand:hover { background: var(--sand); }

/* ---------- 블로그 글 본문 ---------- */
.body blockquote {
  margin: 18px 0; padding: 14px 20px;
  background: var(--paper); border-left: 4px solid var(--olive);
  border-radius: 0 12px 12px 0; color: var(--ink-soft);
}
.body blockquote p { margin: 0; }
.body figure { margin: 20px 0; text-align: center; }
.body figure img { max-width: 100%; height: auto; border-radius: 14px; }
.body figcaption { font-size: .82rem; color: var(--ink-soft); margin-top: 8px; }
.blog-date { font-size: .82rem; color: var(--ink-soft); }
.blog-origin { font-size: .82rem; color: var(--ink-soft); opacity: .8; margin-top: 24px; }
