/* Bổ sung cho template Shoppers — các thành phần riêng của cửa hàng */

/* ---------- Font tiếng Việt ----------
   Font Mukta của template thiếu dải U+1EA0–U+1EF1 (ạ, ả, ấ, ộ, ữ, ự...) nên chữ có dấu bị lấy từ font khác.
   Be Vietnam Pro có đủ bộ dấu; các font dự phòng của hệ điều hành cũng hỗ trợ tiếng Việt. */
:root {
  --font-family-sans-serif: "Be Vietnam Pro", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
body, .tooltip, .popover, button, input, select, textarea {
  font-family: var(--font-family-sans-serif);
}

/* ---------- Thẻ sản phẩm ---------- */
.product-card { position: relative; height: 100%; background: #fff; }
.product-card .block-4-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.badge-sale, .badge-soldout { position: absolute; top: 12px; z-index: 2; font-size: 12px; padding: 5px 8px; }
.badge-sale { left: 12px; }
.badge-soldout { right: 12px; }
.price-old { text-decoration: line-through; color: #999; font-weight: 400; margin-right: 6px; font-size: 0.9em; }

/* ---------- Thanh điều hướng ---------- */
.site-top-icons .account-menu .dropdown-toggle::after { display: none; }
.site-top-icons .dropdown-menu { text-align: left; min-width: 220px; }
.site-top-icons .dropdown-menu .dropdown-item { display: block; color: #333; padding: .4rem 1.2rem; }
.site-top-icons .dropdown-menu .dropdown-item:hover { background: #f4f4f4; color: #7971ea; }
.site-top-icons .dropdown-menu form .dropdown-item { cursor: pointer; }

/* ---------- Chung ---------- */
.rating-stars { color: #f5a623; letter-spacing: 2px; }
.form-required::after { content: " *"; color: #dc3545; }
.table td, .table th { vertical-align: middle; }
.site-blocks-table .product-thumbnail img { max-width: 90px; }
.text-strike { text-decoration: line-through; }
.min-vh-50 { min-height: 50vh; }
.text-pre-line { white-space: pre-line; }
.product-image { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.opacity-60 { opacity: .6; }

/* ---------- Chọn biến thể (size / màu) ---------- */
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-options input[type=radio] { display: none; }
.variant-options label {
  border: 1px solid #ccc; border-radius: 4px; padding: 6px 14px; cursor: pointer; margin: 0;
  color: #333; background: #fff; transition: all .15s;
}
.variant-options input[type=radio]:checked + label { border-color: #7971ea; background: #7971ea; color: #fff; }
.variant-options input[type=radio]:disabled + label { color: #bbb; border-style: dashed; cursor: not-allowed; }

/* ---------- Đánh giá ---------- */
.review-item { border-bottom: 1px solid #eee; padding: 16px 0; }
.review-item:last-child { border-bottom: 0; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { display: none; }
.star-input label { font-size: 28px; color: #ddd; cursor: pointer; margin: 0; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #f5a623; }

/* ---------- Trạng thái đơn hàng ---------- */
.order-timeline { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.order-timeline li { padding: 4px 10px; border-radius: 12px; background: #eee; font-size: 13px; }
.order-timeline li.done { background: #7971ea; color: #fff; }

/* ---------- Khu quản lý (nhân viên / quản trị) ---------- */
.admin-wrap { display: flex; min-height: 100vh; background: #f6f7fb; }
.admin-sidebar { width: 240px; background: #25262b; color: #ccc; flex-shrink: 0; }
.admin-sidebar .brand { display: block; padding: 20px; color: #fff; font-size: 22px; font-weight: 700; }
.admin-sidebar .nav-link { color: #bbb; padding: 10px 20px; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { color: #fff; background: #7971ea; }
.admin-sidebar .nav-section { padding: 16px 20px 6px; font-size: 11px; text-transform: uppercase; color: #777; }
.admin-main { flex: 1; padding: 24px 32px; min-width: 0; }
.admin-main .card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-card .value { font-size: 28px; font-weight: 700; color: #25262b; }
.stat-card .label { color: #888; font-size: 13px; text-transform: uppercase; }
@media (max-width: 767px) {
  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; }
}

/* ---------- Nhãn trạng thái (t:status) ---------- */
.status-badge { font-size: 12px; font-weight: 500; padding: 5px 8px; }
.status-pending { background: #ffe8a3; color: #6b5200; }
.status-confirmed { background: #cfe8ff; color: #0b4a85; }
.status-shipping { background: #7971ea; color: #fff; }
.status-completed, .status-paid, .status-approved, .status-resolved { background: #c9f0d6; color: #1d6b3a; }
.status-cancelled, .status-rejected { background: #e2e3e5; color: #41464b; }
.status-unpaid { background: #f1f1f1; color: #555; }
.status-failed, .status-open { background: #f8d0d3; color: #8a1c25; }
.status-refund { background: #343a40; color: #fff; }
.stat-card a, a.stat-card { color: inherit; }

/* ---------- Biểu đồ doanh thu (FR-43): cột mảnh tối đa 24px, đầu cột bo 4px, khe 2px, lưới mảnh ---------- */
.rev-chart { display: flex; height: 240px; margin-bottom: 32px; }
.rev-axis { position: relative; width: 52px; flex: none; font-size: 11px; color: #6c757d; }
.rev-axis span { position: absolute; right: 8px; transform: translateY(50%); white-space: nowrap; }
.rev-plot { position: relative; flex: 1; min-width: 0; }
.rev-grid { position: absolute; left: 0; right: 0; border-top: 1px solid #eceef1; }
.rev-grid.base { border-top-color: #c4c8cd; }
.rev-cols { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; }
.rev-col { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center;
  padding: 0 1px; outline: none; }
.rev-bar { width: 100%; max-width: 24px; height: var(--h); background: #7971ea; border-radius: 4px 4px 0 0; }
.rev-col:hover, .rev-col:focus { background: rgba(121, 113, 234, .08); }
.rev-col:hover .rev-bar, .rev-col:focus .rev-bar { background: #5b52d6; }
.rev-tip { display: none; position: absolute; bottom: calc(var(--h) + 6px); left: 50%; transform: translateX(-50%); z-index: 5;
  background: #25262b; color: #fff; font-size: 12px; line-height: 1.5; padding: 6px 10px; border-radius: 4px;
  white-space: nowrap; pointer-events: none; }
.rev-col.tip-left .rev-tip { left: 0; transform: none; }
.rev-col.tip-right .rev-tip { left: auto; right: 0; transform: none; }
.rev-col:hover .rev-tip, .rev-col:focus .rev-tip { display: block; }
.rev-x { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 11px; color: #6c757d;
  white-space: nowrap; }
