/*
Theme Name:   Pungchan Child
Theme URI:    https://pungchan.com
Template:     botiga
Author:       주식회사 어반비오나
Author URI:   https://pungchan.com
Description:  풍찬(PUNGCHAN) — 농수산물 종합몰. Botiga 부모 테마 자식. WP+WC+한국식 주소/체크아웃.
Version:      0.2.0
Text Domain:  pungchan-child
*/

/* ─────────────────────────────────────────────────────────────────
   디자인 토큰 (docs/design.pen v2.3 SSOT — get_variables 추출값과 1:1)
   ─────────────────────────────────────────────────────────────── */
:root{
  --pc-primary:       #8B2E2A;
  --pc-primary-deep:  #6E2421;
  --pc-gold:          #C7A06A;
  --pc-gold-deep:     #A8854E;
  --pc-leaf:          #6B8E5A;
  --pc-bg:            #F5EFE4;
  --pc-cream:         #FBF7EF;
  --pc-white:         #FFFFFF;
  --pc-footer-bg:     #EEE6D5;
  --pc-footer-divider:#DACFB6;
  --pc-text:          #2A2421;
  --pc-text-sub:      #4A4138;
  --pc-text-muted:    #6E665D;
  --pc-footer-text:   #5C5247;
  --pc-border:        #E5DCC9;
  --pc-line:          #EFE7D6;
  --pc-error:         #C0392B;
  --pc-r-btn:   6px;
  --pc-r-card:  10px;
  --pc-r-pill:  999px;
  --pc-container: 1200px;
  --pc-side-pad: 120px; /* design.pen 헤더/푸터 padding */
  --pc-font-base:    "Pretendard Variable", Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --pc-font-display: "Noto Serif KR", serif;
  --pc-font-logo:    "Black Han Sans", "Pretendard Variable", Pretendard, sans-serif;
}

/* ─────────────────────────────────────────────────────────────────
   body·전역
   ─────────────────────────────────────────────────────────────── */
body.pc-site{
  background: var(--pc-white);
  color: var(--pc-text);
  font-family: var(--pc-font-base);
  line-height: 1.5;
  margin: 0;
  padding: 0;
}
body.pc-site a{ color: inherit; text-decoration: none; }
body.pc-site img{ max-width: 100%; height: auto; display: block; }

/* Botiga 부모 헤더·푸터 완전 숨김 — 우리 자식 header.php/footer.php가 대체 */
body.pc-site .site-header,
body.pc-site .site-footer,
body.pc-site #masthead.site-header,
body.pc-site #colophon.site-footer{ display:none !important; }

/* ─────────────────────────────────────────────────────────────────
   HEADER 3-tier (utility bar 32 / logo row 88 / category strip 99)
   design.pen ▸ home-screen ▸ EktWN
   ─────────────────────────────────────────────────────────────── */
.pc-header{
  background: var(--pc-white);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* tier 1 utility bar */
/* 공용 1200 wrap — BG 풀폭 / 내용 1200 center (사용자 2026-05-28 룰) */
.pc-wrap{
  width: 100%;
  max-width: var(--pc-container);
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.pc-utility{
  background: var(--pc-cream);
  border-bottom: 1px solid var(--pc-line);
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0;
}
.pc-utility__inner{
  display: flex;
  align-items: center;
  height: 100%;
}
.pc-utility__left{
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--pc-text-muted);
  font-size: 12px;
}
.pc-utility__leaf{ width: 14px !important; height: 14px !important; display: inline-block; vertical-align: middle; flex: 0 0 14px; }

/* tier 2 logo row — BG 풀폭 / 내용 1200 center */
.pc-logorow{
  display: flex;
  align-items: center;
  height: 88px;
  padding: 0;
  background: var(--pc-white);
}
.pc-logorow__inner{
  display: flex;
  align-items: center;
  gap: 48px;
  height: 100%;
}
/* 헤더 로고 — design.pen ▸ home-screen ▸ zJltv 추출 PNG */
.pc-logobox{
  display: flex;
  align-items: center;
  text-decoration: none;
}
.pc-logobox__img{
  height: 66px !important;
  width: auto !important;
  display: block;
}
@media (max-width: 540px){
  .pc-logobox__img{ height: 48px !important; }
}

.pc-menus{
  display: flex;
  align-items: center;
  gap: 30px;
}
.pc-menus__item{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--pc-text);
  padding: 4px 0;
  position: relative;
}
.pc-menus__item.is-active{
  color: var(--pc-primary);
  font-weight: 700;
}
.pc-menus__item.is-active::after{
  content:'';
  position:absolute;
  bottom: -4px;
  width: 24px;
  height: 2px;
  background: var(--pc-primary);
}

