/* ==========================================================================
   Custom UI overrides for THAIHOA PK
   ========================================================================== */

/* ---------- Top header ---------- */
.top-header {
  background: linear-gradient(90deg, #0d47a1 0%, #1565c0 50%, #1e88e5 100%);
  color: #fff;
  padding: 10px 0;
}
.top-header .contact-number,
.top-header .contact-number span,
.top-header .contact-number i {
  color: #fff;
  font-weight: 500;
}
.top-header .contact-number i {
  margin-right: 6px;
}
.top-header .logo svg {
  display: inline-block;
  vertical-align: middle;
}
.top-header .logo .site-logo-svg text {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

/* ---------- Navigation menu ---------- */
.menu {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid #f0f3f7;
}
.menu .navbar.navigation {
  background: transparent;
  margin-bottom: 0;
  min-height: 64px;
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}
.main-nav > li > a {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1565c0 !important;
  padding: 22px 18px !important;
  position: relative;
  transition: all 0.25s ease;
}
.main-nav > li > a i {
  font-size: 16px;
  line-height: 1;
}
.main-nav > li > a:hover,
.main-nav > li > a:focus {
  background: transparent !important;
  color: #0d47a1 !important;
}
.main-nav > li > a::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 14px;
  height: 2px;
  background: linear-gradient(90deg, #42a5f5, #0d47a1);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
  border-radius: 2px;
}
.main-nav > li > a:hover::after,
.main-nav > li.active > a::after {
  transform: scaleX(1);
}

.main-nav .nav-user > a,
.main-nav .nav-coin > a {
  background: #f3f8ff !important;
  border-radius: 999px;
  padding: 10px 16px !important;
  margin: 12px 6px;
  color: #0d47a1 !important;
}
.main-nav .nav-coin > a {
  background: linear-gradient(90deg, #fff7cc, #ffe082) !important;
  color: #8a6d00 !important;
}
.main-nav .nav-user > a::after,
.main-nav .nav-coin > a::after {
  display: none;
}

.dropdown-menu-account {
  border: none;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(13, 71, 161, 0.15);
  padding: 10px;
  min-width: 240px;
}
.dropdown-menu-account ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.dropdown-menu-account ul li {
  display: block;
}
.dropdown-menu-account ul li a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 14px !important;
  font-size: 14px;
  font-weight: 500;
  color: #333 !important;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: normal;
}
.dropdown-menu-account ul li a:hover {
  background: #f3f8ff !important;
  color: #0d47a1 !important;
  padding-left: 18px !important;
}
.dropdown-menu-account ul li a i {
  width: 18px;
  color: #1565c0;
}

/* ---------- Home category cards ---------- */
.product-category.section {
  background: #f7f9fc;
  padding: 50px 0;
}
.product-category.section .title h2 {
  color: #0d47a1;
  font-weight: 700;
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.product-category.section .title h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #42a5f5, #0d47a1);
  border-radius: 2px;
  transform: translateX(-50%);
}

.home-category-card {
  display: block;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  border: 1px solid #eef2f7;
  margin-bottom: 28px;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.home-category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(21, 101, 192, 0.18);
  color: inherit;
}

.home-category-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f7f9fc;
}
@supports not (aspect-ratio: 16 / 9) {
  .home-category-thumb {
    padding-top: 56.25%;
    height: 0;
  }
}
.home-category-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.home-category-card:hover .home-category-thumb img {
  transform: scale(1.06);
}
.home-category-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.35) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.home-category-card:hover .home-category-thumb::after {
  opacity: 1;
}

.home-category-body {
  padding: 18px 20px 20px;
  text-align: left;
}
.home-category-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0d47a1;
  margin: 0 0 8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-category-body p {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 12px;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-category-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1565c0;
  font-weight: 600;
  font-size: 14px;
  transition: gap 0.2s ease;
}
.home-category-card:hover .home-category-link {
  gap: 12px;
}
.home-category-link i {
  transition: transform 0.2s ease;
}

@media (max-width: 480px) {
  .home-category-body h3 { font-size: 16px; }
  .home-category-body p { font-size: 13px; }
}

/* ---------- Shop product grid ---------- */
.products.section .product-item {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid #eef2f7;
}
.products.section .product-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(21, 101, 192, 0.18);
}

