/* DESKTOP-ONLY STYLES (Loaded for screens > 1024px) */

/* .header {
  height: 5rem;
}

.logo img {
  height: 1.375rem;
} */


.product-detail-container {
    padding-top: 0;
}

body.product-page {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@supports not (height: 100dvh) {
  body.product-page {
    height: 100vh;
  }
}

body.product-page .header {
  flex: 0 0 5rem;
}

body.product-page .product-detail-container {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-top: 0;
}

@media (min-width: 1024px) and (max-width: 1500px) and (max-height: 900px) {
  body.product-page {
    height: auto;
    min-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  body.product-page .product-detail-container {
    overflow: visible;
  }

  body.product-page .product-layout-grid,
  body.product-page .product-image-column,
  body.product-page .desktop-gallery-container,
  body.product-page .product-details-column {
    height: auto;
    max-height: none;
  }

  body.product-page .tabs-section .tabs-content-container {
    max-height: none;
    overflow-y: visible;
    overflow-x: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
    padding-right: 0;
  }
}

@supports not (height: 100dvh) {
  @media (min-width: 1024px) and (max-width: 1500px) and (max-height: 900px) {
    body.product-page {
      min-height: 100vh;
    }
  }
}

/* Main layout grid */
.product-layout-grid {
  display: grid;
  grid-template-columns: minmax(35rem, 40rem) 1fr;
  gap: 0 5rem;
  max-width: 1440px;
  margin: 0 auto;
  /* padding: 1.875rem 9.5625rem 1.875rem 9.375rem; */
  padding: 1.875rem clamp(2rem, 7vw, 9.5rem);
}

body.product-page .product-layout-grid,
body.product-page .product-image-column,
body.product-page .desktop-gallery-container {
  height: 100%;
  min-height: 0;
}

body.product-page .product-layout-grid {
  --desktop-v-space: 1.875rem;
  --available-image-height: calc(100dvh - 5rem - (2 * var(--desktop-v-space)));
  --desktop-column-gap: clamp(2.5rem, 4vw, 5rem);
  --image-col-width: clamp(32rem, calc(var(--available-image-height) * 0.75), 40rem);
  --desktop-column-width: min(var(--image-col-width), calc((100% - var(--desktop-column-gap)) / 2));
  grid-template-columns: repeat(2, minmax(0, var(--desktop-column-width)));
  gap: 0 var(--desktop-column-gap);
  justify-content: center;
}

@supports not (height: 100dvh) {
  body.product-page .product-layout-grid {
    --available-image-height: calc(100vh - 5rem - (2 * var(--desktop-v-space)));
  }
}

html.is-safari body.product-page .product-layout-grid {
  --available-image-height: calc(100vh - 5rem - (2 * var(--desktop-v-space)));
  --image-col-width: clamp(31rem, calc(var(--available-image-height) * 0.74), 40rem);
  column-gap: clamp(2rem, 3.2vw, 4rem);
}

body.product-page .product-image-column {
  position: relative;
  top: auto;
  align-self: stretch;
}

body.product-page .product-details-column {
  min-height: 0;
  height: var(--desktop-gallery-height, auto);
  max-height: var(--desktop-gallery-height, none);
}

/* Left column (Image) */
.product-image-column {
  grid-column: 1;
  position: sticky;
  top: 5.625rem; /* Header height + some padding */
  align-self: start; /* Prevents stretching */
}

/* Right column (Details) */
.product-details-column {
  max-width: 31.25rem;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

/* Hide mobile-only gallery on desktop */
.mobile-gallery {
  display: none;
}

/* --- Styling & Order within the right column --- */

.product-details-column .product-title {
  order: 1;
  padding-bottom: 1.5rem;
  border-bottom: none;
}
.product-details-column .product-title .label {
  font-size: .9375rem;
  letter-spacing: .0335rem;
}
.product-details-column .product-title .name {
  font-size: 4rem;
  margin-left: -0.23rem;
}

.product-details-column .color-title {
  order: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 0;
  margin: 0 0 1.625rem;
  border: none;
}
.product-details-column .color-title .label {
  font-size: .9375rem;
  letter-spacing: .0335rem;
  grid-row: 1;
  margin-bottom: .25rem;
}

.product-details-column .color-title .name {
  font-size: 2.1875rem;
  grid-row: 2;
}

.product-details-column .color-title .other-colors {
  font-size: .9375rem;
  grid-row: 2;
  align-self: center;
  /* padding-bottom: .25rem; */
}

.color-title .status {
  grid-column: 2;
  grid-row: 2;
  font-size: .9375rem;
  letter-spacing: .0335rem;
}

.product-details-column .description {
  order: 3;
  font-size: .9375rem;
  letter-spacing: .0335rem;
  line-height: 1.6;
  margin: 0 0 1.75rem;
}

.product-details-column .description.description-collapsible {
  margin-bottom: -0.2rem;
}

.product-details-column .description.description-collapsible.is-expanded {
  margin-bottom: 0.6rem;
}

.product-details-column .description-more[hidden] {
  display: none;
}

.model-desc-break {
    margin: 0.5rem 0;
  }

.product-details-column .description-collapse-inline {
  display: inline;
  margin-left: 0.25rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-color);
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: 0.12rem;
  vertical-align: baseline;
  cursor: pointer;
}

.product-details-column .description-collapse-inline:hover,
.product-details-column .description-collapse-inline:focus-visible {
  opacity: 0.5;
  outline: none;
}

.product-details-column .description-expand-button {
  order: 3;
  align-self: flex-start;
  margin: 0 0 1rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-color);
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: 0.12rem;
  cursor: pointer;
}

.product-details-column .description-expand-button:hover,
.product-details-column .description-expand-button:focus-visible {
  opacity: 0.5;
  outline: none;
}

.product-details-column .purchase-section {
  order: 4;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1.75rem 0 0 0;
  margin: 0 0 1.8rem 0;
  border-top: 1px solid var(--text-color);
  border-bottom: none;
  height: auto; 
}

.product-details-column .price {
  font-size: 2.5rem;
  color: var(--accent-red);
  flex-shrink: 0;
}

.product-details-column .buy-button {
  font-size: 1.4375rem;
  flex-grow: 1;
  /* max-width: 16.875rem; */
  height: 2.625rem;
  padding: 0;
  border: 1px solid var(--text-color);
  background: none;
  color: var(--text-color);
  cursor: pointer;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, background-color 0.15s ease, color 0.15s ease;
}

.product-details-column .buy-button:hover {
  opacity: 0.6;
}

.product-details-column .buy-button:active {
  opacity: 1;
  background-color: var(--text-color);
  color: var(--bg-color);
}

.product-details-column .tabs-section {
  order: 5;
}

.tabs-section .tabs {
  font-size: .875rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-bottom: .9375rem;
  border: none;
  gap: .75rem;
  /* margin-bottom: 1.5rem; */
}

.tabs-section .tabs button {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  text-transform: uppercase;
  font-size: .875rem;
  font-family: 'Degular', sans-serif;
  padding: 0;
}
.tabs-section .tabs button.active {
  font-weight: 400;
}

.tabs-section .tabs-content-container {
  padding-top: 0;
  max-height: var(--desktop-tabs-max-height, none);
  overflow-y: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(251, 223, 203, 0.55) transparent;
  padding-right: 0.1875rem;
}

.tabs-section .tabs-content-container.is-scrollable {
  overflow-y: auto;
}

.tabs-section .tabs-content-container::-webkit-scrollbar {
  width: 0.1875rem;
}

.tabs-section .tabs-content-container::-webkit-scrollbar-track {
  background: transparent;
}

.tabs-section .tabs-content-container::-webkit-scrollbar-thumb {
  background-color: rgba(251, 223, 203, 0.55);
  border-radius: 999px;
  border: none;
}

.tabs-section .tabs-content-container::-webkit-scrollbar-thumb:hover {
  background-color: rgba(254, 110, 118, 0.8);
}
.tabs-section .tabs-content {
  font-size: .9375rem;
  letter-spacing: .0335rem;
  /* line-height: 1.6; */
  display: none;
  margin: 0;
}
.tabs-section .tabs-content.active {
  display: block;
}

@media (min-width: 1024px) and (max-width: 1500px) {
  body.product-page .product-details-column,
  .product-details-column .tabs-section {
    min-height: 0;
  }
}

@media (min-width: 1024px) and (max-width: 1500px) {
  body.product-page .product-layout-grid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    --desktop-v-space: clamp(1.5rem, 1.8vw, 1.875rem);
    --desktop-column-gap: clamp(1.25rem, 3vw, 2.5rem);
    --image-col-width: clamp(28rem, calc(var(--available-image-height) * 0.74), 34rem);
    --desktop-column-width: min(var(--image-col-width), calc((100% - var(--desktop-column-gap)) / 2));
    grid-template-columns: repeat(2, minmax(0, var(--desktop-column-width)));
    gap: 0 var(--desktop-column-gap);
    padding: clamp(1.25rem, 1.8vw, 1.875rem) clamp(1.25rem, 2.4vw, 1.75rem);
    justify-content: center;
  }

  .product-details-column {
    width: 100%;
    max-width: 31.25rem;
  }

  .product-details-column .product-title {
    /* padding-bottom: clamp(0.8rem, 1vw, 1.5rem); */
    padding-bottom: 0.5rem;
  }

  .product-details-column .product-title .label,
  .product-details-column .color-title .label,
  .color-title .status {
    font-size: clamp(0.89rem, 0.98vw, 0.9375rem);
  }

  .product-details-column .product-title .name {
    font-size: clamp(3.65rem, 4.8vw, 4rem);
  }

  .product-details-column .color-title {
    /* margin: 0 0 clamp(1.25rem, 1.9vw, 1.625rem); */
    margin-bottom: 0.5rem
  }

  .product-details-column .color-title .name {
    font-size: clamp(2.05rem, 2.35vw, 2.1875rem);
  }

  .product-details-column .color-title .other-colors,
  .product-details-column .description,
  .tabs-section .tabs-content {
    font-size: clamp(0.92rem, 1.05vw, 0.9375rem);
  }

  .product-details-column .description {
    /* margin: 0 0 clamp(1.375rem, 2vw, 1.75rem); */
    /* line-height: clamp(1.5, 1.25vw, 1.6); */
    margin-bottom: 1rem;
  }

  .product-details-column .description.description-collapsible {
    margin-bottom: 0;
  }

  .product-details-column .description.description-collapsible.is-expanded {
    margin-bottom: 1rem;
  }

  .product-details-column .description-expand-button {
    margin-bottom: 0.8rem;
    font-size: clamp(1.0625rem, 1.45vw, 1.25rem);
  }

  .product-details-column .description-collapse-inline {
    font-size: clamp(1.0625rem, 1.45vw, 1.25rem);
  }

  .product-details-column .purchase-section {
    gap: clamp(1rem, 1.8vw, 1.25rem);
    padding-top: 1rem;
    margin-bottom: 1rem;
    /* padding-top: clamp(1.25rem, 2vw, 1.75rem); */
    /* margin: 0 0 clamp(1.375rem, 2.2vw, 1.8rem) 0; */
  }

  .product-details-column .price {
    font-size: clamp(2.35rem, 2.7vw, 2.5rem);
  }

  .product-details-column .buy-button {
    font-size: clamp(1.33rem, 1.75vw, 1.4375rem);
    height: clamp(2.375rem, 2.7vw, 2.625rem);
  }

  .tabs-section .tabs {
    gap: clamp(0.625rem, 1vw, 0.75rem);
    padding-bottom: clamp(0.75rem, 1.2vw, 0.9375rem);
  }

  .tabs-section .tabs button {
    font-size: clamp(0.8438rem, 1vw, 0.875rem);
  }
}

