/*
Theme Name: BB Shop - Hàng Thái Lan
Theme URI: https://hangthaigiare.com
Description: Giao diện website bán hàng tiêu dùng Thái Lan cho BB Shop
Author: BB Shop
Template: astra
Version: 3.0.0
*/

/* ================= RESET ASTRA CONTAINER CONFLICTS ================= */
.home #content.site-content,
.home .site-content,
#content.site-content {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}

.home .ast-container,
.ast-container {
  display: block !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

.home #primary.content-area,
.home #primary,
#primary.content-area {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

.home .site-main,
.site-main {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

.site-header,
.site-footer:not(.th-site-footer) {
  display: none !important;
}

:root {
  /* Mau lay truc tiep tu logo BB Shop */
  --th-red: #a61d1d;          /* do chu dao */
  --th-red-dark: #871616;     /* do dam: hover, thanh danh muc */
  --th-red-bright: #c42b2b;   /* do sang: diem nhan tren nen do */
  --th-gold: #ebac1d;         /* vang logo */
  --th-gold-dark: #8a6008;    /* vang dam, du tuong phan voi chu trang (5.6:1) */
  --th-gold-darker: #6b4a06;
  --th-tint: #fdf3f3;         /* nen do rat nhat */
  --th-tint-gold: #fdf6e6;    /* nen vang rat nhat */

  --th-red-sale: #d92b2b;
  --th-dark: #1e293b;
  --th-gray-text: #64748b;
  --th-border: #e5e7eb;
  --th-bg: #f6f4f1;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  background-color: var(--th-bg) !important;
  color: #333333;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: border-box;
}

.th-layout-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

/* ================= 1. TOPMOST BAR ================= */
.th-top-banner-bar {
  background: #f8f9fa;
  border-bottom: 1px solid #eeeeee;
  font-size: 12px;
  color: #555555;
  padding: 6px 0;
}
.th-top-banner-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.th-brand-green {
  color: var(--th-red);
  font-weight: 800;
  text-transform: uppercase;
  margin-right: 5px;
}
.th-top-right-links {
  display: flex;
  gap: 12px;
}
.th-top-right-links a {
  color: #666666;
  text-decoration: none !important;
  transition: color 0.2s;
}
.th-top-right-links a:hover {
  color: var(--th-red);
}

/* ================= 2. THANH LOGO ================= */
.th-middle-header {
  background: #ffffff;
  padding: 10px 0;
}
.th-middle-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.th-logo-box {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}
.th-logo-circle {
  width: 52px;
  height: 52px;
  border: 2px solid var(--th-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--th-tint);
}
.th-logo-temple {
  font-size: 28px;
}
.th-logo-title-group {
  display: flex;
  flex-direction: column;
}
.th-logo-wordmark {
  font-size: 24px;
  font-weight: 900;
  color: var(--th-red);
  line-height: 1;
  letter-spacing: 1px;
}
.th-logo-sub {
  font-size: 11px;
  font-weight: 700;
  color: #666666;
  letter-spacing: 0.5px;
}

/* ================= 3. ORANGE NAVIGATION BAR ================= */
.th-nav-bar {
  background: var(--th-red);
  padding: 8px 0;
}
.th-nav-flex {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Category Button */
.th-cat-btn-main {
  background: var(--th-red-dark);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 240px;
  flex-shrink: 0;
}
.th-hamburger {
  font-size: 16px;
}

/* Search Box */
.th-search-wrapper {
  flex-grow: 1;
  max-width: 480px;
}
.th-search-form-clean {
  display: flex;
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  height: 38px;
}
.th-search-field {
  flex-grow: 1;
  border: none !important;
  outline: none !important;
  padding: 0 14px !important;
  font-size: 13px !important;
  color: #333333 !important;
}
.th-search-submit {
  background: var(--th-gold) !important;
  color: var(--th-dark) !important;
  border: none !important;
  padding: 0 18px !important;
  font-size: 16px !important;
  cursor: pointer !important;
}
.th-quick-search-tags {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 11px;
}
.th-quick-search-tags a {
  color: #ffffff;
  text-decoration: none !important;
  opacity: 0.9;
}
.th-quick-search-tags a:hover {
  text-decoration: underline !important;
  opacity: 1;
}

/* Right Actions */
.th-nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.th-order-track-btn {
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.th-header-phone {
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.th-header-cart-box {
  position: relative;
  font-size: 22px;
  text-decoration: none !important;
  color: #ffffff !important;
  display: flex;
  align-items: center;
}
.th-cart-badge-circle {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #facc15;
  color: #000000;
  font-size: 11px;
  font-weight: 900;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================= 4. HERO AREA (SIDEBAR + BANNERS) ================= */
.th-hero-container {
  margin-top: 15px;
}
.th-hero-layout-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 15px;
  align-items: start;
}

/* Left Vertical Categories Menu */
.th-vertical-menu {
  background: #ffffff;
  border: 1px solid var(--th-border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.th-vert-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.th-vert-list li {
  border-bottom: 1px solid #f1f5f9;
}
.th-vert-list li:last-child {
  border-bottom: none;
}
.th-vert-list li a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: #334155 !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.th-vert-list li a:hover {
  background: var(--th-tint);
  color: var(--th-red) !important;
}
.th-menu-txt {
  flex-grow: 1;
}
.th-menu-arr {
  color: #94a3b8;
  font-size: 16px;
  font-weight: 700;
}

/* Right Banners Column */
.th-hero-banners-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Big Promo Banner */
.th-big-promo-banner {
  background: linear-gradient(135deg, #a61d1d 0%, #c42b2b 45%, #871616 100%);
  border-radius: 6px;
  color: #ffffff;
  padding: 35px 40px;
  position: relative;
  overflow: hidden;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.2);
}
.th-banner-top-badge {
  font-size: 14px;
  font-weight: 800;
  color: #fef08a;
  letter-spacing: 1px;
}
.th-promo-sub {
  font-size: 13px;
  font-weight: 700;
  color: #a7f3d0;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.th-promo-title {
  font-size: 36px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 10px 0;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.th-promo-gift-badge {
  background: rgba(0, 0, 0, 0.25);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.th-promo-gift-value {
  font-size: 26px;
  font-weight: 900;
  color: #fef08a;
  margin-bottom: 18px;
}
.th-promo-gift-value span {
  font-size: 32px;
  color: #ffffff;
  text-decoration: underline;
}
.th-promo-action-row {
  display: flex;
  align-items: center;
  gap: 15px;
}
.th-free-ship-tag {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}
.th-buy-now-red-btn {
  background: var(--th-gold);
  color: var(--th-dark) !important;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none !important;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.4);
  transition: transform 0.2s;
}
.th-buy-now-red-btn:hover {
  transform: scale(1.04);
}
.th-banner-bot-bar {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #d1fae5;
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 8px;
}
.th-slider-arrows {
  position: absolute;
  top: 50%;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.th-arrow-left, .th-arrow-right {
  background: rgba(255, 255, 255, 0.85);
  color: #333333;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Sub 3-Banner Row */
.th-sub-banners-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.th-sub-ban-item {
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.th-sub-green { background: var(--th-tint-gold); border: 1px solid #f2dfae; color: #7a5406; }
.th-sub-yellow { background: var(--th-tint); border: 1px solid #f0cfcf; color: #8c1a1a; }
.th-sub-blue { background: #faf7f2; border: 1px solid #e6ddcd; color: #6b5433; }
.th-sub-info h4 { margin: 0 0 2px 0; font-size: 13px; font-weight: 800; }
.th-sub-info small { font-size: 11px; opacity: 0.9; }

/* ================= 5. PRODUCT SECTIONS & TABS ================= */
.th-section-block {
  margin-top: 25px;
  background: #ffffff;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid var(--th-border);
}

/* Tabs Bar */
.th-section-tabs-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 12px;
}
.th-tabs-group {
  display: flex;
  gap: 8px;
}
.th-tab-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 7px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.th-tab-btn.active {
  background: var(--th-red);
  border-color: var(--th-red);
  color: #ffffff;
}
.th-view-all-green-btn {
  background: var(--th-gold-dark);
  color: #ffffff !important;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.2s;
}
.th-view-all-green-btn:hover {
  background: var(--th-gold-darker);
}

/* 5-Column Grid */
.th-grid-5-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

/* Clean Product Card */
.th-clean-product-card {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 6px;
  padding: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}
.th-clean-product-card:hover {
  border-color: var(--th-red);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
.th-round-discount-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--th-red-sale);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.th-clean-thumb {
  width: 100%;
  height: 150px;
  background: #fafafa;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  overflow: hidden;
  margin-bottom: 10px;
}
.th-thumb-icon-placeholder {
  font-size: 55px;
}
.th-clean-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.th-clean-product-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b !important;
  text-decoration: none !important;
  line-height: 1.35;
  margin-bottom: 8px;
  height: 36px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.th-clean-product-title:hover {
  color: var(--th-red) !important;
}
.th-clean-price-row {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  margin-bottom: 6px;
}
.th-clean-price-now {
  font-size: 15px;
  font-weight: 800;
  color: #dc2626;
}
.th-clean-price-was {
  font-size: 12px;
  color: #94a3b8;
  text-decoration: line-through;
}
.th-clean-rating-stars {
  font-size: 11px;
  color: #f59e0b;
}
.th-review-num {
  color: #64748b;
  font-size: 11px;
}

/* Category Feature Layout (Left Banner + 4 Products) */
.th-cat-feature-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
}
.th-cat-left-banner {
  border-radius: 6px;
  padding: 24px 18px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.th-food-banner {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.th-snake-banner {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
}
.th-chef-icon {
  font-size: 45px;
  margin-bottom: 12px;
}
.th-cat-banner-title {
  font-size: 20px;
  font-weight: 900;
  margin: 0 0 8px 0;
  line-height: 1.2;
}
.th-cat-banner-stars {
  font-size: 14px;
  margin-bottom: 8px;
}
.th-cat-banner-sub {
  font-size: 12px;
  opacity: 0.9;
  margin: 0;
}
.th-grid-4-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* ================= 6. COMPACT CLEAN FOOTER ================= */
.th-site-footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 30px 0 0 0;
  margin-top: 35px;
  border-top: 3px solid var(--th-red);
  width: 100%;
}
.th-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.th-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.th-footer-brand-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.th-footer-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0 0 10px 0;
}
.th-footer-info-line {
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 6px;
  line-height: 1.4;
}
.th-footer-info-line a {
  color: #fef08a;
  text-decoration: none !important;
  font-weight: 700;
}
.th-footer-heading {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 12px 0;
  position: relative;
  padding-bottom: 6px;
}
.th-footer-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--th-red);
}
.th-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.th-footer-links li {
  margin-bottom: 6px;
}
.th-footer-links li a {
  color: #94a3b8;
  text-decoration: none !important;
  font-size: 12px;
  transition: color 0.2s;
  display: inline-block;
  line-height: 1.4;
}
.th-footer-links li a:hover {
  color: #ffffff;
}
.th-footer-pay-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.th-pay-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}
.th-footer-trust-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 6px;
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.4;
}
.th-footer-trust-box small {
  color: #94a3b8;
  font-size: 11px;
}
.th-footer-bottom-bar {
  padding: 14px 0;
  font-size: 11px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.th-footer-bottom-bar a {
  color: #fef08a;
  text-decoration: none;
  font-weight: 700;
}

/* ================= 7. FLOATING CONTACT BUTTONS ================= */
.th-floating-contact {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
}
.th-float-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9999px;
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.th-float-btn:hover {
  transform: scale(1.06);
}
.th-float-zalo { background: #0068ff; }
.th-float-phone { background: var(--th-red); }

/* ================= 8. SINGLE PRODUCT PAGE STYLING ================= */
.th-single-product-container {
  margin-top: 20px;
  margin-bottom: 50px;
}

.th-product-breadcrumb {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.th-product-breadcrumb a {
  color: #475569;
  text-decoration: none !important;
}
.th-product-breadcrumb a:hover {
  color: var(--th-red);
}
.th-bc-sep {
  color: #cbd5e1;
}
.th-bc-current {
  color: var(--th-dark);
  font-weight: 700;
}

/* Main 2-Column Card */
.th-single-product-card {
  background: #ffffff;
  border: 1px solid var(--th-border);
  border-radius: 8px;
  padding: 28px;
  display: grid !important;
  grid-template-columns: 420px 1fr !important;
  gap: 35px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* Left Media Column */
.th-single-media-col {
  display: flex;
  flex-direction: column;
}
.th-single-image-box {
  background: #fafafa;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.th-single-icon-placeholder {
  font-size: 110px;
}
.th-single-main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.th-single-discount-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #dc2626;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}
.th-single-under-media-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 15px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  padding: 10px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

/* Right Summary Column */
.th-single-summary-col {
  display: flex;
  flex-direction: column;
}
.th-single-cat-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--th-red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.th-single-product-heading {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px 0;
  line-height: 1.35;
}
.th-single-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}
.th-single-stars {
  color: #f59e0b;
}
.th-single-rating-text {
  color: #64748b;
}
.th-stock-status {
  color: #16a34a;
  font-weight: 700;
  background: #f0fdf4;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

/* Price Box */
.th-single-price-box {
  background: var(--th-tint);
  border: 1px dashed #fed7aa;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.th-price-main-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}
.th-single-price-current {
  font-size: 28px;
  font-weight: 900;
  color: #dc2626;
}
.th-single-price-old {
  font-size: 16px;
  color: #94a3b8;
  text-decoration: line-through;
}
.th-single-sale-tag {
  background: #fee2e2;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Short Desc */
.th-single-short-desc {
  font-size: 14px;
  color: #334155;
  line-height: 1.6;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 15px;
}

/* Cart Form */
.th-single-add-to-cart-wrap {
  margin-bottom: 22px;
}
.th-custom-cart-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.th-qty-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.th-qty-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}
.th-custom-cart-form .quantity input.qty {
  width: 60px !important;
  height: 38px !important;
  text-align: center !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}
.th-single-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.th-btn-add-cart {
  background: var(--th-red) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 14px !important;
  padding: 13px 20px !important;
  border: none !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: background 0.2s !important;
}
.th-btn-add-cart:hover {
  background: var(--th-red-dark) !important;
}
.th-btn-call-order {
  background: var(--th-gold-dark) !important;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 14px;
  padding: 13px 20px;
  border-radius: 6px;
  text-decoration: none !important;
  text-align: center;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.th-btn-call-order:hover {
  background: var(--th-gold-darker) !important;
}

/* Commitments Box */
.th-single-commitments-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px;
}
.th-commit-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}
.th-commit-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #475569;
}
.th-commit-list li {
  margin-bottom: 8px;
  line-height: 1.45;
}
.th-commit-list li:last-child {
  margin-bottom: 0;
}

/* Tabs / Details Block */
.th-single-details-tabs-block {
  background: #ffffff;
  border: 1px solid var(--th-border);
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 35px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.th-details-tab-nav {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.th-tab-item {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.th-tab-item.active {
  background: var(--th-red);
  border-color: var(--th-red);
  color: #ffffff;
}
.th-details-tab-content h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px 0;
}
.th-details-tab-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--th-red);
  margin: 18px 0 8px 0;
}
.th-details-tab-content p {
  font-size: 14px;
  color: #334155;
  line-height: 1.65;
}
.th-details-tab-content ul {
  padding-left: 20px;
  font-size: 14px;
  color: #334155;
  line-height: 1.65;
}

/* Related Block */
.th-related-products-block {
  background: #ffffff;
  border: 1px solid var(--th-border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 40px;
}
.th-related-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 12px;
}
.th-related-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

/* ================= 9. PRODUCT CATEGORY / ARCHIVE PAGE STYLING ================= */
.th-archive-container {
  margin-top: 15px;
  margin-bottom: 50px;
}

.th-archive-header-banner {
  background: linear-gradient(135deg, var(--th-tint) 0%, #ffffff 100%);
  border: 1px solid var(--th-border);
  border-left: 4px solid var(--th-red);
  border-radius: 6px;
  padding: 18px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.th-archive-header-text {
  display: flex;
  flex-direction: column;
}
.th-archive-title {
  font-size: 22px;
  font-weight: 900;
  color: #1e293b;
  margin: 0 0 4px 0;
  text-transform: uppercase;
  letter-spacing: -0.3px;
}
.th-archive-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* Archive Grid Layout (Sidebar + Main) */
.th-archive-layout-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 15px;
  align-items: start;
}
.th-archive-sidebar {
  position: sticky;
  top: 15px;
}
.th-sidebar-heading {
  background: var(--th-red);
  color: #ffffff;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.th-sidebar-trust-box {
  background: #f8fafc;
  border-top: 1px solid var(--th-border);
  padding: 14px;
  text-align: center;
}
.th-side-trust-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}
.th-sidebar-trust-box p {
  font-size: 11px;
  color: #64748b;
  margin: 0 0 8px 0;
  line-height: 1.4;
}
.th-side-hotline {
  color: #dc2626;
  font-size: 14px;
  font-weight: 800;
}

/* Archive Main Content */
.th-archive-main-content {
  background: #ffffff;
  border: 1px solid var(--th-border);
  border-radius: 6px;
  padding: 16px;
}
.th-archive-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.th-archive-count-txt {
  font-size: 13px;
  color: #64748b;
}
.th-custom-sort-select {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 13px;
  outline: none;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
}
.th-archive-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.th-archive-pagination {
  margin-top: 25px;
  text-align: center;
}
.th-archive-pagination ul.page-numbers {
  display: inline-flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 6px;
}
.th-archive-pagination .page-numbers li a,
.th-archive-pagination .page-numbers li span {
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  text-decoration: none !important;
  color: #334155;
  display: inline-block;
}
.th-archive-pagination .page-numbers li span.current {
  background: var(--th-red);
  color: #ffffff;
  border-color: var(--th-red);
  font-weight: 700;
}
.th-archive-empty-box {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}
.th-archive-empty-box p {
  font-size: 15px;
  margin-bottom: 15px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
  .th-archive-layout-grid { grid-template-columns: 1fr; }
  .th-archive-sidebar { display: none; }
  .th-archive-product-grid { grid-template-columns: repeat(3, 1fr); }
  .th-hero-layout-grid { grid-template-columns: 1fr; }
  .th-vertical-menu { display: none; }
  .th-grid-5-cols { grid-template-columns: repeat(3, 1fr); }
  .th-cat-feature-layout { grid-template-columns: 1fr; }
  .th-grid-4-cols { grid-template-columns: repeat(2, 1fr); }
  .th-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .th-single-product-card {
    grid-template-columns: 1fr !important;
    padding: 18px;
  }
  .th-single-image-box {
    height: 280px;
  }
  .th-single-btn-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .th-grid-5-cols { grid-template-columns: repeat(2, 1fr); }
  .th-sub-banners-row { grid-template-columns: 1fr; }
  .th-grid-4-cols { grid-template-columns: 1fr; }
  .th-nav-flex { flex-direction: column; }
  .th-search-wrapper { max-width: 100%; width: 100%; }
  .th-footer-grid { grid-template-columns: 1fr; }
  .th-footer-bottom-bar { flex-direction: column; text-align: center; }
}

/* ================= 10. BỔ SUNG: THÀNH PHẦN ĐỘNG ================= */

/* Nút danh mục giờ là <button>, cần bỏ style mặc định của trình duyệt */
button.th-cat-btn-main {
  border: none;
  font-family: inherit;
  text-align: left;
}

/* Danh sách danh mục bung ra khi bấm nút */
.th-nav-flex {
  position: relative;
}
.th-cat-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 260px;
  background: #ffffff;
  border: 1px solid var(--th-border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  z-index: 200;
  overflow: hidden;
}

/* Mục danh mục đang xem */
.th-vert-list li.th-vert-active > a {
  background: var(--th-tint);
  color: var(--th-red) !important;
}

/* Tiêu đề khối sản phẩm (thay cho các tab giả trước đây) */
.th-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--th-dark);
  text-transform: uppercase;
}

/* 3 ô nhỏ dưới banner giờ là link */
a.th-sub-ban-item {
  text-decoration: none !important;
  transition: transform 0.15s, box-shadow 0.15s;
}
a.th-sub-ban-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}
a.th-sub-green, a.th-sub-green h4, a.th-sub-green small { color: #7a5406; }
a.th-sub-yellow, a.th-sub-yellow h4, a.th-sub-yellow small { color: #8c1a1a; }
a.th-sub-blue, a.th-sub-blue h4, a.th-sub-blue small { color: #6b5433; }

/* Link "Xem chi tiết" trên thẻ sản phẩm */
.th-card-detail-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--th-gold-dark) !important;
  text-decoration: none !important;
}
.th-card-detail-link:hover {
  color: var(--th-red) !important;
}

/* Thư viện ảnh phụ ở trang sản phẩm */
.th-single-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.th-gallery-thumb {
  display: block;
  border: 1px solid var(--th-border);
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
}
.th-gallery-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

/* Khu vực đặt hàng qua hotline / Zalo */
.th-order-hint {
  font-size: 13px;
  color: var(--th-gray-text);
  margin-bottom: 10px;
}
.th-order-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.th-order-buttons a {
  text-decoration: none !important;
  text-align: center;
}

/* Mã sản phẩm và trạng thái hết hàng */
.th-single-sku {
  font-size: 12px;
  color: var(--th-gray-text);
}
.th-stock-status.th-out-of-stock {
  color: var(--th-red-sale);
}

/* Ghi chú khi sản phẩm chưa có mô tả */
.th-empty-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 14px 16px;
  color: #92400e;
  font-size: 14px;
}

/* Khối đánh giá của WooCommerce nằm trong tab */
.th-details-tab-content #reviews {
  margin: 0;
}
.th-details-tab-content .comment-form input[type="text"],
.th-details-tab-content .comment-form input[type="email"],
.th-details-tab-content .comment-form textarea {
  width: 100%;
  max-width: 480px;
  padding: 9px 12px;
  border: 1px solid var(--th-border);
  border-radius: 4px;
}

/* ================= 11. BỔ SUNG: MOBILE ================= */
@media (max-width: 1024px) {
  /* Sidebar danh mục bị ẩn trên mobile, nên nút danh mục ở header
     trở thành đường điều hướng chính. */
  .th-cat-dropdown {
    width: 100%;
  }
  .th-nav-flex {
    flex-wrap: wrap;
    gap: 10px;
  }
  button.th-cat-btn-main {
    width: auto;
    flex: 1 1 auto;
    justify-content: center;
  }
  .th-order-buttons {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .th-top-banner-flex {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
  .th-slogan-text {
    display: none;
  }
  .th-middle-flex {
    justify-content: center;
  }
  .th-archive-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .th-section-tabs-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .th-section-heading {
    font-size: 15px;
  }
  .th-nav-actions {
    width: 100%;
    justify-content: space-between;
  }
  .th-archive-controls-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Nút nổi thu gọn để không che nội dung */
  .th-floating-contact {
    flex-direction: row;
    bottom: 10px;
    right: 10px;
    left: 10px;
    justify-content: center;
  }
  .th-float-btn span {
    display: none;
  }
  .th-float-btn {
    padding: 12px 16px;
    font-size: 18px;
  }
}

/* Thẻ tìm nhanh: cuộn ngang trên mobile thay vì vỡ thành nhiều cột chật */
@media (max-width: 640px) {
  .th-quick-search-tags {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .th-quick-search-tags::-webkit-scrollbar {
    display: none;
  }
  .th-quick-search-tags a {
    flex: 0 0 auto;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.18);
    color: #ffffff;
    opacity: 1;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
  }
}

/* ================= 12. LOGO TUY CHINH ================= */
.th-logo-box--image {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.th-logo-box--image .custom-logo-link {
  display: block;
  line-height: 0;
}
/* Logo ngang: gioi han theo chieu cao, tu co lai tren man hinh hep */
.th-logo-box--image img.custom-logo {
  display: block;
  height: auto;
  width: auto;
  max-height: 72px;
  max-width: 100%;
}
@media (max-width: 1024px) {
  .th-logo-box--image img.custom-logo {
    max-height: 54px;
  }
}
@media (max-width: 640px) {
  .th-logo-box--image img.custom-logo {
    max-height: 46px;
  }
}

/* ================= 13. ICON SVG ================= */
.th-ico {
  flex-shrink: 0;
  vertical-align: -0.18em;
}
/* Icon di kem chu thi cach ra mot chut */
.th-footer-info-line .th-ico,
.th-under-item .th-ico,
.th-commit-title .th-ico,
.th-side-trust-title .th-ico,
.th-footer-trust-box .th-ico,
.th-free-ship-tag .th-ico,
.th-stock-status .th-ico,
.th-header-phone .th-ico,
.th-order-track-btn .th-ico,
.th-banner-bot-bar .th-ico,
.th-float-btn .th-ico,
.th-btn-add-cart .th-ico,
.th-btn-call-order .th-ico,
.th-side-hotline .th-ico {
  margin-right: 6px;
}

/* Nut tim kiem */
.th-search-submit .th-ico {
  vertical-align: middle;
  margin: 0;
}
/* Nut hamburger cua nut danh muc */
.th-hamburger {
  display: inline-flex;
  align-items: center;
}
/* Mui ten cuoi moi muc danh muc */
.th-menu-arr {
  display: inline-flex;
  align-items: center;
  color: #cbd5e1;
}
.th-menu-arr .th-ico {
  width: 14px;
  height: 14px;
}
/* Danh sach cam ket: bo dau cham dau dong, dung nen sach */
.th-commit-list li {
  list-style: none;
}
/* O anh du phong khi san pham chua co anh */
.th-thumb-icon-placeholder img,
.th-single-icon-placeholder img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.55;
}

/* ================= 14. TRANG NOI DUNG (page / bai viet / 404) ================= */
.th-page-container {
  padding-top: 16px;
  padding-bottom: 30px;
}
.th-page-card {
  background: #ffffff;
  border: 1px solid var(--th-border);
  border-radius: 6px;
  padding: 30px 34px;
  margin-top: 12px;
}
.th-page-header {
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 16px;
  margin-bottom: 22px;
}
.th-page-title {
  margin: 0;
  font-size: 27px;
  font-weight: 800;
  color: var(--th-dark);
  line-height: 1.25;
}
.th-page-lead {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--th-gray-text);
}
.th-post-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--th-gray-text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.th-page-thumb {
  margin-bottom: 22px;
}
.th-page-thumb img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Chu trong noi dung trang: de doc, dong thoang */
.th-page-content {
  font-size: 15.5px;
  line-height: 1.75;
  color: #333333;
}
.th-page-content > *:first-child { margin-top: 0; }
.th-page-content > *:last-child { margin-bottom: 0; }
.th-page-content h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--th-red);
  margin: 30px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--th-gold);
}
.th-page-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--th-dark);
  margin: 22px 0 10px;
}
.th-page-content p { margin: 0 0 14px; }
.th-page-content ul,
.th-page-content ol { margin: 0 0 16px; padding-left: 22px; }
.th-page-content li { margin-bottom: 7px; }
.th-page-content a {
  color: var(--th-red);
  text-decoration: underline;
}
.th-page-content strong { color: var(--th-dark); }
.th-page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 14.5px;
}
.th-page-content th,
.th-page-content td {
  border: 1px solid var(--th-border);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}
.th-page-content th {
  background: var(--th-tint);
  font-weight: 700;
  color: var(--th-dark);
}
.th-page-content blockquote {
  margin: 0 0 16px;
  padding: 14px 18px;
  background: var(--th-tint-gold);
  border-left: 4px solid var(--th-gold);
  border-radius: 0 4px 4px 0;
}
.th-page-content blockquote p:last-child { margin-bottom: 0; }
.th-page-content iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 6px;
}

