/* ==========================================================================
   FUGA — trang danh mục / cửa hàng: đường dẫn, thanh công cụ, cột lọc, lưới, thẻ sản phẩm
   ========================================================================== */
.fg-collection { padding-bottom: 56px; background: #fff; color: #1c1c1c; }

/* Đường dẫn */
.fg-crumbs { margin: 16px 0; padding: 12px 0 12px 28.8px; }
.fg-crumbs ol { display: flex; align-items: center; gap: 8px; }
.fg-crumbs li { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 19.6px; }
.fg-crumbs__sep { color: rgba(28, 28, 28, .5); }
.fg-crumbs__current { font-weight: 500; color: rgba(28, 28, 28, .7); }

/* Thanh công cụ */
.fg-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28.8px 28px; border-top: 1px solid #e8e8e8; }
.fg-toolbar__count, .fg-sort__btn, .fg-toolbar__filter { font-size: 12px; line-height: normal; letter-spacing: .48px; }
.fg-toolbar__right { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.fg-toolbar__layout { display: flex; align-items: center; gap: 14px; }
.fg-layout-btn { display: block; line-height: 0; opacity: .3; }
.fg-layout-btn.is-active { opacity: 1; }
.fg-layout-btn .fg-icon { width: 16px; height: 16px; }
.fg-toolbar__divider { width: 1px; height: 16px; background: rgba(28, 28, 28, .15); }
.fg-toolbar__filter { display: inline-flex; align-items: center; gap: 8px; }
.fg-sort { position: relative; }
.fg-sort__btn { display: flex; align-items: center; gap: 8px; transition: opacity .2s; }
.fg-sort__btn:hover { opacity: .7; }
.fg-sort__btn .fg-icon { width: 10px; height: 9px; }
.fg-sort__list { position: absolute; right: 0; top: calc(100% + 12px); z-index: 20; min-width: 220px; padding: 12px 0; background: #fff; box-shadow: 0 4px 24px rgba(0, 0, 0, .12); }
.fg-sort__list a { display: block; padding: 8px 20px; font-size: 14px; line-height: 20px; white-space: nowrap; }
.fg-sort__list a:hover, .fg-sort__list a[aria-current] { background: #f3f3f3; }

/* Bố cục: cột lọc 352px + lưới */
.fg-collection__inner { display: grid; grid-template-columns: 352px minmax(0, 1fr); align-items: start; row-gap: 48px; }
.fg-filters { position: sticky; top: calc(var(--fg-head-bottom, 112px) + 24px); display: grid; gap: 24px; margin: 24px 28px 0; }
.fg-filters__head { display: flex; align-items: center; justify-content: space-between; }
.fg-filters__title { font-size: 12px; line-height: normal; letter-spacing: .48px; }
.fg-filters__close, .fg-filters__foot { display: none; }
.fg-facet { box-shadow: 0 1px 0 #e8e8e8; }
.fg-facet + .fg-facet { box-shadow: 0 1px 0 #e8e8e8, inset 0 1px 0 #e8e8e8; }
.fg-facet__summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; font-size: 15px; line-height: normal; letter-spacing: .6px; color: rgba(28, 28, 28, .6); }
.fg-facet__summary .fg-icon { width: 11px; height: 7px; flex: none; transition: transform .2s; }
.fg-facet[open] .fg-facet__summary .fg-icon { transform: rotate(180deg); }
.fg-facet__content { padding: 0 0 20px 12px; }
.fg-facet__list { display: grid; gap: 12px; }
.fg-check { display: flex; align-items: center; gap: 12px; font-size: 14px; line-height: 19.6px; cursor: pointer; }
.fg-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fg-check__box { position: relative; width: 14px; height: 14px; flex: none; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(28, 28, 28, .3); }
.fg-check input:checked + .fg-check__box { background: #1c1c1c; box-shadow: none; }
.fg-check input:checked + .fg-check__box::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.fg-check input[type="radio"] + .fg-check__box { border-radius: 50%; }
.fg-check input[type="radio"]:checked + .fg-check__box::after { left: 4px; top: 4px; width: 6px; height: 6px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.fg-check input:focus-visible + .fg-check__box { outline: 2px solid #1c1c1c; outline-offset: 2px; }
.fg-facet__colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
.fg-colorbox { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 19.6px; cursor: pointer; }
.fg-colorbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fg-colorbox__dot { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px #e8e8e8; }
.fg-colorbox input:checked + .fg-colorbox__dot { box-shadow: inset 0 0 0 1px #e8e8e8, 0 0 0 2px #fff, 0 0 0 3px #1c1c1c; }
.fg-facet__group { margin: 4px 0 10px; font-size: 14px; line-height: 19.6px; color: rgba(28, 28, 28, .6); }
.fg-facet__group:not(:first-child) { margin-top: 16px; }
.fg-facet__sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.fg-sizebox { display: block; cursor: pointer; }
.fg-sizebox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fg-sizebox span { display: flex; align-items: center; justify-content: center; min-height: 34px; padding: 4px; border: 1px solid #e8e8e8; border-radius: 2px; font-size: 13px; line-height: 1.15; text-align: center; color: rgba(28, 28, 28, .6); overflow-wrap: anywhere; transition: border-color .2s; }
.fg-sizebox:hover span { border-color: #1c1c1c; }
.fg-sizebox input:checked + span { border-color: #1c1c1c; color: #1c1c1c; box-shadow: inset 0 0 0 1px #1c1c1c; }
.fg-switch { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; font-size: 14px; line-height: 19.6px; cursor: pointer; }
.fg-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fg-switch__track { position: relative; width: 32px; height: 16px; border-radius: 9999px; background: rgba(28, 28, 28, .15); transition: background .2s; }
.fg-switch__track::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .2s; }
.fg-switch input:checked ~ .fg-switch__track { background: #1c1c1c; }
.fg-switch input:checked ~ .fg-switch__track::after { transform: translateX(16px); }

/* Lưới sản phẩm */
.fg-plist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 4px; }
.fg-collection[data-layout="small"] .fg-plist { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.fg-plist__promo { min-width: 0; }
.fg-plist__empty { padding: 48px 28px; font-size: 14px; }
.fg-card { position: relative; display: grid; min-width: 0; background: #fff; }
.fg-card__figure { position: relative; display: grid; padding-bottom: 30px; }
.fg-card__media { position: relative; display: block; overflow: hidden; }
.fg-card__img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.fg-card__img2 { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.05); transition: opacity .4s, transform .6s var(--fg-ease); }
.fg-card:hover .fg-card__img2 { opacity: 1; transform: none; }
.fg-card__swatches { position: absolute; left: 16px; right: 16px; bottom: 2px; z-index: 1; display: flex; align-items: center; gap: 8px; }
.fg-card__swatch { width: 28px; height: 28px; flex: none; padding: 0; border: 1px solid #d6d6d6; border-radius: 50%; overflow: hidden; background: #fff; }
.fg-card__swatch img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.fg-card__swatch.is-active { border-color: #1c1c1c; }
.fg-card__more { font-size: 12px; line-height: normal; letter-spacing: .48px; color: rgba(28, 28, 28, .6); }
.fg-card__info { display: grid; gap: 2px; padding: 16px 16px 0; }
.fg-card__title { font-size: 12px; line-height: normal; font-weight: 400; letter-spacing: .48px; }
.fg-card__price { font-size: 12px; line-height: normal; letter-spacing: .48px; color: rgba(28, 28, 28, .6); }

/* Phân trang */
.fg-pagination { margin: 48px 0 0; }
.fg-pagination ul { display: flex; justify-content: center; gap: 8px; }
.fg-pagination a, .fg-pagination span { display: flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; font-size: 14px; border-radius: 18px; }
.fg-pagination .current { background: #1c1c1c; color: #fff; }

.fg-only-mob-shop { display: none !important; }

@media (max-width: 999px) {
	.fg-plist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Điện thoại / máy tính bảng: bộ lọc thành ngăn trượt */
@media (max-width: 768px) {
	.fg-only-desk-shop { display: none !important; }
	.fg-only-mob-shop { display: inline-flex !important; }
	.fg-toolbar { padding: 20px; }
	.fg-crumbs { padding-left: 20px; }
	.fg-collection__inner { grid-template-columns: minmax(0, 1fr); }
	.fg-filters {
		position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(420px, 100%); margin: 0;
		display: flex; flex-direction: column; gap: 0; background: #fff;
		transform: translateX(100%); transition: transform .35s var(--fg-ease); visibility: hidden;
	}
	.fg-filters.is-open { transform: none; visibility: visible; }
	.fg-filters__head { padding: 20px; border-bottom: 1px solid #e8e8e8; }
	.fg-filters__close { display: flex; }
	.fg-filters__body { flex: 1; overflow-y: auto; padding: 0 20px; }
	.fg-filters__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-top: 1px solid #e8e8e8; }
	.fg-filters__clear { font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
	.fg-plist { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 24px 2px; }
	.fg-plist__promo { grid-column: 1 / -1; grid-row: auto; }
	.fg-card__swatches { left: 12px; right: 12px; gap: 6px; }
	.fg-card__swatch { width: 22px; height: 22px; }
	.fg-card__info { padding: 12px 12px 0; }
}
