/*
 * Footish product page redesign – isolated test for L49212100.
 * All rules are gated by a class added by footish-product-redesign-test.js.
 */

:root {
  --footish-redesign-ready: 1;
}

body.footish-product-redesign-test
  .product-description
  > .footish-colour-variants {
  box-sizing: border-box;
  clear: both;
  display: block;
  float: none;
  margin: 22px 0 28px;
  width: 100%;
}

body.footish-product-redesign-test
  .footish-colour-variants
  .related-product-list {
  display: grid !important;
  gap: 3px !important;
  grid-template-columns: repeat(6, minmax(0, 74px)) !important;
  justify-content: start !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

body.footish-product-redesign-test
  .footish-colour-variants
  .related-colors-heading {
  font-size: 17px;
  font-weight: 700;
  grid-column: 1 / -1;
  line-height: 1.25;
  margin: 0 0 3px;
  text-align: left;
}

body.footish-product-redesign-test
  .footish-colour-variants
  .related-product {
  background: transparent !important;
  border: 0 !important;
  box-sizing: border-box;
  box-shadow: none !important;
  float: none;
  margin: 0;
  max-width: none;
  padding: 0;
  width: 100% !important;
}

body.footish-product-redesign-test
  .footish-colour-variants
  .related-product-image {
  aspect-ratio: 4 / 3;
  background: transparent !important;
  border: 0 !important;
  box-sizing: border-box;
  box-shadow: none !important;
  overflow: hidden;
  outline: 0 !important;
  width: 74px !important;
}

body.footish-product-redesign-test
  .footish-colour-variants
  .related-product-image:hover {
  border: 0 !important;
}

body.footish-product-redesign-test
  .footish-colour-variants
  .related-product-image
  a {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: flex;
  height: 100%;
  justify-content: center;
  outline: 0 !important;
  width: 100%;
}

body.footish-product-redesign-test
  .footish-colour-variants
  .related-product-image
  img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
  width: 100%;
}

body.footish-product-redesign-test .footish-size-heading {
  align-items: center;
  box-sizing: border-box;
  clear: both;
  display: flex !important;
  float: none !important;
  flex: 0 0 100%;
  flex-wrap: nowrap;
  justify-content: space-between;
  margin: 20px 0 9px;
  max-width: none;
  padding: 0;
  width: 100%;
}

body.footish-product-redesign-test .footish-size-heading-label {
  color: #2f2f2f;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

body.footish-product-redesign-test .footish-sizeguide-link {
  align-items: center;
  clear: none !important;
  color: #2f2f2f;
  display: inline-flex !important;
  float: none !important;
  font-size: 15px;
  font-weight: 600;
  gap: 7px;
  line-height: 1.25;
  margin: 0;
  margin-left: auto !important;
  position: static !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  width: auto !important;
}

body.footish-product-redesign-test .footish-sizeguide-link::before {
  content: none !important;
  display: none !important;
}

body.footish-product-redesign-test
  .product-attributes
  img.footish-sizeguide-icon {
  display: block !important;
  flex: 0 0 22px !important;
  height: 22px !important;
  margin: 0 !important;
  max-height: 22px !important;
  max-width: 22px !important;
  min-height: 22px !important;
  min-width: 22px !important;
  object-fit: contain !important;
  padding: 0 !important;
  width: 22px !important;
}

body.footish-product-redesign-test .footish-sizeguide-link:hover,
body.footish-product-redesign-test .footish-sizeguide-link:focus {
  color: #000;
}

body.footish-product-redesign-test .footish-mobile-summary {
  display: none;
}

body.footish-product-redesign-test .footish-original-size-select {
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  overflow: hidden !important;
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  white-space: nowrap !important;
  width: 1px !important;
  display: none !important;
}

body.footish-product-redesign-test .footish-size-options {
  background: #fff !important;
  display: grid !important;
  float: none !important;
  gap: 9px !important;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)) !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

body.footish-product-redesign-test .footish-size-option {
  appearance: none !important;
  background: #fff !important;
  border: 1px solid #cfcfcf !important;
  border-radius: 3px !important;
  box-sizing: border-box !important;
  color: #252525 !important;
  cursor: pointer !important;
  float: none !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  min-height: 48px !important;
  padding: 8px 6px !important;
  text-align: center !important;
  width: auto !important;
  transition: border-color 150ms ease, background 150ms ease,
    color 150ms ease;
}

body.footish-product-redesign-test .footish-size-option:hover,
body.footish-product-redesign-test .footish-size-option:focus {
  border-color: #222;
  outline: none;
}

body.footish-product-redesign-test .footish-size-option.is-selected {
  background: #08cbd1 !important;
  border-color: #08cbd1 !important;
  box-shadow: none !important;
  color: #fff !important;
  font-weight: 700 !important;
}

body.footish-product-redesign-test .footish-size-option:disabled {
  background: #f3f3f3;
  color: #aaa;
  cursor: not-allowed;
  text-decoration: line-through;
}