/* Khoi ho tro cuoi trang */
.th-page-help {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--th-border);
}
.th-page-help-text {
  font-size: 14px;
  color: var(--th-gray-text);
  margin-bottom: 14px;
}
.th-page-help .th-order-buttons {
  max-width: 520px;
}

/* Trang 404 */
.th-404-card {
  text-align: center;
  padding: 44px 34px;
}
.th-404-code {
  font-size: 64px;
  font-weight: 900;
  color: var(--th-red);
  line-height: 1;
  letter-spacing: 2px;
}
.th-404-desc {
  max-width: 520px;
  margin: 12px auto 24px;
  color: var(--th-gray-text);
  font-size: 15px;
}
.th-404-search {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto 26px;
}
.th-404-search .th-search-field {
  flex: 1 1 auto;
  border: 1px solid var(--th-border);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 14px;
}
.th-404-cats-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--th-gray-text);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.th-404-cat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 26px;
}
.th-404-cat-links a {
  background: var(--th-tint);
  border: 1px solid #f0cfcf;
  color: var(--th-red) !important;
  padding: 6px 13px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
}
.th-404-cat-links a:hover {
  background: var(--th-red);
  color: #ffffff !important;
}
.th-404-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.th-404-actions a {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .th-page-card { padding: 22px 18px; }
  .th-page-title { font-size: 21px; }
  .th-404-code { font-size: 48px; }
  .th-404-search { flex-direction: column; }
}

/* Menu thanh tren cung: bo dau cham dau dong, xep ngang */
.th-top-menu {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.th-top-menu li {
  list-style: none;
  margin: 0;
}
.th-top-menu a {
  color: #666666;
  text-decoration: none !important;
  transition: color 0.2s;
}
.th-top-menu a:hover {
  color: var(--th-red);
}
.th-404-search .th-view-all-green-btn {
  white-space: nowrap;
  padding: 10px 20px;
}
