:root{--bg:#f6efe7;--card:#fffdfa;--ink:#3a2f36;--muted:#8b7d84;--line:#eadfd3;--coral:#e8806a;--coral-d:#d4664f;--plum:#5a3b52;--ok:#2f9e6f;--warn:#d9822b;--shadow:0 6px 24px rgba(90,59,82,.08);--r:16px;--tab:64px}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.6 'Noto Sans KR','Apple SD Gothic Neo','Malgun Gothic',system-ui,sans-serif;padding-bottom:calc(var(--tab) + env(safe-area-inset-bottom))}
/* 2026-09-22(사용자 요청): 상품 설명 등을 드래그해서 복사해가지 못하게 막는다.
   입력칸(주소/이름 등)은 고객이 직접 쓰고 고쳐야 하니 예외로 다시 켜준다. */
body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea{-webkit-user-select:text;user-select:text}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0}
img{max-width:100%;display:block}
[hidden]{display:none!important}
h1,h2,h3{margin:0;letter-spacing:-.4px}

/* 헤더 */
.top{position:sticky;top:0;z-index:20;background:rgba(246,239,231,.94);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.top-in{display:flex;align-items:center;gap:10px;padding:10px 14px;max-width:1120px;margin:0 auto}
.logo{display:flex;align-items:center;gap:8px;font-weight:700;font-size:19px;color:var(--plum);white-space:nowrap}
.logo-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:var(--coral);color:#fff;font-size:18px}
.search{flex:1;position:relative;min-width:0}
.search input{width:100%;height:42px;border:1px solid var(--line);border-radius:999px;background:var(--card);padding:0 46px 0 16px;outline:none;font-size:15px}
.search input:focus{border-color:var(--coral);box-shadow:0 0 0 3px rgba(232,128,106,.18)}
.search button{position:absolute;right:4px;top:4px;width:34px;height:34px;border-radius:50%;background:transparent;color:var(--plum);display:grid;place-items:center}
.acct-link{position:relative;width:42px;height:42px;display:grid;place-items:center;border-radius:50%;color:var(--plum)}
.acct-link.on{color:var(--coral)}
.cart-link{position:relative;width:42px;height:42px;display:grid;place-items:center;border-radius:50%;color:var(--plum)}
.cart-link b,.tabbar i{position:absolute;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--coral);color:#fff;font:700 11px/18px 'Noto Sans KR',sans-serif;text-align:center;font-style:normal}
.cart-link b{top:2px;right:0}
.cats{display:flex;gap:8px;overflow-x:auto;padding:0 14px 10px;max-width:1120px;margin:0 auto;scrollbar-width:none}
.cats::-webkit-scrollbar{display:none}
.chip{flex:none;height:34px;padding:0 14px;border-radius:999px;background:var(--card);border:1px solid var(--line);font-size:14px;display:grid;place-items:center;color:var(--ink);white-space:nowrap}
.chip.on{background:var(--plum);border-color:var(--plum);color:#fff}

/* 본문 */
main{max-width:1120px;margin:0 auto;padding:14px 14px 28px;outline:none}
.section{margin:26px 0 8px}
.section h2{font-size:19px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:baseline}
.section h2 a{font-size:13px;color:var(--muted);font-weight:400}
.hero{border-radius:22px;padding:26px 22px;background:linear-gradient(135deg,#f3b8a7 0%,#e8806a 55%,#c9587a 100%);color:#fff;position:relative;overflow:hidden;box-shadow:var(--shadow)}
.hero::after{content:"";position:absolute;right:-30px;bottom:-40px;width:170px;height:170px;border-radius:50%;background:rgba(255,255,255,.16)}
.hero h1{font-size:25px;line-height:1.3;font-weight:700}
.hero p{margin:8px 0 16px;opacity:.94;font-size:14px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:48px;padding:0 22px;border-radius:14px;background:var(--coral);color:#fff;font-weight:700;font-size:16px;transition:transform .08s,background .15s}
.btn:active{transform:scale(.98)}
.btn:hover{background:var(--coral-d)}
.btn.ghost{background:var(--card);color:var(--plum);border:1px solid var(--line)}
.btn.ghost:hover{background:#fff}
.btn.white{background:#fff;color:var(--coral-d)}
.btn.block{display:flex;width:100%}
.btn[disabled]{opacity:.5;pointer-events:none}
/* 로그인 - 소셜 버튼(2026-09-22) */
.btn.social{display:flex;width:100%;margin-bottom:8px}
.btn.social:last-child{margin-bottom:0}
.btn.social.google{background:#fff;color:#3c4043;border:1px solid var(--line)}
.btn.social.google:hover{background:#f7f7f7}
.btn.social.kakao{background:#FEE500;color:#191600}
.btn.social.kakao:hover{background:#f5dc00}
.or-div{display:flex;align-items:center;gap:10px;margin:16px 0;color:var(--muted);font-size:12px}
.or-div::before,.or-div::after{content:'';flex:1;height:1px;background:var(--line)}
/* 로그인 화면 2단 배치(2026-09-22 사용자 요청): 이메일·비밀번호 폼 옆에 구글/카카오 버튼을 둔다.
   좁은 화면(모바일)에서는 자동으로 세로 스택(이메일 폼 → 소셜 버튼) */
.login-layout{display:flex;flex-direction:column;gap:16px}
.login-social{display:flex;flex-direction:column;justify-content:center}
.or-div-v{text-align:center;color:var(--muted);font-size:12px;margin-bottom:10px}
.login-links{display:flex;justify-content:flex-end;gap:8px;font-size:13px;margin:10px 0 14px}
.login-links a{color:var(--plum);text-decoration:underline}
.login-links .dot{color:var(--line)}
@media(min-width:640px){
  .login-layout{flex-direction:row;align-items:stretch}
  .login-layout>.panel:first-child{flex:1 1 0;min-width:0}
  .login-social{flex:0 0 230px}
  .login-social .panel{height:100%;display:flex;flex-direction:column;justify-content:center}
}
/* 팝업(모달) 공통 - 회원가입/비밀번호 찾기 등(2026-09-22 사용자 요청): 뒷배경은 스크롤 잠금(body.modal-open) */
.modal-layer{position:fixed;inset:0;background:rgba(58,47,54,.55);z-index:70;display:none;align-items:center;justify-content:center;padding:16px}
.modal-layer.on{display:flex}
.modal-box{background:#fff;width:100%;max-width:380px;border-radius:18px;padding:24px 22px;position:relative;max-height:86vh;overflow:auto;box-shadow:var(--shadow)}
.modal-close{position:absolute;right:12px;top:12px;width:32px;height:32px;border-radius:50%;background:#f3ece4;font-size:16px;line-height:1;display:grid;place-items:center}
.ok-msg{background:#eaf6ee;color:#2f7d4f;border-radius:10px;padding:10px 12px;font-size:13px;margin:6px 0 4px}
body.modal-open{overflow:hidden;position:fixed;left:0;right:0}
.catgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.catcard{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:16px 14px;display:flex;align-items:center;gap:12px}
.catcard .em{font-size:28px}
.catcard b{display:block;font-size:15px}
.catcard small{color:var(--muted)}

/* 상품 그리드 */
.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.card{background:var(--card);border-radius:var(--r);overflow:hidden;border:1px solid var(--line);display:flex;flex-direction:column;transition:box-shadow .15s}
.card:hover{box-shadow:var(--shadow)}
.card .img{aspect-ratio:1/1;background:#efe6dc;overflow:hidden}
.card .img img{width:100%;height:100%;object-fit:cover}
.card .body{padding:10px 12px 14px}
.card .name{font-size:14px;line-height:1.4;height:2.8em;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.card .price{margin-top:6px;font-weight:700;font-size:16px}
.card .price em{font-style:normal;color:var(--muted);font-weight:400;font-size:12px;margin-left:4px}
.tag{display:inline-block;font-size:11px;padding:1px 7px;border-radius:6px;background:#fbe6df;color:var(--coral-d);margin-top:6px}
.toolbar{display:flex;justify-content:space-between;align-items:center;margin:4px 0 12px;gap:8px;flex-wrap:wrap}
.toolbar select{height:38px;border:1px solid var(--line);border-radius:10px;background:var(--card);padding:0 10px;max-width:100%}
/* 2026-09-22(사용자 지적 - "버튼 글씨가 이상하게 뜬다"): 좁은 화면에서 무료/유료배송 버튼+셀렉트가
   한 줄에 다 안 들어가면 flex가 버튼을 찌그러뜨려서 글자가 "무료"/"배송"처럼 줄바꿈됐다.
   찌그러지는 대신 다음 줄로 넘어가게(wrap) 하고, 버튼 글자는 항상 한 줄로 고정한다. */
.toolbar-r{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;max-width:100%}
.muted{color:var(--muted)}
.empty{text-align:center;padding:60px 10px;color:var(--muted)}

/* 페이지네이션 */
.pager{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap}
.pager button{min-width:38px;height:38px;padding:0 8px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink);font-weight:500}
.pager button.on{background:var(--plum);border-color:var(--plum);color:#fff;font-weight:700}
.pager button:disabled{opacity:.4}
.pager .dots{color:var(--muted);padding:0 2px}

/* 배송비 토글 */
.ship-toggle{display:flex;gap:6px;flex-wrap:wrap}
.ship-toggle button{height:38px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--ink);font-size:13px;white-space:nowrap;flex-shrink:0}
.ship-toggle button.on{background:var(--plum);border-color:var(--plum);color:#fff;font-weight:700}

/* 검색창 밑 카테고리(스크롤 시 등장) */
.cats.hide{display:none}

/* 상품 상세 */
.pd{display:grid;gap:18px}
.pd-img{border-radius:20px;overflow:hidden;background:#efe6dc;aspect-ratio:1/1}
.pd-img img{width:100%;height:100%;object-fit:cover}
.pd h1{font-size:20px;line-height:1.4;font-weight:700}
.pd .big{font-size:26px;font-weight:700;margin:6px 0 2px}
.free{display:inline-block;font-size:12px;color:var(--ok);background:#e5f5ee;border-radius:6px;padding:1px 8px;margin-left:6px;vertical-align:middle}
/* 배송비 배지(무료/유료) - 2026-09-22 */
.ship{display:inline-block;font-size:11px;border-radius:6px;padding:1px 7px;margin:4px 6px 0 0;vertical-align:middle}
.ship.free{color:var(--ok);background:#e5f5ee}
.ship.paid{color:var(--warn);background:#fdf1e2}
.card .body .ship{display:block;width:fit-content;margin:4px 0 0}
.line .ship{display:block;width:fit-content;margin:2px 0 4px}
.panel{background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:16px}
.field{display:grid;gap:6px;margin-bottom:14px}
.field label{font-size:13px;color:var(--muted);font-weight:500}
.input,.select,textarea.input{width:100%;height:48px;border:1px solid var(--line);border-radius:12px;background:#fff;padding:0 14px;outline:none;font-size:16px}
textarea.input{height:auto;padding:12px 14px;min-height:64px}
.input:focus,.select:focus{border-color:var(--coral);box-shadow:0 0 0 3px rgba(232,128,106,.18)}
.qty{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}
.qty button{width:44px;height:44px;background:transparent;font-size:20px;color:var(--plum)}
.qty span{min-width:38px;text-align:center;font-weight:700}
.sticky-buy{position:fixed;left:0;right:0;bottom:calc(var(--tab) + env(safe-area-inset-bottom));z-index:15;background:rgba(255,253,250,.97);border-top:1px solid var(--line);padding:10px 14px;display:flex;gap:10px}
.sticky-buy .btn{flex:1}
.detail-imgs{margin-top:8px;display:grid;gap:0;background:#fff;border-radius:var(--r);overflow:hidden}
.detail-imgs img{width:100%;height:auto}
.notice{font-size:13px;color:var(--muted);line-height:1.8}
.notice li{margin-bottom:2px}
.tabs{display:flex;border-bottom:2px solid var(--line);margin:22px 0 12px}
.tabs button{flex:1;padding:12px 0;background:none;font-weight:700;color:var(--muted);border-bottom:3px solid transparent;margin-bottom:-2px}
.tabs button.on{color:var(--plum);border-color:var(--coral)}

/* 장바구니/결제 */
.line{display:grid;grid-template-columns:76px 1fr;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}
.line:last-child{border-bottom:0}
.line img{width:76px;height:76px;border-radius:12px;object-fit:cover;background:#efe6dc}
.line .t{font-size:14px;line-height:1.4}
.line .o{font-size:12px;color:var(--muted)}
.line .row{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
.x{background:none;color:var(--muted);font-size:13px;text-decoration:underline}
.sum{display:grid;gap:8px;font-size:15px}
.sum .r{display:flex;justify-content:space-between}
.sum .total{font-size:19px;font-weight:700;padding-top:10px;border-top:1px dashed var(--line)}
.pay-opt{display:flex;gap:12px;align-items:center;border:1.5px solid var(--line);border-radius:14px;padding:14px;background:#fff;margin-bottom:10px;cursor:pointer}
.pay-opt.on{border-color:var(--coral);background:#fff6f3}
.pay-opt input{accent-color:var(--coral);width:20px;height:20px}
.pay-opt b{display:block}
.pay-opt small{color:var(--muted)}
.check{display:flex;gap:10px;align-items:flex-start;font-size:14px;margin:10px 0}
.check input{accent-color:var(--coral);width:20px;height:20px;margin-top:2px}
.row2{display:grid;grid-template-columns:1fr auto;gap:8px}
.err{color:#c6392c;font-size:13px;margin:4px 0 10px}
.banner{border-radius:14px;padding:14px 16px;margin-bottom:14px;font-size:14px}
.banner.warn{background:#fff3e0;color:#8a5200}
.banner.ok{background:#e5f5ee;color:#1e6d4c}
.banner.info{background:#eef0fb;color:#3a4680}
.bank{font-size:17px;line-height:1.9}
.bank b{font-size:21px;letter-spacing:.5px}
.status{display:inline-block;font-size:12px;font-weight:700;padding:3px 10px;border-radius:999px}
.s-awaiting_deposit,.s-pending_payment{background:#fff3e0;color:#8a5200}
.s-paid,.s-shipped,.s-delivered{background:#e5f5ee;color:#1e6d4c}
.s-canceled,.s-expired{background:#f1e6e6;color:#8a3b3b}
.steps{display:flex;justify-content:space-between;margin:16px 0 4px;font-size:12px;color:var(--muted);text-align:center}
.steps div{flex:1;position:relative}
.steps div::before{content:"";display:block;width:18px;height:18px;border-radius:50%;background:var(--line);margin:0 auto 6px}
.steps div.on{color:var(--plum);font-weight:700}
.steps div.on::before{background:var(--coral)}

/* 하단 */
.foot{max-width:1120px;margin:0 auto;padding:22px 14px 30px;color:var(--muted);font-size:12px;line-height:1.8;border-top:1px solid var(--line)}
.foot a{text-decoration:underline;margin-right:12px;color:var(--plum)}
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:30;height:calc(var(--tab) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:rgba(255,253,250,.97);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr)}
.tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:11px;color:var(--muted);position:relative}
.tabbar svg{width:24px;height:24px}
.tabbar a.on{color:var(--coral-d);font-weight:700}
.tabbar i{top:6px;left:calc(50% + 6px)}
.toast{position:fixed;left:50%;bottom:calc(var(--tab) + 76px);transform:translate(-50%,20px);background:#3a2f36;color:#fff;padding:11px 18px;border-radius:12px;font-size:14px;opacity:0;pointer-events:none;transition:.2s;z-index:50;max-width:88vw;text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
.skeleton{background:linear-gradient(90deg,#efe6dc 25%,#f7f0e8 37%,#efe6dc 63%);background-size:400% 100%;animation:sk 1.3s infinite;border-radius:12px;min-height:180px}
@keyframes sk{0%{background-position:100% 50%}100%{background-position:0 50%}}
#postcodeLayer{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:60;display:none;align-items:flex-end;justify-content:center}
#postcodeLayer.on{display:flex}
#postcodeBox{background:#fff;width:100%;max-width:520px;height:min(560px,86vh);border-radius:18px 18px 0 0;overflow:hidden;position:relative}
#postcodeClose{position:absolute;right:10px;top:8px;z-index:2;background:#eee;border-radius:50%;width:34px;height:34px;font-size:18px}

/* 태블릿 이상 */
@media(min-width:640px){.grid{grid-template-columns:repeat(3,1fr)}.catgrid{grid-template-columns:repeat(5,1fr)}main{padding:20px 20px 40px}.hero{padding:40px 36px}.hero h1{font-size:32px}}
@media(min-width:960px){
  :root{--tab:0px}
  .grid{grid-template-columns:repeat(4,1fr);gap:16px}
  .pd{grid-template-columns:1.05fr 1fr;gap:34px;align-items:start}
  .pd-side{position:sticky;top:130px}
  .tabbar{display:none}
  body{padding-bottom:0}
  .sticky-buy{position:static;background:none;border:0;padding:14px 0 0}
  .cart-layout,.co-layout{display:grid;grid-template-columns:1fr 360px;gap:22px;align-items:start}
  .toast{bottom:30px}
}
@media(max-width:959px){.cart-layout .panel+.panel,.co-layout .panel+.panel{margin-top:14px}}
@media(max-width:360px){.logo-text{display:none}.hero h1{font-size:22px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
