/* ===== TikTok Shop – Pro UI (cleaned) ===== */
:root{
    --shop-bg:#f6fff1;
    --card-bg:#ffffff;
    --card-border:#e8edf2;
    --ink:#0f172a;
    --muted:#6b7280;
    --accent:#9FEC53;           /* xanh chuối */
    --accent-ink:#0f5132;
    --accent-2:#ffb300;         /* vàng cam */
    --danger:#e11d48;
    --ring:#b4f397;
    --shadow-sm:0 6px 16px rgba(15,23,42,.08);
    --shadow-md:0 12px 28px rgba(15,23,42,.10);
    /* aliases để tránh biến thiếu ở đoạn cũ */
    --brand: var(--accent);
    --hair: var(--card-border);
    --orange: var(--accent-2);
    --soft: rgba(0,0,0,.06);
    --line: rgba(17,24,39,.08);
    --success:#16a34a; --warning:#f59e0b; --info:#0ea5e9;
}

/* Trang cửa hàng */
#page-store{ background:transparent; }
#page-store .row.g-3{ --bs-gutter-x:14px; --bs-gutter-y:14px; }

/* ---------- Product Card ---------- */
#page-store .prod-card{
    position:relative;
    background:var(--card-bg);
    border:1px solid var(--card-border);
    border-radius:18px;
    box-shadow:var(--shadow-sm);
    overflow:hidden;
    display:flex; flex-direction:column;
    transition:transform .16s ease, box-shadow .16s ease, border-color .16s;
    outline:0; will-change:transform;
}
#page-store .prod-card:hover{
    transform:translateY(-3px);
    border-color:#dce7f3;
    box-shadow:var(--shadow-md);
}
#page-store .prod-card:focus-within{
    box-shadow:0 0 0 3px var(--ring), var(--shadow-md);
}

/* Ảnh vuông + skeleton */
#page-store .prod-img{
    width:100%;
    aspect-ratio:1/1;
    object-fit:cover;
    background:linear-gradient(100deg,#f3f4f6 30%,#eceff3 45%,#f3f4f6 60%) no-repeat;
    animation:shop-skel 1.2s infinite;
}
@keyframes shop-skel{ 0%{background-position:-200% 0} 100%{background-position:200% 0} }

/* Nội dung card */
#page-store .prod-body{ padding:12px 14px; display:flex; flex-direction:column; gap:6px; flex:1; }
#page-store .prod-name{
    color:var(--ink);
    font-weight:800; font-size:14.5px; line-height:1.25;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
    overflow:hidden; min-height:2.5em;
}
#page-store .prod-price{ color:var(--danger); font-weight:900; font-size:15.5px; letter-spacing:.1px; }
#page-store .prod-stock{ color:var(--muted); font-size:12.5px; }

/* Nút “Mua ngay” – gradient */
#page-store .btn-buy{
    margin-top:6px;
    padding:.6rem .9rem;
    border-radius:12px; border:0;
    font-weight:800; letter-spacing:.2px;
    color:#111;
    background:linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow:0 1px 0 rgba(0,0,0,.05), inset 0 0 0 1px rgba(255,255,255,.3);
    transition:filter .15s ease, transform .05s ease;
}
#page-store .btn-buy:hover{ filter:brightness(.96); }
#page-store .btn-buy:active{ transform:translateY(1px); }

#page-store .btn-detail{
    border:1px solid var(--card-border);
    border-radius:12px;
    font-weight:700;
    color:#374151;
}

/* Badge HOT */
#page-store .badge-hot{
    position:absolute; top:10px; left:10px;
    background:#ff5252; color:#fff;
    font-size:11px; font-weight:800;
    padding:3px 8px; border-radius:999px;
    box-shadow:0 6px 12px rgba(255,82,82,.25);
}

