/*
Theme Name: Theme Core Training Grid
Theme URI: https://dapadzn.com/
Author: Dapadzn
Description: Customer fashion template with a performance training layout.
Version: 1.0.4
Requires at least: 6.4
Tested up to: 6.6
Text Domain: theme-core
*/

:root {
  --tg-black: #050505;
  --tg-ink: #111111;
  --tg-paper: #f4f4ef;
  --tg-line: rgba(255, 255, 255, 0.2);
  --tg-neon: #cbff3d;
}

* {
  box-sizing: border-box;
}

body.ct-body--training {
  margin: 0;
  background: var(--tg-black);
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.tg-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  min-height: 68px;
  padding: 16px 28px;
  background: rgba(5, 5, 5, 0.9);
  border-bottom: 1px solid var(--tg-line);
  backdrop-filter: blur(14px);
}

.tg-header__brand {
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
}

.tg-header__nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
}

.tg-header__nav a,
.tg-header__bag {
  border: 1px solid var(--tg-line);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12px;
  text-transform: uppercase;
}

.tg-hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 0;
  border-bottom: 1px solid var(--tg-line);
}

.tg-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 22px;
  padding: 42px 38px 58px;
}

.tg-hero__copy p,
.tg-section-title p {
  margin: 0;
  color: var(--tg-neon);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tg-hero__copy h1 {
  margin: 0;
  max-width: 11.5ch;
  font-size: clamp(54px, 7.8vw, 124px);
  line-height: 0.88;
  text-transform: uppercase;
  font-weight: 900;
  text-wrap: balance;
}

.tg-hero__copy span {
  max-width: 460px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.55;
}

.tg-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tg-hero__actions a,
.tg-mode-grid a {
  background: #ffffff;
  color: #050505;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.tg-hero__actions a:nth-child(2) {
  background: transparent;
  color: #ffffff;
  border: 1px solid var(--tg-line);
}

.tg-hero__media {
  min-height: 620px;
  overflow: hidden;
  background: #202020;
}

.tg-hero__media img,
.tg-campaign img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tg-train,
.tg-drop {
  padding: 58px 28px;
}

.tg-section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 24px;
}

.tg-section-title h2 {
  margin: 0;
  font-size: clamp(36px, 6vw, 86px);
  line-height: 0.92;
  text-transform: uppercase;
}

.tg-mode-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.tg-mode-grid a {
  min-height: 180px;
  display: flex;
  align-items: end;
  border-radius: 0;
  font-size: clamp(24px, 4vw, 58px);
  line-height: 0.9;
}

.tg-campaigns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--tg-line);
  border-bottom: 1px solid var(--tg-line);
}

.tg-campaign {
  position: relative;
  min-height: 560px;
  overflow: hidden;
}

.tg-campaign::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7));
}

.tg-campaign span {
  position: absolute;
  z-index: 2;
  left: 26px;
  bottom: 24px;
  font-size: clamp(34px, 5vw, 84px);
  font-weight: 900;
  line-height: 0.9;
  text-transform: uppercase;
}

.tg-product-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ct-product-card {
  background: #ffffff;
  color: #050505;
}

.ct-product-card__media {
  display: block;
  aspect-ratio: 4 / 5;
  background: #deded8;
  overflow: hidden;
}

.ct-product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ct-product-card__copy {
  display: grid;
  gap: 6px;
  padding: 13px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.ct-product-card__copy span {
  color: #6f6f6b;
}

.tg-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 28px;
  border-top: 1px solid var(--tg-line);
  font-size: 12px;
  text-transform: uppercase;
}

.tg-footer.ct-template-footer {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(220px, 1fr);
  align-items: start;
  text-transform: none;
}

.ct-template-footer__brand,
.ct-template-footer__links,
.ct-template-footer__company {
  min-width: 0;
}

.ct-template-footer__brand strong,
.ct-template-footer__company strong {
  display: block;
  margin-bottom: 10px;
  color: var(--tg-neon);
  text-transform: uppercase;
}

.ct-template-footer__brand span,
.ct-template-footer__company span,
.ct-template-footer__company a {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.ct-template-footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  text-transform: uppercase;
}

.ct-template-footer__company {
  margin: 0;
  font-style: normal;
}

.ct-archive,
.ct-page,
.ct-product-detail {
  padding: 108px 28px 58px;
}

.ct-archive__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.ct-product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 42px;
}

.ct-product-detail__media img {
  width: 100%;
  height: auto;
}

