/* Mua Hang VIP - PC header and product detail surfaces.
   Loaded after the legacy styles; existing commerce handlers remain intact. */
:root {
  --mhv-ui-petrol: var(--mhv-petrol, #102c38);
  --mhv-ui-jade: var(--mhv-jade, #186255);
  --mhv-ui-mint: var(--mhv-mint, #a9e4d5);
  --mhv-ui-cream: var(--mhv-cream, #faf8f5);
  --mhv-ui-berry: var(--mhv-berry, #b52d50);
  --mhv-ui-border: #eaeaea;
  --mhv-ui-shadow: 0 3px 16px rgba(16, 44, 56, .06);
}

/* Desktop: remove legacy repeated background and the white inner stripe. */
@media (min-width: 991px) {
  body .header {
    background: var(--mhv-ui-petrol) !important;
    width: 100%;
  }
  body .header .menu_header,
  body .header .top_header,
  body .header .top_menu {
    box-sizing: border-box;
    max-width: 100%;
    background: transparent !important;
  }
  body .header .top_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: auto;
    min-height: 88px;
    padding: 8px 10px;
  }
  body .header .top_header .topmenumb {
    flex: 0 1 274px;
    min-width: 0;
    padding: 0;
  }
  body .header .top_header .logo {
    float: none;
    padding: 0;
  }
  body .header .top_header .logo a {
    max-width: 100%;
    height: 71px;
    background-position: left center;
  }
  body .header .top_header > .clr {
    display: none;
  }
  body .header .top_header .search {
    float: none;
    flex: 0 1 490px;
    min-width: 0;
    width: auto;
    padding: 0;
  }
  body .header .search .fr_search {
    float: none;
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid #c3ddd3;
    border-radius: 8px;
    background: #fff !important;
  }
  .header #mvpHeaderSearchForm {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 3px;
    box-sizing: border-box;
  }
  .header #mvpHeaderSearchInput {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 100%;
    padding: 0 10px;
    background: #fff;
    box-sizing: border-box;
    color: #20343d;
  }
  .header #mvpHeaderSearchForm .btn {
    position: static;
    flex: 0 0 88px;
    height: 36px;
    border: 0;
    border-radius: 6px;
    background: var(--mhv-ui-jade);
    color: #fff;
    font-weight: 600;
  }
  .header #mvpHeaderSearchForm .btn span { display: inline; }
  body .header .menu_header,
  body .header .menu_header a,
  body .header .hotro,
  body .header .hotro strong > span,
  body .header .menutop > li > a {
    color: #fff;
  }
  body .header .top_menu {
    border-color: rgba(169, 228, 213, .25);
    height: auto;
    min-height: 38px;
  }
  body .header .menutop > li > a:hover,
  body .header .menutop > li > a.active {
    background-image: none;
    color: var(--mhv-ui-mint);
    box-shadow: inset 0 -2px var(--mhv-ui-mint);
  }
  body .header a:focus-visible,
  body .header button:focus-visible,
  body .header input:focus-visible {
    outline: 2px solid var(--mhv-ui-mint);
    outline-offset: 2px;
  }
}

/* Desktop detail: scoped to viewRecord, never catalogue grids. */
.right_col .mhv-pdp {
  box-sizing: border-box;
  background: var(--mhv-ui-cream);
  padding: 12px;
  border-radius: 12px;
}
.right_col .mhv-pdp > .detail {
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  align-items: start;
  gap: 16px;
}
.right_col .mhv-pdp > .detail::after,
.right_col .mhv-pdp > .detail > .clr { display: none; }
.right_col .mhv-pdp > .detail > .img-detail,
.right_col .mhv-pdp > .detail > .info-detail {
  box-sizing: border-box;
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--mhv-ui-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--mhv-ui-shadow);
}
.right_col .mhv-pdp > .detail > .img-detail { overflow: visible; }
.right_col .mhv-pdp > .detail > .info-detail { overflow-wrap: anywhere; }
.right_col .mhv-pdp .img-detail .img {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--mhv-ui-border) !important;
  border-radius: 10px;
}
.right_col .mhv-pdp .img-detail .mall {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.right_col .mhv-pdp .img-detail .mall > a,
.right_col .mhv-pdp .img-detail .mall > a > .zoomPad {
  display: block;
  width: 100%;
  height: 100%;
  float: none;
}
.right_col .mhv-pdp .img-detail .mall > a > img,
.right_col .mhv-pdp .img-detail .mall .zoomPad > img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.right_col .mhv-pdp .pdsmall {
  display: flex;
  gap: 8px;
  width: 100%;
  height: auto;
  padding: 10px 0 0;
  overflow-x: auto;
}
.right_col .mhv-pdp .pdsmall a,
.right_col .mhv-pdp .pdsmall a.last {
  flex: 0 0 56px;
  box-sizing: border-box;
  width: 56px;
  height: 56px;
  margin: 0 !important;
  padding: 3px !important;
  border: 1px solid var(--mhv-ui-border);
  border-radius: 8px;
  background: #fff;
}
.right_col .mhv-pdp .pdsmall a:is(.active,.zoomThumbActive,:hover) {
  border: 2px solid var(--mhv-ui-jade);
}
.right_col .mhv-pdp .pdsmall a img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.right_col .mhv-pdp .info-detail h1 {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.35;
  color: #20343d;
  margin: 0 0 12px;
}
.right_col .mhv-pdp .form-detail .price-display {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--mhv-ui-petrol);
}
.right_col .mhv-pdp .form-detail .mhv-price-on-sale {
  color: var(--mhv-ui-berry);
}
.right_col .mhv-pdp .form-detail .pdbtn {
  height: auto !important;
}
.right_col .mhv-pdp .form-detail .pdbtn .buy {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  height: auto !important;
  padding: 10px 12px !important;
  background: var(--mhv-ui-jade);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
.right_col .mhv-pdp .form-detail .pdbtn .buy:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.right_col .mhv-pdp > .more-detail {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--mhv-ui-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--mhv-ui-shadow);
}
.right_col .mhv-pdp > .more-detail > label {
  height: auto;
  padding: 0 0 12px;
  background: none;
  color: #20343d;
  font-size: 18px;
}
.right_col .mhv-pdp > .more-detail > .more {
  max-width: 800px;
  margin: auto;
  border: 0;
  padding: 0 !important;
}

