/* FLAVOLINK Page - 좌측 메뉴 + 우측 빈 화면, 모바일 토글 */
:root {
	--flavolink-orange: #EA5504;
	--flavolink-orange-dark: #D35400;
	--flavolink-border: #E0E0E0;
	--flavolink-text: #3D3833;
	/* footer-inner와 동일한 왼쪽 정렬 (max-width 1740px, margin 0 auto, footer padding 2rem) */
	--flavolink-content-left: calc(2rem + max(0px, (100vw - 4rem - var(--layout-max-width)) / 2));
}

.flavolink-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: #FFFFFF;
	padding-top: 65px; /* fixed 헤더 공간 */
}

.flavolink-layout-full {
	background-image: url('/images/flavolink-hero-bg.jpg');	
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.flavolink-layout {
	flex: 1;
	display: flex;
	position: relative;
	width: calc(100% - var(--flavolink-content-left) - 380px);
	max-width: calc(var(--layout-max-width) - 380px);
	margin-left: calc(var(--flavolink-content-left) + 380px);
	margin-right: auto;
	min-height: calc(100vh - 140px);
}

/* 좌측 사이드바 - 2단계 (대분류 + 소분류), footer-inner와 정렬하며 해상도와 관계없이 고정 */
.flavolink-sidebar {
	width: 380px;
	flex-shrink: 0;
	border-right: 1px solid rgba(255, 255, 255, 0.3);
	padding: 0;
	background: rgba(255, 255, 255, 0.9);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: fixed;
	left: var(--flavolink-content-left);
	top: 70px;
	bottom: 0;
	z-index: 1000;
}

/* 왼쪽 여백 영역 반투명 흰색 채우기 */
.flavolink-sidebar::before {
	content: '';
	position: absolute;
	right: 100%;
	top: 0;
	bottom: 0;
	width: 100vw;
	background: rgba(255, 255, 255, 0.9);
}

.flavolink-sidebar-inner {
	display: flex;
	height: 100%;
	min-height: calc(100vh - 140px);
}

/* 대분류 (왼쪽) */
.flavolink-nav-main {
	display: flex;
	flex-direction: column;
	width: 150px;
	flex-shrink: 0;
	/* border-right: 1px solid var(--flavolink-border); */
	padding: 1.5rem 0;
}

.flavolink-nav-item {
	padding: 0.75rem 1rem;
	color: var(--flavolink-text);
	font-size: 0.9rem;
	font-weight: 500;
	border: none;
	background: none;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	border-left: 3px solid transparent;
	transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.flavolink-nav-item:hover {
	color: var(--flavolink-orange);
}

.flavolink-nav-item.active {
	color: var(--flavolink-orange);
	border-left-color: var(--flavolink-orange);
	font-weight: 600;
}

.flavolink-nav-link {
	text-decoration: none;
	margin-top: auto;
}

/* 소분류 (오른쪽) */
.flavolink-nav-sub {
	flex: 1;
	padding: 1.5rem 1rem;
	min-width: 0;
}

.flavolink-sub-panel {
	display: none;
	flex-direction: column;
	gap: 0.25rem;
}

.flavolink-sub-panel.active {
	display: flex;
}

.flavolink-sub-item {
	padding: 0.6rem 1rem;
	color: var(--flavolink-text);
	text-decoration: none;
	font-size: 0.875rem;
	border-radius: 6px;
	transition: color 0.2s, background 0.2s;
}

.flavolink-sub-item:hover {
	color: var(--flavolink-orange);
	background: rgba(230, 126, 34, 0.08);
}

.flavolink-sub-item.active {
	color: var(--flavolink-orange);
	font-weight: 600;
	background: rgba(230, 126, 34, 0.1);
}

/* 우측 메인 영역 (빈 화면) - 배경 위에 로고만 표시 */
.flavolink-main {
	flex: 1;
	min-height: calc(100vh - 140px);
	padding: 2rem 3rem;
	background: transparent;
}

.flavolink-content {
	width: 100%;
	height: 100%;
	min-height: 400px;
	position: relative;
}

/* B2B 매칭 페이지 전용 - 사이드바 없음, 이미지 크게 */
.b2b-matching-page .flavolink-header {
	position: fixed; /* 클릭 가능하도록 유지 */
	z-index: 1002;
	background: rgba(255, 255, 255, 0.98);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
	.b2b-matching-page .flavolink-header {
		background: var(--mobile-header-orange, #EA5504);
		border-bottom: none;
	}
}

/* B2B 매칭 - PC에서 햄버거 메뉴 숨김 (좌측 탭으로 메뉴 열림) */
@media (min-width: 641px) {
	.b2b-matching-page .flavolink-menu-toggle,
	.b2b-matching-page .header-mobile-toggle {
		display: none !important;
	}
}

/* B2B 매칭 - 왼쪽 가장자리 터치 시 메뉴 열림 트리거 + 항상 보이는 탭 */
.b2b-sidebar-trigger {
	position: fixed;
	top: 0;
	left: 0;
	width: 24px;
	height: 100vh;
	z-index: 998;
	cursor: pointer;
	display: flex;
	align-items: center;
}

/* 항상 보이는 좌측 탭(핸들) */
.b2b-sidebar-tab {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 10px;
	height: 72px;
	background: var(--flavolink-orange);
	border-radius: 0 8px 8px 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #FFFFFF;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1;
	box-shadow: 2px 0 12px rgba(234, 85, 4, 0.35);
	transition: width 0.25s ease, background 0.2s ease, box-shadow 0.2s ease;
	pointer-events: none;
}

.b2b-sidebar-trigger:hover .b2b-sidebar-tab {
	width: 14px;
	background: var(--flavolink-orange-dark);
	box-shadow: 3px 0 16px rgba(234, 85, 4, 0.45);
}

/* B2B 매칭 - 좌측 사이드바 (기본 숨김, 마우스 왼쪽 닿을 때 열림) */
.b2b-matching-page .b2b-sidebar {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 999;
	width: 320px;
	max-width: 90vw;
	transform: translateX(-100%);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	box-shadow: none;
	padding-top: 4.5rem;
	background: rgba(255, 255, 255, 0.98);
	border-right: 1px solid var(--flavolink-border);
}

.b2b-matching-page .b2b-sidebar.open {
	transform: translateX(0);
	box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

.b2b-matching-page .b2b-sidebar .flavolink-sidebar-inner {
	min-height: calc(100vh - 4.5rem);
}

.b2b-matching-layout {
	background: transparent;
}

.b2b-matching-main {
	padding: 0;
	flex: 1;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.b2b-matching-page .flavolink-content-b2b {
	width: 100%;
	min-height: calc(100vh - 140px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
}

/* B2B 매칭: flavolink-layout-full 영역을 이미지가 가득 채움 (해상도 무관) */
.b2b-matching-page .flavolink-layout-full {
	flex: 1;
	min-height: 0;
	display: block;
}

.b2b-matching-img-link {
	display: block;
}

.b2b-matching-img-link picture {
	display: contents;
}

.b2b-matching-page .b2b-matching-img-link {
	width: 100%;
	height: 100%;
}

/* B2B 매칭: 메인과 유사한 CTA 버튼 (이미지 위 오버레이) */
.b2b-hero-wrap {
	position: relative;
}

.b2b-hero-btn,
.b2b-hero-sq-btn {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 11%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* padding: 0.875rem 3.5rem; */
	font-size: 1.5rem;
	font-weight: 600;
	color: white;
	background: var(--flavolink-orange);
	border-radius: 50px;
	text-decoration: none;
	box-shadow: 0 4px 20px rgba(234, 85, 4, 0.4);
	transition: all 0.2s ease;
	width: 22%;
	height: 1.7%;
}

.b2b-hero-sq-btn{
	top: auto;
	bottom: 6%;
	border-radius: 20px;
	width: 25%;
}

.b2b-hero-btn:hover,
.b2b-hero-sq-btn:hover {
	background: var(--flavolink-orange-dark);
	transform: translateX(-50%) translateY(-2px);
	box-shadow: 0 6px 24px rgba(234, 85, 4, 0.5);
}

@media (max-width: 968px) {
	.b2b-hero-btn,
	.b2b-hero-sq-btn {
		font-size: 0.95rem;
	}
}

@media (max-width: 640px) {
	.b2b-hero-btn,
	.b2b-hero-sq-btn {
		font-size: 1rem;
		height: 1%;
		width: 60%;
	}
	
	.b2b-hero-btn {
		width: 60%;
		min-width: 120px;
		top: 9.5%;
	}
	
	.b2b-hero-sq-btn {
		width: 60%;
		min-width: 120px;
		bottom: 3%;
	}
}

.b2b-matching-img {
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.b2b-matching-page .b2b-matching-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.click-area1 {
  position: absolute;
  top: calc(721px  - 246px);     /* 버튼이 그려진 위치 */
  left: 763px;
  width: 380px;   /* 버튼 크기 */
  height: 68px;
  background: rgba(0,0,0,0); /* 기본 투명 */
  border-radius: 55px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.click-area2 {
  position: absolute;
  top: calc(4349px - 246px);     /* 버튼이 그려진 위치 */
  left: 695px;
  width: 494px;   /* 버튼 크기 */
  height: 75px;
  background: rgba(0,0,0,0); /* 기본 투명 */
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* 호버 이펙트 처리 */
.click-area1:hover,
.click-area2:hover {
  background: rgba(0,0,0,0.2); /* 살짝 어둡게 */
}



/* FLAVOLINK 헤더 - 고정하여 클릭 가능, 모바일 토글 버튼 공간 */
.flavolink-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1002;
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(8px);
}

@media (max-width: 640px) {
	.flavolink-header {
		background: var(--mobile-header-orange, #EA5504);
		backdrop-filter: none;
		border-bottom: none;
	}
}

.flavolink-header .login-header-inner {
	position: relative;
}

/* 모바일 메뉴 토글 버튼 - 데스크톱에서 숨김 (모바일 스타일은 login.css 오렌지 바와 동일) */
.flavolink-menu-toggle {
	display: none;
	position: relative;
	top: auto;
	left: auto;
	z-index: 1002;
	width: 44px;
	height: 44px;
	padding: 0;
	background: #FFFFFF;
	border: 1px solid var(--flavolink-border);
	border-radius: 8px;
	cursor: pointer;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: background 0.2s;
}

.flavolink-menu-toggle:hover {
	background: #F5F5F5;
}

@media (max-width: 640px) {
	.flavolink-header .flavolink-menu-toggle.header-mobile-toggle {
		background: transparent;
		border: none;
		box-shadow: none;
	}
	.flavolink-header .flavolink-menu-toggle.header-mobile-toggle:hover {
		background: rgba(255, 255, 255, 0.12);
	}
	.flavolink-header .flavolink-menu-toggle.header-mobile-toggle .toggle-bar {
		background: #FFFFFF;
	}
}

.toggle-bar {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--flavolink-text);
	border-radius: 1px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.flavolink-menu-toggle.open .toggle-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.flavolink-menu-toggle.open .toggle-bar:nth-child(2) {
	opacity: 0;
}

.flavolink-menu-toggle.open .toggle-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* 오버레이 - 모바일에서 사이드바 뒤 배경 */
.flavolink-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	cursor: pointer;
}

.flavolink-overlay.open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* 반응형: 태블릿 이하 */
@media ( max-width : 968px) {
	.flavolink-sidebar {
		width: 320px;
	}
	.flavolink-layout {
		width: calc(100% - var(--flavolink-content-left) - 320px);
		max-width: calc(var(--layout-max-width) - 320px);
		margin-left: calc(var(--flavolink-content-left) + 320px);
	}
	.flavolink-nav-main {
		width: 120px;
	}
	.flavolink-main {
		padding: 2rem 1.5rem;
	}
}

/* 반응형: 모바일 */
@media ( max-width : 640px) {
	.flavolink-layout-full {
		background-image: url('/images/mb_flavolink.png');
	}
	.flavolink-layout {
		padding-top: 0;
		width: 100%;
		max-width: 100%;
		margin-left: 0;
	}
	.flavolink-menu-toggle {
		display: flex;
		flex-shrink: 0;
		margin-left: 0;
		margin-right: auto;
		order: -1;
	}
	.flavolink-header .login-header-inner {
		padding-left: 1rem;
		padding-right: 1rem;
	}
	.flavolink-main {
		position: relative;
		z-index: 0;
	}
	.flavolink-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: 1001;
		width: 320px;
		max-width: 90vw;
		transform: translateX(-100%);
		box-shadow: none;
		padding-top: 4.5rem;
		background: rgba(255, 255, 255, 0.98);
		visibility: hidden;
		pointer-events: none;
		transition: transform 0.3s ease, box-shadow 0.3s ease, visibility 0.3s ease;
	}
	.flavolink-sidebar::before {
		display: none;
	}
	.flavolink-sidebar-inner {
		min-height: calc(100vh - 4.5rem);
	}
	.flavolink-sidebar.open {
		transform: translateX(0);
		box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
		visibility: visible;
		pointer-events: auto;
	}
	.flavolink-overlay {
		display: block;
	}
	.flavolink-main {
		padding: 1rem;
		/* padding-top: 4rem; */
		min-height: calc(100vh - 120px);
	}
	.flavolink-nav-main {
		width: 120px;
		padding: 1.25rem 0;
	}
	.flavolink-nav-item {
		padding: 1.125rem 1rem;
		min-height: 56px;
		display: flex;
		align-items: center;
	}
	.flavolink-nav-sub {
		padding: 1.25rem 1rem;
	}
	.flavolink-sub-item {
		padding: 1.125rem 1rem;
		min-height: 56px;
		display: flex;
		align-items: center;
	}
	.b2b-matching-page .flavolink-content-b2b {
		min-height: calc(100vh - 120px);
	}
	/* 모바일: flavolink-layout-full 영역 뷰포트에 맞춤 */
	.b2b-matching-page .flavolink-layout-full {
		min-height: calc(100vh - 65px - 80px);
		flex: 1;
		display: flex;
		flex-direction: column;
		overflow: hidden;
	}
	.b2b-matching-page .flavolink-layout-full .b2b-matching-img-link {
		flex: 1;
		min-height: 0;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.b2b-matching-page .flavolink-layout-full .b2b-matching-img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}
	/* 모바일: 좌측 탭 숨김 (햄버거 메뉴로 대체) */
	.b2b-sidebar-tab {
		display: none;
	}
	/* Flavolink: 좌측 사이드바는 헤더 풀메뉴로 통합 */
	.flavolink-page .flavolink-sidebar,
	.flavolink-page .flavolink-overlay {
		display: none !important;
	}
}

/* ─── Flavolink 헤더 모바일 패널: 흰 배경 · 카테고리(오렌지 바)+2열 링크 (디자인 시안) ─── */
@media (max-width: 640px) {
	.flavolink-header .header-mobile-panel.flavolink-mobile-panel {
		background: #FFFFFF !important;
		box-shadow: none;
		overflow: hidden;
	}
	.flavolink-header .header-mobile-panel.flavolink-mobile-panel.open {
		display: flex;
		flex-direction: column;
		max-height: 100vh;
		height: auto;
		min-height: 0;
	}
	.flavolink-mobile-panel-inner {
		display: flex;
		flex-direction: column;
		flex: 1;
		min-height: 0;
	}
	.flavolink-mobile-panel-top {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 0.75rem;
		padding: 0.75rem 1rem;
		flex-shrink: 0;
		/* border-bottom: 1px solid var(--flavolink-border); */
		background: #FFFFFF;
	}
	.flavolink-header .flavolink-mobile-close {
		position: static;
		width: 44px;
		height: 44px;
		min-width: 44px;
		font-size: 1.75rem;
		font-weight: 300;
		line-height: 1;
		color: var(--flavolink-text) !important;
		background: transparent !important;
		border: none !important;
		border-radius: 8px;
		box-shadow: none !important;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
		font-family: inherit;
	}
	.flavolink-header .flavolink-mobile-close:hover {
		color: var(--flavolink-orange) !important;
		background: rgba(234, 85, 4, 0.08) !important;
	}
	.flavolink-mobile-wordmark {
		flex: 1;
		text-align: center;
		font-size: 1.2rem;
		font-weight: 700;
		color: var(--flavolink-orange);
		text-decoration: none;
		letter-spacing: 0.02em;
		min-width: 0;
	}
	.flavolink-mobile-panel-actions {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		min-width: 4.5rem;
	}
	.flavolink-mobile-login-pill {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 0.5rem 1rem;
		font-size: 0.8rem;
		font-weight: 600;
		color: #FFFFFF !important;
		background: var(--flavolink-orange);
		border-radius: 8px;
		text-decoration: none;
		white-space: nowrap;
		line-height: 1.2;
	}
	.flavolink-mobile-login-pill:hover {
		background: var(--flavolink-orange-dark);
		color: #FFFFFF !important;
	}
	.flavolink-mobile-panel-avatar {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		border-radius: 50%;
		text-decoration: none;
		/* border: 2px solid var(--flavolink-orange); */
		box-sizing: border-box;
	}
	.flavolink-mobile-panel-avatar-inner {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		border-radius: 50%;
		background: #F5F0EB;
		color: #9B8E83;
	}
	.flavolink-mobile-panel-avatar-inner svg {
		width: 20px;
		height: 20px;
	}
	.flavolink-header .flavolink-mobile-panel-inner .header-mobile-user-bar {
		border-bottom: none;
		color: var(--flavolink-text);
	}
	.flavolink-header .flavolink-mobile-panel-inner .header-mobile-user-bar::after {
		background: var(--flavolink-border);
	}
	.flavolink-header .flavolink-mobile-panel-inner .header-mobile-user-bar-greeting {
		color: var(--flavolink-text);
	}
	.flavolink-header .flavolink-mobile-panel-inner .header-mobile-user-bar-links a,
	.flavolink-header .flavolink-mobile-panel-inner .header-mobile-user-bar-logout {
		color: var(--flavolink-text) !important;
	}
	.flavolink-mobile-panel-body {
		flex: 1;
		min-height: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		background: #FFFFFF;
	}
	.flavolink-mobile-sections {
		margin: 0;
		padding: 0;
		--flavolink-mobile-cat-col: 10rem;
	}
	.flavolink-mobile-section {
		border-bottom: 1px solid #EEEAE6;
	}
	.flavolink-mobile-section:last-of-type {
		border-bottom: none;
	}
	.flavolink-mobile-section-row {
		display: grid;
		grid-template-columns: var(--flavolink-mobile-cat-col) minmax(0, 1fr);
		gap: 0.75rem 1rem;
		padding: 1.125rem 1rem;
		align-items: start;
	}
	.flavolink-mobile-cat {
		margin: 0;
		font-size: 0.9rem;
		font-weight: 600;
		line-height: 1.4;
		color: var(--flavolink-text);
		display: flex;
		gap: 0.5rem;
		align-items: flex-start;
	}
	.flavolink-mobile-cat-bar {
		width: 4px;
		min-height: 1.2rem;
		flex-shrink: 0;
		background: var(--flavolink-orange);
		border-radius: 2px;
		margin-top: 0.1rem;
	}
	.flavolink-mobile-cat-text {
		flex: 1;
		min-width: 0;
	}
	.flavolink-mobile-links {
		display: flex;
		flex-direction: column;
		gap: 0.125rem;
	}
	.flavolink-mobile-links a {
		display: block;
		padding: 0.9rem;
		font-size: 0.875rem;
		font-weight: 400;
		color: var(--flavolink-text);
		text-decoration: none;
		line-height: 0;
		border-radius: 4px;
	}
	.flavolink-mobile-links a:hover,
	.flavolink-mobile-links a:active {
		color: var(--flavolink-orange);
	}
	.flavolink-mobile-links a.active {
		color: var(--flavolink-orange);
		font-weight: 600;
		background: rgba(234, 85, 4, 0.14);
		border-radius: 8px;
		padding: 0.65rem 0.55rem;
	}
	.flavolink-mobile-section:has(.flavolink-mobile-links a.active) .flavolink-mobile-cat-text {
		color: var(--flavolink-orange);
	}
	.flavolink-mobile-site-nav {
		display: flex;
		flex-direction: column;
		padding: 0.25rem 1rem 1.5rem;
		margin: 0;
		border-top: 1px solid var(--flavolink-border);
		background: #FFFFFF;
	}
	.flavolink-mobile-site-nav a {
		font-size: 0.8125rem;
		font-weight: 700;
		letter-spacing: 0.05em;
		color: var(--flavolink-text);
		text-decoration: none;
		padding: 0.85rem 0;
		min-height: 48px;
		display: flex;
		align-items: center;
		border-bottom: 1px solid #EEEAE6;
		background: none !important;
		border-radius: 0 !important;
	}
	.flavolink-mobile-site-nav a:last-child {
		border-bottom: none;
	}
	.flavolink-mobile-site-nav a:hover,
	.flavolink-mobile-site-nav a:active {
		color: var(--flavolink-orange);
	}
	.flavolink-mobile-site-nav a.active {
		color: var(--flavolink-orange);
		font-weight: 800;
	}
}

@media (max-width: 360px) {
	.flavolink-mobile-section-row {
		grid-template-columns: 1fr;
		gap: 0.75rem;
	}
	.flavolink-mobile-cat-bar {
		min-height: 1.5rem;
		align-self: stretch;
	}
}