/* ============================================================
   layout.css
   모든 페이지에 공통으로 씌워지는 뼈대(header, gnb, 전체메뉴,
   footer, 맨위로 버튼, 서브페이지 공통 래퍼)만 담당한다.
   특정 페이지 콘텐츠(게시판/갤러리/히어로 등)는 넣지 않는다.
   ============================================================ */

/* ===== Header (스크롤 시 상단 고정) =====
   주의: 반드시 .site-header 클래스로만 선택할 것 — bare `header` 태그 셀렉터를 쓰면
   그누보드 게시판/컨텐츠 스킨들이 자체적으로 쓰는 <header>(예: skin/board/basic/view.skin.php의
   <article id="bo_v"><header><h2 id="bo_v_title">...)까지 같이 걸려서 그 글제목이 화면 상단에
   position:fixed로 떠버리는 버그가 생긴다 (실제로 한번 겪음). */
.site-header{border-bottom:1px solid var(--line);position:fixed;top:0;left:0;right:0;z-index:30;background:var(--paper);transition:background .3s ease,border-color .3s ease,box-shadow .3s ease;}
.site-header.scrolled{box-shadow:0 4px 18px rgba(20,40,25,.1);}
body{padding-top:100px;}

/* 서브페이지 히어로 위에 얹히는 투명 헤더 (스크롤 전) — body.has-hero + .site-header.on-hero 조합으로 사용 */
body.has-hero{padding-top:0;}
.site-header.on-hero{background:transparent;border-bottom-color:transparent;}
.site-header.on-hero .logo-mark{filter:brightness(0) invert(1);}
.site-header.on-hero .nav-item>a{color:#fff;}
.site-header.on-hero:not(.scrolled) .nav-item:hover>a{color:#cfe6ff;}
.site-header.on-hero .allmenu-btn span{background:#fff;}
.site-header.on-hero.scrolled{background:var(--paper);border-bottom-color:var(--line);}
.site-header.on-hero.scrolled .logo-mark{filter:none;}
.site-header.on-hero.scrolled .nav-item>a{color:var(--ink);}
.site-header.on-hero.scrolled .nav-item:hover>a{color:#1480e2;}
.site-header.on-hero.scrolled .allmenu-btn span{background:var(--ink);}
.header-inner{width:100%;max-width:none;margin:0;min-height:100px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,4vw,60px);transition:padding .3s ease;}
.site-header.scrolled .header-inner{padding:0 clamp(20px,4vw,60px);}
.logo{display:flex;align-items:center;gap:12px;}
.logo-mark{height:47px;width:auto;flex:none;object-fit:contain;transition:height .3s ease;}
.site-header.scrolled .logo-mark{height:47px;}
.logo-text{line-height:1.25;}
.logo-text .en{display:block;font-size:12px;letter-spacing:.14em;color:var(--ink-faint);margin-bottom:2px;}
.logo-text .kr{display:block;font-size:22px;font-weight:700;color:var(--green-900);letter-spacing:-.01em;}

.navbar{display:flex;align-items:stretch;gap:2px;}
.nav-item{position:relative;}
.nav-item>a{position:relative;display:flex;align-items:center;height:auto;padding:10px 20px;font-size:17.5px;font-weight:700;color:var(--ink);letter-spacing:-.01em;transition:color .25s ease;}
.nav-item:hover>a, .nav-item.open>a{color:#1480e2;}
.nav-item .sub{
  position:absolute;top:100%;left:50%;transform:translateX(-50%);
  min-width:176px;background:#3c8ed8;border:none;
  border-radius:16px;padding:8px;
  box-shadow:0 18px 34px rgba(15,45,74,.24);
  opacity:0;visibility:hidden;transform:translate(-50%,6px);transition:opacity .18s ease,transform .18s ease;
  z-index:40;
}
.nav-item:hover .sub, .nav-item.open .sub{opacity:1;visibility:visible;transform:translate(-50%,0);}
.sub a{display:block;padding:12px 22px;font-size:16px;font-weight:600;color:#fff;border-radius:0;white-space:nowrap;text-align:left;border-top:1px solid rgba(255,255,255,.2);transition:background .15s ease,border-color .15s ease;}
.sub a:first-child{border-top:none;}
.sub a:hover{background:#0d74d0;border-top-color:transparent;border-radius:10px;}
.sub a:hover + a{border-top-color:transparent;}

.header-right{display:flex;align-items:center;gap:10px;}
.head-icons{display:flex;align-items:center;gap:20px;color:var(--ink);}
.head-icon-item{position:relative;display:flex;align-items:center;}
.head-icon-item>a{display:flex;align-items:center;padding:8px;color:inherit;}
.head-icons svg{width:23px;height:23px;stroke:currentColor;transition:color .3s ease;}
.cart-count{position:absolute;top:1px;right:0;width:16px;height:16px;border-radius:50%;background:#92795f;color:#fff;font-size:10px;line-height:16px;text-align:center;}
.site-header.on-hero .head-icons{color:#fff;}
.site-header.on-hero.scrolled .head-icons{color:var(--ink);}
.allmenu-btn{
  width:44px;height:44px;border-radius:0;background:transparent;border:none;
  display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:6px;flex:none;padding:0;
}
.allmenu-btn span{display:block;height:3px;background:var(--ink);border-radius:2px;transition:width .3s cubic-bezier(.4,0,.2,1);}
.allmenu-btn span:nth-child(1){width:28px;}
.allmenu-btn span:nth-child(2){width:34px;}
.allmenu-btn span:nth-child(3){width:22px;}
.allmenu-btn:hover span:nth-child(1){width:20px;}
.allmenu-btn:hover span:nth-child(2){width:34px;}
.allmenu-btn:hover span:nth-child(3){width:34px;}

/* ===== All-menu overlay ===== */
.allmenu-panel{
  position:absolute;top:100%;left:0;right:0;background:#fff;border-bottom:1px solid var(--line);
  box-shadow:0 20px 30px rgba(20,40,25,.10);
  opacity:0;visibility:hidden;transform:translateY(-10px);pointer-events:none;
  transition:opacity .25s ease,transform .25s ease;z-index:50;
}
.allmenu-panel.show{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto;}
.allmenu-grid{max-width:1400px;margin:0 auto;display:grid;grid-template-columns:repeat(5,1fr);gap:22px;padding:36px 0 44px;}
.allmenu-col{padding:0 8px;}
/* 탭(h4)은 원래 고유색 그대로 유지(요청 — "탭색은 원래색을 유지해야해"), 서브메뉴만
   기본 연한 회색이었다가 오버시에만 그 탭의 고유색 + 흰 글자로 바뀐다. 글씨는 1단계 키움. */
.allmenu-col h4{margin:0 0 16px;padding:13px 0;font-size:17px;font-weight:700;color:#fff;text-align:center;border-radius:10px;}
.allmenu-col h4 a{display:block;color:inherit;}
.allmenu-col:nth-child(1) h4{background:#5b9bd5;}
.allmenu-col:nth-child(2) h4{background:#8bc15c;}
.allmenu-col:nth-child(3) h4{background:#e8a55e;}
.allmenu-col:nth-child(4) h4{background:#f17fb0;}
.allmenu-col:nth-child(5) h4{background:#9b72b0;}
.allmenu-col:nth-child(1) li a:hover{background:#5b9bd5;}
.allmenu-col:nth-child(2) li a:hover{background:#8bc15c;}
.allmenu-col:nth-child(3) li a:hover{background:#e8a55e;}
.allmenu-col:nth-child(4) li a:hover{background:#f17fb0;}
.allmenu-col:nth-child(5) li a:hover{background:#9b72b0;}
.allmenu-col ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;}
.allmenu-col li a{
  display:block;padding:10px 14px;font-size:16px;color:#666;border-radius:8px;
  background:#f4f4f4;transition:background .15s ease,color .15s ease;
}
.allmenu-col li a:hover{color:#fff;}
.allmenu-close{position:absolute;top:12px;right:26px;width:54px;height:54px;border:none;background:transparent;color:var(--ink-faint);font-size:40px;line-height:1;}
.allmenu-close:hover{color:var(--ink);}
.gnb_empty{padding:0 26px;display:flex;align-items:center;height:78px;font-size:14px;color:var(--ink-faint);}
.gnb_empty a{color:var(--sky-600);text-decoration:underline;}

/* ===== 서브페이지 공통 래퍼 (헤더 바로 아래, 푸터 바로 위) ===== */
.page-wrap{max-width:1280px;margin:0 auto;padding:20px 24px 100px;min-height:40vh;}
.page-title{font-size:30px;font-weight:800;color:var(--green-900);margin:0 0 36px;}

/* ===== 서브페이지 히어로 배너 (헤더와 한 배경으로 합쳐진 풀블리드) =====
   시안 검토용: design/sub_intro.html 참고. 승인되면 head.php에 실제 연동.
   body.has-hero + header.on-hero 와 함께 사용 (헤더가 이 배경 위에 투명하게 얹힘). */
.sub-hero{position:relative;width:100%;min-height:350px;overflow:hidden;background:#0f2d4a;}
.sub-hero img{position:absolute;inset:0;z-index:0;width:100%;height:100%;object-fit:cover;transform:scale(1);animation:gakkumHeroZoom 14s ease-out forwards;}
.sub-hero::before{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(9,20,32,.32) 0%,rgba(9,20,32,.18) 38%,rgba(9,20,32,.4) 100%);}
.sub-hero-text{position:relative;z-index:2;max-width:1400px;margin:0 auto;height:100%;min-height:350px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff;transform:translateY(-15px);}
.sub-hero-eyebrow{display:block;font-size:30px;font-weight:800;letter-spacing:.1em;color:rgba(255,255,255,.5);text-transform:uppercase;margin-bottom:-6px;opacity:0;animation:gakkumDropIn .8s cubic-bezier(.34,1.56,.64,1) .15s forwards;}
.sub-hero-text h2{margin:0;font-size:38px;font-weight:800;letter-spacing:-.01em;text-shadow:0 2px 18px rgba(0,0,0,.4);}
.sub-hero-text h2 .char{display:inline-block;opacity:0;animation:gakkumRiseIn .5s cubic-bezier(.34,1.56,.64,1) forwards;}
.sub-hero-text h2 .char.sp{width:.32em;}
@keyframes gakkumHeroZoom{from{transform:scale(1);}to{transform:scale(1.08);}}
@keyframes gakkumDropIn{from{opacity:0;transform:translateY(-28px);}to{opacity:1;transform:translateY(0);}}
@keyframes gakkumRiseIn{from{opacity:0;transform:translateY(28px);}to{opacity:1;transform:translateY(0);}}
@media (max-width:768px){
  .sub-hero{min-height:280px;}
  .sub-hero-text{min-height:280px;padding:0 20px;}
  .sub-hero-eyebrow{font-size:26px;margin-bottom:-4px;}
  .sub-hero-text h2{font-size:26px;}
}

/* ===== 서브페이지 형제메뉴 탭 (헤더와 같은 1400px 폭, 배경 위로 완전히 올라가서 탭 하단선 = 배경 하단선) ===== */
.sub-tabs{position:relative;z-index:2;max-width:1400px;margin:80px auto 0;}
.sub-tabs-inner{display:flex;height:64px;background:rgba(13,30,48,.55);}
.sub-tabs-inner a{flex:1;display:flex;align-items:center;justify-content:center;text-align:center;padding:0 10px;font-size:16px;font-weight:600;color:rgba(255,255,255,.7);border-right:1px solid rgba(255,255,255,.12);transition:background .2s ease,color .2s ease;}
.sub-tabs-inner a:last-child{border-right:none;}
.sub-tabs-inner a:hover{background:#3c8ed8;color:#fff;}
.sub-tabs-inner a.active{background:#3c8ed8;color:#fff;}
@media (max-width:768px){
  .sub-tabs{margin-top:0;}
  .sub-tabs-inner{height:auto;flex-wrap:wrap;}
  .sub-tabs-inner a{flex:1 1 50%;height:auto;padding:13px 8px;font-size:14px;}
}

/* ===== 서브페이지 브레드크럼 (탭 아래, 흰 배경 위 — 탭과 간격 확보) ===== */
.sub-breadcrumb-strip{max-width:1400px;margin:0 auto;padding:40px 0 24px;display:flex;justify-content:flex-end;}
.sub-breadcrumb{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--ink-faint);}
.sub-breadcrumb svg{width:15px;height:15px;flex:none;}
.sub-breadcrumb .sep{opacity:.6;}
.sub-breadcrumb .current{color:var(--ink);font-weight:600;}

/* ===== 서브페이지 콘텐츠 타이틀 ===== */
.sub-content-title{text-align:center;font-size:32px;font-weight:800;color:var(--green-900);margin:8px 0 8px;}
@media (max-width:768px){
  .sub-content-title{font-size:24px;}
}

/* 푸터 스타일은 theme/aramchan_20260821/css/footer.css (공용 파일) 하나로 관리.
   여기 있던 예전 footer/.footer-top/.footer-links/.footer-detail/.footer-bottom/
   .admin-actions/.admin-login 정의는 지금 쓰는 footer.php 마크업과 클래스명이
   더 이상 안 맞는데도 계속 로드되고 있어서, 페이지마다 footer.css랑 뒤섞여
   충돌(배경색/패딩/폭이 페이지별로 다르게 보이는 원인)을 일으키고 있었음 → 제거.
*/

/* ===== Scroll-to-top button ===== */
.top-btn{
  position:fixed;right:clamp(20px,4vw,60px);bottom:clamp(20px,4vw,60px);width:50px;height:50px;border-radius:50%;
  border:1px solid var(--line-strong);background:#fff;color:var(--ink-muted);display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 20px rgba(20,30,40,.14);opacity:0;visibility:hidden;transform:translateY(12px);
  transition:opacity .25s ease,transform .25s ease,background .15s ease,color .15s ease;z-index:60;
}
.top-btn.show{opacity:1;visibility:visible;transform:translateY(0);}
.top-btn:hover{background:var(--paper-alt);color:var(--ink);}
.top-btn svg{width:20px;height:20px;}

/* ===== 우측 고정 퀵메뉴 (자체상품소개/제작문의하기/시안확인하기) — 전 페이지 공통 ===== */
.gakkum-quick-menu{
  position:fixed;right:0;top:50%;transform:translateY(-50%);z-index:55;
  display:flex;flex-direction:column;box-shadow:-4px 0 20px rgba(20,30,40,.1);
  border-radius:12px 0 0 12px;overflow:hidden;
}
.gakkum-quick-item{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
  width:96px;padding:20px 8px;background:#fff;color:var(--ink);text-align:center;
  border-bottom:1px solid var(--line);transition:background .15s ease,color .15s ease;
}
.gakkum-quick-item:last-child{border-bottom:none;}
/* 호버 시 서브탭 활성색(블루)으로 채우고 아이콘/글자는 흰색으로 뒤집힘 */
.gakkum-quick-item:hover{background:#3c8ed8;color:#fff;}
.gakkum-quick-icon{width:34px;height:34px;}
.gakkum-quick-icon svg{width:100%;height:100%;}
.gakkum-quick-label{font-size:14.5px;font-weight:600;line-height:1.3;letter-spacing:-.01em;}
/* 아이콘 고유색 (평소엔 각자 색, 호버하면 위 규칙의 color:#fff로 자연스럽게 흰색 전환) */
.gakkum-quick-item.qm-orange .gakkum-quick-icon{color:#f5820c;}
.gakkum-quick-item.qm-blue .gakkum-quick-icon{color:#1a73e8;}
.gakkum-quick-item.qm-purple .gakkum-quick-icon{color:#a3268f;}
.gakkum-quick-item:hover .gakkum-quick-icon{color:#fff;}
@media (max-width:768px){
  .gakkum-quick-menu{display:none;} /* 좁은 화면에선 콘텐츠 가려서 숨김 */
}
