/* ============================================================
   Custom CSS — Bao Bì Phú Thịnh
   (nạp SAU style.css để override; tách khỏi PHP)
   ============================================================ */

/* Custom CSS từ site gốc */
:root { --primary-color: #f4ba0b; }
/* Container ngoài: max-width 1200, căn giữa */
.container-width, .container { max-width: 1200px }
.row.container { margin-left: auto !important; margin-right: auto !important; }
/* Row CON (lưới sản phẩm, không phải .container): BỎ max-width của Flatsome (1080)
   để lấp đầy container, tránh hẹp + dồn trái */
.row:not(.container) { max-width: none !important; }
.header-main { height: 144px }
#logo img { max-height: 144px }
#logo { width: 208px; }
.header-bottom { min-height: 44px; background-color: #f3ba0b; }
.header-bg-color { background-color: rgba(255,255,255,0.9) }
.nav > li > a { line-height: 16px }
.header:not(.transparent) .header-bottom-nav.nav > li > a { color: #ffffff; }
.header:not(.transparent) .header-bottom-nav.nav > li > a:hover,
.header:not(.transparent) .header-bottom-nav.nav > li.active > a,
.header:not(.transparent) .header-bottom-nav.nav > li.current > a { color: #dd3333; }
.absolute-footer, html { background-color: #121728 }
body { font-family: "Roboto", sans-serif; font-size: 100%; color: #000000; }
h1,h2,h3,h4,h5,h6 { font-family: "Roboto", sans-serif; font-weight: 700; color: #000000; }

/* Custom sections */
.tde_gt { font-style: italic; font-size: 1.1em; color: #666; margin-bottom: 0; }
.ten_gt { font-size: 1.8em; font-weight: 700; color: #f4ba0b; text-transform: uppercase; margin-bottom: 1em; }
.tde_sp { font-size: 1.5em; font-weight: 700; color: #fff; text-transform: uppercase; text-align: center; margin-bottom: 1em; }
.tieude_giua { font-size: 1.5em; font-weight: 700; text-transform: uppercase; text-align: center; margin-bottom: 1em; }
.tieude2, .tieude22 { font-size: 1.2em; font-weight: 700; text-transform: uppercase; margin-bottom: 1em; border-bottom: 2px solid #f4ba0b; padding-bottom: 0.5em; }
.ten_cty { font-size: 1.4em; font-weight: 700; text-transform: uppercase; color: #f4ba0b; line-height: 1.15; text-align: left; padding-left: 40px; }
.slogan_cty { font-size: 0.88em; color: #666; margin-top: 3px; font-style: italic; text-align: left; padding-left: 40px; }
/* Khối tên công ty: full-width, hotline giữ vị trí tự nhiên trong cột phải, canh giữa dọc */
.header-block { width: 100%; }
.row-ten-cty { margin-top: 0 !important; width: 100%; align-items: center; }
.p-hotline { font-size: 1.2em; font-weight: 700; color: #f4ba0b; margin: 0; letter-spacing: .5px; }
.p-tren { font-size: 0.8em; color: #666; margin: 0; }
.lien-he-price { color: #f4ba0b; font-weight: 700; }
.copy_r ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 15px; justify-content: flex-end; }
.copy_r ul li { margin: 0; display: flex; align-items: center; gap: 5px; }
.div-no-padding { padding-left: 0 !important; padding-right: 0 !important; }
.row-ten-cty { margin-top: 5px; }

/* Top bar full-width (giống dải menu) — nền xanh đậm, chữ trắng, căn phải.
   z-index để nổi TRÊN lớp phủ trắng .header-bg-color của Flatsome */
.site-topbar { position: relative; z-index: 3; width: 100%; background: #1b5e20; font-size: 13px; color: #ffffff; }
.site-topbar .container {
  max-width: 1200px; margin: 0 auto; padding: 8px 15px;
  display: flex; align-items: center; justify-content: flex-end; gap: 28px;
}
.site-topbar .tb-left, .site-topbar .tb-right { color: #ffffff; }
.site-topbar .tb-right i, .site-topbar .tb-left i { color: #ffffff; }
@media (max-width: 549px) { .site-topbar .container { font-size: 12px; padding: 6px 12px; gap: 14px; } }

/* Product tabs (trang chủ) */
.sp-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; margin-bottom: 1.5em; }
.sp-tabs a { padding: 8px 20px; background: #f0f0f0; color: #333; font-weight: 700; text-transform: uppercase; font-size: 0.85em; cursor: pointer; border-radius: 4px; }
.sp-tabs a.active, .sp-tabs a:hover { background: #1a1a2e; color: #fff; }

/* Page title band (trang con) */
.page-title-band { background: #1a1a2e; padding: 30px 20px; text-align: center; }
.page-title-band h1 { color: #f4ba0b; font-size: 1.8em; margin: 0 0 5px; text-transform: uppercase; }
.page-title-band .breadcrumbs { color: #ccc; font-size: 0.9em; }
.page-title-band .breadcrumbs a { color: #fff; }

/* Shop sidebar danh mục (sp.php) */
.product-categories a.current { color: #f4ba0b; font-weight: 700; }
.shop-filter-close { display: none; }
/* Mobile: sidebar lọc thành off-canvas (mở bằng nút "Lọc") */
@media (max-width: 849px) {
  #shop-filter {
    position: fixed; top: 0; left: 0; width: 280px; max-width: 85%; height: 100%;
    background: #fff; z-index: 1001; transform: translateX(-100%);
    transition: transform .3s ease; overflow-y: auto;
    box-shadow: 2px 0 14px rgba(0,0,0,.25); padding: 18px !important; margin: 0 !important;
  }
  #shop-filter.open { transform: translateX(0); }
  #shop-filter .shop-filter-close {
    display: inline-block; float: right; font-size: 24px; line-height: 1;
    color: #999; text-decoration: none; font-weight: 400;
  }
  .product-categories .cat-item a { display: block; padding: 10px 4px; border-bottom: 1px solid #eee; }
}

/* Chi tiết sản phẩm */
.spec-table { width: 100%; border-collapse: collapse; margin-top: 1em; }
.spec-table th, .spec-table td { border: 1px solid #ddd; padding: 10px 15px; text-align: left; }
.spec-table th { background: #f7f7f7; width: 35%; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; }
/* Thumbnail: khung cố định 70px + object-fit → ảnh cỡ nào cũng đồng nhất */
.gallery-thumbs > div { flex: 1; height: 70px; position: relative; overflow: hidden; border-radius: 6px; background: #f0f0f0; }
.gallery-thumbs > div > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumbs > div > i { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: #ccc; }

/* Trang liên hệ */
.contact-info-list { list-style: none; padding: 0; }
.contact-info-list li { margin-bottom: 12px; display: flex; align-items: flex-start; gap: 10px; }
.contact-info-list li i { color: #f4ba0b; font-size: 1.2em; margin-top: 3px; width: 20px; text-align: center; }
.cta-block .button { display: block; text-align: center; margin-bottom: 12px; border-radius: 6px; }

/* ===== Hero slider trang chủ ===== */
.hero-slider { position: relative; overflow: hidden; width: 100%; }
.hero-slide {
  width: 100%; min-height: 400px; display: none; align-items: center; justify-content: center;
  text-align: center; padding: 60px 20px;
}
.hero-slide.active { display: flex; }
.hero-slider .hero-inner h1 { color: #f4ba0b; font-size: 2.5em; margin-bottom: .5em; }
.hero-slider .hero-inner p  { color: #fff; font-size: 1.2em; margin-bottom: 1.5em; }
.hero-dots { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; line-height: 0; }
.hero-dot {
  width: 12px !important; height: 12px !important; min-height: 0 !important;
  border-radius: 50% !important; border: 0 !important; margin: 0 4px !important;
  padding: 0 !important; line-height: 0 !important; box-sizing: border-box;
  display: inline-block; flex: 0 0 auto; appearance: none; -webkit-appearance: none;
  background: rgba(255,255,255,.6); cursor: pointer;
}
.hero-dot.active { background: #f4ba0b !important; }
/* Slide ẢNH banner — tỉ lệ CỐ ĐỊNH + object-fit:cover → mọi ảnh (kích thước khác nhau)
   hiển thị đồng nhất, slider không nhảy. Tỉ lệ ~1600:500 (padding-top 31.25%). */
.hero-slide--img { display: none; padding: 0 !important; min-height: 0 !important; }
.hero-slide--img.active {
  display: block !important; position: relative; width: 100%;
  padding-top: 31.25% !important; overflow: hidden;
}
.hero-slide--img.active > a { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: block; }
.hero-slide--img.active img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
@media (max-width: 549px) { .hero-slide--img.active { padding-top: 46% !important; } }

/* ===== Logo + header gọn trên mobile/tablet ===== */
@media (max-width: 849px) {
  .header-main { height: auto !important; }
  #logo { width: auto !important; }
  #logo img { max-height: 56px !important; width: auto; }
  #logo a { padding: 6px 0; display: inline-block; }
  .ten_cty, .slogan_cty { padding-left: 0 !important; }
}

/* Chữ trong card căn giữa */
.product-small .box-text { text-align: center !important; }

/* Lưới cột chia ĐỀU (markup tĩnh không có width do Flatsome UX Builder sinh) → tránh dồn trái */
.row.large-columns-4 > .col { flex: 0 0 25% !important; max-width: 25% !important; }
.row.large-columns-3 > .col { flex: 0 0 33.3333% !important; max-width: 33.3333% !important; }
@media (min-width: 550px) and (max-width: 849px) {
  .row.medium-columns-3 > .col { flex: 0 0 33.3333% !important; max-width: 33.3333% !important; }
  .row.medium-columns-2 > .col { flex: 0 0 50% !important; max-width: 50% !important; }
}
@media (max-width: 549px) {
  .row.small-columns-2 > .col { flex: 0 0 50% !important; max-width: 50% !important; }
}

/* ===== Dropdown "Sản phẩm" — nền vàng chữ trắng (đúng mẫu).
   Nền tô lên <li> vì <ul> bị Flatsome co cao 0px → nền ul vô hình ===== */
.header-bottom-nav .has-dropdown { position: relative; }
.header-bottom-nav li.has-dropdown > ul.nav-dropdown {
  position: absolute !important; top: 100% !important; left: 0 !important; z-index: 100;
  display: block !important; min-width: 240px; margin: 0; padding: 0 !important;
  list-style: none; background: #f4ba0b !important; background-color: #f4ba0b !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.2); border: 0 !important;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.header-bottom-nav li.has-dropdown:hover > ul.nav-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.header-bottom-nav ul.nav-dropdown > li { margin: 0 !important; display: block; background: #f4ba0b !important; }
.header-bottom-nav ul.nav-dropdown > li > a {
  display: block; padding: 12px 20px !important; color: #fff !important;
  font-size: .85em; text-transform: none; white-space: nowrap; background: transparent;
  border-bottom: 1px solid rgba(0,0,0,.12) !important;
}
.header-bottom-nav ul.nav-dropdown > li:last-child > a { border-bottom: 0 !important; }
.header-bottom-nav ul.nav-dropdown > li > a:hover { background: rgba(0,0,0,.12) !important; color: #fff !important; }

/* ===== Menu mobile off-canvas (tự chủ) ===== */
#site-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 1000; opacity: 0; visibility: hidden; transition: opacity .3s ease;
}
#site-backdrop.open { opacity: 1; visibility: visible; }
#main-menu.mobile-sidebar {
  position: fixed; top: 0; left: 0; width: 270px; max-width: 82%;
  height: 100%; background: #fff; z-index: 1001; display: block;
  transform: translateX(-100%); transition: transform .3s ease;
  overflow-y: auto; box-shadow: 2px 0 14px rgba(0,0,0,.25);
}
#main-menu.mobile-sidebar.open { transform: translateX(0); }
#main-menu .sidebar-menu { padding: 15px 0; }
#main-menu .nav-sidebar { list-style: none; margin: 0; padding: 0; }
#main-menu .nav-sidebar > li > a {
  display: block; padding: 13px 22px; color: #333;
  border-bottom: 1px solid #eee; text-transform: uppercase; font-size: .9em;
}
#main-menu .nav-sidebar > li > a:hover { background: #f7f7f7; color: #dd3333; }

/* Zalo float button */
.zalo-float {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 999;
  width: 50px;
  height: 50px;
  background: #0068ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.zalo-float:hover { transform: scale(1.1); }
.zalo-float img { width: 32px; height: 32px; }

/* Phone float button */
.phone-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  width: 50px;
  height: 50px;
  background: #dd3333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  color: #fff;
  font-size: 20px;
  text-decoration: none;
}