@media (min-width: 1024px) and (max-width: 1500px) {
  html.is-safari body.product-page .product-layout-grid {
    --image-col-width: clamp(28rem, calc(var(--available-image-height) * 0.73), 34rem);
    column-gap: clamp(3.5rem, 2.4vw, 4rem);
  }
}

@media (min-width: 2400px) {
  body.product-page .product-layout-grid {
    --image-col-width: clamp(30rem, 34vw, 40rem);
  }
}

/* @media (min-width: 1024px) and (max-width: 1050px) {
  .tabs-section .tabs {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
    justify-content: initial;
  }

  .tabs-section .tabs button {
    text-align: left;
    justify-self: start;
  }
} */

/* --- Hide original mobile elements on desktop --- */
.product-wrapper,
.footer-actions {
    display: none;
}

/* --- Desktop Gallery Styles --- */
.desktop-gallery-container {
  position: relative;
  width: 100%;
  max-width: 40rem;
  aspect-ratio: 3 / 4;
}

body.product-page .desktop-gallery-container {
  max-width: none;
  width: 100%;
  /* height: auto; */
  max-height: 100%;
  aspect-ratio: 3 / 4;
}

@media (min-width: 1024px) and (max-width: 1500px) and (max-height: 900px) {
  body.product-page .desktop-gallery-container {
    height: 100%;
    height: auto;
  }
}

.desktop-gallery-container .gallery-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

body.product-page .desktop-gallery-container .gallery-image {
  object-fit: contain;
  object-position: center;
}

.desktop-gallery-container .gallery-image.active {
  opacity: 1;
  z-index: 1;
}

.desktop-gallery-container .gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background-color: transparent;
  border: none;
  color: var(--text-color);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.4rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.desktop-gallery-container .gallery-arrow:hover,
.desktop-gallery-container .gallery-arrow:focus-visible {
  opacity: 1;
  outline: none;
}

.desktop-gallery-container .gallery-arrow.prev {
  left: calc(var(--gallery-side-gap, 0px) + 0.75rem);
}

.desktop-gallery-container .gallery-arrow.next {
  right: calc(var(--gallery-side-gap, 0px) + 0.75rem);
}

/* Remove old single image style */
.main-product-image {
  display: none;
}