.products.section .product-item .product-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f7f9fc;
}
/* fallback for older browsers */
@supports not (aspect-ratio: 1 / 1) {
  .products.section .product-item .product-thumb {
    padding-top: 100%;
    height: 0;
  }
}
.products.section .product-item .product-thumb .product-image-link {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.products.section .product-item .product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.products.section .product-item:hover .product-thumb img {
  transform: scale(1.05);
}
/* disable the hover overlay + meta icons */
.products.section .product-item .product-thumb:before,
.products.section .product-item .product-thumb .preview-meta {
  display: none !important;
}
.products.section .product-item .product-thumb .bage {
  background: rgba(21, 101, 192, 0.92);
  border-radius: 20px;
  font-size: 12px;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: none;
}

.products.section .product-item .product-content {
  padding: 14px 16px 18px;
  text-align: center;
}
.products.section .product-item .product-content h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  min-height: 42px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.products.section .product-item .product-content h4 a {
  color: #222;
}
.products.section .product-item .product-content h4 a:hover {
  color: #1565c0;
}
.products.section .product-item .product-content .price {
  color: #e53935;
  font-weight: 700;
  font-size: 18px;
  margin: 0;
}

/* ---------- Product detail page ---------- */
.single-product .single-product-slider {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
.single-product .carousel-inner {
  width: 100%;
  position: relative;
  background: #f7f9fc;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
@supports not (aspect-ratio: 1 / 1) {
  .single-product .carousel-inner {
    padding-top: 100%;
    height: 0;
  }
}
.single-product .carousel-inner > .item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.single-product .carousel-inner > .item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.single-product .carousel-indicators.meartlab {
  position: static;
  display: flex;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  flex-wrap: wrap;
  text-align: left;
  width: 100%;
}
.single-product .carousel-indicators.meartlab li {
  width: 72px;
  height: 72px;
  margin: 0;
  border: 2px solid #e3e9f2;
  border-radius: 8px;
  overflow: hidden;
  text-indent: 0;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.single-product .carousel-indicators.meartlab li.active {
  border-color: #1565c0;
  background: #fff;
}
.single-product .carousel-indicators.meartlab li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.single-product .carousel-control {
  width: 40px;
  height: 40px;
  line-height: 40px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.92) !important;
  color: #1565c0 !important;
  border-radius: 50%;
  text-shadow: none;
  opacity: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.single-product .carousel-control.left { left: 10px; }
.single-product .carousel-control.right { right: 10px; }
.single-product .carousel-control:hover {
  background: #1565c0 !important;
  color: #fff !important;
}

.single-product-details {
  padding: 10px 10px 10px 20px;
}
.single-product-details h2 {
  font-size: 26px;
  font-weight: 700;
  color: #0d47a1;
  margin-bottom: 10px;
}
.single-product-details .product-price {
  font-size: 28px;
  color: #e53935;
  font-weight: 800;
  margin: 0 0 16px;
}
.single-product-details .product-price::after {
  content: " đ";
  font-size: 18px;
  font-weight: 600;
}
.single-product-details .product-description {
  color: #555;
  line-height: 1.7;
  margin-bottom: 20px;
}
.single-product-details .product-category {
  margin: 16px 0;
}
.single-product-details .btn.btn-main {
  background: linear-gradient(90deg, #1565c0, #1e88e5);
  border: none;
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-right: 8px;
  margin-top: 10px !important;
  transition: all 0.25s ease;
}
.single-product-details .btn.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(21, 101, 192, 0.35);
}
.single-product-details .btn.btn-main[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.single-product-details .form-group {
  background: #fff9e6;
  border-left: 4px solid #ffb300;
  padding: 12px 14px;
  border-radius: 6px;
  margin-top: 16px;
}
.single-product-details #agree {
  transform: scale(1.3);
  margin-right: 8px;
  vertical-align: middle;
}

.tabCommon .nav-tabs {
  border-bottom: 2px solid #e3e9f2;
}
.tabCommon .nav-tabs > li > a {
  border: none;
  border-radius: 0;
  font-weight: 600;
  color: #666;
  padding: 12px 20px;
}
.tabCommon .nav-tabs > li.active > a,
.tabCommon .nav-tabs > li.active > a:hover {
  background: transparent;
  color: #1565c0;
  border: none;
  border-bottom: 3px solid #1565c0;
}
.tabCommon .tab-content {
  padding: 20px 10px;
  line-height: 1.7;
  color: #444;
}

/* ---------- Page wrappers (contact, policy, etc) ---------- */
.page-wrapper {
  padding: 50px 0;
  background: #f7f9fc;
}
.page-wrapper .container > .row {
  background: #fff;
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  margin-left: 0;
  margin-right: 0;
}
.page-wrapper h2 {
  font-size: 24px;
  color: #0d47a1;
  margin-top: 0;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e3e9f2;
  font-weight: 700;
}
.page-wrapper h4 {
  color: #1565c0;
  font-weight: 700;
  margin-top: 18px;
  margin-bottom: 10px;
  font-size: 17px;
}
.page-wrapper p {
  line-height: 1.75;
  color: #444;
}
.page-wrapper iframe {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.page-wrapper a.fanpage-btn,
.page-wrapper .fanpage-btn {
  background: linear-gradient(90deg, #1877f2, #3b5998);
  color: #fff !important;
  padding: 10px 18px !important;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none !important;
  margin-top: 10px;
  transition: all 0.25s ease;
}
.page-wrapper a.fanpage-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(24, 119, 242, 0.35);
}

.info-card {
  background: linear-gradient(135deg, #1565c0, #1e88e5);
  color: #fff;
  padding: 22px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.info-card h3,
.info-card h4 {
  color: #fff;
  margin-top: 0;
}
.info-card strong { color: #fff; }
.info-card p, .info-card span { color: rgba(255,255,255,0.95); }

.payment-box {
  border: 1px solid #e3e9f2;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: #fff;
  transition: all 0.25s ease;
}
.payment-box:hover {
  border-color: #1565c0;
  box-shadow: 0 6px 14px rgba(21, 101, 192, 0.12);
}
.payment-box h4 {
  margin-top: 0;
  color: #0d47a1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.payment-box strong { color: #e53935; }

.note-box {
  background: #fff9e6;
  border-left: 4px solid #ffb300;
  padding: 14px 18px;
  border-radius: 6px;
  margin-top: 14px;
}

/* ---------- Dashboard tables ---------- */
.user-dashboard .table {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  margin-bottom: 0;
}
.user-dashboard .table thead {
  background: linear-gradient(90deg, #1565c0, #1e88e5);
}
.user-dashboard .table thead th {
  color: #fff;
  font-weight: 600;
  border: none;
  padding: 14px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.user-dashboard .table tbody td {
  padding: 12px 14px;
  vertical-align: middle;
  border-top: 1px solid #f0f3f7;
}
.user-dashboard .table tbody tr:hover {
  background: #f7f9fc;
}
.user-dashboard .label {
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 500;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .main-nav {
    display: block;
  }
  .main-nav > li > a {
    padding: 14px 18px !important;
  }
  .top-header .contact-number.text-right {
    display: none;
  }
  .single-product-details {
    padding: 20px 0 0;
  }
}
