/* =============================================================
   Perfume Finder – Stylesheet
   ============================================================= */

/* ── Variables ── */
.pf-container {
  --pf-gold: #C9A84C;
  --pf-gold-light: #F0D98C;
  --pf-gold-soft: #FBF6E7;
  --pf-dark: #1E1B16;
  --pf-ink: #1a1a1a;
  --pf-muted: #6b6b6b;
  --pf-line: rgba(0, 0, 0, .08);
  --pf-radius: 14px;
  --pf-radius-sm: 8px;
  --pf-gap: 1.5rem;
  --pf-border: 1px solid var(--pf-line);
  --pf-shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 4px 16px rgba(20, 20, 20, .05);
  --pf-shadow-lg: 0 10px 36px rgba(20, 20, 20, .1);
  --pf-chip-h: 34px;
  --pf-ease: cubic-bezier(.4, 0, .2, 1);
  color: var(--pf-ink);
}

/* ── Layout ── */
.pf-container {
  /* display: grid;
  grid-template-columns: 340px 1fr;
  gap: 15px;
  align-items: start; */
}

/* ── Panel ── */
.pf-panel {
  background: linear-gradient(180deg, #fff 0%, #fdfcf8 100%);
  /* border: var(--pf-border); */
  border-radius: var(--pf-radius);
  padding: 16px;
  /* box-shadow: var(--pf-shadow); */
  /* position: sticky;
  top: 2rem; */
}

.pf-panel__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: var(--pf-border);
}

.pf-panel__close {
  display: none;
  margin-left: auto;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
  transition: background .15s;
}

.pf-panel__close:hover {
  background: rgba(0, 0, 0, .06);
  color: var(--pf-ink);
}

.pf-panel__icon {
  color: var(--pf-gold);
  font-size: 16px;
  line-height: 1;
}

.pf-panel__title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: .03em;
}

/* ── Mobile filter toggle ── */
.pf-filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #fff;
  color: var(--pf-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  transition: background .15s, border-color .15s;
}

.pf-filter-toggle:hover {
  background: #f9f7f4;
  border-color: rgba(0, 0, 0, .2);
}

.pf-filter-toggle__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pf-dark);
  color: var(--pf-gold-light);
  font-size: 11px;
  font-weight: 700;
}

/* ── Backdrop (mobile) ── */
.pf-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 9998;
  transition: opacity .3s ease;
}

.pf-backdrop[hidden] {
  display: none;
}

/* ── Body lock ── */
.pf-no-scroll {
  overflow: hidden;
}

/* ── Groups ── */
.pf-group {
  margin-bottom: 1.25rem;
}

.box_tt_filter h1 {
  text-transform: capitalize;
  font-size: 48px;
  margin-bottom: 10px;
}

.pf-group__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  color: #000;
  text-transform: capitalize;
  margin-bottom: 14px;
}

/* ── Chips ── */
.pf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pf-group__label svg {
  width: 20px;
  height: 20px;
}

.pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 5px;
  border: 1px solid var(--pf-line);
  background: #fff;
  color: #000;
  font-size: 13px;
  cursor: pointer;
  transition: all .18s var(--pf-ease);
  white-space: nowrap;
  margin: 0;
  position: relative;
}

.pf-chip:hover {
  border-color: var(--pf-gold);
  background: var(--pf-gold-soft);
  transform: translateY(-1px);
}

.pf-chip.is-active {
  background: #050a30;
  color: #fff;
  border-color: #050a30;
  box-shadow: 0 4px 12px rgba(30, 27, 22, .25);
}

.pf-chip:active {
  transform: scale(.97);
}

.pf-chips__empty {
  font-size: 12px;
  color: #bbb;
  font-style: italic;
  padding: 4px 0;
}

.pf-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: none;
}

.pf-chip__sub {
  font-size: 10px;
  opacity: .7;
  margin-left: 2px;
}

/* ── Range slider ── */
.pf-range {
  position: relative;
  padding: 10px 0 0;
}

.pf-range__track {
  position: relative;
  height: 4px;
  background: rgba(0, 0, 0, .1);
  border-radius: 2px;
  margin-bottom: 8px;
}

.pf-range__fill {
  position: absolute;
  height: 100%;
  background: var(--pf-gold);
  border-radius: 2px;
  pointer-events: none;
}

.pf-range__input {
  position: absolute;
  top: 2px;
  left: 0;
  width: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  z-index: 2;
}

.pf-range__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--pf-gold);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  transition: transform .1s;
}

.pf-range__input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.pf-range__input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--pf-gold);
  cursor: pointer;
  pointer-events: all;
}

/* Extra bottom space for the track container */
.pf-range__track {
  margin-bottom: 24px;
}

