/* ==========================================================================
   FUGA — ngăn trượt tìm kiếm / giỏ hàng + lớp phủ
   ========================================================================== */
.fg-overlay {
	position: fixed; inset: 0; z-index: 55;
	background: rgba(0, 0, 0, .35);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	opacity: 0; transition: opacity .3s;
}
.fg-overlay.is-visible { opacity: 1; }

.fg-drawer {
	position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
	display: flex; flex-direction: column;
	width: 600px; max-width: 100%;
	background: var(--fg-white); color: #1c1c1c;
	transform: translateX(100%); transition: transform .35s var(--fg-ease);
	overflow-y: auto;
}
.fg-drawer.is-open { transform: none; }
.fg-drawer__close {
	display: flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; flex: none; border-radius: 50%;
	background: #eee; color: #1c1c1c;
}
.fg-drawer__close .fg-icon { width: 12px; height: 12px; }

/* Tìm kiếm */
.fg-search__form { display: flex; align-items: center; gap: 10px; padding: 20px 20px 20px; border-bottom: 1px solid var(--fg-line); }
.fg-search__form > .fg-icon { width: 15px; height: 15px; flex: none; }
.fg-search__input { flex: 1; min-width: 0; padding: 0; border: 0; outline: 0; background: none; font-size: 16px; line-height: 1.1; letter-spacing: .16px; }
.fg-search__input::placeholder { color: rgba(28, 28, 28, .6); }
.fg-search__input::-webkit-search-cancel-button { display: none; }
.fg-search__body { display: grid; gap: 48px; padding: 32px; }
.fg-search__label { margin-bottom: 18px; font-size: 12px; line-height: normal; letter-spacing: .48px; color: rgba(28, 28, 28, .6); }
.fg-search__terms { display: grid; justify-items: start; gap: 14px; }
.fg-search__terms a { font-size: 22px; line-height: 33px; letter-spacing: .22px; }
.fg-search__terms a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* Giỏ hàng */
.fg-cart__head { position: relative; display: flex; align-items: center; justify-content: center; padding: 20px; }
.fg-cart__head .fg-drawer__close { position: absolute; left: 20px; top: 20px; }
.fg-cart__title { display: flex; align-items: center; gap: 10px; font-size: 16px; line-height: 28px; }
.fg-cart__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 32px; padding: 6px; border-radius: 4px; background: #f2f2f2; }
.fg-cart__tab { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 3px; font-size: 13px; color: rgba(28, 28, 28, .6); }
.fg-cart__tab.is-active { background: var(--fg-white); color: #1c1c1c; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.fg-cart__dot { position: absolute; top: 12px; margin-left: 60px; width: 5px; height: 5px; border-radius: 50%; background: #1c1c1c; }
.fg-cart__pane { flex: 1; display: flex; flex-direction: column; padding: 0 32px 32px; }
.fg-cart__content { flex: 1; display: flex; flex-direction: column; }
.fg-cart__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; text-align: center; }
.fg-cart__empty-title { font-size: 28px; line-height: 1.3; letter-spacing: .28px; }
.fg-cart__offers-empty { padding: 48px 0; text-align: center; color: rgba(28, 28, 28, .6); }

/* Món trong giỏ */
.fg-cart__items { flex: 1; display: grid; align-content: start; gap: 0; margin-top: 16px; }
.fg-cart__item { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--fg-line); transition: opacity .2s; }
.fg-cart__item.is-busy { opacity: .5; pointer-events: none; }
.fg-cart__thumb img { width: 96px; height: 96px; object-fit: contain; background: #fafbfd; }
.fg-cart__info { display: grid; gap: 4px; align-content: start; }
.fg-cart__name { font-size: 14px; line-height: 20px; font-weight: 500; }
.fg-cart__variant { font-size: 12px; line-height: 17px; letter-spacing: .48px; color: rgba(28, 28, 28, .6); }
.fg-cart__price { font-size: 14px; line-height: 20px; }
.fg-cart__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.fg-qty { display: inline-flex; align-items: center; height: 36px; border: 1px solid rgba(28, 28, 28, .2); }
.fg-qty__btn { width: 36px; height: 100%; font-size: 16px; line-height: 1; }
.fg-qty__input { width: 40px; height: 100%; padding: 0; border: 0; text-align: center; font-size: 14px; -moz-appearance: textfield; appearance: textfield; background: none; }
.fg-qty__input::-webkit-outer-spin-button, .fg-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fg-cart__remove { font-size: 12px; letter-spacing: .48px; text-decoration: underline; text-underline-offset: 3px; color: rgba(28, 28, 28, .6); }
.fg-cart__foot { position: sticky; bottom: 0; display: grid; gap: 12px; padding: 20px 0 0; background: #fff; }
.fg-cart__subtotal { display: flex; justify-content: space-between; font-size: 16px; line-height: 24px; }
.fg-cart__note { font-size: 12px; line-height: 17px; letter-spacing: .48px; color: rgba(28, 28, 28, .6); }
.fg-cart__checkout { width: 100%; }
.fg-cart__view { justify-self: center; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 699px) {
	.fg-drawer { width: 100%; }
	.fg-search__body { padding: 24px 20px; }
	.fg-cart__tabs { margin-inline: 20px; }
	.fg-cart__pane { padding-inline: 20px; }
	.fg-cart__empty-title { font-size: 24px; }
}

/* Sản phẩm nổi bật trong ngăn tìm kiếm */
.fg-search__products { display: grid; grid-auto-flow: column; grid-auto-columns: 240px; gap: 4px; margin: 0 -32px; padding: 1px 32px; overflow-x: auto; scrollbar-width: none; }
.fg-search__products::-webkit-scrollbar { display: none; }
.fg-search__products .fg-card__img { aspect-ratio: 4 / 3; }
@media (max-width: 699px) { .fg-search__products { margin: 0 -20px; padding: 1px 20px; grid-auto-columns: 200px; } }
