layout.module.scss 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. // ── 헤더 (Layout + Studio 공용) ──
  2. .header {
  3. background: var(--bg-head);
  4. border-bottom: 1px solid var(--border-default);
  5. // 1줄: 로고 + PC네비 + 우측 아이콘
  6. .headerRow1 {
  7. display: flex;
  8. align-items: center;
  9. height: 56px;
  10. padding: 0 16px;
  11. }
  12. // 햄버거 메뉴 (모바일 전용)
  13. .hamburger {
  14. display: none;
  15. align-items: center;
  16. justify-content: center;
  17. width: 36px;
  18. height: 36px;
  19. border: none;
  20. background: transparent;
  21. cursor: pointer;
  22. font-size: 1.25rem;
  23. color: var(--text-head);
  24. flex-shrink: 0;
  25. &:hover,
  26. &:focus,
  27. &:active {
  28. color: #fff;
  29. }
  30. @media (max-width: 1125px) {
  31. display: flex;
  32. }
  33. }
  34. // 로고
  35. .logo {
  36. flex-basis: 137px;
  37. font-size: inherit;
  38. padding-right: 20px;
  39. flex-shrink: 0;
  40. color: var(--text-head);
  41. transition: color 0.15s ease;
  42. text-align: center;
  43. &:hover,
  44. &:focus,
  45. &:focus-visible {
  46. color: #fff;
  47. }
  48. }
  49. // PC 네비게이션 (모바일에서 숨김)
  50. .pcNav {
  51. display: flex;
  52. flex-grow: 1;
  53. align-items: center;
  54. font-weight: 500;
  55. ul {
  56. display: flex;
  57. gap: 1rem;
  58. li {
  59. a, button {
  60. color: var(--text-head);
  61. &:hover {
  62. font-weight: 700;
  63. text-decoration: underline;
  64. }
  65. }
  66. }
  67. }
  68. @media (max-width: 1125px) {
  69. display: none;
  70. }
  71. }
  72. // 우측 아이콘 영역
  73. .headerActions {
  74. display: flex;
  75. align-items: center;
  76. gap: 8px;
  77. margin-left: auto;
  78. }
  79. .chargeBtn {
  80. display: inline-flex;
  81. align-items: center;
  82. justify-content: center;
  83. padding: 6px;
  84. border-radius: 16px;
  85. background: transparent;
  86. font-size: 0.75rem;
  87. font-weight: 700;
  88. cursor: pointer;
  89. color: var(--text-head);
  90. white-space: nowrap;
  91. &:hover {
  92. outline: 1px solid var(--outline-default);
  93. background: var(--bg-icon);
  94. }
  95. }
  96. .cartBtn {
  97. position: relative;
  98. display: inline-flex;
  99. align-items: center;
  100. justify-content: center;
  101. width: 36px;
  102. height: 36px;
  103. border-radius: 18px;
  104. background: transparent;
  105. color: var(--text-head);
  106. font-size: 1rem;
  107. &:hover {
  108. outline: 1px solid var(--outline-default);
  109. background: var(--bg-icon);
  110. color: #fff;
  111. }
  112. }
  113. .cartBadge {
  114. position: absolute;
  115. top: -2px;
  116. right: -2px;
  117. min-width: 18px;
  118. height: 18px;
  119. padding: 0 5px;
  120. border-radius: 9px;
  121. background: #ef4444;
  122. color: #fff;
  123. font-size: 10px;
  124. font-weight: 700;
  125. display: inline-flex;
  126. align-items: center;
  127. justify-content: center;
  128. line-height: 1;
  129. }
  130. .authLink {
  131. font-size: 0.875rem;
  132. font-weight: 500;
  133. &:hover {
  134. text-decoration: underline;
  135. }
  136. }
  137. // 2줄: 모바일 가로 스크롤 탭
  138. .headerRow2 {
  139. display: none;
  140. @media (max-width: 1125px) {
  141. display: flex;
  142. align-items: center;
  143. background: rgba(0, 0, 0, 0.12);
  144. border-top: 1px solid rgba(0, 0, 0, 0.18);
  145. }
  146. }
  147. // 좌/우 스크롤 화살표 (모바일 전용, 내 정보 nav 패턴)
  148. .scrollArrow {
  149. display: none;
  150. @media (max-width: 1125px) {
  151. display: flex;
  152. align-items: center;
  153. justify-content: center;
  154. flex-shrink: 0;
  155. width: 32px;
  156. height: 40px;
  157. border: none;
  158. background: transparent;
  159. color: var(--text-head);
  160. font-size: 0.8125rem;
  161. cursor: pointer;
  162. &:active {
  163. color: #fff;
  164. }
  165. }
  166. }
  167. .mobileTabScroll {
  168. display: flex;
  169. flex: 1;
  170. min-width: 0;
  171. overflow-x: auto;
  172. -webkit-overflow-scrolling: touch;
  173. scrollbar-width: none;
  174. padding: 0;
  175. gap: 0;
  176. &::-webkit-scrollbar {
  177. display: none;
  178. }
  179. }
  180. .mobileTab {
  181. flex: 0 0 auto;
  182. display: inline-flex;
  183. align-items: center;
  184. justify-content: center;
  185. padding: 10px 14px;
  186. font-size: 0.875rem;
  187. font-weight: 500;
  188. white-space: nowrap;
  189. color: var(--text-head);
  190. text-decoration: none;
  191. position: relative;
  192. transition: color 0.15s, font-weight 0.15s;
  193. &:hover {
  194. color: #fff;
  195. }
  196. }
  197. .mobileTabActive {
  198. color: #fff;
  199. font-weight: 700;
  200. background: transparent;
  201. &::after {
  202. content: '';
  203. position: absolute;
  204. left: 12px;
  205. right: 12px;
  206. bottom: 0;
  207. height: 3px;
  208. background: #fff;
  209. border-radius: 2px 2px 0 0;
  210. }
  211. }
  212. // 모바일 헤더 패딩 조정
  213. @media (max-width: 1125px) {
  214. .headerRow1 {
  215. padding: 0 8px;
  216. }
  217. .logo {
  218. flex-basis: auto;
  219. padding-right: 0;
  220. }
  221. }
  222. }
  223. // ── 메인 레이아웃 컨테이너 ──
  224. .container {
  225. display: grid;
  226. height: 100vh;
  227. height: 100dvh;
  228. grid-template-rows: auto 1fr auto;
  229. // PC: 좌측 채널 사이드바 + 메인 (2열)
  230. @media (min-width: 1124px) {
  231. grid-template-areas: "header header" "aside main" "aside footer";
  232. grid-template-columns: var(--antooza-sidebar-width, 220px) minmax(0, 1fr);
  233. transition: grid-template-columns 0.2s ease;
  234. }
  235. @media (min-width: 1124px) and (prefers-reduced-motion: reduce) {
  236. transition: none;
  237. }
  238. // 모바일/태블릿
  239. @media (max-width: 1125px) {
  240. grid-template-areas: "header" "main" "footer";
  241. grid-template-columns: minmax(0, 1fr);
  242. }
  243. // 채널 기능 OFF (NEXT_PUBLIC_FEATURE_CHANNEL=false): 사이드바 없는 1열 레이아웃
  244. &.noAside {
  245. @media (min-width: 1124px) {
  246. grid-template-areas: "header" "main" "footer";
  247. grid-template-columns: minmax(0, 1fr);
  248. }
  249. }
  250. > .header {
  251. grid-area: header;
  252. }
  253. // 좌측 사이드바
  254. > .aside {
  255. grid-area: aside;
  256. overflow-y: auto;
  257. transition: transform 0.3s ease;
  258. background: var(--bg-page);
  259. @media (min-width: 1124px) {
  260. position: relative;
  261. transform: translateX(0);
  262. border-right: 1px solid var(--border-default);
  263. }
  264. // 모바일: 왼쪽에서 슬라이드
  265. @media (max-width: 1125px) {
  266. position: fixed;
  267. top: 56px;
  268. left: 0;
  269. width: min(320px, 85vw);
  270. height: calc(100vh - 56px);
  271. height: calc(100dvh - 56px);
  272. z-index: 1000;
  273. transform: translateX(-100%);
  274. border-right: 1px solid var(--border-default);
  275. box-shadow: none;
  276. }
  277. }
  278. // 사이드바 열림 상태
  279. &.sidebarOpen {
  280. > .aside {
  281. @media (max-width: 1125px) {
  282. transform: translateX(0);
  283. box-shadow: 4px 0 12px var(--shadow-color);
  284. }
  285. }
  286. > .overlay {
  287. @media (max-width: 1125px) {
  288. display: block;
  289. }
  290. }
  291. }
  292. // 메인 내용
  293. > .main {
  294. position: relative;
  295. grid-area: main;
  296. overflow-y: auto;
  297. border-bottom: 1px solid var(--border-default);
  298. }
  299. // 오버레이 (모바일)
  300. > .overlay {
  301. display: none;
  302. @media (max-width: 1125px) {
  303. position: fixed;
  304. top: 56px;
  305. left: 0;
  306. right: 0;
  307. bottom: 0;
  308. background: var(--overlay-color);
  309. z-index: 999;
  310. }
  311. }
  312. // 하단 내용
  313. // - Mobile/Tablet (≤1125px): Amazon 스타일 — 중앙 정렬 링크 줄 + 별도 카피라이트 줄
  314. // - PC (≥1124px): 한 줄 — 좌측 링크 나열 + 우측 카피라이트
  315. > .footer {
  316. grid-area: footer;
  317. padding: 16px 12px;
  318. text-align: center;
  319. font-size: 0.75rem;
  320. color: var(--text-muted);
  321. .footerLinks {
  322. display: flex;
  323. flex-wrap: wrap;
  324. justify-content: center;
  325. align-items: center;
  326. gap: 8px 18px;
  327. a {
  328. color: var(--text-secondary);
  329. text-decoration: none;
  330. transition: color 0.15s ease;
  331. &:hover,
  332. &:focus {
  333. color: var(--text-primary);
  334. text-decoration: underline;
  335. }
  336. }
  337. }
  338. .footerCopy {
  339. margin: 10px 0 0;
  340. font-size: 0.6875rem;
  341. color: var(--text-muted);
  342. }
  343. @media (max-width: 576px) {
  344. padding: 14px 10px;
  345. .footerLinks {
  346. gap: 6px 14px;
  347. font-size: 0.6875rem;
  348. }
  349. .footerCopy {
  350. margin-top: 8px;
  351. }
  352. }
  353. // PC: 한 줄 레이아웃 — 좌측 링크 + 우측 카피라이트
  354. // 높이 32px — 좌측 사이드바 .channel-sidebar__icon-btn 와 정렬
  355. @media (min-width: 1124px) {
  356. display: flex;
  357. align-items: center;
  358. justify-content: space-between;
  359. gap: 16px;
  360. height: 32px;
  361. padding: 0 16px;
  362. text-align: left;
  363. font-size: 0.6875rem;
  364. .footerLinks {
  365. flex-wrap: nowrap;
  366. justify-content: flex-start;
  367. gap: 0 18px;
  368. }
  369. .footerCopy {
  370. margin: 0;
  371. white-space: nowrap;
  372. }
  373. }
  374. }
  375. }