layout.module.scss 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  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(--dpot-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. > .header {
  244. grid-area: header;
  245. }
  246. // 좌측 사이드바
  247. > .aside {
  248. grid-area: aside;
  249. overflow-y: auto;
  250. transition: transform 0.3s ease;
  251. background: var(--bg-page);
  252. @media (min-width: 1124px) {
  253. position: relative;
  254. transform: translateX(0);
  255. border-right: 1px solid var(--border-default);
  256. }
  257. // 모바일: 왼쪽에서 슬라이드
  258. @media (max-width: 1125px) {
  259. position: fixed;
  260. top: 56px;
  261. left: 0;
  262. width: min(320px, 85vw);
  263. height: calc(100vh - 56px);
  264. height: calc(100dvh - 56px);
  265. z-index: 1000;
  266. transform: translateX(-100%);
  267. border-right: 1px solid var(--border-default);
  268. box-shadow: none;
  269. }
  270. }
  271. // 사이드바 열림 상태
  272. &.sidebarOpen {
  273. > .aside {
  274. @media (max-width: 1125px) {
  275. transform: translateX(0);
  276. box-shadow: 4px 0 12px var(--shadow-color);
  277. }
  278. }
  279. > .overlay {
  280. @media (max-width: 1125px) {
  281. display: block;
  282. }
  283. }
  284. }
  285. // 메인 내용
  286. > .main {
  287. position: relative;
  288. grid-area: main;
  289. overflow-y: auto;
  290. border-bottom: 1px solid var(--border-default);
  291. }
  292. // 오버레이 (모바일)
  293. > .overlay {
  294. display: none;
  295. @media (max-width: 1125px) {
  296. position: fixed;
  297. top: 56px;
  298. left: 0;
  299. right: 0;
  300. bottom: 0;
  301. background: var(--overlay-color);
  302. z-index: 999;
  303. }
  304. }
  305. // 하단 내용
  306. // - Mobile/Tablet (≤1125px): Amazon 스타일 — 중앙 정렬 링크 줄 + 별도 카피라이트 줄
  307. // - PC (≥1124px): 한 줄 — 좌측 링크 나열 + 우측 카피라이트
  308. > .footer {
  309. grid-area: footer;
  310. padding: 16px 12px;
  311. text-align: center;
  312. font-size: 0.75rem;
  313. color: var(--text-muted);
  314. .footerLinks {
  315. display: flex;
  316. flex-wrap: wrap;
  317. justify-content: center;
  318. align-items: center;
  319. gap: 8px 18px;
  320. a {
  321. color: var(--text-secondary);
  322. text-decoration: none;
  323. transition: color 0.15s ease;
  324. &:hover,
  325. &:focus {
  326. color: var(--text-primary);
  327. text-decoration: underline;
  328. }
  329. }
  330. }
  331. .footerCopy {
  332. margin: 10px 0 0;
  333. font-size: 0.6875rem;
  334. color: var(--text-muted);
  335. }
  336. @media (max-width: 576px) {
  337. padding: 14px 10px;
  338. .footerLinks {
  339. gap: 6px 14px;
  340. font-size: 0.6875rem;
  341. }
  342. .footerCopy {
  343. margin-top: 8px;
  344. }
  345. }
  346. // PC: 한 줄 레이아웃 — 좌측 링크 + 우측 카피라이트
  347. // 높이 32px — 좌측 사이드바 .channel-sidebar__icon-btn 와 정렬
  348. @media (min-width: 1124px) {
  349. display: flex;
  350. align-items: center;
  351. justify-content: space-between;
  352. gap: 16px;
  353. height: 32px;
  354. padding: 0 16px;
  355. text-align: left;
  356. font-size: 0.6875rem;
  357. .footerLinks {
  358. flex-wrap: nowrap;
  359. justify-content: flex-start;
  360. gap: 0 18px;
  361. }
  362. .footerCopy {
  363. margin: 0;
  364. white-space: nowrap;
  365. }
  366. }
  367. }
  368. }