/* ==============================
   ADCARE Việt Nam - Main CSS
   ============================== */


:root {
  --navy:        #2e5c10;   /* xanh đậm (nền navbar, footer, header) */
  --navy-dark:   #1e3d0a;   /* xanh rất đậm */
  --navy-light:  #3d7a18;   /* xanh vừa */
  --accent:      #7db833;   /* xanh chuối chủ đạo */
  --accent-hover:#659a28;   /* xanh chuối đậm hơn (hover) */
  --blue:        #5a9020;   /* xanh lá liên kết */
  --blue-light:  #72b028;   /* xanh lá nhạt */
  --text:        #2d2d2d;
  --text-muted:  #666666;
  --light:       #f2f8ed;   /* nền section xanh nhạt */
  --white:       #ffffff;
  --border:      #ddeecf;   /* viền xanh nhạt */
  --shadow:      0 4px 20px rgba(46,92,16,0.10);
  --shadow-hover:0 8px 30px rgba(46,92,16,0.18);
  --radius:      8px;
  --radius-lg:   12px;
  --transition:  all 0.3s ease;
}

* { box-sizing: border-box; }

body {
  font-family: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: var(--transition);
}
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; }

/* ---- Buttons ---- */
.btn-primary-custom {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
  padding: 10px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  transition: var(--transition);
  display: inline-block;
}
.btn-primary-custom:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline-custom {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  padding: 10px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  display: inline-block;
}
.btn-outline-custom:hover {
  background: var(--white);
  color: var(--navy);
}

/* ---- Section titles ---- */
.section-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent);
  margin-top: 10px;
}
.section-title.text-center::after { margin: 10px auto 0; }

.section-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
}

/* ---- Cards ---- */
.card-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
}
.card-item:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.card-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: var(--transition);
}
.card-item:hover img { transform: scale(1.05); }
.card-item .card-img-wrap { overflow: hidden; }
.card-item .card-img-ph {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  color: var(--accent);
  font-size: 42px;
}
.card-item .card-body { padding: 20px; }
.card-item .card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.4;
}
.card-item .card-text {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-item .card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.card-item .card-link:hover { color: var(--navy); }

/* ---- Breadcrumb ---- */
.breadcrumb-wrap {
  background: var(--light);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }
.breadcrumb-item a { color: var(--blue); }
.breadcrumb-item.active { color: var(--text-muted); }

/* ---- Pagination ---- */
.pagination .page-link {
  color: var(--navy);
  border-color: var(--border);
  padding: 8px 14px;
}
.pagination .page-item.active .page-link {
  background: var(--navy);
  border-color: var(--navy);
}
.pagination .page-link:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ---- Utility ---- */
.bg-navy { background-color: var(--navy) !important; }
.bg-navy-dark { background-color: var(--navy-dark) !important; }
.text-navy { color: var(--navy) !important; }
.text-accent { color: var(--accent) !important; }

/* ---- About content preview (trang chủ) ---- */
.about-content-preview {
  position: relative;
  max-height: 360px;
  overflow: hidden;
}
.about-content-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #fff);
  pointer-events: none;
}
.about-content-inner h1,
.about-content-inner h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.5;
}
.about-content-inner h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
.about-content-inner p {
  font-size: 14.5px;
  line-height: 1.85;
  margin-bottom: 10px;
}
.about-content-inner strong { color: var(--navy-dark); }

/* ---- About accordion (trang chi tiết) ---- */
.about-prose-intro {
  color: var(--text-muted);
  line-height: 1.9;
  font-size: 15px;
  max-width: 800px;
  margin: 0 auto 2rem;
}
.about-accordion { border: none; max-width: 860px; margin: 0 auto; }
.about-accordion-item {
  border: none !important;
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.08);
}
.about-acc-btn {
  background: var(--navy) !important;
  color: #fff !important;
  font-weight: 600;
  font-size: 15px;
  padding: 16px 20px;
}
.about-acc-btn::after { filter: brightness(10); }
.about-acc-btn:not(.collapsed) {
  background: var(--navy-dark) !important;
  color: #fff !important;
  box-shadow: none;
}
.about-acc-btn:focus { box-shadow: none; }
.about-acc-body {
  color: var(--text-muted);
  line-height: 1.9;
  font-size: 15px;
  padding: 20px 24px;
}
.about-acc-body h3 {
  color: var(--navy);
  font-size: 15px;
  font-weight: 600;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}
.about-acc-body ul, .about-acc-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}
.about-acc-body ul li, .about-acc-body ol li { margin-bottom: 5px; }
.about-acc-body p { margin-bottom: 0.9rem; }
.about-acc-body strong { color: var(--text); font-weight: 600; }
.about-acc-body img, .about-prose img {
  float: none !important;
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: var(--radius);
}

