/* Combined search + location box */
.kr-header-search-box {
	display: flex;
	align-items: stretch;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 640px;
	margin: 0 auto;
	background: #fff;
	overflow: visible;
}

.main-header,
.main-header .header-wrap,
.mobile-header,
.kr-header-search-box__location {
	overflow: visible;
}
.kr-header-search-box__location {
	flex: 0 0 auto;
	width: clamp(138px, 40%, 200px);
	min-width: 0;
	display: flex;
	align-items: center;
	padding:5px;
	background: linear-gradient(135deg, #fff9f4 0%, #fff5eb 100%);
	border-radius: 10px;
	margin: 0;
}

.kr-header-search-box__divider {
	flex: 0 0 auto;
	align-self: center;
	width: 1px;
	height: 34px;
	margin: 0 4px;
	background: linear-gradient(180deg, transparent 0%, #e8dfd4 18%, #e8dfd4 82%, transparent 100%);
}

.kr-header-search-box__search {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
}

.kr-header-search-box__search .kr-search,
.kr-header-search-box__search.header-search {
	width: 100%;
	min-width: 0;
}
.kr-header-search-box .kr-location-trigger:hover,
.kr-header-search-box .kr-location-trigger:focus-visible,
.kr-header-search-box .kr-location-trigger.is-open {
	box-shadow: none;
	outline: none;
}

.kr-header-search-box .kr-location-trigger__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.kr-header-search-box .kr-location-trigger__icon svg {
	width: 16px;
	height: 16px;
}

.kr-header-search-box .kr-location-trigger__text {
	min-width: 0;
	gap: 1px;
}

.kr-header-search-box .kr-location-trigger__label {
	font-size: 10px;
	font-weight: 600;
	line-height: 1.1;
	color: #9ca3af;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.kr-header-search-box .kr-location-trigger__row {
	display: flex;
	align-items: center;
	text-align:left;
	gap: 5px;
	min-width: 0;
}

.kr-header-search-box .kr-location-trigger__value {
	font-size: 11px;
	font-weight: 500;
	line-height: 1.25;
	color: var(--kr-text, #1a1a1a);
	max-width: none;
	flex: 1 1 auto;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.kr-header-search-box .kr-location-trigger__pin-badge {
	flex: 0 0 auto;
	font-size: 10px;
	font-weight: 700;
	display:none;
	line-height: 1;
	color: var(--kr-saffron-dark, #e8651a);
	background: rgba(255, 119, 34, 0.14);
	padding: 3px 5px;
	border-radius: 5px;
	letter-spacing: 0.02em;
}

.kr-header-search-box .kr-location-trigger__pin {
	display: none;
}

.kr-header-search-box .kr-location-trigger__chevron {
	flex: 0 0 auto;
	color: #b8b0a6;
	margin-left: 0;
}

.kr-header-search-box .kr-location-trigger__chevron svg {
	width: 13px;
	height: 13px;
}

.kr-location-trigger--inline .kr-location-trigger__chevron {
	margin-left: 0;
}

/* Flatten search form inside combo box */
.kr-header-search-box .kr-search__form,
.kr-header-search-box .kr-search__form--combo {
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	padding: 2px 4px 2px 2px !important;
	min-height: 42px;
	gap: 4px;
}

.kr-header-search-box:focus-within .kr-search__form {
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
}

.kr-header-search-box .kr-search__lead-icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: #9ca3af;
	margin-left: 4px;
}

.kr-header-search-box .kr-search__lead-icon svg {
	display: block;
	width: 17px;
	height: 17px;
}

.kr-header-search-box .kr-search__input,
.kr-header-search-box .search-box,
.kr-header-search-box .search-input-box {
	padding: 8px 4px 8px 0 !important;
	font-size: 0.9rem !important;
}

.kr-header-search-box .kr-search__input::placeholder {
	color: #a8a29e;
}

.kr-header-search-box .kr-search__submit {
	width: 38px !important;
	height: 38px !important;
	min-width: 38px !important;
	border-radius: 10px !important;
	box-shadow: 0 2px 8px rgba(255, 119, 34, 0.22) !important;
}

.kr-header-search-box .kr-search__fibo .dgwt-wcas-search-form {
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
}

/* Mobile combined box */
.kr-header-search-box--mobile {
	display: flex;
	align-items: stretch;
	max-width: none;
	width: auto;
	margin: 0 12px 12px;
	padding: 3px;
	min-height: 48px;
	border-radius: 12px;
	background: #fff;
	border: 1.5px solid #e8dfd4;
	box-shadow: 0 2px 10px rgba(26, 26, 26, 0.06);
}

.kr-header-search-box--mobile:focus-within {
	border-color: var(--kr-saffron, #ff7722);
	box-shadow: 0 0 0 3px rgba(255, 119, 34, 0.1);
}

.kr-header-search-box--mobile .kr-header-search-box__location {
	width: clamp(108px, 36%, 130px);
	border-radius: 9px 0 0 9px;
}

.kr-header-search-box--mobile .kr-location-trigger {
	padding: 6px 4px 6px 8px;
	min-height: 40px;
	gap: 5px;
}

.kr-header-search-box--mobile .kr-location-trigger__icon {
	width: 26px;
	height: 26px;
	border-radius: 7px;
}

.kr-header-search-box--mobile .kr-location-trigger__icon svg {
	width: 14px;
	height: 14px;
}

.kr-header-search-box--mobile .kr-location-trigger__label {
	font-size: 9px;
}

.kr-header-search-box--mobile .kr-location-trigger__value {
	font-size: 12px;
}

.kr-header-search-box--mobile .kr-location-trigger__pin-badge {
	font-size: 9px;
	padding: 2px 4px;
}

.kr-header-search-box--mobile .kr-location-trigger__chevron {
	display: none;
}

.kr-header-search-box--mobile .kr-header-search-box__divider {
	height: 28px;
	margin: 0 3px;
}

.kr-header-search-box--mobile .kr-search--mobile {
	padding: 0;
	background: transparent;
}

.kr-header-search-box--mobile .kr-search__form {
	padding: 2px 3px 2px 0 !important;
	min-height: 40px;
}

.kr-header-search-box--mobile .kr-search__lead-icon {
	width: 24px;
	height: 24px;
	margin-left: 2px;
}

.kr-header-search-box--mobile .kr-search__lead-icon svg {
	width: 15px;
	height: 15px;
}

.kr-header-search-box--mobile .kr-search__input {
	font-size: 0.8125rem !important;
	padding: 8px 2px 8px 0 !important;
}

.kr-header-search-box--mobile .kr-search__submit {
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	border-radius: 9px !important;
}

@media (min-width: 768px) {
	.main-header .kr-header-search-box {
		margin: 0 auto;
	}

	.main-header .header-search {
		flex: unset;
		max-width: none;
		margin: 0;
	}
}

@media (max-width: 991px) and (min-width: 768px) {
	.kr-header-search-box__location {
		width: clamp(112px, 28%, 150px);
	}
}

@media (min-width: 992px) {
	.main-header .kr-header-search-box {
		max-width: 680px;
	}
}

/* Delivery location picker — header trigger + modal */

.kr-location-trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border: 1px solid #ece3da;
	border-radius: 8px;
	background: #fffaf5;
	color: var(--kr-text, #1a1a1a);
	cursor: pointer;
	text-align: left;
	max-width: 100%;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
	font-family: inherit;
}

.kr-location-trigger:hover,
.kr-location-trigger:focus-visible {
	border-color: var(--kr-saffron, #ff7722);
	box-shadow: 0 0 0 3px rgba(255, 119, 34, 0.12);
	outline: none;
}

.kr-location-trigger__icon {
	flex: 0 0 auto;
	color: var(--kr-saffron, #ff7722);
	display: flex;
	align-items: center;
	justify-content: center;
}

.kr-location-trigger__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.2;
}

.kr-location-trigger__row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	min-width: 0;
}

.kr-location-trigger__label {
	font-size: 11px;
	font-weight: 500;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.kr-location-trigger__value {
	font-size: 13px;
	font-weight: 600;
	color: var(--kr-text, #1a1a1a);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 160px;
}

.kr-location-trigger__pin {
	font-size: 11px;
	color: #6b7280;
}

.kr-location-trigger__chevron {
	flex: 0 0 auto;
	color: #9ca3af;
	margin-left: 2px;
}

.kr-location-trigger[data-kr-location-set="1"] {
	background: #fff;
}

/* Desktop header placement (standalone fallback) */
.main-header .header-location {
	flex: 0 0 auto;
	max-width: 190px;
}

.main-header .kr-location-trigger {
	width: 100%;
	padding:0px;
	background:transparent;
	border:0px!important;
}

.main-header .kr-location-trigger__value {
	max-width: 130px;
}

.kr-location-trigger--mobile {
	width: 100%;
}

.kr-location-trigger--mobile .kr-location-trigger__value {
	max-width: none;
}

.kr-location-trigger--mobile .kr-location-trigger__chevron {
	margin-left: auto;
}

.kr-location-trigger.is-open .kr-location-trigger__chevron {
	transform: rotate(180deg);
}

.kr-location-trigger__chevron {
	transition: transform 0.2s ease;
}

/* Dropdown panel */
.kr-location-dropdown[hidden] {
	display: none !important;
}

.kr-location-dropdown {
	position: fixed;
	z-index: 10060;
	width: 340px;
	max-width: calc(100vw - 24px);
}

.kr-location-dropdown__panel {
	max-height: min(70vh, 520px);
	overflow: auto;
	background: #fff;
	border: 1px solid #ece3da;
	border-radius: 14px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
	padding: 18px 16px 14px;
	animation: krLocationDropdownIn 0.18s ease;
}

.kr-location-dropdown.is-flipped .kr-location-dropdown__panel {
	animation: krLocationDropdownInFlip 0.18s ease;
}

@keyframes krLocationDropdownIn {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes krLocationDropdownInFlip {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.kr-location-dropdown__head {
	margin-bottom: 14px;
}

.kr-location-dropdown__title {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 700;
	color: var(--kr-text, #1a1a1a);
}

.kr-location-dropdown__subtitle {
	margin: 0;
	font-size: 12px;
	color: #6b7280;
	line-height: 1.45;
}

.kr-location-dropdown__gps {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 14px;
	border: 1px dashed #f0c9a8;
	border-radius: 10px;
	background: #fff7ef;
	color: var(--kr-saffron-dark, #e8651a);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
	font-family: inherit;
}

.kr-location-dropdown__gps:hover,
.kr-location-dropdown__gps:focus-visible {
	background: #ffefe0;
	border-color: var(--kr-saffron, #ff7722);
	outline: none;
}

.kr-location-dropdown__gps.is-loading {
	opacity: 0.75;
	pointer-events: none;
}

.kr-location-dropdown__divider {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 12px 0;
	color: #9ca3af;
	font-size: 11px;
	font-weight: 600;
}

.kr-location-dropdown__divider::before,
.kr-location-dropdown__divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #ece3da;
}

.kr-location-dropdown__label {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #374151;
}

.kr-location-dropdown__pin-row {
	display: flex;
	gap: 8px;
}

.kr-location-dropdown__pin-input {
	flex: 1;
	min-width: 0;
	height: 40px;
	padding: 0 12px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font-size: 15px;
	font-family: inherit;
	letter-spacing: 0.08em;
}

.kr-location-dropdown__pin-input:focus {
	border-color: var(--kr-saffron, #ff7722);
	box-shadow: 0 0 0 3px rgba(255, 119, 34, 0.12);
	outline: none;
}

.kr-location-dropdown__pin-btn {
	flex: 0 0 auto;
	height: 40px;
	padding: 0 16px;
	border: none;
	border-radius: 10px;
	background: var(--kr-saffron, #ff7722);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}

.kr-location-dropdown__pin-btn:hover {
	background: var(--kr-saffron-dark, #e8651a);
}

.kr-location-dropdown__pin-btn.is-loading {
	opacity: 0.75;
	pointer-events: none;
}

.kr-location-dropdown__message {
	margin-top: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 12px;
	line-height: 1.45;
}

.kr-location-dropdown__message--error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.kr-location-dropdown__message--info {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

.kr-location-dropdown__results {
	margin-top: 12px;
}

.kr-location-dropdown__results-label {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 600;
	color: #374151;
}

.kr-location-dropdown__office-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: 150px;
	overflow: auto;
}

.kr-location-dropdown__office {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	transition: border-color 0.2s, background 0.2s;
}

.kr-location-dropdown__office:hover,
.kr-location-dropdown__office.is-selected {
	border-color: var(--kr-saffron, #ff7722);
	background: #fff7ef;
}

.kr-location-dropdown__office-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--kr-text, #1a1a1a);
}

.kr-location-dropdown__office-meta {
	font-size: 11px;
	color: #6b7280;
}

.kr-location-dropdown__preview {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
}

.kr-location-dropdown__preview-pin {
	font-size: 11px;
	font-weight: 700;
	color: var(--kr-saffron, #ff7722);
	margin-bottom: 2px;
}

.kr-location-dropdown__preview-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--kr-text, #1a1a1a);
}

.kr-location-dropdown__foot {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #f0e8df;
}

.kr-location-dropdown__btn {
	height: 38px;
	padding: 0 16px;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	border: none;
}

.kr-location-dropdown__btn--ghost {
	background: #f3f4f6;
	color: #374151;
}

.kr-location-dropdown__btn--ghost:hover {
	background: #e5e7eb;
}

.kr-location-dropdown__btn--primary {
	background: var(--kr-saffron, #ff7722);
	color: #fff;
}

.kr-location-dropdown__btn--primary:hover:not(:disabled) {
	background: var(--kr-saffron-dark, #e8651a);
}

.kr-location-dropdown__btn--primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.kr-location-dropdown__btn.is-loading {
	opacity: 0.75;
	pointer-events: none;
}

@media (max-width: 767px) {
	.kr-location-dropdown__panel {
		max-height: min(75vh, 480px);
	}
}