.pf-range__labels {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  color: #000;
  margin-top: 8px;
}

/* ── Actions ── */
/* .pf-actions {
  display: flex;
  gap: 8px;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: var(--pf-border);
} */
.pf-actions {
  display: flex;
  gap: 8px;
  margin-top: 0;
  padding-top: 0;
  border-top: unset;
  flex-direction: column;
}

.sec_timkiem {
  padding-top: 0 !important;
}

.box_mjsa .pf-actions {
  background-color: #cccccc0f;
  padding: 10px;
  border-radius: 8px;
}

.box_mjsa .pf-group {
  margin-bottom: 0;
}

.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 51px;
  padding: 0 16px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
  transition: opacity .15s, transform .1s;
  margin: 0;
}

.pf-btn:active {
  transform: scale(.98);
}

.pf-btn--primary {
  flex: 1;
  background: #050a30;
  color: #fff;
}

.pf-btn--primary:hover {
  opacity: .85;
}

.pf-btn--ghost {
  background: transparent;
  color: #000;
  border: 1px solid rgba(0, 0, 0, .15);
}

.pf-btn--ghost:hover {
  background: #f5f5f5;
  color: #000;
}

.box_mjsa .pf-actions svg {
  width: 24px;
  height: 24px;
}

/* ── Loading state ── */
.pf-btn--primary.is-loading {
  pointer-events: none;
  opacity: .7;
}

.pf-btn--primary.is-loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: var(--pf-gold-light);
  border-radius: 50%;
  animation: pf-spin .6s linear infinite;
  margin-left: 6px;
}

@keyframes pf-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Results meta ── */
.pf-results__meta {
  font-size: 16px;
  color: #000;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.pf-results__meta strong {
  color: #000;
}

@media (max-width: 768px) {
  .pf-container {
    grid-template-columns: 1fr;
  }

  .pf-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 500px) {

  /* .pf-grid { grid-template-columns: 1fr !important; } */
  .pf-card__atc-label {
    display: none;
  }

  .pf-card__atc {
    width: 34px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .pf-card__body {
    padding: 10px;
  }
}


/* ══════════════════════════════════════════════════════════════
   Mobile filter drawer (must be AFTER all desktop panel styles)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .pf-container {
    grid-template-columns: 1fr;
  }

  .pf-filter-toggle {
    display: inline-flex;
    margin-bottom: 12px;
    width: fit-content;
    margin: auto;
    margin-bottom: 15px;
  }

  .pf-panel {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    height: 100dvh;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    z-index: 9999;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .3s var(--pf-ease);
    box-shadow: none;
  }

  .is-filter-open .pf-panel {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, .15);
  }

  .pf-backdrop {
    display: block;
  }

  .pf-backdrop[hidden] {
    display: none;
  }

  .pf-panel__close {
    display: inline-flex;
  }
}

/* ── Product grid ── */
.pf-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(4, 1fr);
}

.pf-grid[data-columns="2"] {
  grid-template-columns: repeat(2, 1fr);
}

.pf-grid[data-columns="4"] {
  grid-template-columns: repeat(4, 1fr);
}

/* ── Product card ── */
.pf-card {
  background: #fff;
  border: var(--pf-border);
  border-radius: var(--pf-radius);
  overflow: hidden;
  box-shadow: var(--pf-shadow);
  transition: transform .25s var(--pf-ease), box-shadow .25s var(--pf-ease);
  display: flex;
  flex-direction: column;
  position: relative;
}

.pf-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pf-shadow-lg);
}

.pf-card__img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, #f9f7f4 0%, #f1ede5 100%);
  display: block;
}

.pf-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--pf-ease);
}

.pf-card:hover .pf-card__img-wrap img {
  transform: scale(1.06);
}

.pf-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  display: none;
}

.pf-card__badge--in {
  background: rgba(46, 160, 67, .12);
  color: #1f7a31;
  border: 1px solid rgba(46, 160, 67, .25);
}

.pf-card__badge--out {
  background: rgba(224, 85, 85, .12);
  color: #b53636;
  border: 1px solid rgba(224, 85, 85, .25);
}

.pf-card__body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pf-card__name-link {
  text-decoration: none;
  color: inherit;
}

.pf-card__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--pf-ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s;
}

.pf-card__name-link:hover .pf-card__name {
  color: var(--pf-gold);
}

.pf-card__desc {
  font-size: 14px;
  color: var(--pf-muted);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pf-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: .5rem;
  padding-top: .75rem;
  border-top: 1px dashed var(--pf-line);
}

.pf-card__price {
  font-size: 15px;
  font-weight: 700;
  color: var(--pf-dark);
  line-height: 1.2;
}

