/* ============================================================
   CameraShop — Design tokens
   Bảng màu "phòng điều khiển an ninh": navy đậm + cyan tín hiệu
   + amber cảnh báo. Chữ hiển thị Be Vietnam Pro, nội dung Inter,
   dữ liệu/thông số IBM Plex Mono (đầy đủ dấu tiếng Việt).
   ============================================================ */
:root {
    --ink-navy: #0B1524;
    --navy-2: #132038;
    --navy-3: #1B2C4A;
    --cloud: #F2F6FD;
    --brand: #1E6FF0;
    --brand-dark: #1355C7;
    --brand-deep: #0B3C99;
    --brand-soft: #E8F0FF;
    --paper: #FFFFFF;
    --cyan: var(--brand);
    --cyan-dim: var(--brand-dark);
    --amber: #F5A623;
    --amber-dim: #D98C0F;
    --ink: #101826;
    --slate: #5B6B82;
    --line: #E3E7EE;
    --danger: #C0392B;

    --font-display: 'Be Vietnam Pro', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    --radius: 10px;
    --shadow: 0 2px 10px rgba(11,21,36,.07);
    --shadow-lg: 0 12px 34px rgba(11,21,36,.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--cloud);
    line-height: 1.6;
    font-size: 15.5px;
}
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
a { color: var(--cyan-dim); text-decoration: none; }
a:hover { color: var(--cyan); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-navy); letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Top utility bar ---------- */
.topbar { background: var(--brand-deep); color: rgba(255,255,255,.82); font-size: 12.5px; }
.topbar-links { margin-left: auto; display: flex; }
.topbar-links a { color: rgba(255,255,255,.82); margin-left: 18px; }
.topbar-links a:hover { color: #fff; }
.topbar-inner { display: flex; gap: 22px; padding: 7px 20px; flex-wrap: wrap; }
.topbar-item strong { color: var(--amber); font-weight: 600; }
@media (max-width: 640px) { .topbar-hide-mobile { display: none; } }

/* ---------- Header ---------- */
.site-header { background: var(--brand); padding: 16px 0; position: sticky; top: 0; z-index: 40; box-shadow: 0 2px 10px rgba(11,60,153,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; position: relative; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 4px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle.active .icon-menu { display: none; }
.nav-toggle.active .icon-close { display: block; }
.logo { color: #fff; font-family: var(--font-display); font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.logo-img { height: 42px; width: auto; display: block; }
.main-nav { display: flex; gap: 26px; }
.main-nav a { color: rgba(255,255,255,.92); font-weight: 500; font-size: 14.5px; }
.main-nav a:hover { color: #fff; }
.cart-link { color: var(--ink-navy); background: var(--amber); padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 9px; box-shadow: 0 4px 14px rgba(245,166,35,.28); }
.cart-link:hover { background: #ffb840; color: var(--ink-navy); }
.cart-icon { color: #fff; flex-shrink: 0; }
.cart-count { background: var(--ink-navy); color: #fff; border-radius: 50%; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; font-family: var(--font-mono); padding: 0 5px; }

/* ---------- Trang chủ kiểu cửa hàng chuyên camera: menu danh mục bên trái + banner ---------- */
.dg-top { display: grid; grid-template-columns: 250px 1fr; gap: 14px; margin: 16px 0 14px; }
.dg-menu { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; align-self: start; }
.dg-menu-title { background: var(--brand-dark); color: #fff; font-weight: 700; font-size: 14.5px; padding: 12px 16px; }
.dg-menu ul { list-style: none; margin: 0; padding: 4px 0; }
.dg-menu li a { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font-size: 14px; color: var(--navy-2); border-bottom: 1px solid #EEF1F5; }
.dg-menu li:last-child a { border-bottom: 0; }
.dg-menu li a:hover { background: var(--brand-soft); color: var(--cyan-dim); text-decoration: none; }
.dg-menu li a.is-active { color: var(--cyan-dim); font-weight: 700; background: var(--brand-soft); }
.dg-menu li a small { color: #A6B0BF; font-size: 12px; }
.dg-menu li.sep { height: 6px; background: var(--cloud); }
.dg-menu li.hot a { color: #C47A00; font-weight: 600; }

.dg-slider { position: relative; display: flex; border-radius: 10px; overflow: hidden; min-height: 340px; background: var(--brand); }
.dg-slide { display: none; min-height: 340px; }
.dg-slide.active { display: flex; flex: 1; min-width: 0; }
.dg-slide-copy { flex: 1.2; padding: 34px 36px 44px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.dg-slide-img { flex: 1; display: flex; align-items: center; justify-content: center; padding: 22px 28px; }
.dg-slide-img img { max-width: 100%; max-height: 290px; object-fit: contain; background: #fff; border-radius: 14px; padding: 12px; }
.dg-slide-empty { width: 200px; height: 200px; border-radius: 16px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.35); font-size: 76px; display: flex; align-items: center; justify-content: center; }
.dg-emoji { background: rgba(255,255,255,.55); color: inherit; font-size: 84px; }
.dg-slide h2 { font-size: 30px; line-height: 1.22; font-weight: 800; color: inherit; margin: 0 0 12px; }
.dg-hl { color: #FFD45C; white-space: nowrap; }
.dg-slide-sub { font-size: 15px; line-height: 1.55; margin: 0 0 18px; opacity: .9; }
.dg-slide-actions { display: flex; flex-wrap: wrap; }
.dg-slide-actions .btn { margin: 0 10px 8px 0; }
.dg-chips { display: flex; flex-wrap: wrap; margin-bottom: 14px; }
.dg-chips span { background: rgba(11,21,36,.12); font-weight: 700; font-size: 13.5px; padding: 5px 12px; border-radius: 999px; margin: 0 8px 6px 0; }
.dg-slide-navy { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; }
.dg-slide-navy .dg-slide-img { background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.24), transparent 70%); }
.dg-slide-gold { background: linear-gradient(135deg, #F5A623, #FFC857); color: var(--ink-navy); }
.dg-slide-teal { background: #E4F5F1; color: #0E4A40; }
.dg-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; z-index: 3; }
.dg-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(120,130,150,.55); border: 0; margin: 0 4px; padding: 0; cursor: pointer; }
.dg-dot.active { background: var(--amber); width: 24px; border-radius: 5px; }

.dg-usp { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 20px; }
.dg-usp div { padding: 12px 16px; font-size: 13.5px; font-weight: 600; color: var(--navy-2); border-right: 1px solid var(--line); }
.dg-usp div:last-child { border-right: 0; }
.dg-usp span { margin-right: 6px; }

/* Khối từng danh mục: thanh tiêu đề + lưới sản phẩm */
.dg-sec { margin-bottom: 22px; scroll-margin-top: 90px; }
.dg-sec-head { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); border-radius: 10px 10px 0 0; padding: 11px 16px; }
.dg-sec-head h2 { color: #fff; font-size: 17px; margin: 0; }
.dg-sec-head a { color: #FFE29A; font-size: 13.5px; font-weight: 600; }
.dg-sec-body { background: var(--paper); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; padding: 14px; }
.dg-sec-body .product-grid { margin-bottom: 0; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.dg-more { text-align: center; margin-top: 14px; }
.dg-more a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 9px 26px; font-weight: 600; font-size: 14px; color: var(--navy-2); }
.dg-more a:hover { border-color: var(--cyan); color: var(--cyan-dim); text-decoration: none; }

/* Khối giới thiệu có "Xem thêm / Rút gọn" */
.dg-seo { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; margin-bottom: 22px; }
.dg-seo h2 { font-size: 18px; margin: 0 0 10px; }
.dg-seo-body { max-height: 118px; overflow: hidden; position: relative; font-size: 14px; color: var(--navy-2); line-height: 1.65; }
.dg-seo-body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 52px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff); }
.dg-seo.open .dg-seo-body { max-height: none; }
.dg-seo.open .dg-seo-body::after { display: none; }
.dg-seo-toggle { margin-top: 8px; background: none; border: 0; color: var(--cyan-dim); font-weight: 700; font-size: 14px; cursor: pointer; padding: 4px 0; }

/* Khối "Nhập số điện thoại, gọi lại ngay" */
.dg-call { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; border-radius: 12px; padding: 24px 28px; margin-bottom: 26px; scroll-margin-top: 90px; }
.dg-call h3 { color: #fff; font-size: 20px; margin: 0 0 4px; }
.dg-call p { color: rgba(255,255,255,.9); margin: 0 0 8px; font-size: 14.5px; }
.dg-call-form { display: flex; }
.dg-call-form input[type=text] { width: 230px; margin: 0 8px 0 0; }
.dg-call-links { margin-top: 10px; }
.dg-call-links a { color: #fff; font-weight: 600; margin-right: 18px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Trang chính sách */
.policy-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; margin: 20px 0 40px; align-items: start; }
.policy-nav { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.policy-nav a { display: block; padding: 12px 16px; font-size: 14px; color: var(--navy-2); border-bottom: 1px solid #EEF1F5; }
.policy-nav a:last-child { border-bottom: 0; }
.policy-nav a.active { background: var(--brand-soft); color: var(--cyan-dim); font-weight: 700; }
.policy-nav a:hover { background: var(--brand-soft); text-decoration: none; }
.policy-content { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 24px 28px; font-size: 14.5px; line-height: 1.7; }
.policy-content h1 { font-size: 24px; margin: 0 0 16px; }
.policy-content h3 { font-size: 16px; margin: 20px 0 6px; }
.policy-steps { padding-left: 20px; }
.policy-steps li { margin-bottom: 10px; }
.policy-table { margin: 10px 0 14px; }

/* Thanh gọi nhanh dưới cùng (chỉ hiện trên điện thoại) */
.m-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--brand-deep); border-top: 1px solid rgba(255,255,255,.12); }
.m-bar a, .m-bar button { flex: 1; text-align: center; padding: 8px 2px 7px; font-size: 11.5px; color: #E1E8F2; background: none; border: 0; font-family: inherit; cursor: pointer; }
.m-bar span { display: block; font-size: 18px; line-height: 1.2; }
.footer-hotline { color: var(--amber); font-size: 22px; font-weight: 800; margin: 2px 0 4px; }
.footer-social { display: flex; flex-wrap: wrap; margin-top: 4px; }
.footer-social a { border: 1px solid rgba(255,255,255,.22); border-radius: 6px; padding: 5px 12px; font-size: 13px; color: #E1E8F2; margin: 0 8px 8px 0; }
.footer-social a:hover { border-color: var(--amber); color: var(--amber); text-decoration: none; }

/* ---------- Tiêu đề từng khối ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 12px; }
.section-head h2 { font-size: 21px; margin: 0; display: flex; align-items: center; }
.section-head h2::before { content: ""; display: inline-block; width: 4px; height: 20px; background: var(--amber); border-radius: 2px; margin-right: 10px; }
.section-more { font-size: 14px; font-weight: 600; color: var(--cyan-dim); }

/* ---------- Khối giá sốc ---------- */
.flash-box { background: linear-gradient(135deg, #FFF4E0, #FFE7C2); border: 1px solid #F5D9A8; border-radius: 16px; padding: 18px 18px 4px; margin-bottom: 28px; }
.flash-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.flash-head h2 { font-size: 20px; margin: 0 14px 6px 0; color: #7A2E00; }
.countdown { display: flex; align-items: center; }
.countdown span { background: var(--brand-deep); color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 16px; min-width: 36px; text-align: center; padding: 6px 4px; border-radius: 6px; }
.countdown i { font-style: normal; color: #7A4A00; font-size: 13px; margin: 0 6px; }
.flash-grid { margin-bottom: 14px; }

/* ---------- Dịch vụ, CTA ---------- */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 32px; }
.service-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px; color: var(--ink); transition: box-shadow .18s ease, border-color .18s ease; }
.service-card:hover { box-shadow: var(--shadow-lg); border-color: #CBD3DF; text-decoration: none; }
.svc-icon { font-size: 26px; margin-bottom: 6px; }
.service-card h3 { font-size: 16px; margin: 4px 0 6px; }
.service-card p { font-size: 13.5px; color: var(--slate); flex-grow: 1; margin: 0 0 10px; }
.service-card em { font-style: normal; font-weight: 700; font-size: 13.5px; color: var(--cyan-dim); }
.cta-band { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--brand); color: #fff; border-radius: 16px; padding: 26px 30px; margin-bottom: 32px; }
.cta-band h3 { color: #fff; font-size: 21px; margin: 0 0 4px; }
.cta-band p { color: #B9C6D8; margin: 0; font-size: 14.5px; }
.cta-actions { display: flex; flex-wrap: wrap; }
.cta-actions .btn { margin: 4px 10px 4px 0; }
.btn-zalo { background: #0068FF; color: #fff; }
.btn-zalo:hover { background: #0053D1; color: #fff; text-decoration: none; }

/* ---------- Tra cứu đơn hàng ---------- */
.lookup-wrap { max-width: 720px; margin: 24px auto 40px; }
.lookup-form { display: flex; flex-wrap: wrap; align-items: flex-end; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.lookup-form label { flex: 1 1 200px; margin: 0 12px 0 0; }
.lookup-result { margin-top: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.lookup-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.lookup-head h2 { font-size: 19px; margin: 0 0 2px; }
.lookup-status { background: #E4F5F1; color: #0E7B63; font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 999px; }
.lookup-status.is-cancelled { background: #FCEBE8; color: #A3372A; }
.lookup-steps { list-style: none; display: flex; padding: 0; margin: 14px 0 18px; }
.lookup-steps li { flex: 1; text-align: center; font-size: 13px; color: #A6B0BF; padding-top: 22px; position: relative; }
.lookup-steps li::before { content: ""; position: absolute; top: 4px; left: 50%; margin-left: -7px; width: 14px; height: 14px; border-radius: 50%; background: #D9DEE6; }
.lookup-steps li.done { color: var(--ink-navy); font-weight: 600; }
.lookup-steps li.done::before { background: var(--cyan); }
.lookup-items { margin-bottom: 12px; }
.lookup-meta div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lookup-meta span { color: var(--slate); }
.lookup-total strong { font-size: 17px; color: #D62828; }

/* ---------- Chân trang: phương thức thanh toán ---------- */
.footer-pay { display: flex; align-items: center; flex-wrap: wrap; padding-top: 4px; padding-bottom: 18px; color: rgba(255,255,255,.82); font-size: 13px; }
.footer-pay > span { margin-right: 8px; }
.pay-chip { border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 4px 10px; color: #E1E8F2; font-size: 12.5px; }

/* ---------- Categories ---------- */
.categories {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px;
    position: sticky; top: 70px; z-index: 30;
    background: var(--cloud); padding: 12px 0; scroll-margin-top: 150px;
    box-shadow: 0 8px 12px -8px rgba(11,21,36,.08);
}
.cat-item {
    background: var(--paper); border: 1px solid var(--line); padding: 9px 18px; border-radius: 999px;
    color: var(--navy-2); font-size: 13.5px; font-weight: 500;
}
.cat-item.active, .cat-item:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Khung góc ống ngắm - dùng cho khung ảnh sản phẩm (xem product.php) */
.hero-corner { position: absolute; width: 30px; height: 30px; border: 2px solid var(--cyan); opacity: .8; }
.hero-corner-tl { top: 22px; left: 22px; border-right: none; border-bottom: none; }
.hero-corner-tr { top: 22px; right: 22px; border-left: none; border-bottom: none; }
.hero-corner-bl { bottom: 22px; left: 22px; border-right: none; border-top: none; }
.hero-corner-br { bottom: 22px; right: 22px; border-left: none; border-top: none; }

/* Chấm nhấp nháy - dùng cho huy hiệu "Nổi bật" trên ảnh sản phẩm */
.rec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(245,166,35,.5);} 50% { opacity:.6; box-shadow: 0 0 0 5px rgba(245,166,35,0);} }

/* ---------- Product grid & cards (kiểu cửa hàng: giá, giảm giá, đánh giá nổi bật) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-bottom: 40px; scroll-margin-top: 210px; }
.product-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: box-shadow .18s ease, border-color .18s ease; }
.product-card:hover { box-shadow: var(--shadow-lg); border-color: #CBD3DF; }
.product-img-link { display: block; }
.product-img, .no-image { width: 100%; aspect-ratio: 1/1; background: #fff; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.product-card:hover .product-img img { transform: scale(1.04); }
.no-image { font-size: 44px; color: #B7C1D0; background: var(--cloud); }
.no-image.large { aspect-ratio: 4/3; font-size: 90px; }
.pc-badges { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; }
.pc-badge { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; margin-right: 6px; }
.pc-badge-sale { background: #E5383B; color: #fff; }
.pc-badge-hot { background: var(--amber); color: var(--ink-navy); }
.badge-featured { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--paper); color: var(--amber-dim); font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; display: inline-flex; align-items: center; }
.product-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex-grow: 1; }
.pc-rating { font-size: 12.5px; color: var(--slate); margin-bottom: 4px; }
.pc-star { color: var(--amber); }
.product-body h3 { font-size: 14.5px; font-weight: 600; color: var(--navy-2); line-height: 1.35; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.short-desc { font-size: 13px; color: var(--slate); margin-bottom: 10px; }
.price-row { margin: 0 0 2px; display: flex; align-items: baseline; flex-wrap: wrap; }
.price-row > * { margin-right: 9px; }
.price { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: #D62828; }
.price-row-lg .price { font-size: 30px; }
.old-price { text-decoration: line-through; color: #A6B0BF; font-size: 13px; font-family: var(--font-mono); }
.pc-save { font-size: 12.5px; font-weight: 600; color: #0E7B63; margin-bottom: 6px; }
.pc-points { list-style: none; margin: 4px 0 8px; padding: 0; font-size: 12.5px; color: var(--slate); flex-grow: 1; }
.pc-points li { position: relative; padding-left: 16px; margin-bottom: 3px; line-height: 1.38; }
.pc-points li::before { content: "✓"; position: absolute; left: 0; color: #0E8A5F; font-weight: 700; }
.pc-warranty { font-size: 12.5px; font-weight: 600; color: var(--navy-2); margin-bottom: 2px; }
.pc-ship { font-size: 12.5px; color: var(--slate); margin-bottom: 8px; }
.pc-tags { display: flex; flex-wrap: wrap; margin-bottom: 6px; flex-grow: 1; }
.pc-tags span { font-size: 11.5px; color: var(--slate); background: var(--cloud); border-radius: 4px; padding: 2px 7px; margin: 0 6px 4px 0; }
.stock-status { font-size: 12.5px; color: #0E8A5F; margin-bottom: 10px; }
.stock-status:has(.stock-dot.out-stock) { color: #A6B0BF; }
.stock-dot { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 11px 22px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; font-weight: 600; text-align: center; font-family: var(--font-body); transition: background .15s ease, color .15s ease, border-color .15s ease; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }
.btn-amber { background: var(--amber); color: var(--ink-navy); }
.btn-amber:hover { background: #ffb840; color: var(--ink-navy); text-decoration: none; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.btn-outline { background: var(--paper); border: 1px solid var(--ink-navy); color: var(--ink-navy); }
.btn-outline:hover { background: var(--brand); color: #fff; text-decoration: none; }
.btn-block { width: 100%; }

/* ---------- Back link ---------- */
.back-link { display: inline-block; margin: 22px 0 4px; font-size: 13.5px; color: var(--slate); font-weight: 500; }
.back-link:hover { color: var(--ink-navy); }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; background: var(--paper); padding: 28px; border-radius: 14px; margin: 18px 0 24px; border: 1px solid var(--line); }
.product-gallery { display: flex; flex-direction: column; min-width: 0; }
.product-detail-img { position: relative; border-radius: 10px; overflow: hidden; min-width: 0; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumb { width: 68px; height: 68px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: none; opacity: .65; transition: opacity .15s ease, border-color .15s ease; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: var(--cyan); opacity: 1; }

/* ---------- Nút liên hệ nổi (Zalo + gọi điện) ---------- */
.floating-contact { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 12px; z-index: 100; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.floating-contact.visible { opacity: 1; pointer-events: auto; }
.floating-btn { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 6px 18px rgba(11,21,36,.28); transition: transform .15s ease; }
.floating-btn:hover { transform: scale(1.08); text-decoration: none; }
.floating-btn-zalo { background: #0068FF; }
.floating-btn-phone { background: var(--amber); color: var(--ink-navy); animation: floatPulse 1.8s ease-in-out infinite; }
@keyframes floatPulse { 0%,100% { box-shadow: 0 6px 18px rgba(11,21,36,.28), 0 0 0 0 rgba(245,166,35,.5); } 50% { box-shadow: 0 6px 18px rgba(11,21,36,.28), 0 0 0 8px rgba(245,166,35,0); } }
@media (max-width: 480px) {
    .floating-contact { right: 14px; bottom: 14px; }
    .floating-btn { width: 48px; height: 48px; }
}
.product-detail-img img { width: 100%; display: block; border-radius: 10px; }
.hero-corner.small { width: 22px; height: 22px; border-color: var(--cyan); z-index: 2; }
.product-detail-info { min-width: 0; }
.product-detail-info h1 { font-size: 25px; margin-bottom: 12px; }
.trust-mini { list-style: none; margin: 18px 0; padding: 16px; background: var(--cloud); border-radius: 10px; font-size: 13px; color: var(--navy-2); }
.trust-mini li { padding: 4px 0; }
.add-cart-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0; }
.add-cart-form label { font-size: 13px; color: var(--slate); display: flex; align-items: center; gap: 8px; }
.add-cart-form input { width: 72px; padding: 9px; }

.addon-box { width: 100%; background: var(--cloud); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 4px; }
.addon-box h4 { font-size: 14px; margin: 0 0 12px; color: var(--ink-navy); }
.addon-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; width: 100%; }
.addon-item:last-of-type { border-bottom: none; }
.addon-item input[type=checkbox] { width: auto; flex-shrink: 0; accent-color: var(--cyan-dim); }
.addon-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--paper); display: flex; align-items: center; justify-content: center; }
.addon-name { flex-grow: 1; font-size: 13.5px; color: var(--ink); }
.addon-price { font-family: var(--font-mono); font-size: 13px; color: var(--amber-dim); font-weight: 600; white-space: nowrap; }
.addon-total { text-align: right; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13.5px; color: var(--navy-2); }
.addon-total strong { font-family: var(--font-mono); color: var(--amber-dim); font-size: 16px; }
.product-description { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }

/* ---------- Đánh giá sản phẩm ---------- */
.rating-summary { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 12px; font-size: 13.5px; color: var(--slate); }
.rating-stars, .rating-stars-inline { color: var(--amber); letter-spacing: 1px; }
.rating-num { font-weight: 700; color: var(--ink-navy); }
.reviews-section { margin: 40px 0; padding: 28px; background: var(--paper); border-radius: 14px; border: 1px solid var(--line); }
.reviews-section h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 18px; margin-bottom: 18px; }
.review-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.review-item { padding: 14px 16px; background: var(--cloud); border-radius: 10px; }
.review-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.review-date { font-size: 12px; color: var(--slate); margin-left: auto; }
.review-item p { font-size: 13.5px; color: var(--ink); margin: 0; }
.review-form-box { border-top: 1px solid var(--line); padding-top: 20px; max-width: 480px; }
.review-form-box h4 { font-size: 15px; margin-bottom: 12px; }

/* ---------- Mã giảm giá ---------- */
.coupon-input-row { display: flex; gap: 8px; }
.coupon-input-row input { margin: 0; flex: 1; min-width: 0; }
.coupon-input-row .btn { white-space: nowrap; flex-shrink: 0; }
.coupon-message { display: block; font-size: 12.5px; margin-top: 6px; min-height: 16px; }
.coupon-message.coupon-success { color: #0E7B63; }
.coupon-message.coupon-error { color: var(--danger); }

.payment-options { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.payment-option { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 14px; margin: 0; }
.payment-option input { width: auto; margin: 0; }
.payment-option:has(input:checked) { border-color: var(--cyan); background: var(--brand-soft); }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; margin-bottom: 50px; }
.blog-card { background: var(--paper); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); display: block; transition: transform .18s ease, box-shadow .18s ease; }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.blog-card-img { width: 100%; aspect-ratio: 16/9; background: var(--cloud); overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 16px; }
.blog-date { font-family: var(--font-mono); font-size: 11.5px; color: var(--slate); text-transform: uppercase; letter-spacing: .04em; }
.blog-card-body h3 { font-size: 16px; margin: 8px 0; color: var(--ink-navy); }
.blog-card-body p { font-size: 13.5px; color: var(--slate); margin-bottom: 10px; }
.blog-readmore { font-size: 13px; font-weight: 600; color: var(--cyan-dim); }
.blog-post { max-width: 760px; margin: 20px auto 0; }
.blog-post h1 { font-size: 28px; margin: 8px 0 18px; }
.blog-post-img { width: 100%; border-radius: 12px; margin-bottom: 20px; }
.blog-post-content { font-size: 15px; line-height: 1.8; color: var(--ink); }
.product-description h3 { font-size: 15px; margin-bottom: 8px; }
.product-description p { color: #3B4657; }
.out-of-stock { color: var(--danger); font-weight: 600; margin: 14px 0; }

/* ---------- Forms ---------- */
form label { display: block; margin-bottom: 14px; font-size: 13.5px; color: var(--navy-2); font-weight: 500; }
form input[type=text], form input[type=email], form input[type=number], form input[type=password], form textarea, form select {
    width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; margin-top: 5px; font-size: 14px; font-family: var(--font-body); background: var(--paper);
}
form input:focus, form textarea:focus, form select:focus { border-color: var(--cyan); }
.checkbox-label { display: flex; align-items: center; gap: 8px; }
.checkbox-label input { width: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.note-text { font-size: 13px; color: var(--slate); margin-bottom: 14px; }

/* ---------- Cart & Checkout ---------- */
.cart-table { width: 100%; border-collapse: collapse; background: var(--paper); margin: 20px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.cart-table th { background: var(--cloud); font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--slate); }
.cart-table th, .cart-table td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; }
.cart-total { text-align: right; font-size: 19px; margin: 18px 0; font-family: var(--font-mono); color: var(--ink-navy); }
.cart-actions { margin: 10px 0; display: flex; align-items: center; gap: 12px; }
.cart-save-status { font-size: 13px; color: var(--slate); }
.cart-save-status.cart-save-ok { color: #0E7B63; }
.cart-save-status.cart-save-error { color: var(--danger); }
.link-danger { color: var(--danger); }
.checkout-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.checkout-form, .order-summary { background: var(--paper); padding: 22px; border-radius: 12px; border: 1px solid var(--line); }
.order-summary h3 { font-size: 15px; margin-bottom: 12px; }
.summary-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary-total { font-weight: 700; font-size: 16px; border-bottom: none; font-family: var(--font-mono); color: var(--amber-dim); }
.success-box { background: var(--paper); padding: 48px; text-align: center; border-radius: 14px; margin: 30px 0; border: 1px solid var(--line); }
.qr-payment-box { max-width: 340px; margin: 20px auto; padding: 20px; background: var(--cloud); border-radius: 12px; }
.qr-payment-box h3 { font-size: 15px; margin-bottom: 12px; }
.qr-payment-img { width: 100%; max-width: 260px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 8px; }
.qr-payment-amount { margin: 12px 0 6px; font-size: 15px; }
.qr-payment-amount strong { color: var(--amber-dim); font-family: var(--font-mono); font-size: 18px; }
.qr-payment-note { font-size: 13px; color: var(--navy-2); margin-bottom: 4px; }

/* ---------- Quay số may mắn ---------- */
.lucky-result-box { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; border-radius: 16px; padding: 32px; text-align: center; margin: 28px 0; }
.lucky-result-box h2 { color: #fff; margin-bottom: 6px; }
.lucky-winner-number { font-family: var(--font-mono); font-size: 56px; font-weight: 700; color: #FFD45C; letter-spacing: 8px; margin: 18px 0; }
.lucky-progress-box { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 28px; margin: 28px 0; }
.lucky-milestone-reached { color: var(--amber-dim); font-weight: 700; }
.lucky-progress-bar { width: 100%; height: 22px; background: var(--cloud); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.lucky-progress-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--amber)); border-radius: 999px; transition: width .4s ease; }
.lucky-lookup-box { background: var(--cloud); border-radius: 14px; padding: 24px; margin: 28px 0; }
.lucky-lookup-form { display: flex; gap: 10px; max-width: 420px; }
.lucky-lookup-form input { margin: 0; }
.lucky-lookup-results { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.lucky-lookup-item { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; font-size: 14px; }
.lucky-lookup-item.is-winner { border-color: var(--amber); background: #FFF3E0; }
.lucky-win-badge { color: var(--amber-dim); font-weight: 700; margin-left: 10px; }
.lucky-ticket-box { background: #FFF3E0; border: 1px solid var(--amber); border-radius: 10px; padding: 16px; margin: 16px 0; text-align: center; }
.lucky-ticket-number { font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: var(--amber-dim); letter-spacing: 3px; }
.success-box h1 { margin-bottom: 12px; }

/* ---------- Alerts ---------- */
.alert { padding: 13px 18px; border-radius: 8px; margin: 18px 0; font-size: 14px; }
.alert-success { background: #E4F5F1; color: #0E7B63; border: 1px solid #BFE7DC; }
.alert-danger { background: #FCEBE8; color: #A3372A; border: 1px solid #F3C6BE; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-deep); color: rgba(255,255,255,.8); margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; padding: 44px 20px 32px; }
.footer-logo-img { height: 90px; width: auto; align-self: flex-start; display: block; margin-bottom: 14px; }
.footer-desc { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.72); max-width: 280px; }
.footer-col h4 { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; min-width: 0; }
.footer-col a { color: rgba(255,255,255,.86); }
.footer-col a:hover { color: #FFE29A; }
.footer-bottom { background: rgba(0,0,0,.16); padding: 16px 0; text-align: center; font-size: 12.5px; color: rgba(255,255,255,.66); }

/* ---------- Admin ---------- */
.admin-body { background: var(--cloud); font-family: var(--font-body); }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--ink-navy); color: #fff; padding: 22px; flex-shrink: 0; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; }
.admin-sidebar h2 { color: #fff; margin-bottom: 22px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.sidebar-logo-img { height: 30px; width: auto; }
.sidebar-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 4px; margin-bottom: 22px; }
.sidebar-toggle .icon-close { display: none; }
.sidebar-toggle.active .icon-menu { display: none; }
.sidebar-toggle.active .icon-close { display: block; }
.admin-sidebar nav a { display: flex; align-items: center; justify-content: space-between; color: #B9C6D8; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 14px; }
.admin-sidebar nav a:hover { color: var(--cyan); }
.sidebar-badge { background: var(--amber); color: var(--ink-navy); font-family: var(--font-mono); font-weight: 700; font-size: 11.5px; min-width: 20px; height: 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.admin-content { flex-grow: 1; padding: 32px; }
.admin-content h1 { font-size: 22px; margin-bottom: 6px; }
.admin-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.admin-table th, .admin-table td { padding: 13px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13.5px; }
.admin-table th { background: var(--cloud); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--slate); }
.admin-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.admin-thumb-preview { width: 120px; margin: 8px 0; border-radius: 8px; display: block; }
.gallery-manage { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
.gallery-manage-item { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.gallery-manage-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-manage-delete { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; background: rgba(11,21,36,.75); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; }
.gallery-manage-delete:hover { background: var(--danger); color: #fff; text-decoration: none; }
.admin-form { background: var(--paper); padding: 26px; border-radius: 12px; max-width: 600px; border: 1px solid var(--line); }
.inline-form { display: inline; }
.inline-edit-form { display: flex; align-items: center; gap: 8px; }
.inline-edit-form input { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 22px; }
.stat-card { background: var(--paper); padding: 22px; border-radius: 12px; text-align: center; border: 1px solid var(--line); }
.stat-number { display: block; font-size: 30px; font-weight: 700; color: var(--ink-navy); font-family: var(--font-mono); }
.stat-label { color: var(--slate); font-size: 13px; }
.order-detail-box { background: var(--paper); padding: 22px; border-radius: 12px; margin-bottom: 22px; border: 1px solid var(--line); }

/* ---------- Login ---------- */
.login-box { max-width: 360px; margin: 100px auto; background: var(--paper); padding: 32px; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.login-logo-img { display: block; width: 100%; max-width: 296px; height: auto; margin: 0 auto 16px; }
.login-box h1 { font-size: 19px; margin-bottom: 20px; text-align: center; }

/* ---------- Trang hướng dẫn sử dụng ---------- */
.guide-hero {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff; padding: 44px 32px; border-radius: 16px; margin: 28px 0 32px; text-align: center;
}
.guide-hero h1 { color: #fff; font-size: 30px; margin-bottom: 10px; }
.guide-hero p { color: rgba(255,255,255,.92); max-width: 560px; margin: 0 auto; }

.guide-toc { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 44px; position: sticky; top: var(--hdr-h, 76px); z-index: 30; background: var(--cloud); padding: 10px 0; }
.guide-toc a {
    background: var(--paper); border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px;
    font-size: 13.5px; font-weight: 600; color: var(--navy-2);
}
.guide-toc a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

.guide-section { margin-bottom: 52px; scroll-margin-top: 150px; }
.guide-section-title { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.guide-section-num {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--ink-navy); color: var(--amber);
    display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 18px;
}
.guide-section-title h2 { margin: 0; font-size: 22px; }

.guide-steps { counter-reset: guide-step; }
.guide-step { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.guide-step:last-child { border-bottom: none; }
.guide-step-num {
    counter-increment: guide-step; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
    background: var(--cloud); border: 2px solid var(--cyan); color: var(--cyan-dim); font-weight: 700; font-family: var(--font-mono);
    display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.guide-step-num::before { content: counter(guide-step); }
.guide-step-body h4 { margin: 0 0 6px; font-size: 15.5px; color: var(--ink-navy); }
.guide-step-body p { margin: 0; color: #3B4657; font-size: 14px; line-height: 1.65; }

.guide-callout {
    background: #FFF3E0; border: 1px solid var(--amber); border-radius: 10px; padding: 14px 18px;
    font-size: 13.5px; color: #7A4A00; margin: 18px 0;
}
.guide-callout strong { color: #5C3800; }
.guide-callout.tip { background: #E4F5F1; border-color: var(--cyan); color: #0E4A40; }
.guide-callout.tip strong { color: #073B32; }

.guide-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.guide-checklist li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink); }
.guide-checklist li::before { content: "✓"; color: var(--cyan-dim); font-weight: 700; flex-shrink: 0; }

.guide-faq { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.guide-faq dt { font-weight: 600; color: var(--ink-navy); margin-bottom: 6px; font-size: 14.5px; }
.guide-faq dd { margin: 0 0 18px; color: #3B4657; font-size: 14px; line-height: 1.6; }

.smtp-transcript { background: var(--ink-navy); color: #C7D2E0; padding: 14px; border-radius: 8px; font-family: var(--font-mono); font-size: 12px; line-height: 1.6; overflow: auto; white-space: pre-wrap; word-break: break-all; margin: 0; }

.cart-table-wrap { overflow-x: auto; }
.cart-col-img { width: 84px; }
.cart-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; border: 1px solid var(--line); background: var(--cloud); }
.cart-thumb-empty { display: flex; align-items: center; justify-content: center; color: #B8C2D2; font-size: 22px; }

.cart-item-link { color: var(--ink-navy); font-weight: 500; }
.cart-item-link:hover { color: var(--cyan-dim); text-decoration: underline; }
.summary-item { align-items: center; gap: 12px; }
.summary-item-info { display: flex; align-items: center; min-width: 0; }
.summary-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex-shrink: 0; background: var(--cloud); margin-right: 10px; }
.summary-thumb-empty { display: flex; align-items: center; justify-content: center; color: #B8C2D2; font-size: 16px; }
.summary-qty { color: var(--slate); margin-left: 4px; }
.summary-item-price { white-space: nowrap; }

.lucky-bar-wrap { position: relative; margin-top: 14px; padding-bottom: 26px; }
.lucky-bar-wrap .lucky-progress-bar { margin-top: 0; }
.lucky-marker { position: absolute; top: -4px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.lucky-marker i { display: block; width: 4px; height: 30px; background: var(--slate); border-radius: 2px; opacity: .55; }
.lucky-marker b { font-family: var(--font-mono); font-size: 12px; color: var(--slate); margin-top: 3px; }
.lucky-marker.is-reached i, .lucky-marker.is-drawn i { background: var(--amber); opacity: 1; }
.lucky-marker.is-reached b, .lucky-marker.is-drawn b { color: var(--amber-dim); }
.lucky-marker:last-child { transform: translateX(-100%); align-items: flex-end; }
.lucky-stage-list { margin: 24px 0; }
.lucky-stage-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 16px; }
.lucky-stage-card.is-drawn { border-color: var(--amber); background: #FFFCF5; }
.lucky-stage-head { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.lucky-stage-num { margin-right: 12px; background: var(--ink-navy); color: var(--amber); font-family: var(--font-mono); font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.lucky-stage-milestone { font-weight: 700; color: var(--ink-navy); }
.lucky-stage-state { margin-left: auto; font-size: 13px; color: var(--slate); }
.lucky-prize-chips { display: flex; flex-wrap: wrap; }
.lucky-prize-chip { margin: 0 8px 8px 0; background: #FFF3E0; border: 1px solid #F5D9A8; color: #7A4A00; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; }
.lucky-winner-list { margin-top: 10px; }
.lucky-winner-row { display: flex; align-items: center; margin-bottom: 8px; background: var(--ink-navy); color: #fff; border-radius: 10px; padding: 10px 16px; }
.lucky-winner-ticket { margin-right: 14px; font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: var(--amber); letter-spacing: 4px; min-width: 96px; }
.lucky-winner-info { font-size: 13px; color: #C7D2E0; line-height: 1.5; }
.lucky-winner-info strong { color: #fff; }

.btn-link-small { background: none; border: none; color: var(--cyan-dim); cursor: pointer; padding: 0; font-size: 12px; text-decoration: underline; font-family: inherit; }
.lucky-rules-box { background: var(--brand-soft); border: 1px solid #BFE7DC; border-radius: 14px; padding: 20px 24px; margin: 0 0 24px; }
.lucky-rules-box h3 { margin: 0 0 8px; font-size: 16px; }
.lucky-rules-box ul { margin: 0 0 10px; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.lucky-state { margin-left: 10px; font-size: 13px; font-weight: 600; }
.lucky-state-ok { color: #0E7B63; }
.lucky-state-wait { color: var(--amber-dim); }
.lucky-state-bad { color: var(--danger); }

.theme-opts { display: flex; flex-wrap: wrap; margin: 6px 0 14px; }
.theme-opt { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px 8px 10px; margin: 0 10px 10px 0; cursor: pointer; background: #fff; font-size: 14px; }
.theme-opt input { width: auto; margin: 0 8px 0 0; }
.theme-swatch { width: 24px; height: 24px; border-radius: 50%; margin-right: 8px; display: inline-block; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .dg-top { grid-template-columns: 1fr; }
    .dg-menu { background: none; border: 0; border-radius: 0; }
    .dg-menu-title, .dg-menu li.sep { display: none; }
    .dg-menu ul { display: flex; overflow-x: auto; padding: 0 0 4px; }
    .dg-menu li { flex-shrink: 0; margin-right: 8px; }
    .dg-menu li a { border: 1px solid var(--line); border-radius: 999px; background: var(--paper); padding: 8px 14px; white-space: nowrap; }
    .dg-menu li a small { display: none; }
    .dg-slider, .dg-slide { min-height: 0; }
    .dg-slide.active { flex-direction: column-reverse; }
    .dg-slide-copy { padding: 18px 20px 36px; }
    .dg-slide-img { padding: 16px 16px 0; }
    .dg-slide-img img { max-height: 190px; }
    .dg-slide-empty { width: 120px; height: 120px; font-size: 52px; }
    .dg-slide h2 { font-size: 22px; }
    .dg-usp { grid-template-columns: 1fr 1fr; }
    .dg-usp div:nth-child(2) { border-right: 0; }
    .dg-usp div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .dg-sec-body { padding: 10px; }
    .dg-sec-body .product-grid, .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-body { padding: 10px 10px 12px; }
    .price { font-size: 17px; }
    .pc-points li:nth-child(n+3) { display: none; }
    .dg-call { padding: 18px 16px; }
    .dg-call-side, .dg-call-form { width: 100%; }
    .dg-call-form input[type=text] { flex: 1; width: auto; }
    .policy-layout { grid-template-columns: 1fr; }
    .topbar-links { display: none; }
    .m-bar { display: flex; }
    body { padding-bottom: 58px; }
    .floating-contact { display: none; }
    .product-detail, .checkout-layout { grid-template-columns: 1fr; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; padding: 16px 22px; }
    .sidebar-toggle { display: block; }
    .admin-sidebar h2 { margin-bottom: 0; }
    #admin-nav { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
    #admin-nav.open { max-height: 900px; padding-top: 8px; }

    .nav-toggle { display: block; order: 3; }
    .header-actions { order: 3; }
    .main-nav {
        order: 4; width: 100%;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; gap: 0; background: var(--brand-dark);
        max-height: 0; overflow: hidden; transition: max-height .25s ease;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }
    .main-nav.open { max-height: 560px; }
    .main-nav a { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.06); margin-right: 0 !important; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .trust-bar { justify-content: flex-start; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .logo-img { height: 36px; }
    .logo { font-size: 0; gap: 0; }
}

@media (max-width: 480px) {
    .pc-tags { display: none; }
}

.promo-bar { background: linear-gradient(90deg,#F59E0B,#FBBF24); color:#3B2300; font-size:13.5px; text-align:center; padding:8px 0; }
.promo-bar .promo-code { background:#fff; border:1px dashed #B45309; border-radius:4px; padding:1px 7px; letter-spacing:1px; }
.promo-bar .promo-until { opacity:.8; }

.footer-links { display:flex; flex-wrap:wrap; align-items:center; gap:6px 16px; padding-bottom:12px; font-size:13px; color:rgba(255,255,255,.82); }
.footer-links a { color:#fff; text-decoration:underline; text-underline-offset:3px; }
.footer-links a:hover { color:#FFE29A; }

/* ---- Giỏ hàng: thanh đặt hàng cố định ở dưới cùng ---- */
.cart-bar-spacer { height: 84px; }
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 120; background: #fff; border-top: 1px solid var(--line, #DCE4F0); box-shadow: 0 -6px 20px rgba(11,60,153,.12); }
.cart-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 20px; }
.cart-bar-sum { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.cart-bar-label { font-size: 12px; color: #5B6B82; }
.cart-bar-sum strong { font-size: 20px; color: var(--brand-dark); }
.cart-bar-sum small { color: #0E7B63; font-size: 12px; }
.cart-bar-btn { padding: 13px 34px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.has-cart-bar .floating-contact { bottom: 92px; }
.cart-combo-row { color: #0E7B63; margin-bottom: 6px; }
.cart-combo-row small { display: block; color: #5B6B82; font-size: 12px; }
@media (max-width: 720px) { .cart-bar-inner { padding: 9px 14px; } .cart-bar-btn { padding: 12px 24px; } }

/* ---- Combo ưu đãi (trang sản phẩm) ---- */
.combo-box { border: 1.5px solid #F59E0B; border-radius: 12px; background: #FFFBEB; padding: 14px 16px; margin: 18px 0; }
.combo-box h3 { font-size: 16px; margin: 0 0 10px; color: #92400E; }
.combo-card { background: #fff; border: 1px solid #FDE68A; border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.combo-card:last-child { margin-bottom: 0; }
.combo-name { font-weight: 700; margin-bottom: 8px; }
.combo-items { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.combo-it { display: flex; flex-direction: column; align-items: center; width: 86px; text-align: center; font-size: 11.5px; line-height: 1.25; }
.combo-it img, .combo-it .combo-noimg { width: 62px; height: 62px; object-fit: cover; border-radius: 8px; border: 1px solid #E5E7EB; background: #F3F6FB; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.combo-plus { font-size: 20px; color: #B45309; font-weight: 700; }
.combo-price-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.combo-price strong { font-size: 19px; color: #DC2626; }
.combo-price s { color: #6B7280; margin-left: 8px; font-size: 13px; }
.combo-save { display: inline-block; background: #DCFCE7; color: #166534; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; margin-left: 8px; }

/* ---- Trò chơi vòng quay may mắn ---- */
.game-fab { position: fixed; right: 0; top: 42%; z-index: 110; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 9px 9px; border-radius: 16px 0 0 16px; background: linear-gradient(135deg, #F59E0B, #EF4444); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.15; text-align: center; box-shadow: -4px 6px 18px rgba(239,68,68,.35); animation: gameWobble 2.4s ease-in-out infinite; }
.game-fab:hover { color: #fff; text-decoration: none; padding-right: 14px; }
.game-fab-icon { font-size: 28px; line-height: 1; }
@keyframes gameWobble { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-8deg); } 80% { transform: rotate(7deg); } 90% { transform: rotate(-4deg); } }
@media (max-width: 720px) { .game-fab { top: 38%; padding: 7px 6px 6px; font-size: 10.5px; } .game-fab-icon { font-size: 22px; } }
.game-page { max-width: 980px; margin: 0 auto; padding: 8px 0 30px; text-align: center; }
.game-sub { color: #5B6B82; margin-bottom: 18px; }
.game-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px; }
.wheel-box { position: relative; width: min(86vw, 380px); height: min(86vw, 380px); }
.wheel { position: relative; width: 100%; height: 100%; border-radius: 50%; border: 8px solid #0B3C99; box-shadow: 0 10px 30px rgba(11,60,153,.3); overflow: hidden; cursor: pointer; }
.wheel-label { position: absolute; top: 50%; left: 50%; width: 50%; height: 0; transform-origin: 0 0; }
.wheel-label span { position: absolute; right: 12px; top: 0; transform: translateY(-50%); max-width: 62%; text-align: right; color: #fff; font-size: 12.5px; font-weight: 700; line-height: 1.15; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.wheel-hub { position: absolute; top: 50%; left: 50%; width: 22%; height: 22%; margin: -11% 0 0 -11%; border-radius: 50%; background: #fff; border: 5px solid #0B3C99; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #0B3C99; }
.wheel-pointer { position: absolute; top: -10px; left: 50%; margin-left: -14px; z-index: 3; width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-top: 28px solid #EF4444; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.game-side { max-width: 360px; width: 100%; }
.game-spin-btn { font-size: 18px; padding: 14px 40px; font-weight: 800; }
.game-spin-btn[disabled] { opacity: .55; cursor: not-allowed; }
.game-left { color: #5B6B82; margin: 10px 0 14px; }
.game-result { border: 1px solid #DCE4F0; background: #F5F8FF; border-radius: 12px; padding: 14px; margin-top: 10px; }
.game-result-win { background: #FFFBEB; border-color: #F59E0B; }
.game-result small { display: block; color: #5B6B82; margin-top: 4px; }
.game-code { margin: 10px 0 4px; font-size: 22px; font-weight: 800; letter-spacing: 2px; color: #B45309; }
.game-code .btn { font-size: 12px; padding: 4px 10px; letter-spacing: 0; }
.game-info { max-width: 640px; margin: 30px auto 0; text-align: left; }
.game-info h3 { margin: 18px 0 8px; }
.game-info ul { padding-left: 20px; color: #3B475A; line-height: 1.6; }
.game-table { width: 100%; border-collapse: collapse; }
.game-table td { padding: 8px 6px; border-bottom: 1px solid #E5EAF3; font-size: 14px; }
.game-table td small { display: block; color: #6B7280; }
.game-table .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.game-pct { text-align: right; font-weight: 700; white-space: nowrap; }
.game-rest { text-align: right; color: #6B7280; font-size: 13px; white-space: nowrap; }

/* Game sút penalty */
.pitch { position: relative; width: min(92vw, 420px); height: min(70vw, 320px); border-radius: 18px; overflow: hidden; background: repeating-linear-gradient(0deg, #2f9e44 0 34px, #37b24d 34px 68px); box-shadow: 0 10px 30px rgba(11,60,153,.25); border: 4px solid #0B3C99; }
.pitch::after { content: ""; position: absolute; left: 50%; bottom: 3%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: rgba(255,255,255,.7); }
.goal { position: absolute; top: 8%; left: 8%; right: 8%; height: 48%; border: 6px solid #fff; border-bottom: none; border-radius: 6px 6px 0 0; }
.goal .net { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.28) 0 2px, transparent 2px 14px), repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 2px, transparent 2px 14px); background-color: rgba(0,0,0,.18); }
.keeper { position: absolute; bottom: 0; left: 50%; font-size: 52px; line-height: 1; transform: translate(-50%,0); z-index: 2; pointer-events: none; }
.zone { position: absolute; top: 0; bottom: 0; width: 33.33%; background: transparent; border: 0; font-size: 28px; opacity: .8; cursor: pointer; z-index: 3; animation: zonePulse 1.4s ease-in-out infinite; }
.zone-l { left: 0; } .zone-c { left: 33.33%; } .zone-r { right: 0; }
.zone:hover:not(:disabled) { background: rgba(255,255,255,.22); }
.zone:disabled { cursor: default; animation: none; opacity: 0; }
.ball { position: absolute; left: 50%; bottom: 6%; font-size: 44px; line-height: 1; transform: translate(-50%,0); z-index: 4; pointer-events: none; }
.pitch-msg { position: absolute; left: 0; right: 0; top: 56%; text-align: center; font-size: 30px; font-weight: 900; color: #fff; text-shadow: 0 3px 8px rgba(0,0,0,.6); opacity: 0; transform: scale(.6); transition: all .3s; z-index: 5; pointer-events: none; }
.pitch-msg.show { opacity: 1; transform: scale(1); }
.pitch-msg.goal-win { color: #FDE047; }
@keyframes zonePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.pitch { cursor: crosshair; touch-action: manipulation; }
.aim { position: absolute; width: 0; border-left: 4px dashed rgba(255,255,255,.95); transform-origin: 50% 100%; opacity: 0; pointer-events: none; z-index: 4; transition: opacity .15s; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.aim i { position: absolute; top: -4px; left: -12px; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 18px solid #FDE047; }
.zone.on { background: rgba(253,224,71,.28); }

/* Khu giải trí */
.fun-fab { top: calc(42% + 96px); background: linear-gradient(135deg, #8B5CF6, #EC4899); box-shadow: -4px 6px 18px rgba(139,92,246,.35); animation-delay: .6s; }
@media (max-width: 720px) { .fun-fab { top: calc(38% + 74px); } }
.fun-page { max-width: 960px; margin: 0 auto; padding: 24px 16px 60px; }
.fun-page h1 { text-align: center; }
.fun-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 18px 0 24px; }
.fun-tabs a { padding: 9px 16px; border-radius: 999px; background: #EEF2FF; color: #0B3C99; font-weight: 700; font-size: 14px; }
.fun-tabs a:hover { text-decoration: none; background: #DBE4FF; }
.fun-tabs a.on { background: #0B3C99; color: #fff; }
.fun-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 28px; }
.fun-card { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; padding: 22px 16px; border-radius: 16px; background: #fff; border: 1px solid #E2E8F0; box-shadow: 0 4px 14px rgba(11,60,153,.08); color: #0F172A; }
.fun-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(11,60,153,.15); }
.fun-card-icon { font-size: 44px; line-height: 1; }
.fun-card small { color: #64748B; }
.fun-empty { text-align: center; color: #64748B; padding: 40px 0; }
.story-list { display: grid; gap: 14px; }
.story { background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; padding: 16px 18px; }
.story h3 { margin: 0 0 8px; color: #0B3C99; }
.story p { margin: 0; line-height: 1.65; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.video-card p { margin: 8px 2px 0; font-weight: 600; }
.video-frame { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; }
.is-short .video-frame { aspect-ratio: 9/16; max-width: 260px; }
.video-frame img, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-play { position: absolute; top: 50%; left: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; padding-left: 4px; }
.memory { text-align: center; background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; padding: 20px 14px; }
.mem-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(92%, 360px); margin: 14px auto; }
.mem-card { position: relative; aspect-ratio: 1; border: 0; border-radius: 12px; background: #0B3C99; color: #fff; font-size: 28px; cursor: pointer; padding: 0; }
.mem-card span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.mem-card .mem-back { display: none; background: #FEF3C7; border-radius: 12px; }
.mem-card.open .mem-back, .mem-card.done .mem-back { display: flex; }
.mem-card.done .mem-back { background: #D1FAE5; }
.mem-rules { text-align: left; max-width: 420px; margin: 0 auto 12px; padding-left: 20px; color: #475569; font-size: 14px; line-height: 1.55; }
.mem-msg { font-weight: 700; color: #0B3C99; min-height: 22px; margin: 4px 0 0; }
.mem-card .mem-tag { position: absolute; top: 3px; left: 5px; font-size: 12px; color: #0F172A; opacity: .8; font-weight: 800; }
.mem-card.reveal .mem-back { display: flex; }

/* Cờ vua / cờ tướng */
.chess-page { text-align: center; }
.board-bar { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 14px 0 8px; }
.board-bar select { padding: 8px 10px; border-radius: 8px; border: 1px solid #CBD5E1; }
.board-status { font-weight: 800; color: #0B3C99; min-height: 24px; margin: 6px 0 10px; }
.board-status.win { color: #059669; } .board-status.lose { color: #DC2626; } .board-status.warn { color: #D97706; }
.chess-board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); width: min(94vw, 440px); aspect-ratio: 1; margin: 0 auto; border: 4px solid #0B3C99; border-radius: 6px; overflow: hidden; touch-action: manipulation; user-select: none; }
.chess-board .sq { position: relative; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.chess-board .light { background: #F0D9B5; } .chess-board .dark { background: #B58863; }
.chess-board .last { box-shadow: inset 0 0 0 100px rgba(250,204,21,.35); }
.chess-board .sel { box-shadow: inset 0 0 0 100px rgba(34,197,94,.45); }
.chess-board .chk { box-shadow: inset 0 0 0 100px rgba(239,68,68,.55); }
.chess-board .pc { font-size: min(9.2vw, 40px); line-height: 1; font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif; }
.chess-board .pw { color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000, 0 1px 2px #000; }
.chess-board .pb { color: #111; text-shadow: 0 0 1px rgba(255,255,255,.4); }
.chess-board .tmove::after { content: ""; width: 28%; height: 28%; border-radius: 50%; background: rgba(34,197,94,.65); position: absolute; }
.chess-board .tcap::after { content: ""; position: absolute; inset: 4%; border-radius: 50%; border: 4px solid rgba(34,197,94,.75); }
.xq-wrap { display: flex; justify-content: center; }
.xq-board { position: relative; width: min(94vw, 430px); aspect-ratio: 9.2 / 10.2; background: #F2D29B; border: 4px solid #8B5A2B; border-radius: 8px; touch-action: manipulation; user-select: none; cursor: pointer; }
.xq-svg { position: absolute; inset: 0; width: 100%; height: 100%; stroke: #5B3A1A; fill: none; }
.xq-svg text { fill: #5B3A1A; font-family: serif; }
.xq-pt { position: absolute; width: 10.2%; aspect-ratio: 1; transform: translate(-50%,-50%); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.xq-pt.last::before { content: ""; position: absolute; inset: -6%; border: 2px dashed #2563EB; border-radius: 50%; }
.xq-pt.tmove::after { content: ""; width: 38%; height: 38%; border-radius: 50%; background: rgba(34,197,94,.8); position: absolute; }
.xq-pt.tcap::after { content: ""; position: absolute; inset: -8%; border-radius: 50%; border: 3px solid #16A34A; }
.xq-pc { width: 100%; height: 100%; border-radius: 50%; background: #FEF3C7; border: 2px solid #5B3A1A; box-shadow: 0 2px 3px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; font-family: "Noto Serif CJK SC", "SimSun", "KaiTi", "Microsoft YaHei", serif; font-weight: 900; font-size: min(5.2vw, 24px); line-height: 1; }
.xq-pc.xr { color: #DC2626; border-color: #DC2626; } .xq-pc.xb { color: #111827; border-color: #111827; }
.xq-pc.sel { box-shadow: 0 0 0 3px #22C55E, 0 2px 3px rgba(0,0,0,.35); } .xq-pc.chk { box-shadow: 0 0 0 3px #EF4444; background: #FECACA; }
.chess-page .game-info { text-align: left; max-width: 560px; margin: 24px auto 0; }
.fb-score { font-size: 22px; font-weight: 800; margin: 6px 0; } .fb-score b { font-size: 28px; }
.fb-t1 { color: #2563EB; } .fb-t2 { color: #DC2626; }
.fb-wrap { display: flex; justify-content: center; }
.fb-canvas { width: min(94vw, 400px); aspect-ratio: 360 / 584; border-radius: 10px; border: 4px solid #0B3C99; touch-action: none; user-select: none; cursor: grab; background: #1B5E20; }
.snake-canvas { width: min(94vw, 400px); aspect-ratio: 1; border-radius: 10px; border: 4px solid #0B3C99; touch-action: none; user-select: none; background: #A7D948; }
.snake-pad { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 14px 0 0; }
.snake-pad div { display: flex; gap: 6px; }
.snake-pad button { width: 62px; height: 52px; border: 0; border-radius: 12px; background: #0B3C99; color: #fff; font-size: 22px; cursor: pointer; }
.snake-pad button:active { background: #1E6FF0; }
@media (min-width: 900px) { .snake-pad { display: none; } }
.snake-frame { width: min(100%, 440px); height: 800px; border: 0; border-radius: 14px; background: #22262b; }
.drone-frame { height: 780px; }
.wheel-frame { height: min(92vh, 980px); min-height: 640px; }

/* Hai lối vào trang chủ: Camera / Phần mềm */
.home-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0 8px; }
.home-split-card { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; border-radius: 14px; text-decoration: none; color: #fff; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; box-shadow: 0 4px 14px rgba(11,21,36,.15); }
.home-split-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(11,21,36,.25); }
.hs-camera { background: linear-gradient(135deg, #0B1524, #1B2C4A); }
.hs-soft { background: linear-gradient(135deg, #1355C7, #1E6FF0); }
.hs-icon { font-size: 34px; line-height: 1; }
.hs-body strong { display: block; font-size: 20px; margin-bottom: 4px; }
.hs-body small { display: block; font-size: 14px; line-height: 1.45; opacity: .9; }
.hs-go { align-self: flex-start; margin-top: 4px; background: #F5A623; color: #101826; font-weight: 700; font-size: 14px; padding: 8px 16px; border-radius: 999px; }
@media (max-width: 700px) { .home-split { grid-template-columns: 1fr; } }

/* Trang giới thiệu Ksosi */
.ks-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.ks-hero-note { margin-top: 12px !important; font-size: 13px; opacity: .85; }
.ks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.ks-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.ks-card-icon { font-size: 28px; }
.ks-card h3 { margin: 8px 0 6px; font-size: 17px; }
.ks-card p { margin: 0; font-size: 14px; line-height: 1.5; color: #44505f; }
.ks-steps { padding-left: 22px; line-height: 1.7; }
.ks-steps li { margin-bottom: 10px; }
.ks-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 18px 0 10px; }
.ks-plan { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px; display: flex; flex-direction: column; gap: 6px; }
.ks-plan.is-hot { border: 2px solid var(--amber); box-shadow: 0 8px 22px rgba(245,166,35,.2); }
.ks-plan-tag { position: absolute; top: -12px; right: 16px; background: var(--amber); color: #101826; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.ks-plan h3 { margin: 0; font-size: 20px; }
.ks-price { font-size: 28px; font-weight: 800; color: var(--brand-dark); }
.ks-price small { font-size: 14px; font-weight: 500; color: #667; }
.ks-price-year { font-size: 14px; color: #556; }
.ks-plan-limit { font-weight: 600; margin: 6px 0; }
.ks-plan ul { padding-left: 18px; margin: 0 0 12px; flex: 1; line-height: 1.7; font-size: 14px; }
.ks-note { font-size: 13px; color: #667; }
.ks-faq { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; }
.ks-faq summary { cursor: pointer; font-weight: 600; }
.ks-faq p { margin: 10px 0 0; color: #44505f; }
.ks-cta { margin-top: 36px; }
.ks-cta h2 { color: #fff; margin-bottom: 8px; }
.ks-lang { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin: 14px 0 -10px; }
.ks-lang a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; font-weight: 600; color: var(--navy-2); }
.ks-lang a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text small { font-size: 10.5px; font-weight: 600; letter-spacing: 1.4px; color: rgba(255,255,255,.8); margin-top: 2px; }

/* Menu Sản phẩm xổ xuống + nhóm danh mục */
.nav-dd { position: relative; }
.nav-dd-caret { font-size: 11px; opacity: .8; }
.nav-dd-menu { display: none; position: absolute; top: 100%; left: -14px; min-width: 220px; background: var(--paper); border-radius: 10px; box-shadow: 0 10px 28px rgba(11,21,36,.25); padding: 6px 0; z-index: 60; }
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { display: block; }
.main-nav .nav-dd-menu a { display: block; color: var(--navy-2); padding: 11px 18px; font-size: 14px; white-space: nowrap; }
.main-nav .nav-dd-menu a:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.dg-menu li.grp { padding: 10px 16px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--brand-dark); }
@media (max-width: 768px) {
    .nav-dd-caret { display: none; }
    .nav-dd-menu { display: block; position: static; box-shadow: none; background: transparent; padding: 0; min-width: 0; }
    .main-nav .nav-dd-menu a { color: rgba(255,255,255,.92); padding: 14px 20px 14px 38px; border-bottom: 1px solid rgba(255,255,255,.06); }
    .main-nav .nav-dd-menu a:hover { background: transparent; color: #fff; }
    .main-nav .nav-dd-top { display: none; }
    .dg-menu li.grp { display: none; }
}

/* Chuyển ngôn ngữ */
.lang-sw { display: inline-flex; gap: 4px; margin-left: 14px; }
.lang-sw a { color: rgba(255,255,255,.85); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); }
.lang-sw a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.12); }
.lang-sw a.is-active { background: #fff; color: var(--brand-dark); border-color: #fff; }

@media (max-width: 768px) {
    .guide-toc { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 8px; padding: 8px 2px; -webkit-overflow-scrolling: touch; }
    .guide-toc a { white-space: nowrap; flex-shrink: 0; }
}

/* Nút chọn ngôn ngữ nằm trong thanh header (luôn hiện khi cuộn) */
.lang-dd { position: relative; }
.lang-dd-btn { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.lang-dd-btn:hover { background: rgba(255,255,255,.24); }
.lang-dd-caret { font-size: 10px; opacity: .85; }
.lang-dd-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px; background: var(--paper); border-radius: 10px; box-shadow: 0 10px 28px rgba(11,21,36,.28); padding: 6px 0; z-index: 70; }
.lang-dd.open .lang-dd-menu, .lang-dd:hover .lang-dd-menu { display: block; }
.lang-dd-menu a { display: block; padding: 10px 18px; font-size: 14px; color: var(--navy-2); white-space: nowrap; }
.lang-dd-menu a:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.lang-dd-menu a.is-active { font-weight: 700; color: var(--brand-dark); background: var(--brand-soft); }
@media (max-width: 768px) { .lang-dd-btn { padding: 6px 10px; } }
@media (max-width: 480px) {
    .logo { gap: 10px; }
    .logo-text { font-size: 16px; }
    .logo-text small { font-size: 9px; letter-spacing: 1px; }
    .lang-dd-menu { left: 0; right: auto; }
}

/* Làm nổi bật phần mềm */
.dg-slide-violet { background: linear-gradient(135deg, #4338CA, #7C3AED); color: #fff; }
.dg-slide-violet .dg-chips span { background: rgba(255,255,255,.18); color: #fff; }
.nav-new { display: inline-block; background: var(--amber); color: #101826; font-size: 9.5px; font-weight: 800; letter-spacing: .5px; padding: 2px 6px; border-radius: 999px; margin-left: 6px; vertical-align: middle; line-height: 1.3; }
.hs-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hs-tags i { font-style: normal; background: rgba(255,255,255,.18); font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; }
.hs-soft { box-shadow: 0 6px 20px rgba(30,111,240,.35); }
.dg-slide-violet .dg-slide-img { background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.24), transparent 70%); }
@media (min-width: 769px) {
    .main-nav { gap: 18px; }
    .main-nav a { font-size: 14px; }
}
@media (min-width: 1000px) {
    .header-inner { flex-wrap: nowrap; }
    .header-actions { flex-shrink: 0; gap: 10px; }
    .logo { flex-shrink: 0; }
}

/* Ksosi screenshots */
.ks-shots-h { margin: 28px 0 12px; }
.ks-shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.ks-shots figure { margin: 0; background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 14px rgba(15,23,42,.06); }
.ks-shots img { display: block; width: 100%; height: auto; }
.ks-shots figcaption { padding: 10px 14px; font-size: 14px; color: #475569; }
@media (max-width: 640px) { .ks-shots { grid-template-columns: 1fr; } }
.dg-slide-violet .dg-slide-img img { padding: 4px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.footer-logo { margin-bottom: 14px; align-self: flex-start; }
.footer-logo .logo-text { color: #fff; }
.footer-logo .logo-text small { color: rgba(255,255,255,.7); }
