/* ============================================================
   VI FEERIE — Trang khuyến mãi (sự kiện BlackDay)
   Dùng lại .pcard từ css/products.css
   ============================================================ */

/* ============================================================
   MỞ ĐẦU — nền theo sự kiện

   Toàn bộ màu của phần này lấy từ 4 biến dưới đây. Muốn đổi
   sang Tết, Quốc khánh, Giáng sinh… chỉ cần đặt lại 4 biến đó
   trên chính thẻ .pmhero là xong, không phải sửa dòng CSS nào.
   Lên WordPress thì in 4 biến này ra từ ô tùy chỉnh của bài viết
   sự kiện, khách tự đổi được.
   ============================================================ */
.pmhero {
  /* Bộ màu mặc định — BlackDay */
  --ev-bg: #241620;          /* nền chìm dưới ảnh */
  --ev-accent: #c9abbd;      /* màu nhấn: nhãn, số liệu, chữ in đậm */
  --ev-ink: #241620;         /* chữ nằm trên mảng màu nhấn */
  --ev-veil: 0.62;           /* độ mờ lớp phủ, 0 = thấy rõ ảnh, 1 = che kín */

  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  background: var(--ev-bg);
  color: #fff;
}

/* Ảnh nền của sự kiện. Không có ảnh thì lớp gradient bên dưới
   vẫn đủ đẹp, nên phần này để trống cũng chạy được. */
.pmhero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Lớp phủ: tối dần từ dưới lên cho chữ trắng luôn đọc được,
   cộng hai quầng sáng mờ cho nền bớt phẳng. */
.pmhero__glow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
      color-mix(in srgb, var(--ev-bg) 94%, transparent) 0%,
      color-mix(in srgb, var(--ev-bg) 72%, transparent) 46%,
      color-mix(in srgb, var(--ev-bg) 46%, transparent) 100%),
    radial-gradient(620px 340px at 18% 12%, rgba(255, 255, 255, 0.14), transparent 68%);
  opacity: var(--ev-veil);
  pointer-events: none;
}

/* Trình duyệt cũ không hiểu color-mix thì rơi về lớp phủ đặc một màu */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .pmhero__glow {
    background: linear-gradient(to top,
      rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.62) 46%, rgba(0, 0, 0, 0.34) 100%);
  }
}

/* ---------------- Bộ màu sẵn cho từng dịp ---------------- */

/* Quốc khánh 2/9 — đỏ cờ, nhấn vàng sao.
   Ảnh của dịp này giữa khung đã sẵn tối nên hạ lớp phủ xuống,
   để nếp lụa còn nhìn thấy được. */
.pmhero--quockhanh {
  --ev-bg: #8c1420;
  --ev-accent: #ffd24a;
  --ev-ink: #6d0f19;
  --ev-veil: 0.42;
}

/* Tết Nguyên đán — đỏ son, nhấn vàng kim */
.pmhero--tet {
  --ev-bg: #7d1417;
  --ev-accent: #f2c14e;
  --ev-ink: #5e0f11;
  --ev-veil: 0.6;
}

/* Giáng sinh — xanh rêu, nhấn đỏ ấm */
.pmhero--noel {
  --ev-bg: #17352a;
  --ev-accent: #e8b4a0;
  --ev-ink: #143028;
  --ev-veil: 0.6;
}

.pmhero__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pmhero__tag {
  padding: 6px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ev-accent);
}

.pmhero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 18px 0 16px;
}

.pmhero__title-sm {
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}

.pmhero__title-big {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 74px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
}

.pmhero__title-big em {
  font-style: normal;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--ev-accent);
  color: var(--ev-ink);
}

.pmhero__desc {
  max-width: 620px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.76);
}

.pmhero__desc b {
  color: var(--ev-accent);
  font-weight: 700;
}

/* ---------------- Đồng hồ đếm ngược ---------------- */
.pmcount {
  margin: 30px 0 26px;
}