.pf-card__price ins {
  text-decoration: none;
}

.pf-card__price del {
  font-size: 11px;
  color: #b0b0b0;
  margin-right: 4px;
  font-weight: 500;
}

.pf-card__atc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--pf-dark);
  color: var(--pf-gold-light);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--pf-dark);
  transition: all .18s var(--pf-ease);
  letter-spacing: .02em;
  line-height: 34px;
}

.pf-card__atc:hover {
  background: var(--pf-gold);
  border-color: var(--pf-gold);
  color: var(--pf-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(201, 168, 76, .35);
}

.pf-card__atc.loading {
  opacity: .8;
  pointer-events: none;
  padding-right: 28px;
  position: relative;
}

.pf-card__atc.loading::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: pf-spin .6s linear infinite;
}

/* 
.pf-card__atc.added::before {
  content: '✓';
  margin-right: 2px;
} */

.pf-card__out-of-stock {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  color: #b53636;
  font-weight: 600;
  background: rgba(224, 85, 85, .08);
  border: 1px solid rgba(224, 85, 85, .2);
}

/* ── Empty / skeleton state ── */
.pf-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: #bbb;
  text-align: center;
  gap: 12px;
}

.pf-empty p {
  font-size: 14px;
  color: #000;
  font-weight: 600;
}

.pf-empty svg {
  stroke: #000;
  opacity: 1;
}

/* Skeleton cards */
.pf-skeleton {
  border-radius: var(--pf-radius);
  overflow: hidden;
  border: var(--pf-border);
  background: #fff;
}

.pf-skeleton__img {
  width: 100%;
  aspect-ratio: 1;
  background: #f0ede8;
  animation: pf-shimmer 1.4s infinite;
}

.pf-skeleton__line {
  height: 12px;
  border-radius: 4px;
  background: #f0ede8;
  margin: .875rem .875rem .5rem;
  animation: pf-shimmer 1.4s infinite;
}

.pf-skeleton__line--short {
  width: 60%;
  margin-bottom: .875rem;
}

@keyframes pf-shimmer {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .5;
  }
}

/* ── Pagination ── */
.pf-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pf-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, .15);
  background: #fff;
  color: #000;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  margin: 0;
}

.pf-page-btn:hover {
  border-color: var(--pf-gold);
  background: #fdf8ee;
}

.pf-page-btn.is-active {
  background: var(--pf-dark);
  color: var(--pf-gold-light);
  border-color: var(--pf-gold);
  pointer-events: none;
}

.pf-page-btn:disabled {
  opacity: .4;
  pointer-events: none;
}

/* ── Toast notification ── */
.pf-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #1E1B16;
  color: #F0D98C;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .2);
  border: 1px solid rgba(201, 168, 76, .3);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.pf-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.pf-toast--success {
  border-color: rgba(46, 160, 67, .45);
}

.pf-toast--error {
  border-color: rgba(224, 85, 85, .45);
  color: #ffd6d6;
}

.pf-toast strong {
  color: #fff;
  font-weight: 600;
}

.pf-toast svg {
  flex-shrink: 0;
  color: #6ee090;
}

.pf-toast--error svg {
  color: #ff8a8a;
}

.pf-toast__link {
  margin-left: auto;
  color: #C9A84C;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, .1);
}

.pf-toast__link:hover {
  color: #F0D98C;
}

@media (max-width: 480px) {
  .pf-toast {
    right: 12px;
    left: 12px;
    bottom: 12px;
    max-width: none;
  }

  .pf-results__meta {
    display: none !important;
  }

  .header,
  .header-wrapper {
    z-index: 1;
  }
}

/* ── Card "added" pulse ── */
@keyframes pf-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 160, 67, .35);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(46, 160, 67, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(46, 160, 67, 0);
  }
}

.pf-card.pf-card--added {
  animation: pf-pulse 1s ease-out 1;
}

.add_to_cart_button.added {
  display: flex !important;
}

.pf-group {
  background-color: #fafafadb;
  padding: 14px;
  border-radius: 8px;
}

/**/
.row_ctspm .single_add_to_cart_button.button {
  border-radius: 3px;
  height: 46px;
}

.row_ctspm .quantity {
  border: 1px solid #e5e5e5;
  border-radius: 3px;
}

.row_ctspm .quantity input {
  font-size: 14px;
  height: 46px !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

.row_ctspm .product_meta>span {
  border: none;
  font-size: 14px;
}

.pf-empty {
  background-color: #fff;
  border-radius: 12px;
  margin-top: 15px;
}

.box_tt_filter {
  text-align: center;
  margin-top: 35px;
  margin-bottom: 35px;
}

.box_mjsa {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.pf-panel__header {
  display: none;
}