/**
 * Deployment-safe PDP layout, tabs and native Magento gallery.
 *
 * This filename deliberately supersedes jangro-pdp-override.css. DeployHQ's
 * quick static strategy can retain an existing asset, so a new path ensures
 * these rules are published without mutating the server-rendered navigation.
 */

.catalog-product-view .jangro-pdp-hero {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 24px;
  width: 100%;
}

.catalog-product-view .jangro-pdp-hero .product.media,
.catalog-product-view .jangro-pdp-hero .product-info-main {
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100%;
  padding: 0;
  width: 100% !important;
}

@media only screen and (min-width: 880px) {
  .catalog-product-view .jangro-pdp-hero {
    align-items: start;
    display: grid;
    gap: 50px;
    grid-template-columns: 1.1fr 1fr;
  }

  .catalog-product-view .jangro-pdp-hero .product.media,
  .catalog-product-view .jangro-pdp-hero .product-info-main {
    max-width: none;
    width: auto !important;
  }

  .catalog-product-view .jangro-pdp-hero .product.media {
    grid-column: 1;
    order: 1;
  }

  .catalog-product-view .jangro-pdp-hero .product-info-main {
    grid-column: 2;
    order: 2;
  }
}

.jangro-pdp-tab h4 {
  color: #0a4d3c;
  font-family: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 16px 0 8px;
}

.jangro-pdp-tab h4:first-child {
  margin-top: 0;
}

.jangro-pdp-tab p {
  color: #4a5a52;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.jangro-pdp-tab .jangro-pdp-tab__lead {
  color: #0a2a20;
}

.jangro-dl-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  max-width: 520px;
}

.jangro-dl {
  align-items: center;
  background: #fff;
  border: 1px solid #dde3dc;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: #0a2a20;
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
}

.jangro-dl:hover,
.jangro-dl:focus-visible {
  border-color: rgba(10, 77, 60, 0.35);
  color: #0a2a20;
  text-decoration: none;
}

.jangro-dl__icon {
  align-items: center;
  background: #f4f7f2;
  border-radius: 6px;
  color: #0a4d3c;
  display: inline-flex;
  flex-shrink: 0;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.jangro-dl__text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.jangro-dl__title {
  font-size: 14.5px;
  font-weight: 600;
}

.jangro-dl__sub {
  color: #4a5a52;
  font-size: 12.5px;
}

.jangro-dl__arr {
  color: #0a4d3c;
  flex-shrink: 0;
}

@media only screen and (min-width: 768px) {
  .product.info.detailed .product.data.items {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .product.info.detailed .product.data.items::-webkit-scrollbar {
    display: none;
  }

  .product.info.detailed .product.data.items > .item.title {
    margin: 0 2px 0 0;
  }

  .product.info.detailed .product.data.items > .item.title > .switch {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    box-sizing: border-box;
    color: #4a5a52;
    font-size: 15px;
    font-weight: 600;
    height: 47px;
    line-height: 20px;
    padding: 13px 16px 12px;
    white-space: nowrap;
  }

  .product.info.detailed .product.data.items > .item.title > .switch:hover,
  .product.info.detailed .product.data.items > .item.title > .switch:focus {
    background: transparent;
    border-bottom-color: #dde3dc;
    color: #0a2a20;
  }

  .product.info.detailed .product.data.items > .item.title.active > .switch,
  .product.info.detailed .product.data.items > .item.title.active > .switch:hover,
  .product.info.detailed .product.data.items > .item.title.active > .switch:focus {
    background: transparent;
    border-bottom-color: #8dc63f;
    color: #0a4d3c;
    padding-bottom: 12px;
  }

  .product.info.detailed .product.data.items > .item.content {
    background: none;
    border: 0;
    border-top: 1px solid #dde3dc;
    margin-top: 46px;
    padding: 24px 0;
  }
}

/* Magento removes _block-content-loading when Fotorama is ready. */
.catalog-product-view .product.media
  .gallery-placeholder:not(._block-content-loading)
  .gallery-placeholder__image {
  display: none;
}

.catalog-product-view .product.media .fotorama__arr {
  display: block !important;
}

.catalog-product-view .product.media .fotorama__arr .fotorama__arr__arr {
  background-color: rgba(255, 255, 255, 0.94);
  border: 1px solid #dde3dc;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Neutralise the earlier gallery rule that overwrote Fotorama's calculated
   image geometry. A contained inset gives every slide stable dimensions while
   Fotorama continues to move frames horizontally. */
.catalog-product-view .product.media
  .fotorama__stage__frame .fotorama__img {
  bottom: auto !important;
  box-sizing: border-box !important;
  height: auto !important;
  left: 50% !important;
  margin: 0 !important;
  max-height: calc(100% - 80px) !important;
  max-width: calc(100% - 80px) !important;
  object-fit: contain !important;
  padding: 0 !important;
  position: absolute !important;
  right: auto !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: auto !important;
}

.catalog-product-view .product.media
  .fotorama--fullscreen .fotorama__stage__frame .fotorama__img {
  max-height: 100% !important;
  max-width: 100% !important;
}

@media only screen and (max-width: 767px) {
  .catalog-product-view .product.media
    .fotorama__stage__frame .fotorama__img {
    max-height: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
  }
}