/* Grid responsive */
@media (min-width:576px){ #page-store .col-6{ flex:0 0 auto; width:50%; } }
@media (min-width:992px){ #page-store .col-6.col-md-3{ width:25%; } }

/* ---------- Search + Meta ---------- */
.shop-search{ text-align:left; }
.shop-search .search-box{
    display:flex; align-items:center; gap:8px;
    background:#fff; border:1px solid #e5e7eb;
    border-radius:999px; padding:6px 10px;
    box-shadow:0 2px 6px rgba(0,0,0,.05);
}
.shop-search .search-box i{ color:#6b7280; font-size:16px; }
.shop-search .search-box input{
    flex:1; border:0; outline:0; padding:6px 8px; font-size:15px;
}
.shop-search .search-box input::placeholder{ color:#9ca3af; }
.shop-search .search-box button{
    border:0; background:none; color:#9ca3af; cursor:pointer;
    padding:4px; border-radius:50%; transition:background .2s;
}
.shop-search .search-box button:hover{ background:#f3f4f6; color:#111; }

.shop-search .search-meta{
    margin-top:6px; display:flex; align-items:center; justify-content:space-between;
}
.shop-search .search-meta select{
    border:1px solid #e5e7eb; border-radius:8px; padding:4px 8px; font-size:14px;
}

/* Nút hành động đầu trang */
.store-actions{ display:flex; gap:10px; margin:8px 0 14px; }
.btn-action{
    flex:1; display:flex; align-items:center; justify-content:center; gap:6px;
    background:#fff; border:1px solid var(--hair); border-radius:12px;
    padding:8px 12px; font-weight:700; cursor:pointer;
    box-shadow:0 2px 8px rgba(0,0,0,.05);
}
.btn-action:hover{ background:var(--brand); color:var(--accent-ink); }
.badge{ background:var(--orange); color:#fff; font-size:12px; border-radius:999px; padding:2px 6px; font-weight:700; }

/* ---------- Cart rows (trong modal) ---------- */
.cart-row{ display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px dashed var(--card-border); }
.cart-row img{ width:48px; height:48px; object-fit:cover; border-radius:10px; border:1px solid var(--card-border); }
.qty-ctl .btn{ width:30px; height:30px; border-radius:10px; border:1px solid var(--card-border); }
.cart-total{ font-weight:900; font-size:18px }

/* ---------- SweetAlert2 tune ---------- */
.swal2-popup{ border-radius:22px; padding:18px }
.swal2-title{ font-weight:900; color:#111827 }

/* ---------- Detail Modal ---------- */
.detail-wrap{ text-align:left }
.detail-img{ text-align:center }
.detail-img img{ max-width:280px; width:100%; border-radius:16px; box-shadow:var(--shadow-sm) }
.detail-title{ font-weight:900; font-size:18px; margin:12px 0 6px }
.detail-price{ color:#10b981; font-weight:900; font-size:15px; margin-bottom:8px }
.prose{ color:#374151; line-height:1.6; font-size:14px }
.prose p{ margin:0 0 10px } .prose ul{ padding-left:18px; margin:8px 0 }

/* ---------- Bảng nhẹ (nếu dùng) ---------- */
#page-store table.table{
    border:1px solid var(--card-border);
    border-radius:14px; overflow:hidden;
    background:#fff; box-shadow:var(--shadow-sm);
}
#page-store thead{ background:#f8fafc; }
#page-store table td, #page-store table th{ vertical-align:middle; }
#page-store .thumb{
    width:48px; height:48px; object-fit:cover;
    border-radius:10px; border:1px solid var(--card-border);
}

/* Focus ring cho control trong card */
#page-store .prod-card button:focus{ outline:none; box-shadow:0 0 0 3px var(--ring); }

/* ---------- Orders UI (giữ nguyên & tinh chỉnh nhỏ) ---------- */
.nap-orders__toolbar{display:flex;gap:.5rem;align-items:center;margin-bottom:.5rem}
#moTabs .btn{padding:.45rem .75rem;border-radius:999px;font-weight:600}
#moTabs .btn.active{background:var(--brand);color:var(--accent-ink);border-color:transparent}

.nap-card{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 8px 26px var(--soft);overflow:hidden}
.nap-card__body{padding:12px}
.nap-card__head{display:flex;justify-content:space-between;gap:10px}
.nap-card__code{font-weight:800;letter-spacing:.3px;color:var(--ink)}
.nap-card__meta{font-size:12px;color:var(--muted)}
.nap-card__qr img{max-width:200px;border-radius:12px;box-shadow:0 2px 10px var(--soft)}
.badge{font-weight:700}
.badge.bg-secondary{background:#e5e7eb;color:#111827}
.badge.bg-info{background:var(--info)}
.badge.bg-warning{background:var(--warning)}
.badge.bg-success{background:var(--success)}
.badge.bg-danger{background:var(--danger)}
.nap-addinfo{font-size:12px;color:var(--muted);margin-top:.25rem}
.nap-addinfo code{background:#f3f4f6;padding:.12rem .35rem;border-radius:6px}
.nap-addinfo .copy{margin-left:.25rem;font-size:12px;color:#2563eb;text-decoration:none;cursor:pointer}
.nap-actions{display:flex;gap:.5rem;margin-top:.5rem;flex-wrap:wrap}
.btn-chip{display:inline-flex;align-items:center;gap:.35rem;border:1px solid var(--line);padding:.45rem .7rem;border-radius:12px;background:#fff;font-weight:700}
.btn-chip:hover{background:#f8fafc}
.btn-pay{border:0;color:#0f172a;font-weight:800;border-radius:12px;padding:.5rem .85rem;background:linear-gradient(180deg,#b7ff6a,#ffd24a);box-shadow:0 6px 16px rgba(183,255,106,.3)}
.btn-pay:active{transform:translateY(1px)}
.nap-fab{position:fixed;right:14px;bottom:14px;z-index:50;background:#fff;border:1px solid var(--line);border-radius:999px;padding:.5rem .8rem;box-shadow:0 8px 24px var(--soft);font-weight:700}
.nap-orders .btn{min-height:38px}
@media (min-width:768px){
    .nap-card__body{padding:14px}
    .nap-card__qr img{max-width:220px}
}
