.weaf {
  --weaf-paper: #faf6ed;
  --weaf-paper-2: #f7f0e6;
  --weaf-ink: #1a1410;
  --weaf-ink-soft: #3a2f28;
  --weaf-muted: #7a6f62;
  --weaf-wine: #8d0b28;
  --weaf-wine-deep: #5c0718;
  --weaf-wine-bright: #b01e3f;
  --weaf-line: rgba(26, 20, 16, .10);
  --weaf-line-strong: rgba(26, 20, 16, .16);
  --weaf-shadow: 0 24px 70px rgba(41, 28, 20, .18);
  color: var(--weaf-ink);
  position: relative;
}

.weaf *, .weaf *::before, .weaf *::after { box-sizing: border-box; }
.weaf button, .weaf input, .weaf select { font: inherit; }
.weaf svg { width: 1.15em; height: 1.15em; stroke-width: 1.7; }
html.weaf-lock, html.weaf-lock body { overflow: hidden; }

.weaf__intro { padding: 2.25rem 0 1.5rem; }
.weaf__eyebrow { color: var(--weaf-wine); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; }
.weaf__title { margin: .65rem 0 .75rem; font-size: 10em; line-height: 1.02; font-weight:500; }
.weaf__title em { font-family: "IBM Plex Serif", sans-serif; color: var(--fs-color-alert); }
.weaf__description { max-width: 40%; font-size: 1rem; line-height: 1.7; }
.weaf__description p:last-child { margin-bottom: 0; }

