/* =========================================================
   FOH · Theme Black Friday
   Bật khi <html> có class "theme-bf" (ngày bật/tắt: thẻ <script> đầu index.html).
   Giữ nền kem + font của FOH. Điểm nhấn: đen than + hồng FOH,
   thêm thẻ treo giá kraft, đường may chỉ, băng chữ chạy.
   ========================================================= */

html.theme-bf {
  --bf-ink: #171311;       /* đen than */
  --bf-ink-2: #2A2320;
  --bf-cream: #F6EFE4;
  --bf-kraft: #C9A273;
  --sage: #171311;         /* chữ nhỏ trên tiêu đề → đen */
  --line: #E3D8CB;
}

/* ---------- Thanh trên cùng + đếm ngược ---------- */
.bf-bar {
  background: var(--bf-ink, #171311);
  color: #F6EFE4;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 8px 16px;
}
.bf-bar b { color: #fff; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bf-bar .bf-dot { color: var(--rose); padding-inline: 6px; }
.bf-bar .bf-count { font-variant-numeric: tabular-nums; color: #fff; font-weight: 600; }
.bf-bar .bf-count i { font-style: normal; color: #B9AEA6; font-weight: 400; margin-left: 2px; }
@media (max-width: 640px) { .bf-bar-more { display: none; } .bf-bar { font-size: 12px; } }

/* ---------- Logo: thẻ treo "BF" ---------- */
html.theme-bf .logo { position: relative; }
html.theme-bf .logo::after {
  content: "BF";
  position: absolute;
  right: -30px;
  top: 4px;
  font: 700 10px/1 var(--body);
  letter-spacing: .06em;
  color: #fff;
  background: var(--bf-ink);
  padding: 5px 6px 5px 9px;
  clip-path: polygon(5px 0, 100% 0, 100% 100%, 5px 100%, 0 50%);
  transform: rotate(8deg);
}

/* ---------- Chữ nhỏ trên tiêu đề: ô vuông đen ---------- */
html.theme-bf .eyebrow { color: var(--bf-ink); display: inline-flex; align-items: center; gap: 7px; }
html.theme-bf .eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--rose); transform: rotate(45deg); flex: none; }
html.theme-bf #ghe-quay .eyebrow { color: #F6EFE4; }

/* ---------- Thẻ sản phẩm khi rê chuột ---------- */
html.theme-bf .card:hover { box-shadow: 0 0 0 2px var(--bf-ink), 0 10px 26px rgba(23, 19, 17, .14); }
html.theme-bf .hc-jump a:hover { background: var(--bf-ink); color: #fff; border-color: var(--bf-ink); }
html.theme-bf .hc-jump a:hover small { color: #B9AEA6; }

/* ---------- Slide Black Friday (slide đầu banner) ---------- */
.slide.bf-slide { container-type: inline-size; color: #F6EFE4; background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.028) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.022) 0 1px, transparent 1px 4px),
    radial-gradient(120% 90% at 80% 40%, #2C2421 0%, #171311 60%); }
.slide.bf-slide::after { display: none; }
.bf-in { position: absolute; inset: 0; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; padding: 0 4cqw 0 6cqw; }
.bf-in::before { /* đường may chỉ quanh banner */
  content: ""; position: absolute; inset: 1.4cqw; border: 1.5px dashed rgba(246, 239, 228, .32); border-radius: 6px; pointer-events: none;
}
.bf-txt { position: relative; z-index: 2; }
.bf-kicker { display: inline-block; font-size: max(9px, 1.15cqw); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #F6EFE4; border: 1px solid rgba(246, 239, 228, .4); border-radius: 999px; padding: .45em 1.1em; }
.bf-txt h2 { margin: .28em 0 .22em; font-family: var(--body); font-weight: 700; text-transform: uppercase; line-height: .9; letter-spacing: -.01em; font-size: 9.6cqw; text-shadow: none; max-width: none; }
.bf-txt h2 span { display: block; }
.bf-txt h2 .o { color: transparent; -webkit-text-stroke: max(1.5px, .2cqw) #F6EFE4; position: relative; width: fit-content; }
.bf-txt h2 .o::after { /* đường chỉ hồng dưới chữ */
  content: ""; position: absolute; left: 2%; right: 2%; bottom: -.12em; height: max(2px, .3cqw);
  background: repeating-linear-gradient(90deg, var(--rose) 0 1.2cqw, transparent 1.2cqw 1.9cqw);
}
.bf-txt p { margin: .9em 0 0; font-size: max(11px, 1.6cqw); font-weight: 500; color: #E7DDD2; text-shadow: none; }
.bf-cta { display: inline-block; margin-top: 1.3cqw; background: var(--rose); color: #fff; font-weight: 600; font-size: max(10px, 1.3cqw); padding: .75em 1.5em; border-radius: 999px; }

.bf-pics { position: relative; height: 100%; }
.bf-pol { position: absolute; margin: 0; background: #FBF5EC; padding: .8cqw .8cqw 2.6cqw; box-shadow: 0 1.4cqw 3cqw rgba(0, 0, 0, .45); }
.bf-pol img { position: static; display: block; width: 100%; height: 100%; object-fit: cover; }
.bf-pol::before { /* băng dính vải */
  content: ""; position: absolute; top: -1cqw; left: 50%; width: 6.5cqw; height: 2cqw; transform: translateX(-50%) rotate(-4deg);
  background: repeating-linear-gradient(45deg, #171311 0 .5cqw, #F6EFE4 .5cqw 1cqw); opacity: .9;
}
.bf-pol.p1 { width: 21cqw; height: 25cqw; left: 6%; top: 10%; transform: rotate(-6deg); }
.bf-pol.p2 { width: 19cqw; height: 23cqw; right: 6%; top: 22%; transform: rotate(5deg); }
.bf-pol.p2::before { background: repeating-linear-gradient(45deg, var(--rose) 0 .5cqw, #F7C7D3 .5cqw 1cqw); }

/* thẻ treo giá kraft */
.bf-tag {
  position: absolute; z-index: 3; left: 36%; bottom: 6%; width: 15.5cqw; white-space: nowrap; padding: 2.6cqw 1cqw 1.4cqw; text-align: center; color: #2B211C;
  background: linear-gradient(160deg, #D2AE80, #BF9663);
  clip-path: polygon(22% 0, 78% 0, 100% 16%, 100% 100%, 0 100%, 0 16%);
  transform: rotate(-9deg); filter: drop-shadow(0 .8cqw 1.2cqw rgba(0, 0, 0, .4));
}
.bf-tag::before { /* lỗ xỏ dây */
  content: ""; position: absolute; top: 1cqw; left: 50%; width: 1.3cqw; height: 1.3cqw; translate: -50% 0; border-radius: 50%; background: #171311; box-shadow: inset 0 0 0 .25cqw #A9814F;
}
.bf-tag::after { /* đường may trong thẻ */
  content: ""; position: absolute; inset: .7cqw; top: 2.9cqw; border: 1px dashed rgba(43, 33, 28, .5);
}
.bf-tag b { display: block; font: 700 3.3cqw/1 var(--body); letter-spacing: -.02em; }
.bf-tag small { display: block; margin-top: .5cqw; font-size: max(7px, .95cqw); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.bf-string { /* dây treo thẻ */
  position: absolute; z-index: 2; left: 42.5%; bottom: calc(6% + 9cqw); width: 9cqw; height: 9cqw;
  border-left: 1.5px solid #E7DDD2; border-top: 1.5px solid #E7DDD2; border-radius: 60% 0 0 0; transform: rotate(18deg); opacity: .7;
}
@container (max-width: 560px) {
  .bf-txt p { display: none; }
  .bf-kicker { font-size: 8.5px; }
  .bf-cta { font-size: 10px; margin-top: 8px; }
}

/* ---------- Băng chữ chạy dưới banner ---------- */
.bf-ticker { background: var(--bf-ink, #171311); color: #F6EFE4; overflow: hidden; white-space: nowrap; border-block: 2px dashed rgba(246, 239, 228, .25); }
.bf-ticker-in { display: inline-flex; animation: bf-run 32s linear infinite; }
.bf-ticker span { padding: 10px 0; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.bf-ticker span::after { content: "✦"; color: var(--rose); padding-inline: 18px; }
@keyframes bf-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .bf-ticker-in { animation: none; } }
html.theme-bf #ban-tin { padding-bottom: 0; }
html.theme-bf #danh-muc { padding-top: 40px; }

/* ---------- Khối Ghé quầy + chân trang ---------- */
html.theme-bf #ghe-quay .visit { background: var(--bf-ink); outline: 1.5px dashed rgba(246, 239, 228, .3); outline-offset: -10px; }
html.theme-bf .site-foot { overflow: hidden; }
.bf-tape { background: var(--bf-ink, #171311); color: #F6EFE4; overflow: hidden; white-space: nowrap; transform: rotate(-1.2deg); margin: 0 -20px 28px; padding: 7px 0; }
.bf-tape span { font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.bf-tape span::after { content: "●"; color: var(--rose); padding-inline: 14px; font-size: 8px; vertical-align: 2px; }

/* ---------- Tắt hết khi không ở mùa Black Friday ---------- */
html:not(.theme-bf) .bf-bar,
html:not(.theme-bf) .bf-ticker,
html:not(.theme-bf) .bf-tape { display: none; }
