/* Mayana Core 7.9.80 — PDP layout + compact square family-colour selector.
   Scope is intentionally limited to single WooCommerce product pages. */

/* Product image area is pure white. */
body.msui-product-page .msui-pdp-gallery-col,
body.msui-product-page .msui-pdp-gallery-col .woocommerce-product-gallery,
body.msui-product-page .msui-pdp-gallery-col .woocommerce-product-gallery__wrapper,
body.msui-product-page .msui-pdp-gallery-col .flex-viewport,
body.msui-product-page .msui-pdp-gallery-col .woocommerce-product-gallery__image,
body.msui-product-page .msui-pdp-gallery-col .woocommerce-product-gallery__image > a,
body.msui-product-page .msui-pdp-gallery-col .flex-control-thumbs img {
  background:#fff !important;
}

/* Desktop purchase column: restore a comfortably wide right side. */
@media (min-width:1280px) {
  body.msui-product-page .msui-pdp-main {
    width:min(calc(100% - 64px),1660px) !important;
    grid-template-columns:minmax(0,1fr) minmax(620px,.90fr) !important;
    gap:clamp(48px,3.5vw,64px) !important;
  }
  body.msui-product-page .msui-pdp-summary {
    width:100% !important;
    max-width:none !important;
  }
  body.msui-product-page .msui-pdp-summary .msui-product-intro,
  body.msui-product-page .msui-pdp-summary .msui-short-message {
    width:100% !important;
    max-width:none !important;
  }
}

@media (min-width:901px) and (max-width:1279px) {
  body.msui-product-page .msui-pdp-main {
    width:min(calc(100% - 44px),1220px) !important;
    grid-template-columns:minmax(0,1.05fr) minmax(440px,.95fr) !important;
    gap:32px !important;
  }
  body.msui-product-page .msui-pdp-summary {
    width:100% !important;
    max-width:none !important;
  }
}

/* Under Hemen Satın Al only the accordion group remains. The inline trust /
   delivery copy is removed; accordion delivery data stays available below. */
body.msui-product-page .msui-pdp-summary .msui-trust,
body.msui-product-page .msui-pdp-summary .msui-whatsapp {
  display:none !important;
}
body.msui-product-page .msui-pdp-summary .msui-product-info,
body.msui-product-page .msui-pdp-summary .msui-accordions {
  margin-top:20px !important;
}

/* Core family selector. External MPF selector is hidden only when Core has a
   valid 2+ colour family, preventing duplicate colour rows. */
body.mayana-core-family-active .mpf-family {
  display:none !important;
}
 .mayana-family-switcher {
  width:100%;
  margin:2px 0 20px;
  padding:0;
}
.mayana-family-switcher__heading {
  display:flex;
  align-items:baseline;
  gap:8px;
  margin:0 0 10px;
  color:#6d6961;
  font-size:13px;
  line-height:1.4;
}
.mayana-family-switcher__heading strong {
  color:#181714;
  font-size:14px;
  font-weight:700;
}
.mayana-family-switcher__options {
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:10px;
}
.mayana-family-switcher__option {
  position:relative;
  width:72px;
  min-width:72px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  padding:5px 4px 6px;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:#24221e !important;
  text-decoration:none !important;
  box-shadow:none;
  transition:border-color .16s ease,background .16s ease,opacity .16s ease;
}
.mayana-family-switcher__option:hover {
  border-color:#d9d6cf;
  background:#fff;
}
.mayana-family-switcher__option.is-current {
  border-color:#111;
  background:#fff;
}
.mayana-family-switcher__option.is-out-of-stock {
  opacity:.58;
}
.mayana-family-switcher__swatch {
  display:block;
  flex:0 0 46px;
  width:46px;
  height:46px;
  border-radius:5px;
  border:1px solid rgba(0,0,0,.16);
  background:var(--mayana-family-color,#efefef);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.24);
}
.mayana-family-switcher__swatch--image {
  background-image:var(--mayana-family-image);
  background-size:cover;
  background-position:center;
}
.mayana-family-switcher__swatch--empty {
  background:#f4f4f4;
}
.mayana-family-switcher__name {
  width:100%;
  max-width:68px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:center;
  font-size:10.5px;
  font-weight:650;
  line-height:1.25;
}
.mayana-family-switcher__check {
  position:absolute;
  top:1px;
  right:2px;
  display:grid;
  place-items:center;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#111;
  color:#fff;
  font-size:9px;
  font-weight:800;
  line-height:1;
}

/* Mobile: the gallery is the first PDP content immediately under the main
   header/menu. No title/summary block is allowed to move above it. */
@media (max-width:900px) {
  body.msui-product-page #main,
  body.msui-product-page .site-main,
  body.msui-product-page .msui-pdp-page,
  body.msui-product-page .msui-product-custom,
  body.msui-product-page .msui-pdp-main {
    margin-top:0 !important;
    padding-top:0 !important;
  }
  body.msui-product-page .msui-pdp-main {
    display:flex !important;
    flex-direction:column !important;
  }
  body.msui-product-page .msui-pdp-gallery-col {
    order:-1000 !important;
    width:100% !important;
    margin:14px 0 0 !important;
    padding:0 !important;
  }
  body.msui-product-page .msui-pdp-summary {
    order:0 !important;
    width:100% !important;
    max-width:none !important;
  }
  body.msui-product-page .msui-pdp-gallery-col .woocommerce-product-gallery__image > a {
    padding-top:0 !important;
  }

  /* Blocksy fallback when Shop UI's custom template is disabled. */
  body.single-product .product-entry-wrapper {
    display:flex !important;
    flex-direction:column !important;
  }
  body.single-product .product-entry-wrapper > .woocommerce-product-gallery {
    order:-1000 !important;
    margin-top:14px !important;
  }
  body.single-product .product-entry-wrapper > .entry-summary,
  body.single-product .product-entry-wrapper > .summary {
    order:0 !important;
  }

  .mayana-family-switcher {
    margin:0 0 18px;
  }
  .mayana-family-switcher__options {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    overflow:visible;
    margin-right:0;
    padding:0;
  }
  .mayana-family-switcher__option {
    width:100%;
    min-width:0;
  }
  .mayana-family-switcher__swatch {
    width:42px;
    height:42px;
    flex-basis:42px;
  }
  .mayana-family-switcher__name {
    max-width:64px;
    font-size:10px;
  }
}