.weaf__search-shell { border: 1px solid var(--weaf-line); background: rgba(250, 246, 237, .9); border-radius: 20px; padding: 14px; box-shadow: 0 12px 34px rgba(41, 28, 20, .06); }
.weaf__search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.weaf__search-field { position: relative; display: block; margin: 0; font-weight:400; }
.weaf__search-field svg, .weaf__option-search svg { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.weaf__search-input { width: 100%; height: 50px !important; margin: 0 !important; padding: 0 20px 0 48px !important; border: 1px solid transparent !important; border-radius: 999px !important; background: #fff !important; box-shadow: inset 0 0 0 1px rgba(26, 20, 16, .03) !important; }
.weaf__search-input:focus { border-color: rgba(141, 11, 40, .28) !important; box-shadow: 0 0 0 4px rgba(141, 11, 40, .07) !important; }
.weaf .weaf__filter-button, .weaf .weaf__submit { min-height: 50px; margin: 0; border-radius: 999px; display: inline-flex; align-items: center; gap: .5rem; }
.weaf__filter-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--weaf-wine); color: #fff; font-size: .65rem; display: inline-flex; align-items: center; justify-content: center; }

.weaf__quick-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--weaf-line); border-radius: 18px; overflow: hidden; background: rgba(250, 246, 237, .78); }
.weaf__quick-column { min-height: 205px; padding: 24px 24px 20px; border-right: 1px solid var(--weaf-line); display: flex; flex-direction: column; }
.weaf__quick-column:last-child { border-right: 0; }
.weaf__quick-icon { width: 22px; height: 22px; margin-bottom: 16px; }
.weaf__quick-icon svg { width: 22px; height: 22px; }
.weaf__quick-title { margin: 0 0 14px; font-size: 1.15rem; font-weight: 600; }
.weaf__quick-list { display: grid; gap: 5px; flex: 1 1 auto; align-content: start; padding-bottom: 12px;}
.weaf__quick-option { width: fit-content; max-width: 100%; margin: 0; padding: 5px 9px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--weaf-ink-soft); font-size: .75rem; line-height: 1.25; text-align: left; cursor: pointer; transition: .18s ease;text-transform: unset; }
.weaf__quick-option:hover { color: var(--weaf-wine); }
.weaf__quick-option.is-selected { color: #fff !important; border-color: transparent; }
.weaf__quick-option.is-unavailable { display: none; }
.weaf__quick-more { margin-top: 12px; padding: 0 0 2px; border: 0; border-bottom: 1px solid currentColor; background: transparent; font-size: .65rem; font-weight: 700; letter-spacing: .12em; text-transform: unset!important; cursor: pointer; }

.weaf__chips { display: flex; align-items: center; gap: 9px; margin: 22px 0 18px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.weaf__chips::-webkit-scrollbar { display: none; }
.weaf__chip { flex: 0 0 auto; border: 1px solid var(--weaf-line); background: rgba(250, 246, 237, .9); border-radius: 999px; padding: 9px 15px; color: var(--weaf-ink-soft); font-size: .72rem; cursor: pointer; }
.weaf__chip.is-active { background: var(--weaf-wine); border-color: var(--weaf-wine); color: #fff; }
.weaf__chip.is-unavailable { display: none; }

.weaf__active-filters { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0 0 16px; }
.weaf__active-filters[hidden] { display: none !important; }
.weaf__active-filters-content { flex: 1 1 auto; min-width: 0; }
.weaf__active-filters-title { margin: 0 0 10px; color: var(--weaf-ink-soft); font-size: .82rem; font-weight: 600; line-height: 1.35; }
.weaf__active-summary { display: none; flex-wrap: wrap; gap: 7px; margin: 0; }
.weaf__active-summary.is-visible { display: flex; }
.weaf__active-pill { border: 1px solid rgba(141, 11, 40, .18); background: #fff5f6; color: var(--weaf-wine); border-radius: 999px; padding: 6px 9px; font-size: .68rem; cursor: pointer; }
.weaf .weaf__clear-active { flex: 0 0 auto; min-height: 34px; height: 34px; margin: 0; padding: 0 13px; border: 1px solid rgba(141, 11, 40, .24); border-radius: 999px; background: transparent; box-shadow: none; color: var(--weaf-wine); font-size: .7rem; font-weight: 600; line-height: 32px; letter-spacing: 0; text-transform: none; }
.weaf .weaf__clear-active:hover { border-color: var(--weaf-wine); color: #fff; background: var(--weaf-wine); box-shadow: none; }
.weaf__result-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2%; color: var(--weaf-muted); font-size: .78rem; scroll-margin-top: 110px; }
.weaf__result-count {width:100%;}
.weaf__sort-label { margin: 0; }
.weaf__sort-select { width: auto; min-width: 190px; height: 36px; margin: 0; border: 0; background-color: transparent; color: var(--weaf-ink-soft); box-shadow: none;border: 1px solid; border-radius: 25px; }

.weaf__results { position: relative; min-height: 240px; transition: opacity .18s ease; }
.weaf__results.is-loading { opacity: .48; pointer-events: none; }
.weaf__results.is-loading::after { content: ""; position: absolute; top: 80px; left: 50%; width: 34px; height: 34px; margin-left: -17px; border: 3px solid rgba(141, 11, 40, .16); border-top-color: var(--weaf-wine); border-radius: 50%; animation: weaf-spin .7s linear infinite; }
@keyframes weaf-spin { to { transform: rotate(360deg); } }
.weaf__results .products { margin-bottom: 0; }
.weaf__empty { margin: 1rem 0; }
.weaf__pagination { margin-top: 2rem; }

.weaf__overlay { position: fixed; inset: 0; z-index: 99997; background: rgba(17, 12, 9, .38); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s ease; }
.weaf__overlay.is-open { opacity: 1; }
.weaf__drawer { position: fixed; z-index: 99998; right: 0; top: 0; bottom: 0; width: min(620px, 94vw); background: var(--weaf-paper); box-shadow: var(--weaf-shadow); transform: translateX(105%); transition: transform .34s cubic-bezier(.22, .8, .24, 1); display: flex; flex-direction: column; color: var(--weaf-ink); }
.weaf__drawer.is-open { transform: translateX(0); }
.weaf__drawer-header { padding: 25px 28px 20px; border-bottom: 1px solid var(--weaf-line); display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.weaf__drawer-kicker { color: var(--weaf-wine); text-transform: uppercase; font-size: .65rem; font-weight: 700; letter-spacing: .14em; }
.weaf__drawer-title { margin: 7px 0 4px; font-size: 2.1rem; letter-spacing: -.035em; font-weight: 500; }
.weaf__drawer-note { max-width: 440px; margin: 0; color: var(--weaf-muted); font-size: .75rem; line-height: 1.55; }
.weaf .weaf__close { flex: 0 0 auto; width: 40px; height: 40px; min-height: 40px; margin: 0; padding: 0; border-radius: 999px; display: grid; place-items: center; }
.weaf__drawer-body { overflow: auto; padding: 8px 28px 36px; }
.weaf__filter-section { border-bottom: 1px solid var(--weaf-line); padding: 20px 0; }
.weaf__filter-section:last-child { border-bottom: 0; }
.weaf__filter-heading { width: 100%; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.weaf__filter-heading > span { display: grid; gap: 2px; }
.weaf__filter-heading strong { font-size: 1rem; font-weight: 500; }
.weaf__filter-heading small { color: var(--weaf-muted); font-size: .65rem; }
.weaf__chevron { width: 18px !important; height: 18px !important; transition: transform .2s ease; }
.weaf__filter-section.is-collapsed .weaf__chevron { transform: rotate(-90deg); }
.weaf__filter-content { margin-top: 15px; }
.weaf__filter-section.is-collapsed .weaf__filter-content { display: none; }
.weaf__option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.weaf__check-option { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: 0; color: var(--weaf-ink-soft); font-size: .75rem; cursor: pointer; }
.weaf__check-option input { appearance: none; width: 17px; height: 17px; margin: 0; border: 1px solid var(--weaf-line-strong); border-radius: 4px; background: #fff; display: grid; place-items: center; cursor: pointer; }
.weaf__check-option input:checked { background: var(--weaf-wine); border-color: var(--weaf-wine); }
.weaf__check-option input:checked::after { content: "✓"; color: #fff; font-size: .68rem; line-height: 1; }
.weaf__option-search { position: relative; display: block; margin: 0 0 12px; }
.weaf__option-search svg { left: 12px; color: var(--weaf-muted); }
.weaf__option-search input { width: 100%; height: 40px; margin: 0; padding: 0 13px 0 37px; border: 1px solid var(--weaf-line); border-radius: 12px; background: #fff; font-size: .75rem; box-shadow: none; }
.weaf__price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.weaf__price-option { position: relative; margin: 0; }
.weaf__price-option input { position: absolute; opacity: 0; pointer-events: none; }
.weaf__price-option span { min-height: 48px; padding: 6px 5px; display: grid; place-items: center; text-align: center; border-radius: 12px; border: 1px solid var(--weaf-line); background: #fff; color: var(--weaf-ink-soft); font-size: .68rem; cursor: pointer; }
.weaf__price-option input:checked + span { border-color: var(--weaf-wine); color: var(--weaf-wine); background: #fff4f5; box-shadow: inset 0 0 0 1px var(--weaf-wine); }
.weaf__option-grid .is-unavailable, .weaf__price-grid .is-unavailable { display: none; }
.weaf__option-grid .is-search-hidden, .weaf__price-grid .is-search-hidden { display: none; }
.weaf__drawer-footer { margin-top: auto; padding: 16px 28px 20px; border-top: 1px solid var(--weaf-line); background: rgba(250, 246, 237, .95); display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.weaf .weaf__clear, .weaf .weaf__apply { min-height: 48px; margin: 0; border-radius: 999px; }
.weaf__toast { position: fixed; z-index: 99999; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--weaf-ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: .75rem; opacity: 0; pointer-events: none; transition: .25s ease; }
.weaf__toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.weaf__toast.is-error { background: #8d0b28; }

@media (max-width: 980px) {
  .weaf__quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weaf__quick-column:nth-child(2n) { border-right: 0; }
  .weaf__quick-column:nth-child(-n+2) { border-bottom: 1px solid var(--weaf-line); }
}

@media (max-width: 640px) {
  .weaf__active-filters { gap: 14px; }
  .weaf__active-filters-title { margin-bottom: 8px; }
  .weaf .weaf__clear-active { max-width: 92px; text-align: right; }

  .weaf__intro { padding: 1.5rem 0 1rem; }
  .weaf__description { font-size: .88rem; }
  .weaf__search-shell { padding: 10px; border-radius: 16px; }
  .weaf__search-row { grid-template-columns: minmax(0, 1fr) auto; }
  .weaf .weaf__filter-button { grid-column: 1 / -1; order: 3; width: 100%; justify-content: center; }
  .weaf .weaf__submit { min-width: 94px; padding-left: 15px; padding-right: 15px; }
  .weaf__quick-grid { grid-template-columns: 1fr 1fr; }
  .weaf__quick-column { min-height: 180px; padding: 18px 15px; }
  .weaf__quick-title { font-size: 1rem; }
  .weaf__quick-option { font-size: .7rem; }
  .weaf__result-toolbar { align-items: flex-start; }
  .weaf__sort-select { min-width: 155px; font-size: .72rem; }
  .weaf__drawer { top: auto; width: 100%; height: 92vh; border-radius: 22px 22px 0 0; transform: translateY(105%); }
  .weaf__drawer.is-open { transform: translateY(0); }
  .weaf__drawer-header { padding: 21px 18px 16px; }
  .weaf__drawer-title { font-size: 1.8rem; }
  .weaf__drawer-body { padding: 6px 18px 32px; }
  .weaf__drawer-footer { padding: 14px 18px 18px; }
  .weaf__option-grid { grid-template-columns: 1fr; }
  .weaf__price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Không giữ khoảng trống cho thuộc tính/tùy chọn chưa có dữ liệu hợp lệ. */
.weaf [hidden] { display: none !important; }
.weaf__search-row--without-filter { grid-template-columns: 1fr auto; }

/* Flatsome-style AJAX Load More pagination. */
.weaf__load-more {
  margin-top: 2rem;
  text-align: center;
}
.weaf .weaf__load-more-button {
  min-width: 210px;
  margin: 0;
  border-radius: 999px;
  justify-content: center;
  position: relative;
}
.weaf__load-more-spinner {
  display: none;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: weaf-spin .7s linear infinite;
}
.weaf__load-more-button.is-loading .weaf__load-more-spinner {
  display: inline-block;
}
.weaf__load-more-button.is-loading {
  cursor: wait;
  opacity: .72;
}
.weaf__load-more-status {
  margin-top: .65rem;
  color: var(--weaf-muted);
  font-size: .7rem;
}

/* Backend-configurable visibility/layout helpers. */
.weaf__search-row--without-search { grid-template-columns: auto auto; justify-content: end; }
.weaf__search-row--without-search.weaf__search-row--without-filter { grid-template-columns: auto; }
.weaf__result-toolbar--sort-only { justify-content: flex-end; }
.weaf__drawer-note p { margin: 0; }

@media (min-width: 641px) {
  .weaf__quick-grid { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
}

@media (max-width: 640px) {
  .weaf__search-row--without-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .weaf__search-row--without-search .weaf__filter-button { grid-column: auto; order: initial; width: auto; }
  .weaf__search-row--without-search.weaf__search-row--without-filter { grid-template-columns: 1fr; }
  .weaf__search-row--without-search.weaf__search-row--without-filter .weaf__submit { width: 100%; }
}
