/* WONWOO MALL FIX38 — static layout adjustments only; no API/server changes. */

/* (1) Keep the KGM selector logo inside the row and consistent with the Hyundai selector. */
#ww-parts-maker-switch .ww-maker-tabs button[data-ww-maker="KGM"]{
  overflow:hidden!important;
}
#ww-parts-maker-switch .ww-maker-tabs button[data-ww-maker="KGM"] .ww-maker-logo-wrap{
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 70px!important;
  width:70px!important;
  height:42px!important;
  min-width:70px!important;
  overflow:hidden!important;
}
#ww-parts-maker-switch .ww-maker-tabs button[data-ww-maker="KGM"] .ww-maker-logo-wrap img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:55px!important;
  max-height:32px!important;
  object-fit:contain!important;
  flex-shrink:0!important;
}

/* (2)(3) Give the search section and its service card the available width.
   The manufacturer's two-column selector itself remains intact. */
@media (min-width:1024px){
  body:not(.ww-kr-official-mode):not(.ww-kgm-popup) #auto > .page-container{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:20px!important;
  }
  body:not(.ww-kr-official-mode):not(.ww-kgm-popup) #auto > .page-container > div{
    grid-column:1 / -1!important;
    width:100%!important;
    min-width:0!important;
  }
  body:not(.ww-kr-official-mode):not(.ww-kgm-popup) #auto [data-ww-hkg-intro]{
    max-width:none!important;
    width:100%!important;
    white-space:nowrap!important;
  }
}
#ww-auto-service-links{
  width:100%!important;
  max-width:none!important;
}
#ww-auto-service-links .ww-auto-service-card{
  width:100%!important;
  max-width:none!important;
}

/* (3) 11 auto-parts links: 4 compact cards per desktop row; preserve mobile usability. */
#auto .ww-auto-parts-mall-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
#auto .ww-auto-parts-mall-grid > a{
  min-height:79px!important;
  padding:7px 9px!important;
  gap:3px!important;
  justify-content:center!important;
  overflow:hidden!important;
}
#auto .ww-auto-parts-mall-grid > a > span:first-child{
  padding:2px 5px!important;
  min-height:33px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
#auto .ww-auto-parts-mall-grid > a img{
  display:block!important;
  height:auto!important;
  width:auto!important;
  max-height:24px!important;
  max-width:66px!important;
  object-fit:contain!important;
}
#auto .ww-auto-parts-mall-grid > a strong{
  font-size:11px!important;
  line-height:1.2!important;
}
#auto .ww-auto-parts-mall-grid a[href*="gparts.co.kr"]::after,
#auto .ww-auto-parts-mall-grid a[href*="pechanara.com"]::after{
  top:4px!important;
  right:5px!important;
  padding:3px 5px!important;
  font-size:8px!important;
}
@media (max-width:1023px){
  #auto .ww-auto-parts-mall-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  #auto [data-ww-hkg-intro]{white-space:normal!important;}
}
@media (max-width:620px){
  #auto .ww-auto-parts-mall-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;}
  #auto .ww-auto-parts-mall-grid > a{min-height:75px!important;padding:7px!important;}
  #ww-parts-maker-switch .ww-maker-tabs button[data-ww-maker="KGM"] .ww-maker-logo-wrap{flex-basis:58px!important;width:58px!important;min-width:58px!important;}
}
@media (max-width:370px){
  #auto .ww-auto-parts-mall-grid{grid-template-columns:1fr!important;}
}

/* FIX39 — Direct server order intake / customer contact option */
.ww-purchase-form .ww-purchase-contact{border:1px solid #d5e0ef;background:#f8fbff;border-radius:9px;padding:13px}
.ww-purchase-form .ww-purchase-consent{font-size:13px;font-weight:750;color:#213d61;cursor:pointer}
.ww-purchase-form .ww-purchase-consent input{width:18px;height:18px;accent-color:#0b448f}
.ww-purchase-form .ww-purchase-contact p{margin-top:7px;line-height:1.6}
.ww-purchase-form .ww-purchase-history-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;border:1px solid #bacde1;border-radius:8px;padding:8px 16px;color:#154780;font-size:13px;font-weight:800;text-decoration:none}
.ww-purchase-form .ww-purchase-photo-remove{display:inline-block;margin-top:8px;padding:4px 0;color:#a43338;font-weight:700;font-size:12px;text-decoration:underline}
.ww-purchase-form [role="alert"]{line-height:1.6}
@media (max-width:650px){.ww-purchase-form .ww-purchase-history-link{width:100%}}