/* Direct mobile product route (separate PHP renderer). */
.mhv-app .mhv-product-page { background: var(--mhv-ui-cream); }
.mhv-app .mhv-pdp-mobile,
.mhv-app .mhv-pdp-description {
  background: #fff;
  border: 1px solid var(--mhv-ui-border);
  border-radius: 12px;
  box-shadow: var(--mhv-ui-shadow);
  min-width: 0;
}
.mhv-app .mhv-pdp-mobile .mhv-detail-img {
  position: relative;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--mhv-ui-border);
  border-radius: 10px;
}
.mhv-app .mhv-pdp-mobile .mhv-detail-img img {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: contain;
  display: block;
}
.mhv-app .mhv-pdp-mobile h1 {
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.mhv-app .mhv-pdp-mobile .mhv-detail-price {
  color: var(--mhv-ui-petrol);
}
.mhv-app .mhv-pdp-mobile .mhv-price-on-sale { color: var(--mhv-ui-berry); }

/* Restrict editor overrides to actual product descriptions. */
.mhv-pdp > .more-detail > .more,
.mhv-pdp-description .mhv-detail-content {
  font-size: 16px;
  line-height: 1.65;
  color: #20343d;
  overflow-wrap: anywhere;
  min-width: 0;
  overflow-x: auto;
}
:is(.mhv-pdp > .more-detail > .more, .mhv-pdp-description .mhv-detail-content) img {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  float: none !important;
  margin: 12px auto !important;
  border-radius: 8px;
}
:is(.mhv-pdp > .more-detail > .more, .mhv-pdp-description .mhv-detail-content) table {
  display: block;
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
:is(.mhv-pdp > .more-detail > .more, .mhv-pdp-description .mhv-detail-content) :is(iframe,video,figure,div,p) {
  max-width: 100% !important;
  box-sizing: border-box;
}
@media (max-width: 990px) {
  .right_col .mhv-pdp > .detail { grid-template-columns: minmax(0, 1fr); }
  .right_col .mhv-pdp > .detail > .img-detail { max-width: 520px; width: 100%; margin-inline: auto; }
  .right_col .mhv-pdp .zoomWindow { display: none !important; }
  .right_col .mhv-pdp { padding: 8px; }
}
