:root {
  --shopee-orange: #ee4d2d;
  --shopee-orange-dark: #d7410f;
  --text: #222;
  --border: #e5e5e5;
  --bg: #f5f5f5;
}
* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; margin: 0; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }

/* Header */
.topbar { background: var(--shopee-orange); padding: 14px 0; }
.topbar-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 0 16px; }
.logo { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: 1px; }
.search { flex: 1; display: flex; background: #fff; border-radius: 3px; overflow: hidden; }
.search input { flex: 1; border: none; padding: 10px 12px; font-size: 14px; }
.search button { border: none; background: var(--shopee-orange); color: #fff; padding: 0 16px; cursor: pointer; }
.cart-link { color: #fff; font-weight: 600; position: relative; white-space: nowrap; }
.shop-home-link { color: #fff; font-weight: 500; white-space: nowrap; opacity: .9; }
.shop-home-link:hover { opacity: 1; text-decoration: underline; }
.badge { background: #fff; color: var(--shopee-orange); border-radius: 50%; padding: 2px 6px; font-size: 11px; margin-left: 4px; }

.flash { max-width: 1200px; margin: 12px auto; background: #fff3cd; border: 1px solid #ffe08a; padding: 10px 16px; border-radius: 6px; }

/* Banner */
.shop-banner { max-width: 1200px; margin: 16px auto; padding: 24px; background: linear-gradient(135deg, var(--shopee-orange), #ff7337); color: #fff; border-radius: 8px; }
.shop-banner h1 { margin: 0 0 6px; font-size: 28px; }
.shop-banner p { margin: 0; opacity: .9; }

/* Layout */
.layout { max-width: 1200px; margin: 0 auto; display: flex; gap: 20px; padding: 0 16px 40px; }
.sidebar { width: 220px; flex-shrink: 0; }
.sidebar h3 { font-size: 15px; border-bottom: 2px solid var(--shopee-orange); padding-bottom: 8px; }
.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li a { display: block; padding: 8px 4px; font-size: 14px; color: #555; }
.category-list li a.active, .category-list li a:hover { color: var(--shopee-orange); font-weight: 600; }

.product-area { flex: 1; }
.sort-bar { background: #fff; padding: 12px 16px; border-radius: 4px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 14px; }
.sort-btn { padding: 6px 14px; border: 1px solid var(--border); border-radius: 3px; background: #fafafa; }
.sort-btn.active { background: var(--shopee-orange); color: #fff; border-color: var(--shopee-orange); }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.product-card { background: #fff; border-radius: 4px; overflow: hidden; border: 1px solid var(--border); transition: box-shadow .15s; display: block; }
.product-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.product-thumb { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.product-thumb span { font-size: 40px; font-weight: 800; color: rgba(255,255,255,.85); text-transform: uppercase; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.discount-badge { position: absolute; top: 6px; right: 6px; background: #fff; color: var(--shopee-orange); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.product-info { padding: 8px 10px 12px; }
.product-name { font-size: 13px; line-height: 1.3; height: 34px; overflow: hidden; margin-bottom: 6px; }
.product-price { display: flex; align-items: baseline; gap: 6px; }
.price-now { color: var(--shopee-orange); font-weight: 700; font-size: 16px; }
.price-old { color: #999; text-decoration: line-through; font-size: 12px; }
.product-meta { display: flex; justify-content: space-between; font-size: 12px; color: #757575; margin-top: 6px; }

/* Product detail */
.breadcrumb { max-width: 1200px; margin: 12px auto; padding: 0 16px; font-size: 13px; color: #757575; }
.product-detail { max-width: 1200px; margin: 0 auto; background: #fff; padding: 24px; border-radius: 8px; display: flex; gap: 32px; }
.gallery { width: 380px; flex-shrink: 0; }
.gallery-main { aspect-ratio: 1/1; border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery-main span { font-size: 80px; font-weight: 800; color: rgba(255,255,255,.85); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-main img.zoomable { cursor: zoom-in; }
.gallery-main video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.gallery-note { font-size: 12px; color: #999; text-align: center; margin-top: 8px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumb { width: 64px; height: 64px; border-radius: 4px; border: 1px solid var(--border); overflow: hidden; position: relative; cursor: pointer; flex-shrink: 0; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.active { border-color: var(--shopee-orange); border-width: 2px; }
.gallery-thumb-video .play-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; text-shadow: 0 1px 4px rgba(0,0,0,.7); background: rgba(0,0,0,.2); }
.description-gallery { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.description-gallery img { width: 160px; height: 160px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: zoom-in; }
.description-blocks { margin-top: 12px; display: flex; flex-direction: column; gap: 0; }
.description-block-text { white-space: pre-line; line-height: 1.6; font-size: 14px; margin: 0; }
.description-block-image { width: 100%; max-width: 700px; display: block; border-radius: 6px; cursor: zoom-in; }

/* Lightbox phóng to ảnh */
.lightbox-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 1000; align-items: center; justify-content: center; }
.lightbox-overlay.active { display: flex; }
.lightbox-content { position: relative; max-width: 88vw; max-height: 86vh; display: flex; align-items: center; justify-content: center; }
.lightbox-content img { max-width: 88vw; max-height: 86vh; object-fit: contain; border-radius: 4px; display: block; }
.lightbox-close { position: absolute; top: -42px; right: 0; color: #fff; font-size: 32px; line-height: 1; cursor: pointer; }
.lightbox-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.92); border: none; width: 42px; height: 42px; border-radius: 50%; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #333; }
.lightbox-arrow:hover { background: #fff; }
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }
.lightbox-counter { position: absolute; bottom: -34px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; }
@media (max-width: 700px) {
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
}
.detail-info { flex: 1; }
.detail-info h1 { font-size: 20px; margin: 0 0 10px; }
  .detail-info h1 { font-size: 15px !important; }
.price-box { background: #fafafa; border-radius: 6px; padding: 16px; margin: 16px 0; display: flex; align-items: center; gap: 12px; }
.price-box .price-now { font-size: 28px; }

.variant-group { margin-bottom: 16px; }
.variant-group label { display: block; color: #757575; font-size: 13px; margin-bottom: 8px; }
.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-chip { border: 1px solid var(--border); border-radius: 3px; padding: 8px 16px; cursor: pointer; font-size: 13px; }
.variant-chip input { margin-right: 6px; }
.variant-chip:has(input:checked) { border-color: var(--shopee-orange); color: var(--shopee-orange); background: #fff5f2; }

.qty-group { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.qty-group input { width: 70px; padding: 8px; border: 1px solid var(--border); border-radius: 3px; }
.stock-note { font-size: 13px; color: #757575; }

.action-buttons { display: flex; gap: 12px; }
.btn { display: inline-block; padding: 12px 28px; border-radius: 3px; font-weight: 600; cursor: pointer; border: none; font-size: 14px; }
.btn-primary { background: var(--shopee-orange); color: #fff; }
.btn-primary:hover { background: var(--shopee-orange-dark); }
.btn-outline { background: #fff5f2; color: var(--shopee-orange); border: 1px solid var(--shopee-orange); }
.btn-block { width: 100%; text-align: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.spec-box { max-width: 1200px; margin: 20px auto; background: #fff; padding: 24px; border-radius: 8px; }
.spec-box h2 { font-size: 16px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.spec-table th { text-align: left; width: 160px; color: #757575; font-weight: 400; padding: 6px 0; vertical-align: top; }
.spec-table td { padding: 6px 0; }
.description { white-space: pre-line; line-height: 1.6; font-size: 14px; }

.related-section { max-width: 1200px; margin: 20px auto 40px; padding: 0 16px; }

/* Cart */
.page-title { max-width: 1200px; margin: 20px auto; padding: 0 16px; }
.cart-table { max-width: 1200px; margin: 0 auto 20px; width: calc(100% - 32px); background: #fff; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
.cart-product { display: flex; align-items: center; gap: 10px; }
.mini-thumb { width: 36px; height: 36px; border-radius: 4px; display: inline-block; object-fit: cover; }
.remove-link { color: #999; }
.cart-table input[type=number] { width: 60px; padding: 4px; }
.cart-summary { max-width: 1200px; margin: 0 auto 40px; width: calc(100% - 32px); background: #fff; padding: 16px; display: flex; justify-content: flex-end; align-items: center; gap: 20px; border-radius: 4px; }

/* Checkout */
.checkout-layout { max-width: 1000px; margin: 0 auto 40px; display: flex; gap: 24px; padding: 0 16px; }
.checkout-form { flex: 1; background: #fff; padding: 24px; border-radius: 8px; display: flex; flex-direction: column; gap: 4px; }
.checkout-form label { font-size: 13px; color: #555; margin-top: 12px; }
.checkout-form input, .checkout-form textarea { padding: 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; }
.payment-options { display: flex; gap: 12px; margin-top: 8px; }
.checkout-form button { margin-top: 20px; }
.order-summary { width: 320px; background: #fff; padding: 20px; border-radius: 8px; height: fit-content; }
.summary-line { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.summary-total { display: flex; justify-content: space-between; font-weight: 700; padding-top: 12px; color: var(--shopee-orange); }

/* Order success */
.order-success { max-width: 600px; margin: 40px auto; background: #fff; padding: 32px; border-radius: 8px; text-align: center; }
.order-success h1 { color: #1e8e3e; }
.qr-image { width: 260px; margin: 16px auto; display: block; border: 1px solid var(--border); border-radius: 8px; }
.qr-missing { color: #c0392b; }

/* Admin */
.admin-header { background: #222; color: #fff; padding: 14px 24px; display: flex; justify-content: space-between; }
.admin-header nav a { margin-left: 20px; color: #ccc; }
.admin-header nav a:hover { color: #fff; }
.admin-main { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-table { width: 100%; background: #fff; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
.admin-row-actions { line-height: 1.9; white-space: nowrap; }
.admin-form { background: #fff; padding: 24px; border-radius: 8px; display: flex; flex-direction: column; gap: 4px; max-width: 700px; }
.admin-form label { font-size: 13px; color: #555; margin-top: 12px; }
.admin-form input, .admin-form select, .admin-form textarea { padding: 8px; border: 1px solid var(--border); border-radius: 4px; }
.form-row { display: flex; gap: 16px; }
.form-row > div { flex: 1; }
.admin-form button { margin-top: 20px; align-self: flex-start; }
.status-form { display: flex; gap: 12px; align-items: center; margin: 16px 0; }
.current-image-preview { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.current-image-preview img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.current-image-preview video { width: 160px; border-radius: 6px; border: 1px solid var(--border); }
.current-image-preview span { font-size: 12px; color: #999; }
.gallery-note-admin { font-size: 12px; color: #999; margin-top: 4px; }
.admin-section-title { font-size: 16px; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin: 28px 0 4px; }
.admin-section-title:first-of-type { margin-top: 4px; }
.form-row-3 { display: flex; gap: 16px; }
.form-row-3 > div { flex: 1; }
.variant-hint { font-size: 12px; color: #999; margin: 4px 0 10px; }
.variant-empty-note { font-size: 13px; color: #999; background: #fafafa; padding: 12px; border-radius: 4px; }
.variant-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.variant-table th, .variant-table td { border: 1px solid var(--border); padding: 6px 8px; font-size: 13px; text-align: left; }
.variant-table th { background: #fafafa; }
.variant-table input { width: 100%; padding: 6px; border: 1px solid var(--border); border-radius: 3px; box-sizing: border-box; }
.shipping-option-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.shipping-toggle-label { display: flex; align-items: center; gap: 6px; width: 160px; font-size: 14px; color: #333; }
.shipping-option-row input[type=number] { width: 120px; padding: 6px; border: 1px solid var(--border); border-radius: 3px; }

.admin-login-body { display: flex; align-items: center; justify-content: center; height: 100vh; background: #f5f5f5; }
.login-box { background: #fff; padding: 32px; border-radius: 8px; width: 320px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.login-box input { padding: 10px; border: 1px solid var(--border); border-radius: 4px; }
.error { color: #c0392b; font-size: 13px; }

.site-footer { text-align: center; color: #999; font-size: 13px; padding: 24px; }

/* Đánh giá sản phẩm (customer-facing) */
.review-box { max-width: 1200px; margin: 20px auto; background: #fff; padding: 24px; border-radius: 8px; }
.review-box h2 { font-size: 16px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.review-summary { display: flex; align-items: center; gap: 12px; background: #fffbf5; border: 1px solid #ffe0cc; border-radius: 6px; padding: 16px; margin: 14px 0 18px; }
.review-summary-score { font-size: 28px; font-weight: 800; color: var(--shopee-orange); }
.review-summary-stars { color: var(--shopee-orange); font-size: 18px; }
.review-summary-count { color: #555; font-size: 13px; }
.review-list { display: flex; flex-direction: column; gap: 16px; }
.review-item { border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.review-item:last-child { border-bottom: none; padding-bottom: 0; }
.review-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-stars { color: var(--shopee-orange); font-size: 13px; }
.review-date { color: #999; font-size: 12px; }
.review-comment { margin: 8px 0; font-size: 14px; color: #333; line-height: 1.5; }
.review-images { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.review-images img { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: zoom-in; }
.review-video { max-width: 320px; border-radius: 6px; margin-top: 8px; display: block; background: #000; }
.review-empty-note { color: #999; font-size: 14px; }

/* Đánh giá sản phẩm (admin) */
.review-admin-count { color: #999; font-size: 13px; margin-top: -6px; }
.review-admin-list { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.review-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.review-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-delete-link { margin-left: auto; color: #c0392b; }

/* Trang chủ Shop (customer-facing) */
.shop-home { max-width: 1200px; margin: 16px auto 40px; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.shop-stats-bar { background: #fff; border-radius: 8px; padding: 20px; display: flex; align-items: center; gap: 20px; }
.shop-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--shopee-orange); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; text-transform: uppercase; flex-shrink: 0; }
.shop-stats-info { flex: 1; }
.shop-stats-info h1 { margin: 0 0 6px; font-size: 22px; }
.shop-stats-row { display: flex; gap: 10px; font-size: 13px; color: #555; }
.shop-stats-actions { display: flex; gap: 10px; }
.shop-tabs { background: #fff; border-radius: 8px; padding: 4px 12px; display: flex; gap: 4px; overflow-x: auto; }
.shop-tab { padding: 14px 16px; font-size: 14px; color: #555; white-space: nowrap; border-bottom: 3px solid transparent; }
.shop-tab.active { color: var(--shopee-orange); border-bottom-color: var(--shopee-orange); font-weight: 600; }
.shop-block { background: #fff; border-radius: 8px; overflow: hidden; }
.shop-block-text { padding: 20px 24px; text-align: center; }
.shop-block-text h2 { margin: 0 0 6px; }
.shop-block-text p { margin: 0; color: #666; }
.shop-block-banner-single { position: relative; display: block; width: 100%; overflow: hidden; }
.shop-block-banner-single img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-placeholder { width: 100%; height: 100%; min-height: 160px; background: linear-gradient(135deg, #ffe0cc, #ffd0b8); display: flex; align-items: center; justify-content: center; color: var(--shopee-orange-dark); font-weight: 600; text-align: center; padding: 24px; }
.banner-overlay-text { position: absolute; left: 24px; bottom: 20px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.banner-overlay-text h3 { margin: 0 0 4px; font-size: 20px; }
.banner-overlay-text p { margin: 0; font-size: 13px; }
.shop-block-banner-multi { position: relative; padding: 4px; }
.banner-multi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 4px; }
.banner-multi-item { display: block; overflow: hidden; }
.banner-multi-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-featured-products { padding: 20px 24px; }
.shop-featured-products h2 { margin: 0 0 14px; font-size: 16px; }

/* Trang trí Shop (admin) */
.shop-block-admin-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.shop-block-admin-item { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; }
.shop-block-admin-item.shop-block-inactive { opacity: .5; }
.shop-block-admin-preview { width: 60px; height: 60px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: #fafafa; display: flex; align-items: center; justify-content: center; }
.shop-block-admin-preview img { width: 100%; height: 100%; object-fit: cover; }
.shop-block-admin-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.shop-block-admin-actions { display: flex; gap: 10px; font-size: 14px; }
.shop-block-admin-actions a { color: #555; }
.delete-link { color: #c0392b; }
.ratio-options { display: flex; gap: 10px; margin: 4px 0 10px; }
.ratio-chip { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 4px; padding: 8px 12px; font-size: 13px; cursor: pointer; }

/* Voucher / Combo / Flash Sale (admin) */
.product-picker { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; padding: 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; background: #fafafa; }
.product-picker .variant-chip { border: none; padding: 2px 0; font-size: 13px; }

/* Voucher / Combo / Flash Sale (khách hàng) */
.voucher-badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.voucher-badge { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--shopee-orange); color: var(--shopee-orange-dark); background: #fff8f3; border-radius: 4px; padding: 4px 10px; font-size: 13px; }
.price-after-voucher-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; font-size: 14px; color: #555; }
.price-after-voucher-row strong { color: var(--shopee-orange-dark); font-size: 16px; }
.combo-box { background: #fff8f3; border: 1px solid #ffd9c2; border-radius: 6px; padding: 12px 16px; margin: 10px 0; }
.combo-box h4 { margin: 0 0 6px; font-size: 14px; color: var(--shopee-orange-dark); }
.combo-box p { margin: 2px 0; font-size: 13px; color: #666; }
.flash-sale-box { background: linear-gradient(90deg, #fff0e8, #fff); border: 1px solid var(--shopee-orange); border-radius: 6px; padding: 10px 16px; margin: 10px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.flash-sale-box .fls-label { color: var(--shopee-orange-dark); font-weight: 700; }
.flash-sale-progress { width: 160px; height: 8px; background: #ffe0cc; border-radius: 4px; overflow: hidden; }
.flash-sale-progress-fill { height: 100%; background: var(--shopee-orange); }
.flash-sale-countdown { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--shopee-orange-dark); }
.voucher-code-form { display: flex; gap: 8px; margin: 10px 0; }
.voucher-code-form input { flex: 1; padding: 8px; border: 1px solid var(--border); border-radius: 4px; text-transform: uppercase; }
.applied-voucher-line { display: flex; align-items: center; justify-content: space-between; background: #fff8f3; border: 1px solid #ffd9c2; border-radius: 4px; padding: 8px 12px; margin: 8px 0; font-size: 13px; }
.summary-line.discount-line, .summary-total.discount-line { color: #c0392b; }

/* Bố cục 2 cột: nội dung chính + sidebar cố định */
.product-page-layout { max-width: 1200px; margin: 20px auto 0; display: flex; align-items: flex-start; gap: 20px; }
.product-page-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.product-page-main .product-detail,
.product-page-main .review-box,
.product-page-main .spec-box { margin: 0; }
.product-page-sidebar { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }
.shop-info-card { background: #fff; border-radius: 8px; padding: 16px; }
.shop-info-card-header { display: flex; align-items: center; gap: 10px; }
.shop-info-card-actions { margin-top: 12px; }
.sidebar-voucher-box { background: #fff; border-radius: 8px; padding: 16px; }
.sidebar-voucher-box h4 { margin: 0 0 10px; font-size: 14px; }
.sidebar-voucher-item { display: flex; align-items: center; justify-content: space-between; border: 1px dashed var(--shopee-orange); border-radius: 4px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; }
.sidebar-voucher-save { padding: 4px 12px; font-size: 12px; }
.sidebar-top-products { background: #fff; border-radius: 8px; padding: 16px; }
.sidebar-top-products h4 { margin: 0 0 10px; font-size: 14px; }
.sidebar-top-product-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.sidebar-top-product-item .product-thumb { width: 48px; height: 48px; border-radius: 4px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.sidebar-top-product-item .product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-top-product-name { font-size: 12px; color: #333; line-height: 1.3; max-height: 2.6em; overflow: hidden; margin-bottom: 2px; }
.trust-badges-section { max-width: 1200px; margin: 20px auto 0; background: #fff; border-radius: 8px; padding: 16px 24px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; }
.trust-badge { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #555; }
@media (max-width: 900px) {
  .product-page-layout { flex-direction: column; align-items: stretch; }
  .product-page-sidebar { width: 100%; position: static; }
}

/* ---- Shopee-style product form additions ---- */
.gallery-manage-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.gallery-manage-item { position: relative; display: block; width: 70px; text-align: center; cursor: default; }
.gallery-manage-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.gallery-remove-check { display: block; font-size: 11px; color: #d0021b; margin-top: 2px; }
.gallery-remove-check input { margin-right: 3px; }
.color-image-manage-box { margin: 10px 0 16px; padding: 12px; background: #fafafa; border-radius: 6px; border: 1px solid var(--border); }
.color-image-manage-grid { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.color-image-manage-item { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: #555; width: 64px; }
.color-image-manage-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; border: 2px solid var(--shopee-orange); }
.color-image-manage-empty { width: 48px; height: 48px; border-radius: 50%; border: 1px dashed #ccc; display: flex; align-items: center; justify-content: center; font-size: 9px; color: #aaa; text-align: center; }
.color-image-manage-link { display: inline-block; margin-top: 4px; }
.variant-color-cell { display: flex; align-items: center; gap: 6px; }
.variant-color-swatch { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.variant-discount-hint { font-size: 11px; color: var(--shopee-orange); margin-top: 2px; }

/* VEQ video natural ratio + zoom */
.gallery-main video{object-fit:contain !important;}
.gallery-main.veq-has-video{aspect-ratio:auto !important;height:auto !important;max-height:80vh;background:#000;}
.gallery-main.veq-has-video video{height:auto !important;max-height:80vh;width:100%;}
.veq-vzoom-btn{position:absolute;top:8px;right:8px;z-index:5;background:rgba(0,0,0,.6);color:#fff;border:0;border-radius:6px;padding:4px 9px;cursor:pointer;font-size:15px;line-height:1;}
.veq-voverlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.9);z-index:2000;align-items:center;justify-content:center;}
.veq-voverlay.active{display:flex;}
.veq-voverlay video{max-width:92vw;max-height:90vh;}
.veq-vclose{position:absolute;top:14px;right:22px;color:#fff;font-size:34px;cursor:pointer;background:none;border:0;line-height:1;}


/* ---- Shop Voucher + Flash Sale (them tu dong) ---- */
.shop-voucher-block, .shop-flashsale-block {
  background: #fff;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.shop-block-title { font-size: 16px; font-weight: 700; margin: 0 0 10px 0; color: #ee4d2d; }
.shop-voucher-scroll, .shop-flashsale-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.shop-voucher-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  border: 1px solid #ee4d2d;
  border-radius: 6px;
  overflow: hidden;
  min-width: 230px;
  background: linear-gradient(90deg,#fff5f2,#fff);
}
.voucher-left { padding: 8px 12px; flex: 1; }
.voucher-amount { color: #ee4d2d; font-weight: 700; font-size: 15px; }
.voucher-condition { font-size: 12px; color: #555; margin-top: 2px; }
.voucher-expiry { font-size: 11px; color: #999; margin-top: 2px; }
.voucher-right { padding: 0 10px; }
.btn-save-voucher {
  background: #ee4d2d; color: #fff; border: none; border-radius: 14px;
  padding: 6px 14px; font-size: 13px; cursor: pointer;
}
.flashsale-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.flashsale-title { color: #ee4d2d; margin: 0; }
.flashsale-countdown { font-size: 13px; color: #333; background: #ffe8e0; padding: 4px 10px; border-radius: 4px; }
.flashsale-countdown span { background: #000; color: #fff; padding: 1px 4px; border-radius: 2px; font-weight: 700; }
.flashsale-card {
  flex: 0 0 200px; width: 200px; text-decoration: none; color: inherit;
  border: 1px solid #eee; border-radius: 8px; overflow: hidden; background: #fff;
  transition: box-shadow .15s;
}
.flashsale-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.flashsale-img-wrap { position: relative; width: 100%; aspect-ratio: 1/1; }
.flashsale-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flashsale-badge {
  position: absolute; top: 8px; right: 8px; background: #ee4d2d; color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 7px; border-radius: 3px;
}
.flashsale-info { padding: 10px 12px 12px; }
.flashsale-price { color: #ee4d2d; font-weight: 700; font-size: 19px; }
.flashsale-price-old { color: #999; text-decoration: line-through; font-size: 13px; margin-top: 2px; }
.flashsale-progress { position: relative; margin-top: 10px; height: 22px; border-radius: 11px; background: #d84315; overflow: hidden; }
.flashsale-progress-bar { display: none; }
.flashsale-progress-text { position: relative; z-index: 1; display: block; text-align: center; font-size: 13px; line-height: 22px; color: #fff; font-weight: 700; }

/* ---- Scrollbar cho khu vuc chon mau/phan loai (task #44) ---- */
.color-options, .variant-options, .product-colors {
  max-height: 180px;
  overflow-y: auto;
}


/* ---- Shop Info Block (duoi phan danh gia, task #45) ---- */
.shop-info-block {
  background: #fff;
  border-radius: 6px;
  padding: 18px 20px;
  margin: 16px 0;
  border: 1px solid #eee;
}
.shop-info-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.shop-info-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: #ee4d2d; color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; text-decoration: none; text-transform: uppercase; flex-shrink: 0;
}
.shop-info-main { flex: 1; min-width: 120px; }
.shop-info-name { font-size: 16px; font-weight: 700; color: #222; text-decoration: none; display: block; }
.shop-info-name:hover { color: #ee4d2d; }
.shop-info-sub { font-size: 12px; color: #888; margin-top: 2px; }
.shop-info-actions { display: flex; gap: 8px; }
.shop-info-btn { padding: 7px 16px; font-size: 13px; border-radius: 4px; text-decoration: none; }
.shop-info-stats {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid #f0f0f0;
}
.shop-info-stat { display: flex; flex-direction: column; align-items: center; text-align: center; }
.shop-info-stat-value { font-weight: 700; color: #ee4d2d; font-size: 14px; }
.shop-info-stat-label { font-size: 11px; color: #888; margin-top: 3px; }
.shop-info-address { font-size: 12px; color: #666; margin-top: 12px; }
@media (max-width: 700px) {
  .shop-info-stats { grid-template-columns: repeat(3, 1fr); }
}


/* ---- Static pages (Bai Viet / Lien He) ---- */
.static-page { max-width: 700px; margin: 30px auto; padding: 20px; }
.static-page h1 { font-size: 22px; margin-bottom: 16px; }
.static-page-empty { color: #888; }
.contact-info p { margin: 8px 0; font-size: 14px; }


/* ---- Marquee + Header 3-col ---- */
.marquee-bar { background:#e6e6e6; color:#1a1a1a; overflow:hidden; white-space:nowrap; height:42px; display:flex; align-items:center; border-bottom:1px solid #eee; }
.marquee-track { display:inline-flex; animation: marquee-scroll 25s linear infinite; }
.marquee-item { padding:0 40px; font-size:17px; font-weight:600; color:#1a1a1a; }
@keyframes marquee-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.topbar-3col { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:nowrap; }
.topbar-menu { display:flex; align-items:center; gap:24px; flex:1 1 0; }
.topbar-menu .menu-item { color:#fff; text-decoration:none; font-size:14px; cursor:pointer; white-space:nowrap; font-weight:700; }
.topbar-menu .menu-item:hover { color:#fff; text-decoration:underline; }
.menu-dropdown { position:relative; }
.menu-dropdown .dropdown-panel { display:none; position:absolute; top:100%; left:0; background:#fff; box-shadow:0 4px 12px rgba(0,0,0,0.15); border-radius:4px; min-width:180px; padding:8px 0; z-index:50; }
.menu-dropdown:hover .dropdown-panel { display:block; }
.dropdown-panel a { display:block; padding:8px 16px; color:#333; text-decoration:none; font-size:14px; white-space:nowrap; }
.dropdown-panel a:hover { background:#f5f5f5; color:#ee4d2d; }
.logo-center { font-size:22px; font-weight:700; text-align:center; flex:0 0 auto; }
.topbar-right { display:flex; align-items:center; gap:16px; flex:1 1 0; justify-content:flex-end; }
@media (max-width: 700px) {
  .topbar-menu { display:none; }
  .topbar-3col { justify-content:space-between; }
}


/* ---- Typography: Hanken Grotesk + Poppins (giong Polomanor) ---- */
body, input, button, select, textarea {
  font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
}
.shop-block-title, .flashsale-title, .section-title {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.price-now, .price-old, .flashsale-price, .flashsale-price-old,
.voucher-amount, .product-price {
  font-family: 'Poppins', sans-serif;
}
.topbar-menu .menu-item {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 13px;
}
.logo-center {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: .5px;
}

/* ---- Hero banner + carousels + feedback (Polomanor-style layout) ---- */
.shop-hero-banner { margin-bottom: 16px; }
.shop-carousel-block { margin: 20px 0; }
.shop-product-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.shop-product-scroll .product-card { flex: 0 0 160px; }
.shop-feedback-block { margin: 20px 0; }
.feedback-placeholder {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  color: #888;
  font-size: 14px;
}

/* Trang trí Shop admin - moderate UI upgrade */
.shop-block-admin-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;}
.block-action-btn{display:inline-flex;align-items:center;justify-content:center;padding:6px 12px;border-radius:6px;background:#f2f2f2;color:#333;font-size:13px;text-decoration:none;border:1px solid #ddd;cursor:pointer;transition:background .15s;}
.block-action-btn:hover{background:#e2e2e2;}
.block-action-up,.block-action-down{font-weight:700;padding:6px 10px;}
.block-action-toggle{background:#fff3e0;color:#e65100;border-color:#ffe0b2;}
.block-action-toggle:hover{background:#ffe0b2;}
.block-action-danger{background:#fdecea;color:#c0392b;border-color:#f5c6cb;}
.block-action-danger:hover{background:#f8d7da;}
.btn-edit-block{background:#e3f2fd;color:#1565c0;border-color:#bbdefb;}
.btn-edit-block:hover{background:#bbdefb;}
.char-count{font-size:12px;color:#888;margin-left:8px;font-weight:400;}
.product-search-input{width:100%;box-sizing:border-box;padding:9px 12px;margin-bottom:10px;border:1px solid #ddd;border-radius:6px;font-size:14px;}
#cancel-edit-btn{margin-left:8px;}

.block-type-picker{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:14px;}
.block-type-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:110px;padding:14px 8px;border:2px solid #e0e0e0;border-radius:10px;cursor:pointer;background:#fafafa;transition:.15s;text-align:center;}
.block-type-card:hover{border-color:#ffb74d;background:#fff8f0;}
.block-type-card.active{border-color:#ee4d2d;background:#fff1ec;box-shadow:0 0 0 1px #ee4d2d inset;}
.block-type-icon{font-size:26px;line-height:1;}
.block-type-label{font-size:12px;color:#444;font-weight:600;}
.block-type-card.active .block-type-label{color:#ee4d2d;}

/* Trang trí Shop - live preview panel */
.decoration-layout{display:grid;grid-template-columns:1fr 380px;gap:24px;align-items:start;}
.decoration-left{min-width:0;}
.decoration-right{position:sticky;top:16px;}
.preview-panel-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;}
.preview-panel-header h3{margin:0;font-size:16px;}
.preview-phone-frame{border:8px solid #222;border-radius:24px;overflow:hidden;background:#fff;box-shadow:0 4px 16px rgba(0,0,0,.15);height:720px;}
#shop-preview-frame{width:100%;height:100%;border:0;}
@media (max-width: 1100px){
  .decoration-layout{grid-template-columns:1fr;}
  .decoration-right{position:static;}
  .preview-phone-frame{height:600px;}
}


/* ==== Mobile Shopee-style overhaul (added) ==== */

.mobile-menu-toggle { display:none; background:none; border:none; color:#fff; font-size:22px; cursor:pointer; padding:4px 8px; line-height:1; }

.mobile-shop-header { display:none; }
.msh-cover { width:100%; aspect-ratio:16/7; background:linear-gradient(135deg, var(--shopee-orange), #ff7337); background-size:cover; background-position:center; position:relative; }
.msh-avatar { position:absolute; left:16px; bottom:-28px; width:64px; height:64px; border-radius:50%; background:#fff; border:3px solid #fff; box-shadow:0 2px 6px rgba(0,0,0,.2); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:20px; color: var(--shopee-orange); overflow:hidden; }
.msh-avatar img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
.msh-info { background:#fff; padding:36px 16px 12px; }
.msh-name-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.msh-name { font-size:17px; margin:0; font-weight:700; }
.msh-fav { font-size:11px; color: var(--shopee-orange); border:1px solid var(--shopee-orange); border-radius:3px; padding:3px 6px; white-space:nowrap; }
.msh-stats { font-size:13px; color:#555; display:flex; align-items:center; gap:8px; margin-top:6px; }
.msh-sep { color:#ccc; }
.msh-tabs { display:flex; background:#fff; border-top:1px solid #f0f0f0; }
.msh-tab { flex:1; border:none; background:none; padding:12px 4px; font-size:14px; color:#555; cursor:pointer; border-bottom:2px solid transparent; }
.msh-tab.active { color: var(--shopee-orange); font-weight:600; border-bottom-color: var(--shopee-orange); }

.cart-table-wrap { width:100%; }

@media (max-width: 700px) {
  /* --- Header / nav --- */
  .mobile-menu-toggle { display:inline-block; order:-1; }
  .topbar-inner.topbar-3col { flex-wrap:wrap; position:relative; }
  .topbar-menu { display:none; position:absolute; top:100%; left:0; right:0; background:#fff; flex-direction:column; gap:0; box-shadow:0 4px 12px rgba(0,0,0,.15); z-index:50; padding:8px 0; }
  .topbar-menu.mobile-open { display:flex; }
  .topbar-menu .menu-item { color:#333; padding:10px 16px; font-weight:500; }
  .topbar-menu .menu-item:hover { background:#f5f5f5; color: var(--shopee-orange); text-decoration:none; }
  .topbar-menu .menu-dropdown { position:static; }
  .topbar-menu .menu-dropdown .menu-item-trigger,
  .topbar-menu .menu-trigger { padding:10px 16px; display:block; }
  .topbar-menu .dropdown-panel { display:block; position:static; box-shadow:none; min-width:0; padding:0; background:none; }
  .topbar-menu .dropdown-panel a { padding-left:28px; }
  .logo-center { font-size:16px; }
  .logo-center img { max-height: 56px !important; max-width: 200px !important; }
  .topbar-right { gap:8px; flex:1 1 auto; }
  .search { min-width:0; }
  .search input { min-width:0; font-size:13px; padding:8px 10px; }
  .cart-link { white-space:nowrap; font-size:13px; }

  /* --- Homepage: Shopee shop-style mobile header --- */
  .shop-banner { display:none; }
  .mobile-shop-header { display:block; }
  .layout { flex-direction:column; padding:0 0 40px; gap:0; }
  .sidebar { display:none; width:100%; padding:12px 16px; }
  .sidebar.msh-active { display:block; }
  .product-area { display:none; padding:0 16px; flex:none; width:100%; }
  .product-area.msh-active { display:block; }
  .sort-bar { flex-wrap:wrap; margin-top:12px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap:10px; }

  /* --- Product detail gallery --- */
  .gallery { width:100%; }
  .gallery-thumbs { flex-wrap:wrap; }

  /* --- Cart --- */
  .cart-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .cart-table { min-width:600px; }
  .cart-summary { flex-wrap:wrap; }

  /* --- Checkout --- */
  .checkout-layout { flex-direction:column; padding:0 16px; }
  .order-summary { width:100%; }

  /* --- Product detail: gallery + info stack --- */
  .product-detail { flex-direction:column; }
  .product-detail .gallery { width:100%; }
  .product-detail { gap: 0; }
}


/* ==== Product detail mobile overhaul (added) ==== */

.pd-mobile-topbar { display:none; }
.pd-gallery-counter { display:none; }
.pd-mobile-actionbar { display:contents; }
.pd-mobile-chat { display:none; }
.pd-qty-popup-overlay { display:none; }
.variant-chip-thumb { display:none; }

@media (max-width: 700px) {
  body:has(#pd-mobile-topbar) .topbar { display:none; }

  .pd-mobile-topbar {
    display:flex; align-items:center; gap:8px;
    position:sticky; top:0; z-index:70;
    background:#fff; padding:8px 12px;
    border-bottom:1px solid #eee;
  }
  .pd-mtb-back { border:none; background:none; font-size:22px; padding:4px 6px; cursor:pointer; color:#222; }
  .pd-mtb-search { flex:1; }
  .pd-mtb-search input { width:100%; border:1px solid #e5e5e5; border-radius:16px; padding:7px 12px; font-size:13px; background:#f5f5f5; }
  .pd-mtb-icon { border:none; background:none; font-size:20px; padding:4px 6px; cursor:pointer; color:#222; position:relative; text-decoration:none; }
  .pd-mtb-cart { display:inline-flex; }
  .pd-mtb-badge { position:absolute; top:-2px; right:-2px; background:var(--shopee-orange); color:#fff; font-size:10px; border-radius:999px; padding:1px 5px; line-height:1.3; }

  /* Gallery: single swipeable image, hide thumbnail strip */
  #gallery-thumbs { display:none; }
  .gallery { width:100%; }
  .gallery-main { position:relative; aspect-ratio:1/1; }
  .gallery-main img, .gallery-main video { width:100%; height:100%; object-fit:cover; }
  .pd-gallery-counter {
    display:block; position:absolute; right:10px; bottom:10px;
    background:rgba(0,0,0,.55); color:#fff; font-size:12px;
    padding:2px 8px; border-radius:10px; z-index:2;
  }

  /* Color variant chips: thumbnail image + horizontal scroll */
  .variant-options { flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:4px; }
  .variant-chip-color { display:flex; flex-direction:column; align-items:center; flex-shrink:0; width:84px; padding:8px 4px; }
  .variant-chip-thumb {
    display:block; width:64px; height:64px; border-radius:6px;
    background-size:cover; background-position:center; background-color:#f5f5f5;
    border:1px solid #e5e5e5; margin-bottom:4px;
  }
  .variant-chip-thumb.no-img { display:none; }
  .variant-chip-label {
  font-size:10.5px; text-align:center; line-height:1.2; max-width:76px;
  white-space:normal; overflow:hidden; text-overflow:clip;
  display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical;
  max-height:5em;
}

  /* Sticky bottom action bar: chat + add-cart + buy-now */
  .pd-mobile-actionbar {
    display:flex !important; position:fixed; left:0; right:0; bottom:0; z-index:70;
    background:#fff; box-shadow:0 -2px 10px rgba(0,0,0,.08);
  }
  .pd-mobile-chat {
    display:flex !important; align-items:center; justify-content:center;
    width:52px; flex-shrink:0; font-size:20px; color:#00bfa5; text-decoration:none;
    border-right:1px solid #f0f0f0;
  }
  .pd-mobile-actionbar .action-buttons { flex:1; display:flex; gap:0; margin:0; }
  .pd-mobile-actionbar .action-buttons .btn { flex:1; border-radius:0; margin:0; }
  .product-page-main { padding-bottom:60px; }

  /* Quantity confirm popup */
  .pd-qty-popup-overlay.open {
    display:flex; align-items:flex-end; position:fixed; inset:0;
    background:rgba(0,0,0,.45); z-index:200;
  }
  .pd-qty-popup {
    background:#fff; width:100%; border-radius:12px 12px 0 0;
    padding:16px; position:relative; max-height:80vh; overflow-y:auto;
  }
  .pd-qty-popup-close { position:absolute; top:10px; right:12px; border:none; background:none; font-size:20px; color:#999; cursor:pointer; }
  .pd-qty-popup-top { display:flex; gap:12px; margin-bottom:10px; }
  .pd-qty-popup-img { width:72px; height:72px; border-radius:6px; background-size:cover; background-position:center; background-color:#f5f5f5; flex-shrink:0; }
  .pd-qty-popup-info { flex:1; }
  .pd-qty-popup-price { color:var(--shopee-orange); font-size:18px; font-weight:700; }
  .pd-qty-popup-stock { color:#999; font-size:12px; margin-top:4px; }
  .pd-qty-popup-variant { font-size:13px; color:#555; margin:8px 0 14px; }
  .pd-qty-popup-qty { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
  .pd-qty-stepper { display:flex; align-items:center; border:1px solid #e5e5e5; border-radius:4px; }
  .pd-qty-stepper button { width:32px; height:32px; border:none; background:#f5f5f5; font-size:16px; cursor:pointer; }
  .pd-qty-stepper input { width:44px; height:32px; border:none; border-left:1px solid #e5e5e5; border-right:1px solid #e5e5e5; text-align:center; }
  .pd-qty-popup-confirm { width:100%; }

  /* Flash sale banner label restyle for real countdown text */
  .flash-sale-countdown { font-weight:600; }
}


/* ==== pd-mobile-video-objectfit-fix ==== */
@media (max-width: 700px) {
  .gallery-main video { object-fit: cover !important; }
}


/* ==== pd-gallery-counter-size-override ==== */
#pd-gallery-counter {
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #fff !important;
}


/* ==== pd-qty-inline-stepper ==== */
.qty-stepper { display:inline-flex; align-items:center; border:1px solid #e5e5e5; border-radius:4px; }
.qty-stepper button { width:32px; height:32px; border:none; background:#f5f5f5; font-size:16px; line-height:1; cursor:pointer; }
.qty-stepper button:first-child { border-radius:4px 0 0 4px; }
.qty-stepper button:last-child { border-radius:0 4px 4px 0; }
.qty-stepper input { width:44px; height:32px; border:none; border-left:1px solid #e5e5e5; border-right:1px solid #e5e5e5; text-align:center; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }


/* ==== pd-mobile-img-viewer ==== */
.pd-img-viewer-overlay { display:none; position:fixed; inset:0; background:#000; z-index:500; align-items:center; justify-content:center; }
.pd-img-viewer-overlay.open { display:flex; }
.pd-img-viewer-stage { width:100%; height:100%; display:flex; align-items:center; justify-content:center; }
.pd-img-viewer-stage img, .pd-img-viewer-stage video { max-width:100%; max-height:100%; object-fit:contain; }
.pd-img-viewer-close { position:absolute; top:16px; left:12px; z-index:2; background:rgba(255,255,255,.15); color:#fff; border:none; border-radius:999px; width:36px; height:36px; font-size:22px; line-height:1; cursor:pointer; }
.pd-img-viewer-counter { position:absolute; top:20px; right:16px; z-index:2; background:rgba(0,0,0,.55); color:#fff; font-size:12px; padding:2px 8px; border-radius:10px; }
@media (min-width: 701px) {
  .pd-qty-popup-overlay.open { align-items: center; justify-content: center; }
  .pd-qty-popup { width: 420px; max-width: 92vw; border-radius: 12px; }
}
.pd-qty-popup-variants { margin-bottom: 12px; }
.pd-qty-popup-variants .variant-options { flex-wrap: wrap; }
.pd-qty-popup-overlay.open { display:flex; align-items:flex-end; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:200; }
.pd-qty-popup { background:#fff; width:100%; border-radius:12px 12px 0 0; padding:16px; position:relative; max-height:80vh; overflow-y:auto; }
.pd-qty-popup-close { position:absolute; top:10px; right:12px; border:none; background:none; font-size:20px; color:#999; cursor:pointer; }
.pd-qty-popup-top { display:flex; gap:12px; margin-bottom:10px; }
.pd-qty-popup-img { width:72px; height:72px; border-radius:6px; background-size:cover; background-position:center; background-color:#f5f5f5; flex-shrink:0; }
.pd-qty-popup-info { flex:1; }
.pd-qty-popup-price { color:var(--shopee-orange); font-size:18px; font-weight:700; }
.pd-qty-popup-stock { color:#999; font-size:12px; margin-top:4px; }
.pd-qty-popup-variant { font-size:13px; color:#555; margin:8px 0 14px; }
.pd-qty-popup-qty { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.pd-qty-stepper { display:flex; align-items:center; border:1px solid #e5e5e5; border-radius:4px; }
.pd-qty-stepper button { width:32px; height:32px; border:none; background:#f5f5f5; font-size:16px; cursor:pointer; }
.pd-qty-stepper input { width:44px; height:32px; border:none; border-left:1px solid #e5e5e5; border-right:1px solid #e5e5e5; text-align:center; }
.pd-qty-popup-confirm { width:100%; }
@media (min-width: 701px) {
  .pd-qty-popup-overlay.open { align-items: center; justify-content: center; }
  .pd-qty-popup { width: 420px; max-width: 92vw; border-radius: 12px; }
}

.cart-items-list { max-width:1200px; margin:0 auto 16px; }
.cart-item-card { background:#fff; border-radius:8px; padding:14px 16px; margin-bottom:10px; }
.cart-item-name { font-weight:600; font-size:15px; line-height:1.35; max-height:2.7em; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; margin-bottom:10px; }
.cart-item-row { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.cart-item-thumb { width:64px; height:64px; border-radius:6px; background-size:cover; background-position:center; background-color:#f5f5f5; flex-shrink:0; }
.cart-item-variant-info { display:flex; flex-direction:column; gap:2px; font-size:13px; color:#555; min-width:60px; }
.cart-item-size-badge { color:#888; font-size:12px; }
.cart-item-price { margin-left:auto; font-weight:700; color:var(--shopee-orange); white-space:nowrap; }
.cart-add-variant-section { max-width:1200px; margin:20px auto; background:#fff; border-radius:8px; padding:16px; }
.cart-add-variant-section h3 { margin:0 0 12px; font-size:16px; }
.add-variant-card { border-top:1px dashed var(--border); padding-top:12px; margin-top:12px; }
.add-variant-card:first-of-type { border-top:none; padding-top:0; margin-top:0; }
.add-variant-title { font-weight:600; margin-bottom:8px; }
.add-variant-form .variant-group { margin-bottom:10px; }
.btn-add-variant { margin-top:6px; }
.order-summary .cart-item-card { padding:10px 0; margin-bottom:0; border-bottom:1px dashed var(--border); border-radius:0; }

.topbar { position:sticky; top:0; z-index:100; transition:padding .2s ease, box-shadow .2s ease; }
.topbar.is-compact { padding:6px 0; box-shadow:0 2px 8px rgba(0,0,0,.12); }
.topbar.is-compact .logo img { max-height:34px !important; }
.topbar.is-compact .topbar-menu .menu-item { font-size:12px; }
.topbar.is-compact .search input { padding:5px 10px; }

.msh-shop-panel { display: none; }

.category-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap:12px; }
.category-card { display:flex; flex-direction:column; align-items:center; text-align:center; text-decoration:none; color:inherit; gap:6px; }
.category-thumb { width:100%; aspect-ratio:1/1; border-radius:50%; overflow:hidden; display:flex; align-items:center; justify-content:center; background:#f5f5f5; }
.category-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.category-thumb-all { background:linear-gradient(135deg,#ee4d2d,#ff8a65); }
.category-initial { color:#fff; font-weight:600; font-size:13px; }
.category-name { font-size:12px; color:#333; line-height:1.3; }
.category-card.active .category-name { color:#ee4d2d; font-weight:600; }
.category-thumb-empty .category-initial { color:#999; }
.post-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap:16px; margin-top:16px; }
.post-card { display:flex; flex-direction:column; text-decoration:none; color:inherit; border:1px solid #eee; border-radius:8px; overflow:hidden; background:#fff; transition:box-shadow .15s; }
.post-card:hover { box-shadow:0 2px 10px rgba(0,0,0,.08); }
.post-thumb { width:100%; aspect-ratio:16/9; background:#f5f5f5; overflow:hidden; }
.post-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.post-thumb-empty { width:100%; height:100%; background:linear-gradient(135deg,#f5f5f5,#eaeaea); }
.post-info { padding:10px 12px; }
.post-title { font-size:15px; margin:0 0 6px; color:#222; }
.post-excerpt { font-size:13px; color:#777; margin:0; line-height:1.4; }
.post-detail-cover { width:100%; max-height:360px; object-fit:cover; border-radius:8px; margin:12px 0; }
.post-detail-content { white-space:pre-line; line-height:1.7; color:#333; margin-top:12px; }
@media (max-width:700px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); gap:10px; }
}


/* ---- MOBILE HEADER OVERRIDE (Polomanor-style) ---- */
.search-toggle-btn { display:none; }
@media (max-width:700px) {
  .topbar { background:#fff; border-bottom:1px solid #eee; }
  .mobile-menu-toggle { color:#333; }
  .logo-center { flex:1 1 auto; }
  .topbar-right { position:relative; gap:14px; }
  .search-toggle-btn { display:inline-flex; align-items:center; justify-content:center; background:none; border:none; font-size:19px; color:#333; padding:4px; cursor:pointer; }
  .search { display:none; }
  .search.search-open { display:flex; position:absolute; right:0; top:100%; margin-top:8px; width:220px; z-index:60; box-shadow:0 4px 12px rgba(0,0,0,.15); background:#fff; border-radius:4px; overflow:hidden; }
  .cart-link { color:#333; }
  .cart-text { display:none; }
  .badge { background:var(--shopee-orange); color:#fff; }
}


/* ---- Full-bleed mobile: xoa khoang trang 2 ben cho banner/voucher/carousel ---- */
@media (max-width: 700px) {
  .shop-home { padding: 0; margin: 0 auto 24px; }
  .shop-block { border-radius: 0; }
  .shop-carousel-block { padding: 14px 16px; }
}


/* ---- Icon to hon + logo can giua + tim kiem full-screen + trang ket qua tim kiem ---- */
@media (max-width: 700px) {
  .topbar-inner.topbar-3col { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .mobile-menu-toggle { justify-self: start; font-size: 26px; }
  .logo-center { justify-self: center; text-align: center; }
  .topbar-right { justify-self: end; }
  .search-toggle-btn { font-size: 24px; }
  .cart-link { font-size: 24px; }
}

.search-back-btn, .search-cam-btn, .search-suggest-list { display: none; }

@media (max-width: 700px) {
  .search.search-open {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    z-index: 200;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    box-shadow: none;
    border-radius: 0;
    overflow-y: auto;
    display: flex;
  }
  .search.search-open .search-input-row { display: flex; align-items: center; gap: 8px; }
  .search.search-open .search-back-btn { display: inline-flex; align-items: center; justify-content: center; font-size: 24px; background: none; border: none; color: #333; padding: 4px; }
  .search.search-open input { flex: 1; border: 1px solid #eee; background: #f5f5f5; border-radius: 20px; padding: 10px 14px; font-size: 15px; }
  .search.search-open .search-cam-btn { display: inline-flex; align-items: center; justify-content: center; font-size: 20px; background: none; border: none; color: #333; padding: 4px; }
  .search.search-open .search-submit-btn { display: none; }
  .search.search-open .search-suggest-list { display: flex; flex-direction: column; margin-top: 18px; gap: 2px; }
  .search .search-suggest-item { background: none; border: none; text-align: left; padding: 13px 4px; font-size: 15px; color: #333; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
}

.search-results-page { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #fff; }
.search-results-topbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff; z-index: 10; }
.search-back-link { font-size: 22px; color: #333; text-decoration: none; padding: 4px; display: inline-flex; flex-shrink: 0; }
.search-results-form { flex: 1; display: flex; align-items: center; gap: 8px; background: #f5f5f5; border-radius: 20px; padding: 8px 12px; min-width: 0; }
.search-results-form input { flex: 1; min-width: 0; border: none; background: none; outline: none; font-size: 15px; }
.search-results-cam-btn { border: none; background: none; font-size: 17px; padding: 0; flex-shrink: 0; }
.search-results-filter-btn { border: none; background: none; font-size: 13px; color: #333; padding: 4px 6px; white-space: nowrap; flex-shrink: 0; position: relative; }
.search-results-filter-panel { display: none; position: absolute; right: 8px; top: 52px; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.15); border-radius: 8px; padding: 6px 0; min-width: 160px; z-index: 20; }
.search-results-filter-panel.filter-panel-open { display: block; }
.filter-cat-item { display: block; padding: 10px 16px; font-size: 13px; color: #333; text-decoration: none; white-space: nowrap; }
.filter-cat-item:hover, .filter-cat-item.active { background: #f5f5f5; color: var(--shopee-orange); }
.search-results-sort-bar { display: flex; border-bottom: 1px solid #eee; overflow-x: auto; }
.sort-tab { flex: 1; text-align: center; padding: 12px 8px; font-size: 13px; color: #555; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.sort-tab.active { color: var(--shopee-orange); border-bottom-color: var(--shopee-orange); font-weight: 600; }
.search-results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; }
.search-results-empty { padding: 60px 20px; text-align: center; color: #888; font-size: 14px; }