.pc-right{
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: flex-end;
  margin-left: auto;
}
.pc-auth{
  display: flex;
  align-items: center;
  gap: 18px;
}
.pc-auth__a{
  font-size: 11px;
  font-weight: 500;
  color: var(--pc-text-muted);
}
/* 검색 pill — design.pen ▸ search (eYevR) 충실 재현
 * ★ 함정 (사이트 마다 재발):
 *   - WC/Botiga 기본 input 룰 + UA 기본 input BG=white 때문에 pill cream 안에 흰 input 가 박힘
 *   - base.css `.pc-site input` 가 border 1.5px 박는 룰 적용 → 디자인엔 border 없음
 *   - 해결: pill 컨테이너에 BG 두고, input 자체는 transparent + border 0 강제
 *   - 모든 룰을 높은 specificity + !important 로 닫아야 base.css·Botiga·UA 모두 이김
 */
.pc-search{
  display: flex;
  align-items: center;
  background: var(--pc-cream) !important;
  border-radius: var(--pc-r-pill);
  height: 42px;
  width: 340px;
  padding: 0 6px 0 18px;
  justify-content: space-between;
  box-sizing: border-box;
}
.pc-header .pc-search .pc-search__input,
.pc-site .pc-search .pc-search__input{
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  flex: 1 1 auto;
  font-size: 13px;
  color: var(--pc-text);
  outline: none;
  padding: 0 !important;
  margin: 0 !important;
  height: 30px;
  line-height: 30px;
  min-width: 0;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.pc-search__input::placeholder{ color: var(--pc-text-muted); opacity: 1; }
.pc-search__btn{
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--pc-primary);
  color: var(--pc-white);
  display: flex; align-items:center; justify-content:center;
  border: 0;
  cursor: pointer;
  flex: 0 0 30px;
  padding: 0;
}
.pc-search__btn-icon{ width: 14px !important; height: 14px !important; }

.pc-icons{
  display: flex;
  align-items: center;
  gap: 16px;
}
.pc-icons__a{
  width: 44px;
  display:flex; flex-direction:column; align-items:center; gap:3px;
  position: relative;
  color: var(--pc-text);
}
.pc-icons__svg{ width: 22px !important; height: 22px !important; }
.pc-icons__label{ font-size: 10px; color: var(--pc-text-sub); font-weight: 500; }
.pc-icons__count{
  position: absolute;
  top:-2px; right:6px;
  background: var(--pc-primary);
  color: var(--pc-white);
  border-radius: var(--pc-r-pill);
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  display:flex; align-items:center; justify-content:center;
  padding: 0 4px;
}