.ct-product-detail__summary,
.ct-product-detail__description {
  min-width: 0;
}

.ct-product-detail__description {
  overflow-x: auto;
  line-height: 1.65;
}

.ct-product-detail__description table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

.ct-product-detail__description td,
.ct-product-detail__description th {
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.ct-product-detail__form table.variations,
.ct-product-detail__form .variations tbody,
.ct-product-detail__form .variations tr,
.ct-product-detail__form .variations th,
.ct-product-detail__form .variations td {
  display: block;
  width: 100%;
}

.ct-product-detail__form select,
.ct-product-detail__form input.qty {
  width: 100%;
  min-height: 44px;
}

.ct-product-detail h1,
.ct-archive h1,
.ct-page h1 {
  font-size: clamp(44px, 7vw, 112px);
  line-height: 0.9;
  text-transform: uppercase;
}

.ct-product-detail h1 {
  font-size: clamp(34px, 4.5vw, 68px);
  line-height: 1;
}

@media (max-width: 900px) {
  .tg-header,
  .tg-hero,
  .tg-campaigns,
  .ct-product-detail {
    grid-template-columns: 1fr;
  }

  .tg-mode-grid,
  .tg-product-row,
  .ct-archive__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tg-footer.ct-template-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tg-header {
    gap: 12px;
    padding: 14px 16px;
  }

  .tg-header__brand {
    font-size: 22px;
  }

  .tg-hero__copy {
    padding: 34px 16px;
  }

  .tg-hero__copy h1,
  .tg-section-title h2,
  .tg-campaign span,
  .ct-product-detail h1,
  .ct-archive h1,
  .ct-page h1 {
    font-size: 42px;
    line-height: 0.96;
  }

  .tg-hero__media,
  .tg-campaign {
    min-height: 380px;
  }

  .tg-mode-grid,
  .tg-product-row,
  .ct-archive__grid {
    grid-template-columns: 1fr;
  }

  .tg-train,
  .tg-drop,
  .ct-archive,
  .ct-page,
  .ct-product-detail {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ct-template-footer__links {
    grid-template-columns: 1fr;
  }
}

/* Mobile QA guards for the training-grid header and product detail pages. */
body.ct-body--training {
  overflow-x: clip;
}

.tg-header,
.tg-header__nav,
.tg-header__tools,
.tg-home,
.ct-archive,
.ct-page,
.ct-product-detail,
.ct-product-detail__summary,
.ct-product-detail__description,
.ct-product-detail__form,
.ct-template-footer,
.ct-template-footer__brand,
.ct-template-footer__links,
.ct-template-footer__company {
  max-width: 100%;
  min-width: 0;
}

.tg-header__nav {
  flex-wrap: wrap;
  justify-content: center;
}

.tg-header__nav a,
.ct-product-card a,
.ct-product-detail h1,
.ct-product-detail__description,
.ct-template-footer__company span,
.ct-template-footer__company a {
  overflow-wrap: anywhere;
}

.tg-hero,
.tg-hero__copy,
.tg-hero__copy h1 {
  max-width: 100%;
  min-width: 0;
}

.tg-hero__copy h1 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

.ct-product-detail__description table,
.ct-product-detail__description tbody,
.ct-product-detail__description tr,
.ct-product-detail__description th,
.ct-product-detail__description td {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 640px) {
  .tg-header {
    grid-template-columns: 1fr;
    justify-items: center;
    overflow: clip;
  }

  .tg-header__nav,
  .tg-header__tools {
    width: 100%;
    gap: 8px;
  }

  .tg-header__nav a {
    flex: 1 1 92px;
    min-width: 0;
    padding: 8px 10px;
    text-align: center;
  }

  .ct-product-detail__description {
    overflow: hidden;
  }

  .ct-product-detail table,
  .ct-product-detail tbody,
  .ct-product-detail tr,
  .ct-product-detail th,
  .ct-product-detail td,
  .ct-product-detail__description table,
  .ct-product-detail__description tbody,
  .ct-product-detail__description tr,
  .ct-product-detail__description th,
  .ct-product-detail__description td {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .ct-product-detail tr,
  .ct-product-detail__description tr {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .ct-product-detail th,
  .ct-product-detail td,
  .ct-product-detail__description th,
  .ct-product-detail__description td {
    border: 0;
    padding: 4px 0;
    overflow-wrap: anywhere;
  }

  .tg-hero__copy h1,
  .tg-section-title h2 {
    font-size: 34px;
    line-height: 1.02;
  }
}
