/* ================================================================
   TKK Homepage — 4 sections only
   ================================================================ */

.tkk-home-section {
  padding: 0;
  background: #f3f5f8;
}

.tkk-home-container {
  width: min(var(--tkk-container, 1320px), calc(100% - 32px));
  max-width: var(--tkk-container, 1320px);
  margin-inline: auto;
  padding: 0;
}

/* ---------- Banner ---------- */
.tkk-home-banner-section {
  padding: 18px 0 24px;
}

.tkk-home-banner-container {
  overflow: hidden;
}

.tkk-home-banner {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(36, 84, 164, .08);
}

.tkk-home-banner .swiper-slide {
  min-height: clamp(220px, 34vw, 450px);
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

.tkk-home-banner .slider-content {
  display: none !important;
}

.tkk-home-banner .bricks-swiper-button-prev,
.tkk-home-banner .bricks-swiper-button-next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--tkk-blue-700, #2f66c8);
  box-shadow: 0 5px 18px rgba(20, 45, 85, .16);
}

/* ---------- Categories ---------- */
.tkk-home-categories-section {
  padding: 0 0 24px;
}

.tkk-home-heading {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tkk-home-heading h2,
.tkk-home-category-block__head h2 {
  margin: 0;
  color: #172033;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.tkk-home-heading h2 {
  padding-left: 12px;
  border-left: 4px solid var(--tkk-blue-600, #4078d5);
}

.tkk-home-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tkk-home-category-card {
  min-height: 88px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid #e3e9f2;
  border-radius: 9px;
  background: #fff;
  color: #172033;
  text-decoration: none !important;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.tkk-home-category-card:hover {
  border-color: #bfd0ee;
  box-shadow: 0 8px 22px rgba(47, 102, 200, .09);
  transform: translateY(-1px);
}

.tkk-home-category-card__media {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  color: #7695cb;
  font-size: 24px;
}

.tkk-home-category-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tkk-home-category-card__copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.tkk-home-category-card__copy strong {
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.tkk-home-category-card__copy small {
  color: #667085;
  font-size: 12px !important;
}

/* ---------- Best sellers ---------- */
.tkk-home-bestsellers-section {
  padding: 0 0 24px;
}

.tkk-home-bestsellers-section .tkk-home-container {
  align-items: center;
}

.tkk-home-bestsellers {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  align-self: center;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(34, 83, 164, .07);
}

.tkk-home-bestsellers__head {
  min-height: 70px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, var(--tkk-blue-700, #2f66c8), var(--tkk-blue-600, #4078d5));
  color: #fff;
}

.tkk-home-bestsellers__head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.tkk-home-countdown {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.tkk-home-countdown__label {
  font-size: 12px;
}

.tkk-home-countdown strong {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  font-weight: 700;
}

.tkk-home-countdown strong > span {
  min-width: 29px;
  padding: 4px 5px;
  border-radius: 5px;
  background: #fff;
  color: var(--tkk-blue-700, #2f66c8);
  text-align: center;
}

.tkk-home-countdown strong small {
  font-size: 12px !important;
  font-weight: 400;
}

.tkk-home-products,
.tkk-home-products .products {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.tkk-home-products .products {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.tkk-home-products .tkk-product-card {
  width: 100% !important;
  max-width: 100%;
  min-width: 0 !important;
}

/* ---------- Category product blocks ---------- */
.tkk-home-category-products-section {
  padding: 0 0 46px;
}

.tkk-home-category-products {
  display: grid;
  gap: 20px;
}

.tkk-home-category-block {
  overflow: hidden;
  border: 1px solid #e4eaf3;
  border-radius: 10px;
  background: #fff;
}

.tkk-home-category-block__head {
  min-height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e7ebf1;
}

.tkk-home-category-block__head h2 {
  padding-left: 11px;
  border-left: 4px solid var(--tkk-blue-600, #4078d5);
}

.tkk-home-category-block__head a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--tkk-blue-700, #2f66c8);
  font-size: 13px;
  text-decoration: none;
}

.tkk-home-empty {
  margin: 0;
  padding: 26px;
  color: #667085;
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .tkk-home-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tkk-home-products .products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  /* Stop the Bricks 450px slider height from carrying into tablet/mobile. */
  .tkk-home-banner,
  .tkk-home-banner .swiper,
  .tkk-home-banner .swiper-container,
  .tkk-home-banner .swiper-wrapper {
    height: auto !important;
    min-height: 0 !important;
  }

  .tkk-home-banner .swiper-slide {
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 2.55 / 1;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #fff;
  }
}

@media (max-width: 767px) {
  .tkk-home-container {
    width: calc(100% - 20px);
  }

  .tkk-home-banner-section {
    padding: 8px 0 18px;
  }

  .tkk-home-banner {
    border-radius: 8px;
  }

  .tkk-home-banner .swiper-slide {
    aspect-ratio: 2.55 / 1;
  }

  .tkk-home-banner .bricks-swiper-button-prev,
  .tkk-home-banner .bricks-swiper-button-next {
    display: none !important;
  }

  .tkk-home-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .tkk-home-category-card {
    min-height: 76px;
    padding: 8px;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px;
  }

  .tkk-home-category-card__media {
    width: 52px;
    height: 52px;
  }

  .tkk-home-bestsellers-section .tkk-home-container {
    width: calc(100% - 20px);
    margin-inline: auto;
    align-items: center;
  }

  .tkk-home-bestsellers {
    width: 100%;
    margin-inline: auto;
  }

  .tkk-home-bestsellers__head {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .tkk-home-countdown {
    justify-items: start;
  }

  .tkk-home-products {
    overflow: hidden;
  }

  .tkk-home-products .products {
    width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    overflow: hidden;
  }

  .tkk-home-products .tkk-product-card {
    min-width: 0 !important;
    overflow: hidden;
  }

  .tkk-home-products .tkk-product-card .price {
    min-width: 0;
    overflow: hidden;
  }

  .tkk-home-category-block__head {
    padding-inline: 12px;
  }

  .tkk-home-heading h2,
  .tkk-home-category-block__head h2,
  .tkk-home-bestsellers__head h2 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .tkk-home-banner .swiper-slide {
    aspect-ratio: 2.45 / 1;
  }

  .tkk-home-bestsellers__head {
    padding: 11px 14px;
  }

  .tkk-home-countdown strong {
    gap: 4px;
    font-size: 14px;
  }

  .tkk-home-countdown strong > span {
    min-width: 27px;
    padding-inline: 4px;
  }
}
