/* ==========================================================================
   SITE EXTRA — các thành phần bổ sung cho bản PHP (không đụng tới style.css đã duyệt)
   ========================================================================== */

/* Honeypot chống bot */
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Link dùng chung kiểu nút trang */
a.page-btn.active { color: var(--white); }
.page-btn.is-disabled { opacity: 0.4; cursor: not-allowed; }
a.sidebar-cat-btn.active, a.tab-pill.active, a.feat-filter-chip.active { color: var(--white); }
a.tab-pill { display: inline-flex; align-items: center; }
.blog-search-inline { margin: 0; }

/* Danh mục con trong sidebar */
.sidebar-subcat-list { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 6px 12px; padding-left: 10px; border-left: 2px solid var(--soft-pink-border); }
.sidebar-subcat-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 9px; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.sidebar-subcat-link:hover { color: var(--primary-pink); background: var(--white); }
.sidebar-subcat-link.active { color: var(--primary-pink); font-weight: 700; background: var(--white); }
a.active-filter-pill a, .active-filter-pill a { color: inherit; font-size: 1rem; line-height: 1; }

/* Trạng thái rỗng / 404 */
.empty-state { text-align: center; padding: 48px 20px; background: #fbf6f9; border-radius: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-state p { font-weight: 700; line-height: 1.6; }
.empty-state .button { display: inline-flex; }
.notfound-code { font-size: 4.5rem; font-weight: 700; color: var(--primary-pink); line-height: 1; }
.muted-note { color: var(--text-muted); font-size: 0.86rem; }

/* Trang tĩnh */
.static-page { max-width: 860px; margin: 0 auto; background: var(--white); border-radius: 18px; padding: 32px; box-shadow: 0 6px 24px rgba(60, 34, 95, 0.06); }
.static-page-title { font-size: 1.6rem; color: var(--primary-pink); margin-bottom: 16px; }
.static-page .pdp-rich-content ol { padding-left: 20px; list-style: decimal; display: flex; flex-direction: column; gap: 8px; }

/* Hết hàng */
.badge-soldout { position: absolute; top: 10px; left: 10px; z-index: 3; background: var(--plum-dark); color: var(--white); font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.product-card.is-soldout .front-image, .product-card.is-soldout .back-image { filter: grayscale(0.7); opacity: 0.8; }
.btn-circle-plus:disabled { opacity: 0.35; cursor: not-allowed; }
.pdp-stock-tag.is-out { background: #f3e9ee; color: var(--text-muted); }
.pdp-btn-addcart:disabled, .pdp-btn-buynow:disabled { opacity: 0.45; cursor: not-allowed; }
.pdp-review-reply { margin-top: 10px; padding: 10px 14px; background: var(--soft-pink-bg); border-left: 3px solid var(--primary-pink); border-radius: 10px; font-size: 0.85rem; color: var(--plum-dark); line-height: 1.55; }

/* ==========================================================================
   ĐÁNH GIÁ SẢN PHẨM THỰC TẾ TỪ DB (0% MOCK RATING)
   ========================================================================== */
.hearts-rating svg.is-on { fill: var(--primary-pink); }
.hearts-rating svg.is-off { fill: #e5d8e0; }
.hearts-rating svg.is-half .heart-bg { fill: #e5d8e0; }
.hearts-rating svg.is-half .heart-fg { fill: var(--primary-pink); }
.rate-score-mini { font-weight: 700; color: var(--plum-dark); font-size: 0.73rem; }
.pdp-rating-jump { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(214, 59, 125, 0.45); transition: color .15s; }
.pdp-rating-jump:hover { color: var(--primary-pink); }

.pdp-review-summary-box {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, #fdf3f7 0%, #faf5fb 100%);
  border-radius: 18px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.pdp-rev-score-col { text-align: center; padding-right: 18px; border-right: 1px solid #f0dce6; }
.pdp-rev-big-score { font-size: 2.35rem; font-weight: 700; color: var(--primary-pink); line-height: 1.05; }
.pdp-rev-big-score small { font-size: 1rem; color: var(--text-muted); font-weight: 600; margin-left: 2px; }
.pdp-rev-big-hearts { margin: 8px 0 6px; display: flex; justify-content: center; }
.pdp-rev-big-hearts .hearts-rating svg { width: 16px; height: 16px; }
.pdp-rev-score-sub { font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.pdp-rev-score-sub strong { color: var(--plum-dark); }

.pdp-rev-bars-col { display: flex; flex-direction: column; gap: 7px; }
.pdp-rev-bar-row { display: grid; grid-template-columns: 54px 1fr 32px; gap: 10px; align-items: center; font-size: 0.8rem; }
.pdp-rev-bar-lbl { font-weight: 700; color: var(--plum-dark); }
.pdp-rev-bar-track { height: 8px; background: #efe4ea; border-radius: 99px; overflow: hidden; }
.pdp-rev-bar-fill { height: 100%; background: var(--primary-pink); border-radius: 99px; transition: width .25s ease; }
.pdp-rev-bar-cnt { text-align: right; color: var(--text-muted); font-weight: 600; }

.pdp-rev-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pdp-rev-filter-btn {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #fbf6f9;
  color: var(--plum-dark);
  border: 1px solid #eedbe5;
  cursor: pointer;
  transition: all .15s;
}
.pdp-rev-filter-btn:hover { border-color: var(--primary-pink); color: var(--primary-pink); }
.pdp-rev-filter-btn.active { background: var(--primary-pink); color: #fff; border-color: var(--primary-pink); }

.pdp-review-empty {
  background: #fbf6f9;
  border-radius: 16px;
  padding: 26px 20px;
  text-align: center;
}
.pdp-review-empty p { font-weight: 700; color: var(--plum-dark); margin-bottom: 6px; font-size: 0.94rem; }
.pdp-review-empty small { color: var(--text-muted); font-size: 0.83rem; line-height: 1.55; display: block; max-width: 460px; margin: 0 auto; }

.pdp-review-author-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pdp-review-author small { font-weight: 600; color: var(--text-muted); }
.pdp-review-meta-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pdp-review-verified { display: inline-flex; align-items: center; gap: 4px; }
.pdp-review-verified svg { width: 12px; height: 12px; }
.pdp-review-date { font-size: 0.76rem; color: var(--text-muted); font-weight: 600; }

.pdp-review-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pdp-review-photo-item {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eedbe5;
  display: block;
}
.pdp-review-photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.pdp-review-photo-item:hover img { transform: scale(1.06); }

.pdp-rating-picker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 0 2px; }
.pdp-rate-pick-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  border: 1.5px solid #edd9e3;
  color: #decdd6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
}
.pdp-rate-pick-btn svg { width: 17px; height: 17px; }
.pdp-rate-pick-btn.is-on { color: var(--primary-pink); border-color: #f3bdd2; background: #fff7fa; }
.pdp-rate-pick-btn:hover { transform: translateY(-1px); border-color: var(--primary-pink); }
.pdp-rate-pick-label { font-size: 0.84rem; font-weight: 700; color: var(--primary-pink); margin-left: 6px; }

.pdp-review-form-box .form-field select,
.pdp-review-form-box .form-field input[type="file"] {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  font-size: 0.86rem;
  background: #fff;
  color: var(--text-main);
}
.pdp-rev-upload-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pdp-rev-upload-preview img { width: 58px; height: 58px; object-fit: cover; border-radius: 10px; border: 1px solid #ebd5e0; }

@media (max-width: 767px) {
  .pdp-review-summary-box { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .pdp-rev-score-col { padding-right: 0; padding-bottom: 12px; border-right: 0; border-bottom: 1px solid #f0dce6; }
}

/* Giỏ hàng: dòng sản phẩm hết hàng */
.mini-cart-item.is-out .mini-cart-price { color: #c0392b; font-weight: 700; }
a.checkout-btn { display: flex; align-items: center; justify-content: center; text-align: center; }

/* Hero slide là link */
a.hero-banner-slide { display: block; }

/* Cổng xác nhận 18+ */
.age-gate { position: fixed; inset: 0; z-index: 99999; background: rgba(60, 34, 95, 0.82); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.age-gate-card { background: var(--white); border-radius: 22px; max-width: 440px; width: 100%; padding: 34px 28px; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); }
.age-gate-badge { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: var(--primary-pink); color: var(--white); font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.age-gate-card h2 { font-size: 1.25rem; color: var(--plum-dark); margin-bottom: 10px; }
.age-gate-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.age-gate-actions { display: flex; flex-direction: column; gap: 10px; }
.age-gate-actions .button { display: flex; align-items: center; justify-content: center; border-radius: 99px; }

/* ==========================================================================
   CHECKOUT / THANH TOÁN QR / THEO DÕI ĐƠN
   ========================================================================== */
.alert-box { padding: 12px 16px; border-radius: 12px; font-size: 0.9rem; font-weight: 600; margin-bottom: 16px; }
.alert-error { background: #fdecef; color: #b3263e; border: 1px solid #f6c5cf; }
.alert-success { background: #eaf8ef; color: #1f7a3e; border: 1px solid #bfe6cc; }
.alert-info { background: var(--soft-pink-bg); color: var(--plum-dark); border: 1px solid var(--soft-pink-border); }

.checkout-layout, .pay-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.checkout-main { display: flex; flex-direction: column; gap: 20px; }
.checkout-side, .pay-summary { position: sticky; top: 110px; }
.co-card { background: var(--white); border-radius: 18px; padding: 26px; box-shadow: 0 6px 24px rgba(60, 34, 95, 0.06); }
.co-title { font-size: 1.25rem; color: var(--primary-pink); margin-bottom: 8px; }
.co-sub { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }
.co-card .flatsome-form { display: flex; flex-direction: column; gap: 14px; }
.co-card .form-field select, .co-card .form-field input[type="text"], .co-card .form-field input[type="tel"], .co-card .form-field textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border-light); border-radius: 12px; font-size: 0.92rem; background: #fff; color: var(--text-main);
}
.co-card .form-field input:focus, .co-card .form-field select:focus, .co-card .form-field textarea:focus { border-color: var(--primary-pink); }
.co-card .form-field label { display: block; font-size: 0.84rem; font-weight: 700; margin-bottom: 6px; }

.co-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.co-option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--border-light); border-radius: 12px; cursor: pointer; }
.co-option:has(input:checked) { border-color: var(--primary-pink); background: var(--soft-pink-bg); }
.co-option input { margin-top: 4px; accent-color: var(--primary-pink); }
.co-option span { display: flex; flex-direction: column; gap: 3px; font-size: 0.9rem; }
.co-option small { color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; }

.co-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; max-height: 320px; overflow: auto; }
.co-item { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; font-size: 0.86rem; }
.co-item img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; }
.co-item-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.co-item-info a, .co-item-info span { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.co-item-info small { color: var(--text-muted); }
.link-btn { color: var(--primary-pink); font-weight: 700; font-size: 0.82rem; text-decoration: underline; padding: 4px 0; background: none; display: inline-block; }
.co-coupon { display: flex; gap: 8px; margin: 14px 0 6px; }
.co-coupon input { flex: 1; padding: 10px 14px; border: 1.5px dashed var(--pastel-pink); border-radius: 12px; text-transform: uppercase; font-size: 0.88rem; }
.co-coupon .button { border-radius: 12px; padding: 0 16px; }
.co-coupon-msg { font-size: 0.8rem; font-weight: 600; min-height: 18px; margin-bottom: 8px; }
.co-coupon-msg.ok { color: #1f7a3e; } .co-coupon-msg.bad { color: #b3263e; }
.co-rows { border-top: 1px solid var(--border-light); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; margin-bottom: 14px; }
.co-rows > div { display: flex; justify-content: space-between; gap: 10px; }
.co-total { font-size: 1.1rem; border-top: 1px dashed var(--border-light); padding-top: 10px; }
.co-total strong { color: var(--primary-pink); font-size: 1.25rem; }
.co-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 0.82rem; line-height: 1.5; margin-bottom: 14px; }
.co-agree input { margin-top: 3px; accent-color: var(--primary-pink); }
.co-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 10px; line-height: 1.5; }
.co-ship-to { background: var(--soft-pink-bg); border-radius: 12px; padding: 12px 14px; font-size: 0.84rem; line-height: 1.6; margin: 10px 0; }

.pay-head { margin-bottom: 14px; }
.pay-badge { display: inline-block; background: var(--soft-pink-bg); color: var(--primary-pink); font-weight: 700; font-size: 0.8rem; padding: 4px 12px; border-radius: 99px; margin-bottom: 8px; }
.pay-countdown { background: #fff6e6; color: #8a5a00; border: 1px solid #f3dfb2; border-radius: 12px; padding: 10px 14px; font-size: 0.88rem; margin-bottom: 16px; }
.pay-grid { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; margin-bottom: 18px; }
.pay-qr { border: 2px dashed var(--pastel-pink); border-radius: 16px; padding: 10px; background: #fff; }
.pay-qr img { width: 100%; height: auto; border-radius: 8px; }
.pay-qr-empty { padding: 28px 12px; text-align: center; font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.pay-info { display: flex; flex-direction: column; gap: 10px; }
.pay-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px; align-items: center; padding: 9px 12px; background: #fbf6f9; border-radius: 10px; font-size: 0.88rem; }
.pay-row span { color: var(--text-muted); font-size: 0.8rem; }
.pay-row strong { word-break: break-all; }
.pay-amount { color: var(--primary-pink); font-size: 1.15rem; }
.pay-content { letter-spacing: 1px; }
.copy-btn { background: var(--primary-pink); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 5px 10px; border-radius: 99px; }
.copy-btn.copied { background: #1f7a3e; }
.pay-instruction { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; }
.pay-warn { font-size: 0.82rem; color: #b3263e; line-height: 1.5; }
.pay-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.pay-step { display: flex; gap: 10px; align-items: flex-start; font-size: 0.84rem; line-height: 1.5; padding: 12px; border-radius: 12px; background: #fbf6f9; }
.pay-step b { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-pink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.pay-must { background: #fdecef; border: 1px solid #f6c5cf; color: #8e1d33; border-radius: 12px; padding: 12px 16px; font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }
.pay-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-actions .button { border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; }
.pay-zalo-btn { flex: 1; min-width: 260px; padding: 15px 20px; font-size: 1rem; }
.pay-reported { margin-top: 12px; font-size: 0.86rem; color: #1f7a3e; font-weight: 600; }
.pay-state { background: #eaf8ef; border: 1px solid #bfe6cc; color: #1f6035; border-radius: 12px; padding: 16px; line-height: 1.6; margin-bottom: 14px; }
.pay-state .button { margin-top: 10px; border-radius: 99px; display: inline-flex; }

.track-steps { display: flex; justify-content: space-between; gap: 6px; margin: 18px 0 22px; counter-reset: s; }
.track-steps li { flex: 1; text-align: center; position: relative; color: var(--text-muted); font-size: 0.78rem; }
.track-steps li span { width: 30px; height: 30px; border-radius: 50%; background: #f1e7ee; color: var(--text-muted); display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; font-weight: 700; position: relative; z-index: 1; }
.track-steps li:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: 50%; width: 100%; height: 3px; background: #f1e7ee; }
.track-steps li.done span { background: var(--primary-pink); color: #fff; }
.track-steps li.done:not(:last-child)::after { background: var(--primary-pink); }
.track-steps li.current em { color: var(--primary-pink); font-weight: 700; }
.track-steps em { font-style: normal; }
.track-log { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.track-log li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; font-size: 0.86rem; padding: 8px 12px; background: #fbf6f9; border-radius: 10px; }
.track-log time { color: var(--text-muted); font-weight: 700; font-size: 0.78rem; }

@media (max-width: 900px) {
  .checkout-layout, .pay-layout { grid-template-columns: 1fr; }
  .checkout-side, .pay-summary { position: static; }
  .pay-grid { grid-template-columns: 1fr; }
  .pay-qr { max-width: 280px; margin: 0 auto; }
  .pay-steps { grid-template-columns: 1fr; }
  .pay-row { grid-template-columns: 1fr auto; }
  .pay-row span { grid-column: 1 / -1; }
  .co-card { padding: 18px; }
}

/* FAQ */
.faq-group { color: var(--primary-pink); margin: 22px 0 10px; font-size: 1.05rem; }
.faq-item { border: 1.5px solid var(--border-light); border-radius: 12px; padding: 0 16px; margin-bottom: 8px; background: #fff; }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 13px 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--primary-pink); font-size: 1.2rem; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 0 14px; color: var(--text-muted); line-height: 1.7; font-size: 0.92rem; }