/* tier 3 category strip — 11개. BG 풀폭 / 내용 1200 center */
.pc-cats{
  background: var(--pc-white);
  border-top: 1px solid var(--pc-line);
  border-bottom: 1px solid var(--pc-line);
  padding: 14px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.pc-cats__inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pc-cats__a{
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding: 2px 4px;
}
.pc-cats__circle{
  width: 44px; height: 44px;
  border-radius: var(--pc-r-pill);
  display:flex; align-items:center; justify-content:center;
  flex: 0 0 44px;
}
.pc-cats__icon{ width: 22px !important; height: 22px !important; }
.pc-cats__label{
  font-size: 12px;
  font-weight: 500;
  color: var(--pc-text);
}
/* 카테고리별 칩 배경색 — design.pen 추출값 */
.pc-cats__circle--all           { background:#EEE6D5; }
.pc-cats__circle--rice-grain    { background:#F5EFE4; }
.pc-cats__circle--fruit         { background:#FBE9E2; }
.pc-cats__circle--vegetable     { background:#E7EFD9; }
.pc-cats__circle--meat          { background:#F4E6D4; }
.pc-cats__circle--seafood       { background:#E0E8EE; }
.pc-cats__circle--honey-extract { background:#FBF1D6; }
.pc-cats__circle--processed     { background:#F0EAE0; }
.pc-cats__circle--kimchi-sauce  { background:#FCE5E0; }
.pc-cats__circle--snack         { background:#F5E6CC; }
.pc-cats__circle--liquor        { background:#EADAE5; }
.pc-cats__circle--gift-set      { background:#F8DDD8; }

/* ─────────────────────────────────────────────────────────────────
   FOOTER (베이지 #EEE6D5)
   design.pen ▸ home-screen ▸ f1tkq
   ─────────────────────────────────────────────────────────────── */
.pc-footer{
  background: var(--pc-footer-bg);
  color: var(--pc-footer-text);
  font-family: var(--pc-font-base);
}
.pc-footer__main{
  display: flex;
  gap: 80px;
  padding: 56px var(--pc-side-pad) 40px;
}
.pc-footer__brand{ flex: 1 1 auto; display:flex; flex-direction:column; gap:18px; }
/* 푸터 로고 — design.pen ▸ home-screen ▸ TdAm2 추출 PNG */
.pc-footer__logo{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.pc-footer__logo-img{
  height: 56px !important;
  width: auto !important;
  display: block;
}
.pc-footer__company{
  display:flex; flex-direction:column; gap:6px;
  padding-top: 8px;
}
.pc-footer__company p{
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  color: var(--pc-footer-text);
}
.pc-footer__hours{
  width: 320px;
  display:flex; flex-direction:column; gap:12px;
}
.pc-footer__hours h4{
  font-family: var(--pc-font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--pc-text);
  margin: 0;
}
.pc-footer__hours ul{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:5px; }
.pc-footer__hours li{
  font-size: 12px;
  line-height: 1.7;
  color: var(--pc-footer-text);
}

.pc-footer__divider{
  height: 1px;
  background: var(--pc-footer-divider);
}
.pc-footer__bottom{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--pc-side-pad) 28px;
}
.pc-footer__cp{
  font-size: 11px;
  font-weight: 500;
  color: var(--pc-footer-text);
}
.pc-footer__links{
  display:flex; align-items:center; gap:20px;
}
.pc-footer__links a{
  font-size: 11px;
  font-weight: 600;
  color: var(--pc-text-sub);
}

/* ─────────────────────────────────────────────────────────────────
   모바일 (≤768)
   ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px){
  :root{ --pc-side-pad: 24px; }
  .pc-auth{ display:none; }

  /* 로고행 재배치: [로고 … 아이콘] / [검색 풀폭] / [프로모 메뉴 스크롤]
     기존 flex 한 줄 cram → 로고가 0폭으로 뭉개지던(찌그러짐) 트랩 해소. */
  .pc-logorow{ height: auto; padding: 10px 0; }
  .pc-logorow__inner{
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "logo . icons"
      "search search search"
      "menus menus menus";
    align-items: center;
    gap: 10px 12px;
  }
  .pc-logobox{ grid-area: logo; flex: 0 0 auto; }
  .pc-logobox__img{ height: 52px !important; width: auto !important; }
  /* .pc-right 박스를 해제해 자식(검색·아이콘)을 그리드에 직접 배치 */
  .pc-right{ display: contents; }
  .pc-icons{ grid-area: icons; justify-self: end; gap: 14px; margin-left: 0; }
  .pc-search{ grid-area: search; width: 100% !important; height: 44px; }

  /* 프로모 메뉴 — 가로 스크롤 한 줄로 명확히 배치 (이전엔 숨겨져 접근 불가) */
  .pc-menus{
    grid-area: menus;
    display: flex !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 22px;
    padding: 2px 0;
    scrollbar-width: none;
  }
  .pc-menus::-webkit-scrollbar{ display: none; }
  .pc-menus__item{ flex: 0 0 auto; flex-direction: row; font-size: 14px; white-space: nowrap; padding: 2px 0; gap: 0; }
  .pc-menus__item.is-active::after{ bottom: -2px; }

  /* 헤더·카테고리 좌측 라인을 16px 로 통일 (BEST 메뉴와 카테고리 세로 정렬) */
  .pc-wrap{ padding: 0 16px; }
  .pc-cats{ overflow-x: auto; flex-wrap: nowrap; gap: 14px; padding: 12px 16px; justify-content: flex-start; }
  .pc-cats__inner{ padding-left: 0; padding-right: 0; }
  .pc-cats__a{ flex: 0 0 auto; }
  .pc-footer__main{ flex-direction: column; gap: 32px; padding: 40px 24px 24px; }
  .pc-footer__hours{ width: 100%; }
  .pc-footer__bottom{ flex-direction: column; gap: 12px; align-items: flex-start; padding: 16px 24px 24px; }
}
@media (max-width: 540px){
  .pc-logobox__img{ height: 46px !important; }
  /* .pc-wrap padding 은 ≤1024 블록에서 16px 로 통일 — 여기서 재선언하면
     뒤 순서로 .pc-cats__inner padding:0 리셋을 덮어써 카테고리 정렬이 깨짐. */
}
