/*
Theme Name:   CarDiagTech (Flatsome Child)
Theme URI:    https://cardiagtech.com
Description:  Child theme Flatsome cho CarDiagTech – thiết kế v1 đã chốt 28/10/2026.
Author:       CarDiagTech
Template:     flatsome
Version:      1.0.0
Text Domain:  cardiagtech
*/

/* ==========================================================================
   1. DESIGN TOKENS (khớp bản thiết kế v1)
   ========================================================================== */
:root {
  --cdt-red: #D90A0A;
  --cdt-red-soft: #FF6B6B;      /* chữ đỏ trên nền đen */
  --cdt-red-tint: #FFF1F1;
  --cdt-black: #111111;
  --cdt-ink: #141414;           /* nền khối tối, nav bar */
  --cdt-text: #222222;
  --cdt-muted: #555555;
  --cdt-muted-2: #666666;
  --cdt-line: #EEEEEE;
  --cdt-bg-soft: #F4F4F4;
  --cdt-star: #E8A317;
  --cdt-green: #1E9E50;
  --cdt-font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --cdt-font-body: "Lato", Arial, sans-serif;
  --cdt-container: 1230px;
}

body { font-family: var(--cdt-font-body); color: var(--cdt-text); }
a { color: var(--cdt-black); }
a:hover { color: var(--cdt-red); }

/* Tiêu đề kiểu logo: Barlow Condensed nghiêng đậm, in hoa */
.cdt-heading,
.section-title-container .section-title,
.shop-page-title h1,
.page-title h1,
.product_title.entry-title {
  font-family: var(--cdt-font-head) !important;
  font-style: italic;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0;
}
.cdt-accent { color: var(--cdt-red); }
.dark .cdt-accent, .cdt-dark .cdt-accent { color: var(--cdt-red-soft); }

/* ==========================================================================
   2. HEADER (Flatsome Header Builder)
   ========================================================================== */