.pmcount__label {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.pmcount__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pmcount__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 86px;
  padding: 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.pmcount__cell b {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pmcount__cell span {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.pmcount__sep {
  font-size: 26px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.35);
}

.pmcount__over {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ev-accent);
}

.pmcount__over[hidden] {
  display: none;
}

.pmcount.is-over .pmcount__grid {
  opacity: 0.4;
}

/* ---------------- Nút ---------------- */
.pmhero__acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.pmhero__act2 {
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #fff;
}

.pmhero__act2:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ---------------- Bốn con số ---------------- */
.pmhero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 760px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.pmhero__stats li {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pmhero__stats b {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  color: var(--ev-accent);
}

.pmhero__stats span {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   KHUNG GIỜ VÀNG
   ============================================================ */
.pmflash {
  background: var(--bg-soft);
}

.pmflash__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 26px;
}

.pmflash__note {
  font-size: 13.5px;
  color: var(--muted);
}

.pmslots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.pmslot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-family: var(--font-body);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.pmslot b {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
}

.pmslot span {
  font-size: 12px;
  color: var(--muted);
}

.pmslot:hover {
  border-color: var(--brand-light);
}

/* Khung đang chạy */
.pmslot.is-live {
  border-color: var(--brand-deep);
  background: var(--brand-deep);
}

.pmslot.is-live b,
.pmslot.is-live span {
  color: #fff;
}

.pmslot.is-live span {
  color: rgba(255, 255, 255, 0.78);
}

/* Khung đã qua */
.pmslot.is-done {
  opacity: 0.5;
}

.pmslots__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  padding: 11px 16px;
  border-radius: var(--radius);
  background: var(--brand-tint);
  font-size: 13.5px;
  color: var(--muted);
}

.pmslots__bar[hidden] {
  display: none;
}

.pmslots__bar b {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-deeper);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   LƯỚI SẢN PHẨM GIẢM GIÁ
   ============================================================ */
.pmdeals__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 14px;
}

.pmdeals__tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pmdeals__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pmfilter {
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.pmfilter:hover {
  border-color: var(--brand-light);
}

.pmfilter.is-active {
  border-color: var(--brand-deep);
  background: var(--brand-deep);
  color: #fff;
  font-weight: 600;
}

.pmdeals__sort {
  position: relative;
  display: flex;
  align-items: center;
}

.pmdeals__sort select {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 32px 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}

.pmdeals__sort select:hover,
.pmdeals__sort select:focus {
  border-color: var(--brand-light);
  outline: none;
}

.pmdeals__sort svg {
  position: absolute;
  right: 12px;
  width: 14px;
  height: 14px;
  color: var(--muted);
  pointer-events: none;
}

.pmdeals__count {
  margin-bottom: 22px;
  font-size: 13.5px;
  color: var(--muted);
}

.pmdeals__count b {
  color: var(--ink);
  font-weight: 600;
}

.pmdeals__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pmdeals__item.is-hidden {
  display: none;
}

.pmdeals__item > .pcard {
  height: 100%;
}

@keyframes pmIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.pmdeals__item.is-entering {
  animation: pmIn 0.4s var(--ease) both;
}

.pmdeals__empty {
  padding: 56px 20px;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
}

.pmdeals__empty[hidden] {
  display: none;
}

/* ============================================================
   MÃ GIẢM GIÁ
   ============================================================ */
.pmcoupon {
  background: var(--bg-soft);
}

.pmcoupon__head {
  margin-bottom: 30px;
  text-align: center;
}

.pmcoupon__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* Vé giảm giá: khấc tròn hai bên chỗ nối, giống vé giấy */
.pmticket {
  position: relative;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.pmticket__left {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 122px;
  padding: 20px 10px;
  background: var(--brand-deep);
  color: #fff;
  text-align: center;
}

.pmticket__left b {
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 600;
  line-height: 1;
}

.pmticket__left span {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.78);
}

/* Hai khấc tròn ở đường nối giữa hai nửa vé */
.pmticket::before,
.pmticket::after {
  content: "";
  position: absolute;
  left: 122px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-soft);
  transform: translateX(-50%);
  z-index: 1;
}

.pmticket::before { top: -7px; }
.pmticket::after { bottom: -7px; }

.pmticket__body {
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
}

