/* ============================================================
   COLOREX — STYLE CHÍNH
   ============================================================ */
/* Ẩn thanh trượt ngang cho toàn bộ trang */
html, body {
    overflow-x: hidden;
}

/* Đảm bảo thẻ cha của menu không cắt mất menu con */
.navbar, .navbar-collapse {
    overflow: visible !important;
}

/* ============================================================
   1. RESET & BASE (Đã gộp và sửa font chuẩn tiếng Việt)
   ============================================================ */
* { box-sizing: border-box; }

body {
  margin: 0;
  /* Sử dụng bộ font an toàn, hỗ trợ tiếng Việt tốt trên mọi thiết bị */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.6;
}

h1 { font-size: 35px; }
h2 { font-size: 30px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

a {
  text-decoration: none !important;
  transition: color 0.3s ease;
  color: inherit;
}
a:hover {
  color: var(--brand-primary, #f58220);
}

a:focus, input:focus, textarea:focus, button:focus {
  text-decoration: none;
  outline: none;
}

/* ============================================================
   2. IMAGES
   ============================================================ */
img {
  display: block;
  margin-top: 10px;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  border-radius: 15px;
}
img.no-radius { border-radius: 0; }
img.rounded-top { margin-top: -10px; border-radius: 15px 15px 0 0; }
img.rounded-bottom { border-radius: 0 0 15px 15px; }

/* ============================================================
   3. NAVBAR STICKY
   ============================================================ */
.navbar-sticky {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

/* ============================================================
   4. PAGINATION
   ============================================================ */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.pagination li { flex: 0 0 auto; }
.pagination a {
  display: block; padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 4px;
  text-decoration: none; font-size: 14px; color: #333; transition: all 0.2s ease;
}
.pagination a:hover { border-color: var(--brand-primary, #f58220); color: var(--brand-primary, #f58220); }
.pagination .active a { background: var(--brand-primary, #f58220); border-color: var(--brand-primary, #f58220); color: #fff; }

@media (max-width: 480px) {
  .pagination a { padding: 4px 6px; font-size: 12px; }
}

/* ============================================================
   5. ICON BAR (sticky note bên trái)
   ============================================================ */
.icon-bar {
  position: fixed; top: 57%; transform: translateY(-50%);
  -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%);
}
.icon-bar a {
  display: block; text-align: center; padding: 8px; transition: all 0.3s ease;
  color: white; font-size: 15px; z-index: 999;
}
.icon-bar a:hover { background-color: #000; z-index: 999; }

/* ============================================================
   6. HOTLINE
   ============================================================ */
.btn-hotline {
  background-color: var(--brand-primary, #f58220); color: white; font-weight: bold;
  border: none; border-radius: 25px; padding: 10px 20px; transition: all 0.2s ease-in-out;
}
.btn-hotline:hover { background-color: var(--brand-primary-dark, #d96d10); color: white; }

.hotline { display: none; }
@media (max-width: 767px) {
  .hotline {
    display: block; position: fixed; bottom: 5%; left: 50%; transform: translateX(-50%);
    padding: 10px 20px; background-color: #dc3545; color: #fff; text-decoration: none;
    font-weight: bold; border-radius: 25px;
  }
}

/* ============================================================
   7. UTILITIES
   ============================================================ */
.flip-icon { display: inline-block; transform: scaleX(-1); }
.link-hover-underline-warning:hover { color: var(--brand-primary, #f58220) !important; text-decoration: underline; cursor: pointer; }
.content { margin-left: 0px; font-size: 15px; z-index: 999; }
[id] { scroll-margin-top: 150px; }

.fa.fa-twitter { font-family: sans-serif; }
.fa.fa-twitter::before { content: "𝕏"; font-size: 1.2em; }

/* ============================================================
   8. SEARCH SMART ART — search_01 & search_02
   ============================================================ */
.search-hero {
  background: linear-gradient(135deg, var(--brand-primary-bg, #fff1eb) 0%, #ffffff 100%);
  border: 1px solid var(--brand-primary-border, #ffd0b8);
  border-radius: 18px; padding: 20px; margin-bottom: 20px;
}
.search-form { width: 100%; }
.search-input-wrap {
  position: relative; display: flex; align-items: center; background: #fff;
  border: 2px solid var(--brand-primary-border, #ffd0b8); border-radius: 50px;
  padding: 6px 6px 6px 48px; transition: border-color .2s, box-shadow .2s;
}
.search-input-wrap:focus-within { border-color: var(--brand-primary, #f58220); box-shadow: 0 0 0 4px rgba(248, 89, 34, 0.12); }
.search-icon {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  color: var(--brand-primary, #f58220); font-size: 1.1rem; pointer-events: none;
}
.search-input {
  flex: 1; border: none; outline: none; background: transparent; padding: 12px 8px;
  font-size: 1rem; color: #1f2937; min-width: 0;
}
.search-input::placeholder { color: #aaa; }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--brand-primary, #f58220);
  color: #fff; border: none; border-radius: 50px; padding: 12px 24px;
  font-weight: 600; cursor: pointer; transition: background .2s, transform .1s; white-space: nowrap;
}
.search-btn:hover { background: var(--brand-primary-dark, #d96d10); }
.search-btn:active { transform: scale(0.97); }

.hint-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-left: 8px; }
.hint-label { font-size: .85rem; color: #888; margin-right: 4px; }
.hint-pill {
  background: #fff; border: 1px solid var(--brand-primary-border, #ffd0b8);
  color: var(--brand-primary, #f58220); border-radius: 50px; padding: 4px 14px;
  font-size: .82rem; cursor: pointer; transition: all .2s;
}
.hint-pill:hover { background: var(--brand-primary, #f58220); color: #fff; border-color: var(--brand-primary, #f58220); }

.result-bar-wrap { margin-bottom: 20px; animation: resultSlideIn .35s ease-out; }
@keyframes resultSlideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.result-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid var(--brand-primary-border, #ffd0b8);
  border-left: 4px solid var(--brand-primary, #f58220); border-radius: 12px;
  padding: 14px 18px; box-shadow: 0 2px 10px rgba(248, 89, 34, 0.06); flex-wrap: wrap;
}
.result-bar__left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.result-bar__icon {
  flex-shrink: 0; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-primary-bg, #fff1eb); color: var(--brand-primary, #f58220); border-radius: 10px; font-size: 1rem;
}
.result-bar__text { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.result-bar__label { color: #555; font-size: .9rem; }
.result-bar__keyword { color: #222; font-weight: 700; font-size: .95rem; word-break: break-word; }
.result-bar__badge {
  display: inline-flex; align-items: center; background: var(--brand-primary, #f58220);
  color: #fff; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 50px; white-space: nowrap;
}
.result-bar__clear {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 7px 14px;
  background: #f3f4f6; color: #666; border-radius: 50px; font-size: .85rem; font-weight: 500;
  text-decoration: none; transition: all .2s;
}
.result-bar__clear:hover { background: var(--brand-primary, #f58220); color: #fff; text-decoration: none; }
.result-bar__hint {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 16px;
  background: #fffbf7; border: 1px dashed #ffd0b8; border-radius: 10px; color: #886644; font-size: .85rem;
}
.result-bar__hint i { color: var(--brand-primary, #f58220); flex-shrink: 0; }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 0; }
.chip {
  display: inline-flex; align-items: center; padding: 8px 18px; background: #fff;
  border: 1.5px solid #e5e7eb; color: #444; border-radius: 50px; font-size: .9rem;
  font-weight: 500; text-decoration: none; transition: all .2s; white-space: nowrap;
}
.chip:hover { border-color: var(--brand-primary, #f58220); color: var(--brand-primary, #f58220); background: var(--brand-primary-bg, #fff1eb); text-decoration: none; }
.chip--active { background: var(--brand-primary, #f58220); border-color: var(--brand-primary, #f58220); color: #fff !important; box-shadow: 0 4px 12px rgba(248, 89, 34, 0.28); }
.chip--active:hover { background: var(--brand-primary-dark, #d96d10); border-color: var(--brand-primary-dark, #d96d10); color: #fff; }

/* Responsive cho Search */
@media (max-width: 768px) {
  .search-hero { padding: 14px; border-radius: 14px; }
  .search-input-wrap { flex-wrap: wrap; padding: 8px 8px 8px 44px; border-radius: 14px; }
  .search-icon { left: 16px; top: 22px; transform: none; }
  .search-input { width: 100%; padding: 10px 4px; font-size: .95rem; }
  .search-btn { width: 100%; justify-content: center; margin-top: 6px; padding: 12px; }
  .search-btn-text { display: inline; }
  .hint-row { padding-left: 0; }
  .chip { padding: 7px 14px; font-size: .85rem; }
}
@media (max-width: 576px) {
  .result-bar { padding: 12px 14px; }
  .result-bar__text { font-size: .85rem; }
  .result-bar__keyword { font-size: .9rem; }
  .result-bar__clear span { display: none; }
  .result-bar__clear { padding: 7px 10px; }
}
@media (max-width: 480px) {
  .search-btn-text { display: none; }
  .search-btn { width: 52px; padding: 12px; flex-shrink: 0; }
  .search-input-wrap { flex-wrap: nowrap; border-radius: 50px; }
  .search-input { width: auto; }
}

/* ============================================================
   9. STICKY NOTE (icon-bar bên trái)
   ============================================================ */
#stickynoteContainer .icon-bar .sn-btn {
  background-color: var(--sn-bg, var(--brand-primary, #f58220)); color: var(--sn-color, #fff);
  border: var(--sn-border, none); border-radius: var(--sn-radius, 0);
  transition: var(--sn-transition, all 0.3s ease); opacity: var(--sn-opacity, 1);
}
#stickynoteContainer .icon-bar .sn-btn:hover,
#stickynoteContainer .icon-bar .sn-btn:focus {
  background-color: var(--sn-hover-bg, #fff) !important; color: var(--sn-hover-color, var(--brand-primary, #f58220)) !important;
  box-shadow: var(--sn-hover-shadow, 0 2px 6px rgba(0,0,0,0.15)); opacity: var(--sn-hover-opacity, 1);
}
#stickynoteContainer .icon-bar .sn-dropdown { background-color: var(--sn-dd-bg, var(--brand-primary, #f58220)); border: none; }
#stickynoteContainer .icon-bar .sn-dropdown .dropdown-item { color: var(--sn-dd-color, #fff); }
#stickynoteContainer .icon-bar .sn-dropdown .dropdown-item:hover,
#stickynoteContainer .icon-bar .sn-dropdown .dropdown-item:focus {
  background-color: var(--sn-dd-hover-bg, var(--brand-primary-dark, #d96d10)) !important; color: var(--sn-dd-hover-color, #fff) !important;
}

/* ============================================================
   TANHOAPHUPCCC.VN — LAYOUT SPECIFIC
   ============================================================ */
:root {
  --orange: #f58220; --orange-dark: #d96d10; --dark: #1a1a1a;
  --grey: #f4f4f4; --text: #333; --muted: #777; --footer: #555;
}

/* Header */
.site-header { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 1000; }
.logo-img { height: 64px; width: auto; }
.main-menu .nav-link { color: #333 !important; font-weight: 700; font-size: 14px; text-transform: uppercase; padding: 10px 14px !important; }
.main-menu .nav-link:hover, .main-menu .nav-link.active { color: var(--orange) !important; }
.main-menu .dropdown-menu { border-radius: 0; border: 0; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.main-menu .dropdown-item { font-size: 14px; padding: 9px 18px; }
.search-toggle { width: 44px; height: 44px; border-radius: 50%; background: var(--orange); color: #fff; border: 0; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.phone-pill { background: var(--orange); color: #fff !important; font-weight: 800; padding: 10px 20px; border-radius: 30px; white-space: nowrap; }
.phone-pill:hover { background: var(--orange-dark); color: #fff !important; }
.header-search { display: none; position: absolute; right: 0; top: 52px; background: #fff; border: 1px solid #eee; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 10px; z-index: 10; }
.header-search.open { display: flex; }

/* Hero banner */
.hero-banner { position: relative; overflow: hidden; color: #fff; height: clamp(320px, 55vw, 560px); display: flex; align-items: center; }
.hero-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.hero-banner-content { position: relative; z-index: 2; }

/* Orange strip */
.orange-strip { background: var(--orange); color: #fff; }
.orange-strip .col-md-4 { padding: 26px 28px; }
.orange-strip .col-md-4 + .col-md-4 { border-left: 1px solid rgba(255,255,255,.5); }
.orange-strip h4 { font-weight: 800; font-size: 17px; text-transform: uppercase; margin-bottom: 6px; }
.orange-strip p { margin: 0; font-size: 14px; color: #fff; }

/* Sidebar */
.sidebar-box { border: 1px solid #eee; padding: 20px; }
.sidebar-box h5 { font-weight: 800; text-transform: uppercase; font-size: 16px; margin-bottom: 14px; }
.contact-btn { display: block; background: var(--orange); color: #fff !important; text-align: center; font-weight: 800; padding: 11px; margin-bottom: 8px; }
.contact-btn:hover { background: var(--orange-dark); color: #fff !important; }
.sidebar-search { display: flex; border: 1px solid #ddd; }
.sidebar-search input { border: 0; flex: 1; padding: 10px; outline: none; min-width: 0; }
.sidebar-search button { background: var(--orange); color: #fff; border: 0; padding: 0 14px; }

/* Section titles */
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-weight: 900; text-transform: uppercase; font-size: 28px; margin: 0; }
.section-title .line { width: 70px; height: 4px; background: var(--orange); margin: 12px auto 0; }
.section-title p { color: var(--muted); margin-top: 10px; }

/* Products */
.product-card { border: 1px solid #eee; transition: .25s; background: #fff; }
.product-card:hover { box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.product-thumb { position: relative; overflow: hidden; background: #fafafa; }
.product-thumb img { width: 100%; height: 300px; object-fit: cover; transition: .4s; }
.product-card:hover .product-thumb img { transform: scale(1.05); }
.badge-tag { position: absolute; top: 12px; left: 12px; color: #fff; font-weight: 800; font-size: 12px; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--orange); z-index: 2; }
.quick-view { position: absolute; left: 0; right: 0; bottom: 0; background: var(--orange); color: #fff; border: 0; font-size: 13px; font-weight: 700; padding: 10px; opacity: 0; transition: .25s; }
.product-card:hover .quick-view { opacity: 1; }
.product-info { padding: 16px; text-align: center; }
.product-cat { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; min-height: 18px; }
.product-name { font-size: 15px; font-weight: 700; line-height: 1.4; min-height: 42px; margin: 8px 0; }
.product-name a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: #111; font-weight: 900; font-size: 18px; }
.btn-orange { background: var(--orange); color: #fff; font-weight: 700; padding: 12px 28px; border-radius: 4px; border: 0; text-transform: uppercase; }
.btn-orange:hover { background: var(--orange-dark); color: #fff; }

/* Categories */
.cat-tile { border: 1px solid #eee; text-align: center; padding: 22px 10px; background: #fff; height: 100%; }
.cat-tile h5 { font-weight: 800; font-size: 14px; text-transform: uppercase; margin: 10px 0 4px; }
.cat-tile span { color: var(--muted); font-size: 13px; }
.cat-pill { border: 1px solid #ddd; background: #fff; padding: 8px 16px; border-radius: 30px; font-size: 14px; font-weight: 600; margin: 3px; }
.cat-pill.active, .cat-pill:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* News */
.post-card { border: 1px solid #eee; height: 100%; background: #fff; position: relative; }
.post-card img { height: 200px; width: 100%; object-fit: cover; }
.post-card .body { padding: 18px; }
.date-badge { position: absolute; top: 12px; left: 12px; background: #fff; border: 1px solid #eee; text-align: center; padding: 6px 10px; line-height: 1.1; z-index: 2; }
.date-badge b { display: block; font-size: 20px; }
.date-badge span { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.post-card h3 { font-size: 16px; font-weight: 700; line-height: 1.5; }
.news-heading { display: flex; align-items: center; gap: 16px; justify-content: center; }
.news-heading:before, .news-heading:after { content: ""; height: 1px; background: #ddd; flex: 1; max-width: 220px; }

/* Footer */
.site-footer { background: var(--footer); color: #ddd; padding: 56px 0 0; font-size: 14px; }
.site-footer h5 { color: #fff; font-weight: 800; text-transform: uppercase; font-size: 15px; margin-bottom: 16px; }
.site-footer a { color: #ddd; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { padding: 5px 0; }
.tag-pill { display: inline-block; border: 1px solid rgba(255,255,255,.35); color: #ddd; font-size: 12px; padding: 4px 9px; margin: 0 4px 6px 0; }
.tag-pill:hover { color: #fff; border-color: #fff; }
.footer-bottom { background: #3d3d3d; margin-top: 44px; padding: 16px 0; font-size: 13px; color: #bbb; }
.footer-bottom a { color: #ddd; }

/* Back to top */
.back-top { position: fixed; right: 18px; bottom: 18px; z-index: 2000; width: 48px; height: 48px; border-radius: 50%; background: #fff; border: 1px solid #ccc; color: #333; font-size: 20px; display: none; align-items: center; justify-content: center; }
.back-top.show { display: flex; }

/* Product detail */
.thumb-main { border: 1px solid #eee; }
.thumb-main img { width: 100%; height: 480px; object-fit: cover; }
.thumb-mini { width: 90px; height: 90px; object-fit: cover; border: 2px solid #eee; cursor: pointer; }
.thumb-mini.active { border-color: var(--orange); }
.spec-table td { padding: 10px 12px; border: 1px solid #eee; font-size: 14px; }
.spec-table td:first-child { font-weight: 700; background: #fafafa; width: 180px; }

@media(max-width: 768px) {
  .orange-strip .col-md-4 + .col-md-4 { border-left: 0; border-top: 1px solid rgba(255,255,255,.5); }
  .product-thumb img { height: 220px; }
  .thumb-main img { height: 320px; }
  .logo-img { height: 52px; }
}
/* Khung chứa ảnh cố định tỉ lệ */
.ratio-box {
  width: 100%;
  aspect-ratio: 16 / 9; /* Bạn có thể đổi thành 4/3, 1/1 tùy ý */
  position: relative;
  overflow: hidden;
}

/* Ép ảnh bên trong phủ kín khung và tự động cắt (crop) */
.ratio-box img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Lệnh cắt ảnh không méo */
  object-position: center; /* Căn giữa ảnh khi cắt */
  margin: 0 !important; /* Ghi đè margin-top: 10px ở global */
  border-radius: 0 !important; /* Ghi đè border-radius ở global */
}

/* Khung cố định cho ảnh sản phẩm */
.product-img-wrapper {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1; /* Tỉ lệ ảnh vuông (bạn có thể đổi thành 4/3 hoặc 16/9 tùy ý) */
  overflow: hidden;
  background-color: #f8f9fa; /* Màu nền nhẹ cho khung ảnh */
}

/* Đảm bảo ảnh phủ kín khung và cắt bớt phần thừa */
.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Hiệu ứng hover để xổ menu xuống */
@media (min-width: 768px) {
  .navbar-nav .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0; /* Xóa khoảng cách để chuột không bị mất hover */
  }
}

/* Style cho các thẻ trong dropdown menu (tùy chọn) */
.dropdown-menu {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: none;
}
.dropdown-item:hover {
  background-color: var(--brand-primary, #f58220);
  color: #fff;
}