/* Homepage wow layout driven by real Woo categories/products */

.tggd-home-index {
  display: grid;
  gap: 16px;
  margin: 14px 0 24px;
  width: calc(100% - 24px);
  max-width: 1170px;
  margin-left: auto;
  margin-right: auto;
}

.tggd-home-top-banner {
  margin-top: 10px;
  padding: 0 12px;
}

.tggd-home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 1fr);
  gap: 14px;
  border: 1px solid #d8e6f4;
  border-radius: 16px;
  background: linear-gradient(130deg, #081a30 0%, #0d2848 52%, #1d4f83 100%);
  color: #fff;
  padding: 16px;
}

.tggd-home-hero__text h1 {
  margin: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 800;
}

.tggd-home-hero__text p {
  margin: 8px 0 12px;
  color: #d4e5f8;
  font-size: 15px;
}

.tggd-home-hero__text p a {
  color: #d4e5f8;
  text-decoration: none;
  border-bottom: 1px dashed rgba(212, 229, 248, 0.55);
}

.tggd-home-hero__text p a:hover {
  color: #ffdd65;
  border-bottom-color: rgba(255, 221, 101, 0.9);
}

.tggd-home-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tggd-home-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.tggd-home-chip img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}

.tggd-home-chip:hover {
  background: #f4b300;
  border-color: #f4b300;
  color: #0d2848;
  text-decoration: none;
}

.tggd-home-hero__banner {
  border: 1px dashed rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.tggd-home-hero__badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: #f4b300;
  color: #0d2848;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
}

.tggd-home-hero__headline {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
}

.tggd-home-hero__sub {
  color: #dbe8f8;
  font-size: 13px;
}

.tggd-home-hero-sales {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.tggd-home-hero-sale {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px;
  color: #fff;
  text-decoration: none;
}

.tggd-home-hero-sale img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.tggd-home-hero-sale__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tggd-home-hero-sale__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  color: #f1f7ff;
}

.tggd-home-hero-sale__price {
  font-size: 13px;
  font-weight: 800;
  color: #ffdd65;
}

.tggd-home-hero-sale__price .woocommerce-Price-amount.amount,
.tggd-home-hero-sale__price ins .woocommerce-Price-amount.amount,
.tggd-home-hero-sale__price del .woocommerce-Price-amount.amount {
  color: inherit !important;
}

.tggd-home-hero-sale__price del,
.tggd-home-hero-sale__price ins,
.tggd-home-hero-sale__price .amount {
  color: inherit;
  text-decoration: none;
}

.tggd-home-hero-sale:hover {
  border-color: #f4b300;
  background: rgba(244, 179, 0, 0.16);
  color: #fff;
}

.tggd-home-hero-sales__empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  padding: 10px;
  color: #dbe8f8;
  font-size: 12px;
}

.tggd-home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tggd-home-section-head h2 {
  margin: 0;
  color: #0d2848;
  font-size: 24px;
}

.tggd-home-section-head a {
  margin-top: 2px;
  color: #1d4f83;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}

.tggd-home-section-head a:hover {
  text-decoration: underline;
}

.tggd-home-section-subcats {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tggd-home-category-section--with-subcats .tggd-home-section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.tggd-home-category-section--with-subcats .tggd-home-section-head h2 {
  font-size: 22px;
}

.tggd-home-section-subcat-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d8e6f4;
  border-radius: 999px;
  background: #f8fbff;
  color: #1d4f83;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.tggd-home-section-subcat-link:hover {
  border-color: #0d2848;
  background: #eef5ff;
  color: #0d2848;
}

.tggd-home-deals,
.tggd-home-recommended,
.tggd-home-category-section,
.tggd-home-search-suggest,
.tggd-home-topic {
  border: 1px solid #d8e6f4;
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.tggd-home-search-suggest__head h2 {
  margin: 0;
  color: #0d2848;
  font-size: 20px;
  line-height: 1.3;
}

.tggd-home-search-suggest__chips {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tggd-home-search-suggest__chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid #dfeaf7;
  border-radius: 999px;
  background: #f8fbff;
  color: #12406a;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

.tggd-home-search-suggest__chip:hover {
  border-color: #1d4f83;
  background: #eaf3ff;
  color: #0d2848;
}

.tggd-home-topic__head {
  margin-bottom: 8px;
}

.tggd-home-topic-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tggd-home-topic-tab {
  border: 1px solid #d8e6f4;
  border-radius: 999px;
  background: #f8fbff;
  color: #1d4f83;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  padding: 7px 12px;
  cursor: pointer;
}

.tggd-home-topic-tab.is-active,
.tggd-home-topic-tab:hover {
  border-color: #0d2848;
  background: #0d2848;
  color: #fff;
}

.tggd-home-topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tggd-home-topic-card {
  display: block;
  border: 1px solid #edf3fb;
  border-radius: 12px;
  overflow: hidden;
  background: #fcfdff;
}

.tggd-home-topic-card__thumb {
  display: block;
  background: #ffffff;
}

.tggd-home-topic-card__thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center;
  display: block;
}

.tggd-home-topic--club-video .tggd-home-topic-card__thumb--video {
  position: relative;
  cursor: pointer;
}

.tggd-home-topic--club-video .tggd-home-topic-card__thumb--video img {
  object-fit: cover;
}

.tggd-home-topic--club-video .tggd-home-topic-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 38px;
  border-radius: 11px;
  background: rgba(227, 32, 32, 0.94);
  box-shadow: 0 8px 18px rgba(8, 20, 44, 0.28);
  pointer-events: none;
}

.tggd-home-topic--club-video .tggd-home-topic-card__play::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 11px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #fff;
}

