@charset "utf-8";
/* ================================================================
   goldmoa.store  mobile app-style responsive layer
   Only applies under 768px (phones). Desktop layout untouched.
   ================================================================ */

/* --- viewport / base --- */
@media only screen and (max-width: 768px) {
  html { -webkit-text-size-adjust: 100%; }
  body { background: #f5f6f8 !important; }
  .tx-loader { display: none !important; }

  /* Hide desktop-only floating / popup helpers that get in the way */
  aside[style*="position: fixed"] { display: none !important; }
  .z_jb_up_kong, .z_jb_bp_tp, .z_jb_tcc_kong_nr, .z_jb_tcc_kong_tp { display: none !important; }

  /* ================= top app bar ================= */
  .m_topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    height: 52px; background: #fff;
    display: flex; align-items: center; gap: 8px;
    padding: 0 12px; box-sizing: border-box;
    border-bottom: 1px solid #ececec;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
  }
  .m_topbar .m_back {
    width: 32px; height: 32px; flex: 0 0 32px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: #222; cursor: pointer;
  }
  .m_topbar .m_logo {
    font-family: 'hg_logo1','Malgun Gothic',sans-serif;
    font-size: 20px; font-weight: 800; color: #b83018; letter-spacing: 1px;
    white-space: nowrap; flex: 0 0 auto;
  }
  .m_topbar .m_logo span { color: #222; }
  .m_topbar .m_search {
    flex: 1; height: 36px; background: #f2f3f5; border-radius: 18px;
    display: flex; align-items: center; padding: 0 14px; gap: 6px;
  }
  .m_topbar .m_search input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 14px; color: #222; min-width: 0;
  }
  .m_topbar .m_search input::placeholder { color: #aaa; }
  .m_topbar .m_search .m_search_icon { color: #999; font-size: 15px; }
  .m_topbar .m_icon {
    width: 34px; height: 34px; flex: 0 0 34px;
    display: flex; align-items: center; justify-content: center;
    color: #333; font-size: 20px; position: relative;
  }
  .m_topbar .m_cart_badge {
    position: absolute; top: 2px; right: 0;
    min-width: 16px; height: 16px; border-radius: 8px;
    background: #e23a3a; color: #fff; font-size: 10px; font-weight: 700;
    display: none; align-items: center; justify-content: center; padding: 0 4px;
  }

  /* spacer so content isn't hidden behind fixed bar + bottom tab */
  .m_topbar_spacer { height: 52px; }
  .m_bottomtab_spacer { height: 58px; }

  /* ================= bottom tab bar ================= */
  .m_tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    height: 58px; background: #fff;
    border-top: 1px solid #ececec;
    display: flex; align-items: stretch;
    box-shadow: 0 -1px 6px rgba(0,0,0,.05);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .m_tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; color: #8a8a8a; text-decoration: none; font-size: 11px; font-weight: 600;
  }
  .m_tabbar a .m_tab_icon { font-size: 21px; line-height: 1; }
  .m_tabbar a.m_active { color: #b83018; }

  /* ================= page content reset ================= */
  .z_gy_wr { padding-top: 0; }
  .m_topbar + .z_gy_wr, .m_topbar + div { padding-top: 0; }

  /* Desktop top bars hidden on mobile */
  .xg12_main .xg12_main_top, .xg12_main > div:first-child { display: none !important; }
  .xg12_logobox { display: none !important; }

  /* index header area */
  #main_menu, .main_menu { display: none !important; }

  /* desktop fixed-header spacer (empty 236px div) - not needed on mobile */
  div[style="height:236px;"] { display: none !important; }
  div[style="height: 236px;"] { display: none !important; }
  div[style="height:236px"] { display: none !important; }
  div[style="height: 236px"] { display: none !important; }

  /* hard-coded desktop-width sections (inline style width) */
  section[style*="width: 1200px"], div[style*="width: 1200px"], section[style*="width:1200px"], div[style*="width:1200px"] {
    width: 100% !important;
    box-sizing: border-box;
  }

  /* ================= index: item cards ================= */
  .main_main {
    padding: 0 !important;
  }
  .main_main > div[style*="padding"] { padding: 0 10px !important; }
  .item_box { width: 100% !important; }

  /* item grid generic (index uses inline styles; handled below) */
}

/* ---------- index item rows ---------- */
@media only screen and (max-width: 768px) {
  /* Home banner area */
  .s_slide01 img { border-radius: 8px; }
  .main_main .swiper { width: 100% !important; }
  .s_slide02 .swiper-slide { max-width: none !important; }
  .s_slide02 .swiper-slide .item_img_box { height: auto !important; aspect-ratio: 1/1; }

  /* product grid containers on home */
  .home_item_grid, .item_list, [class*="item_grid"] { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
  .main_item ul { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px 8px !important; }
  .main_item ul li { width: 100% !important; padding-bottom: 0 !important; min-width: 0 !important; overflow: hidden; }
  .main_item .item_img_box { height: auto !important; aspect-ratio: 1/1; }

  /* generic inline-flex grids on home page */
  .main_main section[style*="display: flex"], .main_main div[style*="display: flex"] {
    flex-wrap: wrap;
  }
  .main_main div[style*="width: 240px"], .main_main div[style*="width:240px"] { width: calc(50% - 6px) !important; }
}

/* ---------- item card generic ---------- */
@media only screen and (max-width: 768px) {
  .item_img_box { width: 100% !important; aspect-ratio: 1/1; overflow: hidden; background: #fff; }
  .item_img_box .item_img { width: 100% !important; height: 100% !important; object-fit: cover; }
  .item_timu { font-size: 13px !important; line-height: 1.4 !important; height: auto !important; max-height: 2.8em; overflow: hidden; }
  .item_price { font-size: 13px !important; }
  .item_price_box { padding: 4px 0 !important; white-space: nowrap !important; overflow: hidden !important; }
  .item_sale_percent { font-size: 11px !important; }
}

/* ================================================================
   list page (sp_l)
   ================================================================ */
@media only screen and (max-width: 768px) {
  .xg12_main .xg12_main_search, .xg12_main form { display: none !important; }
  .xg12_main { display: none !important; }
  .sp_l_container { margin: 0 auto !important; padding: 8px 0 60px !important; }
  .sp_l_breadcrumb { display: none !important; }
  .sp_l_title { padding: 8px 12px !important; font-size: 16px !important; }
  .sp_l_count { font-size: 12px !important; }
  .sp_l_sort { display: flex !important; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 8px 12px !important; }
  .sp_l_sort a { white-space: nowrap; padding: 6px 12px !important; font-size: 12px !important; }
  .sp_l_grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }
  .sp_l_grid .sp_l_item {
    background: #fff; border-radius: 8px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    display: block !important;
  }
  .sp_l_item .item_img_box { aspect-ratio: 1/1; }
  .sp_l_item .item_type { margin: 0 !important; }
  .sp_l_item .item_name { padding: 6px 8px !important; font-size: 13px !important; line-height: 1.4 !important; height: auto !important; }
  .sp_l_item .item_price { padding: 0 8px 8px !important; }
}

/* ================================================================
   product detail pages (products folder)
   ================================================================ */
@media only screen and (max-width: 768px) {
  .z_gy_top { display: none !important; }
  .breadcrumb { display: none !important; }
  .detail_wrap {
    display: block !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  .detail_wrap .btn_area { display: none !important; }
  .detail_img_box {
    width: 100% !important;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #fff;
  }
  .detail_img_box img { width: 100%; height: 100%; object-fit: contain; }
  .detail_info { width: 100% !important; padding: 12px !important; background: #fff; }
  .detail_info h1 { font-size: 17px !important; line-height: 1.4 !important; }
  .detail_sub { font-size: 13px !important; margin: 6px 0 10px !important; }
  .info_table li { font-size: 13px !important; }
  .price_area .sale_price { font-size: 20px !important; }
  .price_area .orig_price { font-size: 13px !important; }
  .qty_area { margin: 10px 0 !important; }

  /* sticky bottom buy bar on detail page */
  .m_detail_bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9998;
    background: #fff; border-top: 1px solid #ececec;
    display: flex; gap: 8px; padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
    box-shadow: 0 -1px 6px rgba(0,0,0,.06);
  }
  .m_detail_bar .btn_buy,
  .m_detail_bar .btn_cart,
  .m_detail_bar .btn_wish {
    flex: 1; height: 44px; border-radius: 22px; font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .m_detail_bar .btn_buy { background: #b83018; color: #fff; }
  .m_detail_bar .btn_cart { background: #222; color: #fff; }
  .m_detail_bar .btn_wish { background: #f2f3f5; color: #333; flex: 0 0 52px; }
  .detail_desc { padding: 12px !important; margin-bottom: 60px !important; }

  .z_gy_foot { padding: 20px 12px !important; }
  .z_gy_foot_in > div { flex-direction: column !important; gap: 12px !important; }
  .z_gy_copyright { padding: 12px !important; font-size: 11px !important; }
}

/* ================================================================
   my_* pages (mypage / cart / fav / charge / withdraw / orders)
   ================================================================ */
@media only screen and (max-width: 768px) {
  .top_bar { display: none !important; }
  .header { display: none !important; }
  nav { display: none !important; }
  .page_title { padding: 10px 12px !important; font-size: 16px !important; }
  .mypage_tabs {
    display: flex !important; overflow-x: auto !important;
    -webkit-overflow-scrolling: touch; padding: 0 10px !important;
    border-bottom: 1px solid #ececec !important; flex-wrap: nowrap !important;
  }
  .mypage_tab { padding: 12px 16px !important; white-space: nowrap !important; font-size: 13px !important; }
  .mypage_wrapper { display: block !important; padding: 10px !important; }
  .mypage_sidebar { width: 100% !important; }
  .sidebar_profile { border-radius: 8px !important; }
  .mypage_main { width: 100% !important; }
  .my_section { border-radius: 8px !important; }
  .my_table { display: block !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sidebar_quick { display: grid !important; grid-template-columns: repeat(2,1fr) !important; gap: 8px !important; }
  .sidebar_quick a {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: #fff; border-radius: 8px; padding: 14px 8px; font-size: 12px; font-weight: 700;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
  }
  .sidebar_quick .sq_icon { font-size: 22px; }

  /* tables -> stacked card rows on mobile */
  .my_table thead { display: none; }
  .my_table tbody, .my_table tr, .my_table td { display: block !important; width: 100% !important; }
  .my_table tbody tr {
    background: #fff; border: 1px solid #eee; border-radius: 8px; margin-bottom: 8px; padding: 10px;
  }
  .my_table tbody td { border: none !important; padding: 4px 0 !important; text-align: left !important; }
  .my_table tbody td::before { content: attr(data-label); display: block; font-size: 10px; color: #999; font-weight: 700; margin-bottom: 2px; }
  .my_table .empty { text-align: center !important; padding: 30px 10px !important; }

  .pe_hktable th, .pe_hktable td { display: block !important; width: 100% !important; text-align: left !important; box-sizing: border-box; }
  .pe_hktable th { background: #f7f7f9 !important; padding: 8px 10px !important; }
  .pe_hktable td { padding: 10px !important; }

  .footer { display: none !important; }
}

/* ================================================================
   auth pages (yh_login / yh_join / yh_readme)
   ================================================================ */
@media only screen and (max-width: 768px) {
  body > div[style*="background-color: #fafafa"], body > div[style*="min-height: 100vh"] { padding: 0 !important; }
  main[style*="max-width: 400px"], main { width: 100% !important; max-width: 100% !important; margin: 0 !important; box-shadow: none !important; min-height: 100vh; }
}

/* ================================================================
   generic small screens fine-tuning
   ================================================================ */
@media only screen and (max-width: 480px) {
  .m_topbar .m_logo { font-size: 17px; }
  .m_topbar .m_search { padding: 0 10px; }
  .m_topbar .m_search input { font-size: 13px; }
  .m_tabbar a { font-size: 10px; }
}
