/**
 * 한우 사는 곳 — .search_wrapper.page-hanwoo-mall 범위
 * 검색 줄은 main.css 의 .search_btn_wrap / .search_bar 와 동일 클래스 사용
 */

/* KV는 공통 .sub_top 사용 (숨김 해제됨) */

.search_wrapper.page-hanwoo-mall {
	width: 100%;
}

/* store_search_test 와 동일: 좌 search_cont_menu / 우 search_cont_list (main.css .search_cont) */
.search_wrapper.page-hanwoo-mall .search_bar_component.hanwoo-mall-search-component {
	align-items: stretch;
	gap: 0;
	width: 100%;
	max-width: 1480px;
	margin-left: auto;
	margin-right: auto;
}

.search_wrapper.page-hanwoo-mall .search_cont_menu.hanwoo-mall-search-menu {
	align-items: stretch;
	/* Figma 361:125: 폼과 도구 사이 35px, 하단 50px */
	display: flex;
	flex-direction: column;
	gap: 35px;
	padding-bottom: 50px;
	box-sizing: border-box;
	/* main.css sticky top:0 은 고정 #header(common.css)에 가려짐 → GNB 높이만큼 보정 */
	top: 90px;
}

@media only screen and (max-width: 1281px) {
	.search_wrapper.page-hanwoo-mall .search_cont_menu.hanwoo-mall-search-menu {
		top: 55px;
	}
}

@media only screen and (max-width: 768px) {
	.search_wrapper.page-hanwoo-mall .search_cont_menu.hanwoo-mall-search-menu {
		/* #header 숨김, .m_header 고정 (~60px) */
		top: 60px;
	}
}

.search_wrapper.page-hanwoo-mall .search_cont_menu.hanwoo-mall-search-menu #hanwooMallSearchFrm {
	width: 100%;
	align-items: stretch;
}