.pmticket__name {
  margin-bottom: 5px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.pmticket__note {
  margin-bottom: 12px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.pmticket__copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px dashed var(--brand-light);
  border-radius: 6px;
  background: var(--brand-tint);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand-deeper);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.pmticket__copy:hover {
  border-color: var(--brand-deep);
  background: var(--brand-soft);
}

.pmticket__copy svg {
  width: 15px;
  height: 15px;
}

.pmticket__copy.is-copied {
  border-style: solid;
  border-color: var(--brand-deep);
  background: var(--brand-deep);
  color: #fff;
}

.pmcoupon__toast {
  margin-top: 18px;
  padding: 11px 16px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  font-size: 13.5px;
  text-align: center;
  color: var(--brand-deeper);
}

.pmcoupon__toast[hidden] {
  display: none;
}

/* ============================================================
   THỂ LỆ + CÂU HỎI
   ============================================================ */
.pmrules__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.pmrules__title {
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}

.pmrules__list {
  counter-reset: rule;
  display: grid;
  gap: 14px;
}

.pmrules__list li {
  position: relative;
  padding-left: 38px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.pmrules__list li::before {
  counter-increment: rule;
  content: counter(rule);
  position: absolute;
  left: 0;
  top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--brand-tint);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-deep);
}

.pmrules__list b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------------- Câu hỏi gập/mở ---------------- */
.pmfaq {
  border-bottom: 1px solid var(--line);
}

.pmfaq:first-of-type {
  border-top: 1px solid var(--line);
}

.pmfaq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 16px 0;
  text-align: left;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s var(--ease);
}

.pmfaq__q:hover {
  color: var(--brand-deep);
}

.pmfaq__q svg {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  color: var(--muted);
  transition: transform 0.28s var(--ease);
}

.pmfaq.is-open .pmfaq__q svg {
  transform: rotate(180deg);
}

/* Gập bằng grid-template-rows để không phải đo chiều cao */
.pmfaq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s var(--ease);
}

.pmfaq.is-open .pmfaq__a {
  grid-template-rows: 1fr;
}

.pmfaq__a > div {
  min-height: 0;
  overflow: hidden;
}

.pmfaq__a p {
  padding-bottom: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 1100px) {
  .pmdeals__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pmrules__row {
    gap: 40px;
  }
}

@media screen and (max-width: 900px) {
  .pmhero {
    padding: 56px 0 50px;
  }

  .pmhero__title-big {
    font-size: 58px;
  }

  .pmcoupon__list {
    grid-template-columns: 1fr;
  }

  .pmrules__row {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

@media screen and (max-width: 820px) {
  .pmdeals__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

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

  .pmhero__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 10px;
  }

  .pmdeals__head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media screen and (max-width: 560px) {
  .pmhero {
    padding: 44px 0 40px;
  }

  .pmhero__title-big {
    font-size: 42px;
    gap: 7px;
  }

  .pmhero__title-sm {
    font-size: 18px;
  }

  .pmhero__desc {
    font-size: 14px;
  }

  /* Đếm ngược thu nhỏ, bỏ dấu hai chấm cho đỡ chật.
     .pmhero__inner canh giữa nên phải kéo rộng bằng tay,
     không thì bốn ô co lại chỉ còn 40px. */
  .pmcount {
    align-self: stretch;
  }

  .pmcount__grid {
    gap: 6px;
  }

  .pmcount__sep {
    display: none;
  }

  .pmcount__cell {
    flex: 1;
    min-width: 0;
    padding: 11px 4px;
  }

  .pmcount__cell b {
    font-size: 27px;
  }

  .pmcount__cell span {
    font-size: 10px;
  }

  .pmhero__acts .btn {
    width: 100%;
  }

  .pmhero__stats b {
    font-size: 23px;
  }

  .pmticket__left {
    width: 98px;
  }

  .pmticket::before,
  .pmticket::after {
    left: 98px;
  }

  .pmdeals__grid {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pmdeals__item.is-entering {
    animation: none !important;
  }

  .pmfaq__a {
    transition: none !important;
  }
}