body.footish-product-redesign-test .footish-size-options.needs-selection {
  animation: footish-size-attention 240ms ease-in-out 0s 2 alternate;
}

body.footish-product-redesign-test
  .purchase-block-price.footish-mobile-purchase-price {
  display: none !important;
}

body.footish-product-redesign-test .footish-mobile-top-price {
  display: none !important;
}

/* Remove the arrow that Jetshop adds for the now visually hidden dropdown. */
body.footish-product-redesign-test .product-attributes-1::before,
body.footish-product-redesign-test .product-attributes-1::after {
  content: none !important;
  display: none !important;
}

body.footish-product-redesign-test .product-attributes,
body.footish-product-redesign-test .product-attributes-1 {
  background: #fff !important;
}

body.footish-product-redesign-test .product-attributes {
  border-bottom: 1px solid #222 !important;
}

body.footish-product-redesign-test
  .purchase-block-buy.is-size-required
  .buy-button {
  background: #aaa !important;
  border-color: #aaa !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

body.footish-product-redesign-test
  .purchase-block-buy.is-size-confirmed
  .buy-button {
  background: #4bcf5b !important;
  border-color: #4bcf5b !important;
  cursor: pointer !important;
}

@keyframes footish-size-attention {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(5px);
  }
}

body.footish-sizeguide-open {
  overflow: hidden !important;
}

body > .footish-sizeguide-drawer {
  bottom: 0 !important;
  height: 100vh !important;
  height: 100dvh !important;
  left: 0 !important;
  pointer-events: none !important;
  position: fixed !important;
  right: 0 !important;
  top: 0 !important;
  visibility: hidden !important;
  width: 100vw !important;
  z-index: 9998 !important;
}

body > .footish-sizeguide-drawer.is-open {
  pointer-events: auto !important;
  visibility: visible !important;
}

.footish-sizeguide-drawer > .footish-sizeguide-backdrop {
  background: rgba(0, 0, 0, 0.48) !important;
  border: 0 !important;
  bottom: 0 !important;
  cursor: pointer !important;
  height: 100vh !important;
  left: 0 !important;
  margin: 0 !important;
  opacity: 0;
  padding: 0 !important;
  position: fixed !important;
  right: 0 !important;
  top: 0 !important;
  transition: opacity 220ms ease;
  width: 100vw !important;
}

.footish-sizeguide-drawer.is-open .footish-sizeguide-backdrop {
  opacity: 1;
}

.footish-sizeguide-drawer > .footish-sizeguide-panel {
  background: #fff !important;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.22);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  bottom: 0 !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100% !important;
  min-width: 380px !important;
  position: fixed !important;
  right: 0 !important;
  top: 0 !important;
  transform: translateX(105%);
  transition: transform 260ms ease;
  width: 480px !important;
  z-index: 9999 !important;
}

.footish-sizeguide-drawer.is-open > .footish-sizeguide-panel {
  transform: translateX(0) !important;
}

.footish-sizeguide-header {
  align-items: center;
  border-bottom: 1px solid #ddd;
  box-sizing: border-box;
  display: flex;
  flex: 0 0 82px;
  justify-content: space-between;
  padding: 0 22px 0 26px;
}

.footish-sizeguide-title {
  color: #2f2f2f;
  font-size: 28px;
  line-height: 1.15;
  margin: 0;
}

.footish-sizeguide-close {
  align-items: center;
  background: #fff;
  border: 0;
  border-radius: 50%;
  color: #222;
  cursor: pointer;
  display: flex;
  font-family: Arial, sans-serif;
  font-size: 42px;
  height: 48px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 5px;
  position: static;
  width: 48px;
  z-index: 2;
}

.footish-sizeguide-close:hover,
.footish-sizeguide-close:focus {
  background: #f1f1f1;
  outline: 2px solid #222;
}

.footish-sizeguide-drawer-content {
  box-sizing: border-box;
  flex: 1 1 auto;
  height: auto;
  overflow: auto;
  padding: 26px 26px 30px;
  -webkit-overflow-scrolling: touch;
}

.footish-sizeguide-drawer-content h2,
.footish-sizeguide-drawer-content h3,
.footish-sizeguide-drawer-content h4 {
  margin-top: 0;
}

.footish-sizeguide-drawer-content .footish-sizeguide-model-title {
  align-items: center;
  background: #fff;
  box-sizing: border-box;
  display: flex;
  min-height: 58px;
  margin: 0 !important;
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 4;
}

.footish-sizeguide-drawer-content table {
  border-collapse: collapse;
  font-size: 16px;
  min-width: 100%;
  width: 100%;
}

.footish-sizeguide-drawer-content th,
.footish-sizeguide-drawer-content td {
  border: 1px solid #d5d5d5;
  padding: 13px 8px;
  text-align: center;
}

.footish-sizeguide-drawer-content th {
  background: #2f2f2f;
  color: #fff;
  font-weight: 700;
  position: sticky;
  top: 58px;
  z-index: 3;
}

/* The new heading replaces Jetshop's internal attribute label visually. */
body.footish-product-redesign-test
  .product-attributes-1
  > span:first-child {
  display: none;
}