/* Figma 361:125 — 세로 스택: 지역 행 → 검색 행 → 예시 문구 */
.search_wrapper.page-hanwoo-mall .hanwoo-mall-search-stack {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 20px;
	width: 100%;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-region-row {
	width: 100%;
	height: 70px;
	flex-shrink: 0;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-region-select {
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0 40px 0 20px;
	border: none;
	background-color: #f5f5f5;
	color: #000;
	font-size: 16.9px;
	font-weight: 500;
	letter-spacing: -0.05em;
	line-height: 24px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23888888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 20px center;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-region-select option[value=""] {
	color: #888;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	justify-content: flex-start;
	width: 100%;
	gap: 0;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row.search_btn_wrap {
	justify-content: flex-start;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row .input {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
	display: flex;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row input[type="text"] {
	width: 100%;
	height: 70px;
	padding: 21.5px 25px 19.5px;
	border: none;
	border-radius: 0;
	background-color: #f5f5f5;
	color: #000;
	font-size: 16px;
	font-weight: 400;
	letter-spacing: -1.2px;
	box-sizing: border-box;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row input::placeholder {
	color: rgba(0, 0, 0, 0.5);
	font-size: 16px;
	font-weight: 400;
	letter-spacing: -1.2px;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row .hanwoo-mall-search-submit,
.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row .search_btn {
	flex: 0 0 70px;
	width: 70px;
	min-width: 70px;
	height: 70px;
	padding: 10px;
	font-size: 20px;
	font-weight: 500;
	letter-spacing: -1.2px;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-search-hint {
	margin: 0;
	font-size: 18px;
	font-weight: 300;
	letter-spacing: -0.9px;
	color: rgba(0, 0, 0, 0.5);
	line-height: 27px;
	text-align: left;
}

/* Figma 361:125 — 선택 초기화 · 전체보기: 우측 정렬, 밑줄 없음 */
.search_wrapper.page-hanwoo-mall .hanwoo-mall-select-tools.search_menu_selectWrap {
	justify-content: flex-end;
	gap: 20px;
	width: 100%;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-select-tools .hanwoo-mall-tool-link {
	text-decoration: none;
	text-underline-offset: 0;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-select-tools .hanwoo-mall-tool-link:hover {
	text-decoration: underline;
	text-underline-offset: 5px;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-select-tools .hanwoo-mall-tool-link p {
	margin: 0;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-select-divider {
	display: inline-block;
	width: 1px;
	height: 23px;
	background: #d4d4d4;
	flex-shrink: 0;
	align-self: center;
}

/* -------------------------------------------------------------------------
 * 우측 리스트 영역 Figma 361:160
 * ------------------------------------------------------------------------- */
.search_wrapper.page-hanwoo-mall .search_cont_list.hanwoo-mall-result {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 30px;
	width: 100%;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-list-toolbar {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	flex-wrap: wrap;
	gap: 16px;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-count {
	margin: 0;
	padding: 0;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-count strong {
	font-family: "Noto Sans KR", sans-serif;
	font-size: 21.7px;
	font-weight: 700;
	line-height: 50px;
	letter-spacing: -1.1px;
	color: #000;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-perpage-wrap {
	position: relative;
	flex: 0 0 auto;
}

.search_wrapper.page-hanwoo-mall .hanwoo-mall-perpage {
	box-sizing: border-box;
	width: 180px;
	height: 50px;
	padding: 0 40px 0 21px;
	border: 1px solid #d4d4d4;
	border-radius: 0;
	background-color: #fff;
	font-family: "Noto Sans KR", sans-serif;
	font-size: 18px;
	font-weight: 300;
	line-height: 27px;
	color: #000;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 20px center;
}

@media only screen and (max-width: 1281px) {
	.search_wrapper.page-hanwoo-mall .hanwoo-mall-region-row {
		height: 60px;
	}

	.search_wrapper.page-hanwoo-mall .hanwoo-mall-region-select {
		font-size: 16px;
		padding: 0 36px 0 16px;
	}

	.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row input[type="text"] {
		height: 60px;
		padding: 10px 20px;
		font-size: 16px;
	}

	.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row .hanwoo-mall-search-submit,
	.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row .search_btn {
		flex-basis: 60px;
		width: 60px;
		min-width: 60px;
		height: 60px;
		font-size: 18px;
	}
}

@media only screen and (max-width: 1024px) {
	.search_wrapper.page-hanwoo-mall .hanwoo-mall-search-hint {
		font-size: 15px;
		line-height: 24px;
	}
}

@media only screen and (max-width: 768px) {
	.search_wrapper.page-hanwoo-mall #hanwooMallSearchFrm {
		width: 100%;
	}

	.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row {
		width: 100%;
	}

	.search_wrapper.page-hanwoo-mall .hanwoo-mall-perpage {
		width: 160px;
		font-size: 15px;
		height: 46px;
	}

	.search_wrapper.page-hanwoo-mall .hanwoo-mall-count strong {
		font-size: 18px;
		line-height: 40px;
	}
}

@media only screen and (max-width: 480px) {
	.search_wrapper.page-hanwoo-mall .hanwoo-mall-region-row {
		height: 50px;
	}

	.search_wrapper.page-hanwoo-mall .hanwoo-mall-region-select {
		font-size: 13px;
		padding: 0 28px 0 10px;
		background-position: right 10px center;
	}

	.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row input[type="text"] {
		height: 50px;
		font-size: 14px;
		padding: 10px 12px;
	}

	.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row .hanwoo-mall-search-submit,
	.search_wrapper.page-hanwoo-mall .hanwoo-mall-keyword-row .search_btn {
		flex-basis: 50px;
		width: 50px;
		min-width: 50px;
		height: 50px;
		font-size: 14px;
	}
}

/* -------------------------------------------------------------------------
 * 카드 그리드
 * ------------------------------------------------------------------------- */
.page-hanwoo-mall {
	--hm-text-body: #191918;
	--hm-pill-bg: #e5e5e5;
	--hm-buy: #333;
	--hm-page-on: #ff3d45;
	--hm-page-off: rgba(0, 0, 0, 0.5);
	box-sizing: border-box;
}

.page-hanwoo-mall .hanwoo-mall-grid {
	display: grid;
	/* Figma 361:160: 2열, 카드 간격 30px */
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px;
	width: 100%;
	list-style: none;
	margin: 0;
	padding: 0;
}

.page-hanwoo-mall .hanwoo-mall-card-wrap {
	display: flex;
	padding-bottom: 0;
	margin-bottom: 0;
	min-height: 0;
}

.page-hanwoo-mall .hanwoo-mall-card-wrap .hanwoo-mall-card {
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
}

/* Figma 361:170 기본 / 361:183 호버 */
.page-hanwoo-mall .hanwoo-mall-card {
	position: relative;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 5px;
	min-height: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	overflow: hidden;
}

.page-hanwoo-mall .hanwoo-mall-card-inner {
	position: relative;
	z-index: 0;
	flex: 1 1 auto;
	min-height: 215px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	padding: 17px 20px 16px;
	box-sizing: border-box;
}

/* 기본 상태: 로고만 (Figma 361:170 계열) */
.page-hanwoo-mall .hanwoo-mall-card-logo-row {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	width: 100%;
	overflow: hidden;
}

.page-hanwoo-mall .hanwoo-mall-card-logo-media {
	position: relative;
	z-index: 0;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 80px;
}

/* 로고 미등록: 기본 이미지 + 그 하단 브랜드명 14px */
.page-hanwoo-mall .hanwoo-mall-card-logo-media.is-no-logo {
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding-top: 4px;
	padding-bottom: 4px;
	box-sizing: border-box;
}

.page-hanwoo-mall .hanwoo-mall-card-logo-media.is-no-logo .hanwoo-mall-logo-fallback {
	flex-shrink: 0;
}

.page-hanwoo-mall .hanwoo-mall-card-brand-name {
	margin: 0;
	width: 100%;
	max-width: 100%;
	padding: 0 4px;
	box-sizing: border-box;
	flex-shrink: 0;
	font-family: "Noto Sans KR", sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.02em;
	color: #191918;
	text-align: center;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	word-break: keep-all;
}

.page-hanwoo-mall .hanwoo-mall-card-logo-media img {
	max-width: 200px;
	width: auto;
	height: auto;
	max-height: none;
	min-height: 0;
	object-fit: contain;
	object-position: center;
	display: block;
}

/* 호버 시 Figma 379:1019: 흰색 67% 면이 카드 전체를 덮고 desc + 구매하기 */
.page-hanwoo-mall .hanwoo-mall-card-hover-layer {
	position: absolute;
	inset: 0;
	z-index: 3;
	box-sizing: border-box;
	border-radius: inherit;
	background: rgba(255, 255, 255, 0.67);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.22s ease, visibility 0.22s ease;
}

.page-hanwoo-mall .hanwoo-mall-card:hover .hanwoo-mall-card-hover-layer,
.page-hanwoo-mall .hanwoo-mall-card:focus-within .hanwoo-mall-card-hover-layer {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.page-hanwoo-mall .hanwoo-mall-logo-placeholder {
	width: 200px;
	max-width: 100%;
	min-height: 80px;
	height: auto;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px dashed #d4d4d4;
	border-radius: 4px;
	background: #fafafa;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #aaa;
	text-transform: lowercase;
	font-family: system-ui, sans-serif;
}

.page-hanwoo-mall .hanwoo-mall-card-hover-layer .hanwoo-mall-card-desc {
	position: absolute;
	left: 50%;
	top: 24px;
	transform: translateX(-50%);
	z-index: 1;
	box-sizing: border-box;
	width: calc(100% - 48px);
	max-width: 344px;
	height: 110px;
	margin: 0;
	padding: 0;
	overflow-x: hidden;
	overflow-y: auto;
	font-family: "Pretendard", "Noto Sans KR", sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 22px;
	color: #020202;
	letter-spacing: 0.125px;
	-webkit-overflow-scrolling: touch;
}

.page-hanwoo-mall .hanwoo-mall-card-hover-layer .hanwoo-mall-card-actions {
	position: absolute;
	right: 29px;
	bottom: 34px;
	z-index: 1;
	display: flex;
	justify-content: flex-end;
	align-items: flex-end;
	margin: 0;
	padding: 0;
	max-height: none;
	opacity: 1;
	overflow: visible;
}

.page-hanwoo-mall .hanwoo-mall-region-pill {
	position: absolute;
	top: 17px;
	right: 17px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	max-width: calc(100% - 34px);
	height: 26px;
	padding: 0 21px;
	border-radius: 60px;
	border: 1px solid transparent;
	background: #efefef;
	font-size: 12px;
	font-weight: 500;
	line-height: 24px;
	color: #000;
	white-space: nowrap;
	font-family: "Noto Sans KR", sans-serif;
	box-sizing: border-box;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.page-hanwoo-mall .hanwoo-mall-card:hover .hanwoo-mall-region-pill,
.page-hanwoo-mall .hanwoo-mall-card:focus-within .hanwoo-mall-region-pill {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.page-hanwoo-mall .hanwoo-mall-buy {
	display: inline-flex;
	align-items: flex-end;
	gap: 5px;
	min-height: 36px;
	padding: 5px 1px;
	font-size: 14px;
	font-weight: 500;
	line-height: 14px;
	color: #0c0c0c;
	text-decoration: none;
	border-radius: 8px;
	font-family: "Noto Sans KR", "Pretendard", sans-serif;
}

.page-hanwoo-mall .hanwoo-mall-buy:hover {
	text-decoration: underline;
}

.page-hanwoo-mall .hanwoo-mall-buy .hanwoo-mall-buy-icon {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	object-fit: contain;
	display: block;
}

.page-hanwoo-mall .hanwoo-mall-buy.is-disabled {
	pointer-events: none;
	opacity: 0.45;
	text-decoration: none;
	cursor: default;
}

.page-hanwoo-mall .hanwoo-mall-empty {
	text-align: center;
	padding: 80px 20px;
	color: #888;
	font-size: 18px;
}

.page-hanwoo-mall .hanwoo-mall-empty a {
	color: #5f0801;
	text-decoration: underline;
}

/* 페이징 */
.page-hanwoo-mall .hanwoo-mall-paging {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0;
	margin-top: 0;
	padding-top: 15px;
	padding-bottom: 0;
}

.page-hanwoo-mall .hanwoo-mall-paging .hm-pg-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	text-decoration: none;
}

.page-hanwoo-mall .hanwoo-mall-paging .hm-pg-arrow img {
	display: block;
	width: 24.5px;
	height: auto;
	max-height: 25px;
}

.page-hanwoo-mall .hanwoo-mall-paging .hm-pg-arrow.btn.prev img,
.page-hanwoo-mall .hanwoo-mall-paging .hm-pg-arrow.btn.next img {
	width: 25px;
}

.page-hanwoo-mall .hanwoo-mall-paging a.hm-pg-disabled {
	pointer-events: none;
	opacity: 0.35;
}

.page-hanwoo-mall .hanwoo-mall-paging ul.hm-pg-nums {
	display: flex;
	align-items: center;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0 10px;
}

.page-hanwoo-mall .hanwoo-mall-paging ul.hm-pg-nums li {
	margin: 0;
	width: 45px;
	height: 45px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.page-hanwoo-mall .hanwoo-mall-paging ul.hm-pg-nums a {
	width: 45px;
	height: 45px;
	border-radius: 45px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 27px;
	font-weight: 400;
	color: var(--hm-page-off);
	text-decoration: none;
	font-family: "Noto Sans KR", sans-serif;
}

.page-hanwoo-mall .hanwoo-mall-paging ul.hm-pg-nums li.on a {
	background: var(--hm-page-on);
	color: #fff;
	font-weight: 400;
}

.page-hanwoo-mall .hanwoo-mall-paging ul.hm-pg-nums li:not(.on) a:hover {
	color: rgba(0, 0, 0, 0.75);
}

@media (max-width: 768px) {
	.page-hanwoo-mall .hanwoo-mall-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.page-hanwoo-mall .hanwoo-mall-card-hover-layer .hanwoo-mall-card-desc {
		width: calc(100% - 28px);
		top: 16px;
		height: 96px;
		font-size: 14px;
		line-height: 20px;
	}

	.page-hanwoo-mall .hanwoo-mall-card-hover-layer .hanwoo-mall-card-actions {
		right: 14px;
		bottom: 22px;
	}
}

@media (max-width: 480px) {
	.page-hanwoo-mall .hanwoo-mall-card-hover-layer .hanwoo-mall-card-desc {
		width: calc(100% - 20px);
		top: 12px;
		height: 88px;
	}

	.page-hanwoo-mall .hanwoo-mall-card-hover-layer .hanwoo-mall-card-actions {
		right: 10px;
		bottom: 16px;
	}
}
