/*
Theme Name: Theme Core Runway Index
Theme URI: https://dapadzn.com/
Author: Dapadzn
Description: Customer fashion template with a sparse runway index layout.
Version: 1.0.3
Requires at least: 6.4
Tested up to: 6.6
Text Domain: theme-core
*/

:root {
  --ct-ink: #090909;
  --ct-paper: #f7f6f2;
  --ct-line: rgba(9, 9, 9, 0.18);
  --ct-muted: #6f6a62;
  --ct-accent: #b4a07d;
}

* {
  box-sizing: border-box;
}

body.ct-body--runway {
  margin: 0;
  background: var(--ct-paper);
  color: var(--ct-ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

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

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

.ri-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 120px 1fr auto auto;
  gap: 28px;
  align-items: center;
  min-height: 72px;
  padding: 18px 28px;
  background: rgba(247, 246, 242, 0.92);
  border-bottom: 1px solid var(--ct-line);
  backdrop-filter: blur(14px);
  font-size: 12px;
  text-transform: uppercase;
}

.ri-header__brand {
  justify-self: start;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 700;
  line-height: 0.85;
}

.ri-header__nav,
.ri-header__tools {
  display: flex;
  gap: 22px;
  align-items: center;
}

.ri-home {
  overflow: hidden;
}

.ri-hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 24px;
  padding: 22px 28px 34px;
  border-bottom: 1px solid var(--ct-line);
}

.ri-hero__index {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  border-right: 1px solid var(--ct-line);
  padding: 0 18px 42px 0;
  font-size: 12px;
  color: var(--ct-muted);
}

.ri-hero__media {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  background: #ddd7cd;
}

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

.ri-hero__media--main {
  grid-row: span 2;
}

.ri-hero__copy {
  align-self: end;
  display: grid;
  gap: 18px;
  padding: 20px 0 42px;
}

.ri-hero__copy p,
.ri-section-title p,
.ri-editorial__copy p {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--ct-muted);
}

.ri-hero__copy h1 {
  margin: 0;
  max-width: 11ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 8vw, 136px);
  font-weight: 400;
  line-height: 0.86;
}

.ri-hero__copy span,
.ri-editorial__copy span {
  max-width: 420px;
  color: var(--ct-muted);
  line-height: 1.55;
}

.ri-hero__copy a,
.ri-editorial__copy a {
  width: fit-content;
  border-bottom: 1px solid currentColor;
  padding-bottom: 5px;
  text-transform: uppercase;
  font-size: 12px;
}

.ri-category-index {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--ct-line);
}

.ri-category-index a {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 26px;
  border-right: 1px solid var(--ct-line);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 64px);
}

.ri-category-index em {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-style: normal;
  text-transform: uppercase;
}

.ri-arrivals {
  padding: 58px 28px;
}

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

.ri-section-title h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 96px);
  font-weight: 400;
  line-height: 0.95;
}

.ri-product-mosaic {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 18px;
}

.ct-product-card {
  min-width: 0;
}

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

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

.ct-product-card--feature {
  grid-column: span 2;
  grid-row: span 2;
}

.ct-product-card--feature .ct-product-card__media {
  aspect-ratio: 4 / 5;
}

.ct-product-card__copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  font-size: 12px;
  text-transform: uppercase;
}

.ct-product-card__copy span {
  color: var(--ct-muted);
}

.ri-editorial {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  min-height: 620px;
  border-top: 1px solid var(--ct-line);
  border-bottom: 1px solid var(--ct-line);
}

.ri-editorial__image {
  overflow: hidden;
  background: #d9d0c3;
}

.ri-editorial__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 56px;
}

.ri-editorial__copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 5vw, 92px);
  font-weight: 400;
  line-height: 0.95;
}

.ri-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 28px;
  font-size: 12px;
  text-transform: uppercase;
}

.ri-footer.ct-template-footer {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(220px, 1fr);
  align-items: start;
  border-top: 1px solid var(--ct-line);
  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;
  text-transform: uppercase;
}

.ct-template-footer__brand span,
.ct-template-footer__company span,
.ct-template-footer__company a {
  display: block;
  color: var(--ct-muted);
  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: 110px 28px 60px;
}

.ct-archive__hero h1,
.ct-page__content h1,
.ct-product-detail h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 92px);
  font-weight: 400;
}

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

.ct-product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.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 var(--ct-line);
}

.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;
}

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

  .ri-header__nav {
    overflow-x: auto;
  }

  .ri-hero__index {
    display: none;
  }

  .ri-category-index,
  .ri-product-mosaic,
  .ct-archive__grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .ri-header__brand {
    font-size: 34px;
    line-height: 1;
  }

  .ri-header__nav,
  .ri-header__tools {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .ri-hero {
    padding: 16px;
  }

  .ri-hero__media {
    min-height: 360px;
  }

  .ri-hero__copy h1,
  .ri-section-title h2,
  .ri-editorial__copy h2 {
    font-size: 42px;
    line-height: 0.96;
  }

  .ri-category-index,
  .ri-product-mosaic,
  .ct-archive__grid {
    grid-template-columns: 1fr;
  }

  .ct-archive,
  .ct-page,
  .ct-product-detail,
  .ri-arrivals,
  .ri-editorial__copy {
    padding-left: 16px;
    padding-right: 16px;
  }

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

/* Product detail QA: prevent imported spec tables from creating mobile overflow. */
body.ct-body--runway {
  overflow-x: clip;
}

.ct-product-detail,
.ct-product-detail__media,
.ct-product-detail__summary,
.ct-product-detail__form,
.ct-product-detail__description,
.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;
}

.ct-product-detail h1,
.ct-product-detail__description,
.ct-product-detail__description * {
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .ct-product-detail__description {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .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 var(--ct-line);
  }

  .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;
  }

  .ct-product-detail__description table:not(.variations) {
    display: table;
    width: max-content !important;
    min-width: 640px;
    max-width: none;
    table-layout: auto;
    border-collapse: collapse;
  }

  .ct-product-detail__description table:not(.variations) tbody {
    display: table-row-group;
    width: auto;
    max-width: none;
  }

  .ct-product-detail__description table:not(.variations) tr {
    display: table-row;
    width: auto;
    height: auto !important;
    border-bottom: 0;
    padding: 0;
  }

  .ct-product-detail__description table:not(.variations) th,
  .ct-product-detail__description table:not(.variations) td {
    display: table-cell;
    width: auto !important;
    min-width: 56px;
    max-width: none;
    height: auto !important;
    padding: 8px 10px;
    border: 1px solid var(--ct-line);
    text-align: center;
    white-space: nowrap;
    overflow-wrap: normal;
  }
}