.header-top { background: var(--cdt-black) !important; font-size: 13px; }
.header-top .nav > li > a,
.header-top .html { color: #dddddd; text-transform: none; font-weight: 400; letter-spacing: 0; }
.header-top strong { color: #fff; }

.header-main .searchform-wrapper .searchform {
  border: 2px solid var(--cdt-red);
  border-radius: 4px;
  overflow: hidden;
}
.header-main .searchform .search-field { height: 44px; border: 0; box-shadow: none; font-size: 15px; }
.header-main .searchform .search_categories {
  height: 44px; border: 0; background: var(--cdt-bg-soft); font-weight: 700; font-size: 14px;
}
.header-main .searchform .ux-search-submit { background: var(--cdt-red) !important; width: 56px; height: 44px; border-radius: 0; }

.header-bottom { background: var(--cdt-ink) !important; }
.header-bottom .header-nav-main > li > a {
  color: #e6e6e6;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .04em;
  padding: 16px 15px 13px;
  border-bottom: 3px solid transparent;
}
.header-bottom .header-nav-main > li.active > a,
.header-bottom .header-nav-main > li.current-menu-item > a,
.header-bottom .header-nav-main > li > a:hover {
  color: #fff;
  border-bottom-color: var(--cdt-red);
}
.header-bottom .button.primary { font-size: 13px; font-weight: 900; letter-spacing: .05em; }

.cdt-hotline { display: flex; align-items: center; gap: 10px; color: var(--cdt-black); }
.cdt-hotline svg { flex: 0 0 auto; }
.cdt-hotline small { display: block; font-size: 12px; color: var(--cdt-muted-2); line-height: 1.2; }
.cdt-hotline strong { display: block; font-size: 15px; line-height: 1.2; }

.cart-icon strong { border-color: var(--cdt-red); color: var(--cdt-red); }
.header-cart-link .cart-icon strong:after { border-color: var(--cdt-red); }

/* ==========================================================================
   3. BUTTONS & BADGES
   ========================================================================== */
.button, button, input[type="submit"] { font-weight: 900; letter-spacing: .05em; border-radius: 3px; }
.button.primary:not(.is-outline), .button.alt { background-color: var(--cdt-red); }
.button.secondary:not(.is-outline) { background-color: var(--cdt-black); }

.badge-container .badge-inner.on-sale,
.badge-container .badge-inner.cdt-new {
  font-family: var(--cdt-font-body);
  font-weight: 900;
  font-size: 12px;
  border-radius: 999px;
  padding: 6px 11px;
  height: auto;
  min-width: 0;
}
.badge-container .badge-inner.on-sale { background: var(--cdt-red); }
.badge-container .badge-inner.cdt-new { background: var(--cdt-black); color: #fff; }

/* ==========================================================================
   4. PRODUCT CARD (product-small)
   ========================================================================== */
.product-small.box {
  border: 1px solid var(--cdt-line);
  background: #fff;
  transition: box-shadow .2s, transform .2s;
}
.product-small.box:hover { box-shadow: 0 10px 28px rgba(0,0,0,.12); transform: translateY(-3px); }
.product-small .box-image { background: var(--cdt-bg-soft); }
.product-small .box-text { padding: 14px 16px 18px; text-align: left; }
.product-small .category {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--cdt-muted-2); opacity: 1;
}
.product-small .product-title a { font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--cdt-black); }
.product-small .star-rating span:before, .star-rating span:before { color: var(--cdt-star); }
.product-small .price, .product-small .price .amount { color: var(--cdt-red); font-weight: 900; font-size: 17px; }
.product-small .price del .amount { color: #888; font-weight: 400; font-size: 14px; }

/* Shop list view (nút chuyển grid/list – xem assets/js/cdt.js) */
.cdt-view-toggle { display: inline-flex; gap: 6px; margin-left: 10px; vertical-align: middle; }
.cdt-view-toggle button {
  width: 44px; height: 44px; margin: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--cdt-muted); border: 1px solid #ddd; border-radius: 0;
}
.cdt-view-toggle button[aria-pressed="true"] { background: var(--cdt-black); color: #fff; border-color: var(--cdt-black); }

.products.cdt-list-view > .col { flex-basis: 100% !important; max-width: 100% !important; }
.products.cdt-list-view .product-small.box { display: flex; flex-wrap: wrap; }
.products.cdt-list-view .product-small .box-image { flex: 0 0 220px; max-width: 100%; }
.products.cdt-list-view .product-small .box-text { flex: 1 1 300px; }
.products .cdt-excerpt { display: none; font-size: 14px; color: var(--cdt-muted); line-height: 1.6; margin: 6px 0 0; }
.products.cdt-list-view .cdt-excerpt { display: block; }

/* ==========================================================================
   5. SECTION TITLES, TABS, WIDGETS
   ========================================================================== */
.section-title-normal { border-bottom: 2px solid var(--cdt-line); }
.section-title-normal span { border-bottom: 3px solid var(--cdt-red); margin-bottom: -2px; padding-bottom: 10px; }
.section-title b { background: var(--cdt-line); height: 2px; opacity: 1; }

.nav-line > li > a, .tabbed-content .nav > li > a {
  font-weight: 900; font-size: 14px; letter-spacing: .04em; color: var(--cdt-muted);
}
.nav-line > li.active > a, .nav-line > li > a:hover { color: var(--cdt-red); }
.nav-line > li > a:before { background-color: var(--cdt-red); height: 3px; }

.widget-title, span.widget-title {
  font-family: var(--cdt-font-body); font-size: 15px; font-weight: 900; letter-spacing: .06em;
  display: block; border-bottom: 2px solid var(--cdt-line); padding-bottom: 10px; margin-bottom: 14px;
}
.is-divider { display: none; }
.widget_product_categories li.current-cat > a,
.widget_product_categories li.current-cat > a:hover { color: var(--cdt-red); font-weight: 900; }
.price_slider_wrapper .ui-slider .ui-slider-range { background: var(--cdt-red); }
.price_slider_wrapper .ui-slider .ui-slider-handle { background: #fff; border: 3px solid var(--cdt-red); }

/* Page title bar tối (Shop / Category / Blog) */
.shop-page-title.featured-title .title-bg,
.page-title.featured-title .title-bg { background-color: var(--cdt-ink) !important; }
.shop-page-title .breadcrumbs, .shop-page-title .breadcrumbs a { color: #bbbbbb; text-transform: none; font-weight: 400; font-size: 13px; }

/* Pagination tròn */
.page-numbers.button.current, .page-number.current { background: var(--cdt-red); border-color: var(--cdt-red); color: #fff; }
ul.page-numbers li > span, ul.page-numbers li > a { border: 2px solid #ddd; width: 44px; height: 44px; line-height: 40px; font-weight: 900; }

/* ==========================================================================
   6. HOMEPAGE COMPONENTS
   ========================================================================== */
/* Menu danh mục dọc bên trái slider */
.cdt-cat-menu { background: #fff; border: 1px solid #e6e6e6; height: 100%; }
.cdt-cat-menu__head {
  background: var(--cdt-red); color: #fff; padding: 14px 18px; display: flex; align-items: center; gap: 10px;
  font-family: var(--cdt-font-head); font-weight: 700; font-size: 18px; letter-spacing: .04em;
}
.cdt-cat-menu ul { list-style: none; margin: 0; padding: 0; }
.cdt-cat-menu li { margin: 0; }
.cdt-cat-menu li a {
  display: flex; justify-content: space-between; align-items: center; padding: 13px 18px;
  border-bottom: 1px solid #f0f0f0; font-size: 14px; font-weight: 700; color: var(--cdt-black);
}
.cdt-cat-menu li a:hover { color: var(--cdt-red); background: #fafafa; }

/* Slide hero: nền đen + mảng đỏ chéo bên phải */
.cdt-hero-slide { position: relative; overflow: hidden; }
.cdt-hero-slide .bg { background-color: var(--cdt-ink); }
.cdt-hero-slide:after {
  content: ""; position: absolute; top: 0; right: -60px; bottom: 0; width: 38%;
  background: var(--cdt-red); clip-path: polygon(40% 0, 100% 0, 100% 100%, 10% 100%);
  z-index: 0; pointer-events: none;
}
.cdt-hero-slide .text-box, .cdt-hero-slide .banner-layers { z-index: 2; }
.cdt-eyebrow { font-size: 13px; font-weight: 900; letter-spacing: .14em; color: var(--cdt-red); text-transform: uppercase; }
.dark .cdt-eyebrow, .cdt-dark .cdt-eyebrow { color: var(--cdt-red-soft); }
.cdt-hero-slide h1, .cdt-hero-slide h2 {
  font-family: var(--cdt-font-head); font-style: italic; font-weight: 800; text-transform: uppercase; line-height: 1.02;
}
.flickity-page-dots .dot.is-selected { background: var(--cdt-red); border-color: var(--cdt-red); }

/* Dải cam kết */
.cdt-features .icon-box-text h5, .cdt-features .icon-box-text h3 { font-weight: 900; font-size: 15px; margin-bottom: 0; }
.cdt-features .icon-box-text p { font-size: 13px; color: var(--cdt-muted-2); margin: 0; }

/* Ô danh mục */
.cdt-cat-tiles .product-category .box {
  border: 1px solid var(--cdt-line); padding: 26px 14px; transition: box-shadow .2s, transform .2s;
}
.cdt-cat-tiles .product-category .box:hover { box-shadow: 0 10px 28px rgba(0,0,0,.12); transform: translateY(-3px); }
.cdt-cat-tiles .box-image { border-radius: 50%; overflow: hidden; background: var(--cdt-bg-soft); max-width: 88px; margin: 0 auto; }
.cdt-cat-tiles h5, .cdt-cat-tiles .header-title { font-weight: 900; font-size: 15px; text-transform: none; letter-spacing: 0; }

/* Banner 2 khối */
.cdt-promo { min-height: 220px; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 40px; color: #fff; }
.cdt-promo--red { background: var(--cdt-red); }
.cdt-promo--dark { background: var(--cdt-ink); }
.cdt-promo__title { font-family: var(--cdt-font-head); font-style: italic; font-weight: 800; font-size: 40px; line-height: 1; text-transform: uppercase; color: #fff; margin: 0; }
.cdt-promo a { color: #fff; font-weight: 900; text-decoration: underline; }

/* Dịch vụ */
.cdt-services .featured-box { background: #fff; padding: 30px; height: 100%; transition: box-shadow .2s, transform .2s; }
.cdt-services .featured-box:hover { box-shadow: 0 10px 28px rgba(0,0,0,.12); transform: translateY(-3px); }
.cdt-services .icon-box-img .icon-inner { background: var(--cdt-red); border-radius: 4px; }

/* Quy trình 4 bước */
.cdt-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.cdt-steps li { margin: 0; border-top: 4px solid var(--cdt-red); background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.06); padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.cdt-steps__n { font-family: var(--cdt-font-head); font-style: italic; font-weight: 800; font-size: 44px; line-height: 1; color: var(--cdt-red); }
.cdt-steps__t { font-weight: 900; font-size: 17px; }
.cdt-steps__d { font-size: 14px; color: var(--cdt-muted); line-height: 1.6; }

/* Lưới hãng xe */
.cdt-brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.cdt-brands a { border: 1px solid #3a3a3a; color: #fff; padding: 20px 10px; text-align: center; font-weight: 900; font-size: 14px; letter-spacing: .06em; }
.cdt-brands a:hover { border-color: var(--cdt-red); color: #fff; background: rgba(217,10,10,.15); }

/* Blog cards */
.box-blog-post { border: 1px solid var(--cdt-line); }
.box-blog-post .box-text { padding: 20px; text-align: left; }
.box-blog-post .post-title { font-weight: 900; font-size: 17px; line-height: 1.35; }
.badge.post-date .badge-inner { background: #fff; color: var(--cdt-black); border: 0; font-weight: 900; }

/* ==========================================================================
   7. SINGLE PRODUCT
   ========================================================================== */
.product-info .price-wrapper .price, .product-info .price .amount { color: var(--cdt-red); font-weight: 900; font-size: 32px; }
.product-info .price del .amount { color: #888; font-size: 18px; font-weight: 400; }
.product-short-description ul { list-style: none; margin-left: 0; }
.product-short-description li { position: relative; padding-left: 24px; }
.product-short-description li:before { content: "✓"; position: absolute; left: 0; color: var(--cdt-red); font-weight: 900; }

.cdt-buy-now.button { background: var(--cdt-black); color: #fff; margin-left: 8px; }
.cdt-whatsapp-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; margin: 12px 0;
  border: 2px solid var(--cdt-green); color: #157A3C; font-weight: 900; font-size: 14px; letter-spacing: .04em;
}
.cdt-whatsapp-btn:hover { background: var(--cdt-green); color: #fff; }
.cdt-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; background: var(--cdt-bg-soft); padding: 16px; font-size: 13px; font-weight: 700; margin-bottom: 16px; }
.cdt-trust span { border-left: 3px solid var(--cdt-red); padding-left: 10px; }

.variations .ux-swatch.selected { border-color: var(--cdt-red); background: var(--cdt-red-tint); }
.related.related-products-wrapper { background: var(--cdt-bg-soft); padding: 48px 0 32px; }

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.cdt-newsletter { background: var(--cdt-red); color: #fff; }
.cdt-newsletter__inner { max-width: var(--cdt-container); margin: 0 auto; padding: 28px 15px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.cdt-newsletter__title { font-family: var(--cdt-font-head); font-style: italic; font-weight: 800; font-size: 28px; text-transform: uppercase; display: block; }
.cdt-newsletter form { flex: 1 1 360px; max-width: 520px; display: flex; background: #fff; border-radius: 4px; overflow: hidden; margin: 0; }
.cdt-newsletter input[type="email"] { flex: 1; min-width: 0; border: 0; height: 50px; margin: 0; box-shadow: none; }
.cdt-newsletter button { margin: 0; height: 50px; background: var(--cdt-black); color: #fff; padding: 0 24px; border-radius: 0; }

.footer-wrapper .footer-widgets { background: var(--cdt-bg-soft) !important; }
.footer-widgets .widget-title { border-bottom: 2px solid var(--cdt-red); display: inline-block; }
.footer-widgets a { color: #444; }
.absolute-footer { background: var(--cdt-black) !important; color: #bbbbbb; font-size: 13px; }
.cdt-pay { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.cdt-pay span { border: 1px solid #444; color: #eee; padding: 5px 10px; font-weight: 900; border-radius: 3px; }

/* ==========================================================================
   9. ACCESSIBILITY & RESPONSIVE
   ========================================================================== */
.button.cdt-center { display: table; margin: 32px auto 0; }
.cdt-sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 849px) {
  .cdt-hero-slide:after { width: 25%; opacity: .9; }
  .cdt-promo__title { font-size: 32px; }
  .cdt-cat-menu { display: none; } /* mobile dùng menu off-canvas của Flatsome */
}