.tggd-home-topic--club-video .tggd-home-topic-card__thumb--video:hover .tggd-home-topic-card__play {
  background: #ff0000;
}

.tggd-video-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
}

.tggd-video-modal[hidden] {
  display: none;
}

.tggd-video-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 18, 36, 0.7);
  cursor: pointer;
}

.tggd-video-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 20px));
}

.tggd-video-modal__close {
  position: absolute;
  right: 6px;
  top: -40px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.tggd-video-modal__frame-wrap {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.tggd-video-modal__frame-wrap iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

body.tggd-video-modal-open {
  overflow: hidden;
}

.tggd-home-topic-card__meta {
  padding: 8px;
}

.tggd-home-topic-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  color: #16385c;
  text-decoration: none;
}

.tggd-home-topic-card__title:hover {
  color: #1d4f83;
  text-decoration: underline;
}

.tggd-home-topic-card__excerpt {
  margin: 6px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #4f6880;
  font-size: 12px;
  line-height: 1.45;
}

.tggd-home-topic-card__date {
  display: block;
  margin-top: 6px;
  color: #7a90a6;
  font-size: 11px;
  line-height: 1.3;
}

.tggd-home-deals__list,
.tggd-home-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tggd-home-product {
  border: 1px solid #edf3fb;
  border-radius: 12px;
  background: #fcfdff;
  padding: 8px;
  color: #133353;
  display: block;
  box-shadow: none;
}

.tggd-home-product__meta {
  display: block;
}

.tggd-home-product:hover {
  border-color: #d7e6f8;
  box-shadow: 0 8px 18px rgba(13, 40, 72, 0.08);
  transform: translateY(-1px);
  text-decoration: none;
}

.tggd-home-product__thumb {
  display: block;
  border-radius: 10px;
  border: 0;
  background: transparent;
  overflow: hidden;
  margin-bottom: 8px;
}

.tggd-home-product__thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.tggd-home-product__name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  min-height: 36px;
  color: #16385c;
}

.tggd-home-product__price {
  display: block;
  font-size: 14px;
  color: #eb0707;
  font-weight: 800;
  margin-top: 6px;
}

.tggd-home-product__price .woocommerce-Price-amount.amount,
.tggd-home-product__price ins .woocommerce-Price-amount.amount,
.tggd-home-product__price del .woocommerce-Price-amount.amount {
  color: #eb0707 !important;
}

.tggd-home-load-more-wrap {
  margin-top: 10px;
  text-align: center;
}

.tggd-home-load-more {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1d4f83;
  font-size: 14px;
  font-weight: 800;
  min-height: 0;
  padding: 0;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.tggd-home-load-more:hover,
.tggd-home-load-more:focus-visible {
  color: #113b63;
}

.tggd-home-load-more.is-loading {
  opacity: 0.7;
  cursor: wait;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .tggd-home-top-banner {
    padding: 0 10px;
  }

  .tggd-home-hero {
    grid-template-columns: 1fr;
  }

  .tggd-home-deals__list,
  .tggd-home-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tggd-home-topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tggd-home-category-section--with-subcats .tggd-home-section-head h2 {
    font-size: 20px;
  }

  .tggd-home-category-section--with-subcats .tggd-home-section-subcat-link {
    font-size: 11px;
    padding: 5px 8px;
  }
}

@media (max-width: 768px) {
  .tggd-home-top-banner {
    margin-top: 8px;
    padding: 0 6px;
  }

  .tggd-home-index {
    gap: 12px;
    margin-top: 10px;
    width: calc(100% - 12px);
    max-width: none;
  }

  .tggd-home-hero {
    border-radius: 12px;
    padding: 12px;
  }

  .tggd-home-hero__text h1 {
    font-size: 26px;
  }

  .tggd-home-hero__headline {
    font-size: 22px;
  }

  .tggd-home-hero-sales {
    grid-template-columns: 1fr;
  }

  .tggd-home-deals,
  .tggd-home-recommended,
  .tggd-home-category-section,
  .tggd-home-search-suggest,
  .tggd-home-topic {
    border-radius: 12px;
    padding: 10px;
  }

  .tggd-home-search-suggest__head h2 {
    font-size: 18px;
  }

  .tggd-home-search-suggest__chip,
  .tggd-home-topic-tab {
    font-size: 12px;
    padding: 6px 10px;
  }

  .tggd-home-category-section--with-subcats .tggd-home-section-head {
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .tggd-home-category-section--with-subcats .tggd-home-section-head h2 {
    font-size: 18px;
  }

  .tggd-home-category-section--with-subcats .tggd-home-section-head .tggd-home-section-subcats {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 5px;
    overflow-x: auto;
    margin-top: 2px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .tggd-home-section-head a {
    font-size: 13px;
    margin-top: 1px;
  }

  .tggd-home-load-more {
    min-height: 0;
    padding: 0;
    font-size: 13px;
  }

  .tggd-home-category-section--with-subcats .tggd-home-section-subcats {
    margin-bottom: 8px;
    gap: 6px;
  }

  .tggd-home-category-section--with-subcats .tggd-home-section-subcat-link {
    font-size: 10px;
    padding: 4px 7px;
    white-space: nowrap;
  }

  .tggd-home-deals__list,
  .tggd-home-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tggd-home-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tggd-home-topic--club-video .tggd-home-topic-card__play {
    width: 46px;
    height: 33px;
  }

  .tggd-home-topic--club-video .tggd-home-topic-card__play::before {
    left: 18px;
    top: 9px;
    border-top-width: 7px;
    border-bottom-width: 7px;
    border-left-width: 11px;
  }

  .tggd-video-modal__dialog {
    width: calc(100vw - 12px);
  }

  .tggd-video-modal__close {
    right: 2px;
    top: -36px;
  }
}