/* ---- About detail prose ---- */
.about-prose {
  max-width: 860px;
  margin: 0 auto;
  color: var(--text-muted);
  line-height: 1.9;
  font-size: 15px;
}
.about-prose h2 {
  color: var(--navy);
  font-size: 20px;
  font-weight: 700;
  border-left: 4px solid var(--accent);
  padding-left: 14px;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.about-prose h3 {
  color: var(--navy);
  font-size: 16px;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}
.about-prose p {
  margin-bottom: 1rem;
}
.about-prose ul,
.about-prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}
.about-prose ul li,
.about-prose ol li {
  margin-bottom: 6px;
}
.about-prose strong {
  color: var(--text);
  font-weight: 600;
}
.about-prose a {
  color: var(--accent);
  text-decoration: underline;
}

/* ---- About features ---- */
.about-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--light);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  transition: var(--transition);
}
.about-feature-item:hover {
  background: #e6f4d7;
  transform: translateX(4px);
}
.about-feature-icon {
  flex-shrink: 0;
  font-size: 18px;
  color: var(--accent);
}
.about-feature-text {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.5;
}

/* ---- Dropdown: Lưới 2 cột ---- */
.dropdown-menu.dropdown-grid {
  display: none;
  min-width: 360px;
  padding: 12px;
  gap: 6px;
  background: var(--navy);
}
.dropdown-menu.dropdown-grid.show {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.dropdown-grid-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--white);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.2s;
}
.dropdown-grid-item:hover {
  background: rgba(255,255,255,0.12);
  color: var(--accent);
}
.dropdown-grid-item i {
  font-size: 16px;
  color: var(--accent);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* ---- Dropdown: Mega menu ---- */
.dropdown-menu.dropdown-mega {
  display: none;
  min-width: 480px;
  padding: 16px;
  gap: 8px;
  background: var(--navy);
}
.dropdown-menu.dropdown-mega.show {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.dropdown-mega-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  color: var(--white);
  text-decoration: none;
  transition: background 0.2s;
}
.dropdown-mega-item:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}
.dropdown-mega-item i {
  font-size: 20px;
  color: var(--accent);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.dropdown-mega-item strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}
.dropdown-mega-item small {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-top: 3px;
  line-height: 1.4;
}

/* Service card — featured services on homepage */
.service-card-inner {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.08);
}
.service-card-inner:hover {
  background: rgba(255,255,255,0.1);
}

/* ==============================
   Product detail
   ============================== */
.product-detail { padding-top: 36px; }

/* --- Gallery (cột ảnh) --- */
.product-gallery { position: sticky; top: 90px; }
.product-gallery__main {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.product-gallery__thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.product-gallery__thumb {
  width: 76px;
  height: 58px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.product-gallery__thumb:hover { border-color: var(--accent); }
.product-gallery__thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(125,184,51,0.22);
}

/* --- Info (cột thông tin) --- */
.product-info__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.product-badge {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 4px 13px;
  border-radius: 20px;
}
.product-badge--brand { background: var(--navy); color: #fff; }
.product-badge--model {
  background: var(--light);
  color: var(--navy);
  border: 1px solid var(--border);
}
.product-info__title {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 14px;
}
.product-info__lead {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.85;
  margin-bottom: 24px;
}
.product-info__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-phone {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--navy);
  color: var(--navy);
  padding: 8px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}
.btn-phone:hover { background: var(--navy); color: #fff; }

/* --- Content blocks (mô tả / thông số) --- */
.product-block { margin-top: 30px; }
.product-block__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  margin-bottom: 14px;
}
.product-block__body {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.9;
}
.product-block__body p:last-child { margin-bottom: 0; }
.product-specs {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.9;
  white-space: pre-line;
}

/* --- Sản phẩm liên quan --- */
.product-related {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

/* ==============================
   Sidebar cây danh mục (thu/sổ)
   ============================== */
.cat-tree,
.cat-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cat-tree__children { padding-left: 14px; display: none; }
.cat-tree__item.is-open > .cat-tree__children { display: block; }

.cat-tree__row {
  display: flex;
  align-items: stretch;
  border-left: 3px solid transparent;
  transition: background 0.2s;
}
.cat-tree__row:hover { background: var(--light); }
.cat-tree__item > .cat-tree__row:has(.is-active) { border-left-color: var(--accent); }

.cat-tree__link {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 10px 17px;
  font-size: 13.5px;
  color: var(--text);
  min-width: 0;
}
.cat-tree__link.is-active { color: var(--accent); font-weight: 600; }
.cat-tree__icon { color: var(--navy-light); width: 16px; text-align: center; flex-shrink: 0; }
.cat-tree__name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-tree__count { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }

.cat-tree__toggle {
  flex-shrink: 0;
  width: 38px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  transition: color 0.2s;
}
.cat-tree__toggle:hover { color: var(--accent); }
.cat-tree__toggle i { transition: transform 0.25s ease; }
.cat-tree__item.is-open > .cat-tree__row .cat-tree__toggle i { transform: rotate(180deg); }