/* Desktop/tablet: colour choices sit below the product identity. */
@media only screen and (min-width: 768px) {
  body.footish-product-redesign-test
    .footish-colour-variants
    .related-product-image
    img {
    object-fit: contain !important;
    object-position: center bottom !important;
  }

  body.footish-product-redesign-test .purchase-block-body {
    align-items: stretch;
    background: #f3f3f3 !important;
    display: grid !important;
    gap: 0 28px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
    padding: 0 !important;
  }

  body.footish-product-redesign-test .purchase-block-quantity {
    display: none !important;
  }

  body.footish-product-redesign-test .product-attributes {
    background: #fff !important;
    float: none !important;
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    max-width: none !important;
    padding: 22px 24px 24px !important;
    width: 100% !important;
  }

  body.footish-product-redesign-test .purchase-block-price {
    align-self: center;
    float: none !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    margin: 0 !important;
    max-width: none !important;
    padding: 26px 0 26px 24px !important;
    width: 100% !important;
  }

  body.footish-product-redesign-test .purchase-block-buy {
    float: none !important;
    grid-column: 2 !important;
    grid-row: 2 !important;
    margin: 0 !important;
    max-width: none !important;
    padding: 24px 24px 24px 0 !important;
    width: 100% !important;
  }

  body.footish-product-redesign-test .purchase-block-buy .buy-button {
    box-sizing: border-box;
    width: 100% !important;
  }

  body.footish-product-redesign-test
    .product-description
    > .footish-colour-variants {
    margin: 18px 0 22px;
  }
}

/* Mobile: identity, colour choices and purchase information stack naturally. */
@media only screen and (max-width: 767px) {
  body.footish-product-redesign-test .footish-mobile-summary.is-active {
    box-sizing: border-box;
    clear: both;
    display: block;
    float: none;
    padding: 20px 18px 16px;
    width: 100%;
  }

  body.footish-product-redesign-test
    .footish-mobile-summary
    .product-title,
  body.footish-product-redesign-test
    .footish-mobile-summary
    .product-details {
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }

  body.footish-product-redesign-test
    .footish-mobile-summary
    .footish-mobile-top-price {
    color: #303030 !important;
    display: block !important;
    float: none !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    margin: 22px 0 0 !important;
    opacity: 1 !important;
    padding: 0 !important;
    position: static !important;
    visibility: visible !important;
    width: 100% !important;
  }

  body.footish-product-redesign-test
    .purchase-block-body
    .purchase-block-price:not(.footish-mobile-purchase-price) {
    display: none !important;
  }

  body.footish-product-redesign-test .purchase-block-body {
    background: transparent !important;
    display: block !important;
    padding: 0 !important;
  }

  body.footish-product-redesign-test .purchase-block-quantity {
    display: none !important;
  }

  body.footish-product-redesign-test .product-attributes,
  body.footish-product-redesign-test .purchase-block-buy {
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  body.footish-product-redesign-test .product-attributes {
    background: #fff !important;
    padding: 18px !important;
  }

  body.footish-product-redesign-test
    .purchase-block-price.footish-mobile-purchase-price {
    background: #f3f3f3 !important;
    box-sizing: border-box !important;
    display: block !important;
    float: none !important;
    margin: 0 !important;
    max-width: none !important;
    padding: 20px 18px 4px !important;
    position: static !important;
    width: 100% !important;
  }

  body.footish-product-redesign-test .footish-size-options {
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.footish-product-redesign-test .footish-size-option {
    font-size: 17px;
    min-height: 52px;
  }

  body.footish-product-redesign-test .purchase-block-buy {
    background: #f3f3f3 !important;
    box-sizing: border-box !important;
    margin-top: 0 !important;
    padding: 14px 18px 20px !important;
  }

  .footish-sizeguide-drawer > .footish-sizeguide-panel {
    bottom: 0 !important;
    height: 80vh !important;
    height: 80dvh !important;
    max-width: none !important;
    min-width: 0 !important;
    top: auto !important;
    width: 100% !important;
  }

  .footish-sizeguide-drawer-content {
    padding: 18px 16px 24px;
  }

  .footish-sizeguide-header {
    flex-basis: 64px;
    padding: 0 12px 0 18px;
  }

  .footish-sizeguide-title {
    font-size: 22px;
  }

  body.footish-product-redesign-test
    .product-description
    > .footish-colour-variants {
    margin: 18px 0 24px;
    padding: 0;
  }

  body.footish-product-redesign-test
    .footish-colour-variants
    .related-product-list {
    gap: 2px !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  body.footish-product-redesign-test
    .footish-colour-variants
    .related-product-image {
    width: 100% !important;
  }

  body.footish-product-redesign-test
    .footish-colour-variants
    .related-colors-heading {
    font-size: 16px;
  }

  body.footish-product-redesign-test .footish-size-heading {
    margin-top: 18px;
  }

  body.footish-product-redesign-test .footish-size-heading-label {
    font-size: 17px;
  }
}
