/* style.css */
/* --bg:#EFEFEF; */
:root{
    /* layout */
    --max:480px;
    --radius:14px;
  
    /* brand */
    --blue:#013BAF;
    --blue2:#0D49C7;     /* 일부 페이지에서 사용 */
    --blue-2:#1B56CC;    /* join/style에서 사용(호환용) */
  
    /* base colors */
            /* 대부분 페이지 기본 배경 */
    --bg:#F2F4F8;
    --bg2:#F2F4F8;        /* 대부분 페이지 기본 배경 */
    --txt:#111;
    --text:var(--txt);   /* user_info 호환 */
    --muted:#667085;
    --line:#E5EAF2;
    --border:#E8ECF3;
    --card:#fff;
    --white:#fff;
    /* status */
    --red:#E41E2B;
  
    /* effects */
    --shadow:0 2px 10px rgba(0,0,0,.06);
  
    /* misc */
    --chip:#EDF2FF;      /* cart에서 사용 */
  }
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== Containers (필요시 사용) ===== */
.wrap{ max-width:var(--max); margin:0 auto; }
.container{ max-width:var(--max); margin:0 auto; padding:16px; }
.chip{ border:0; background:var(--chip); color:#1b3dbf; font-weight:700; padding:6px 12px; border-radius:10px; height: 30px;}
.chip.danger{ background:#FF0000; color:#ffffff; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', sans-serif;
  background-color: var(--bg);
  color: #000;
  line-height: 1.5;
}


/* 헤더(고정) */
.header{position:fixed;top:0;left:0;right:0;max-width:var(--max);margin:0 auto;background:#fff;border-bottom:1px solid #eee;z-index:1000}
.header .row{height:45px;display:flex;align-items:center;justify-content:space-between;padding:0 16px; border-bottom: 1px solid var(--line);}
.header img{width:24px;height:24px}
.header .icons{display:flex;gap:12px}
.back{background:none;border:0;padding:0;cursor:pointer}
.header-spacer{height:56px}

  /* 헤더 */
  .header .left,.header .right{display:flex;align-items:center;gap:12px}
  .header .title{font-size:16px;font-weight:700;margin-left: 10px;}
  .header button{background:none;border:0;padding:0;cursor:pointer}

.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}
  .btn.full{width:100%;height:48px;border-radius:12px}
  .btn[disabled]{background:#F3F6FB;color:#A9B4C6;border-color:#E2E8F0;cursor:not-allowed}
  .btn{height:40px;border-radius:10px;border:1px solid #EFEFEF;background:#013BAF;color:#ffffff;font-weight:800;padding:0 14px;cursor:pointer;white-space:nowrap;
    display: flex;
    justify-content: center;
    align-items: center;}
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: white;
  border-bottom: 1px solid #eee;
  max-width: 480px;
  margin: 0 auto;
  height: 45px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo img {
  width: 24px;
  height: 24px;
}

.logo span {
  font-size: 18px;
  font-weight: bold;
  color: #0051a3; /* 로고 색상 추정 */
}

.top-icons {
  display: flex;
  gap: 12px;
}

.icon-btn {
  background: none;
  border: none;
  padding: 0;
}

.icon-btn img {
  width: 24px;
  height: 24px;
}


.gnb {
    background-color: #fff;
  position: relative;
  overflow-x: auto;
  white-space: nowrap;
  border-bottom: 1px solid #ddd;
  max-width: 480px;
  margin: 0 auto;
}

.gnb.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.gnb-list {
  display: flex;
  list-style: none;
  padding: 0 16px;
  margin: 0;
}

.gnb-item {
  padding: 12px 16px;
  font-size: 16px;
  color: #444;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}

.gnb-item-child{
  padding: 12px 16px;
  font-size: 16px;
  color: #444;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}

.gnb-item-child.active {
  color: #0051a3;
  font-weight: bold;
}

.gnb-item span {
  position: relative;
  display: inline-block;
}

.gnb-item.active {
  color: #0051a3;
  font-weight: bold;
}

.gnb-underline {
  position: absolute;
  bottom: 0;
  height: 4px;
  border-radius: 10px 10px 0 0;
  background-color: #0051a3;
  transition: all 0.3s ease;
}

.main-banner {
    background-color: #fff;
  position: relative;
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 30px;
}

.slider {
  display: flex;
  transition: transform 0.5s ease;
  touch-action: pan-y;
}

.slide {
  flex: 0 0 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  color: #fff;
}

/* 각 배너 배경 색상 */
.banner1 { background-color: #0051a3; }
.banner2 { background-color: #ff6b00; }
.banner3 { background-color: #1f8a70; }

.banner-content h2 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 8px;
}

.banner-content p {
  font-size: 15px;
  line-height: 1.4;
}

.dots {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
  margin: 0 4px;
  transition: background 0.3s;
}

.dot.active {
  background: #fff;
}


.single-product-slider {
    
    background-color: #fff;
  /* max-width: 480px; */
  margin: 0 auto;
  margin-top: 20px;
  overflow: hidden;
  position: relative;
}

.section-title {
  font-size: 18px;
  font-weight: bold;
  margin: 16px 0;
  color: #013BAF;
}

.single-slider {
  display: flex;
  /* gap: 16px; */
  transition: transform 0.5s ease;
  will-change: transform;
  touch-action: pan-y;
}

.single-card {
  flex: 0 0 100%;
  padding:10px;
  /* overflow: hidden; */
  width: 100%;
  display: flex;
  flex-direction: column;
}

.image-wrapper {
  width: 100%;
  min-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--card);
  border-radius: 10px;
  height: 250px;
  /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); */
}
.single-slider{
    width: 100%;
}
.image-wrapper img {
    max-height: 250px;
    width: 80%;
    height: auto;
    object-fit: contain;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 12px 16px;
}

.card-bottom .title {
  font-weight: 600;
  font-size: 16px;
}

.card-bottom .desc {
  line-height: 13px;
  font-size: 13px;
  color: #666;
}

.card-bottom .price {
  font-weight: bold;
  font-size: 16px;
  text-align: right;
}

.card-bottom .vat {
  font-size: 12px;
  color: #999;
  text-align: right;
}



.grid-product-list {
  max-width: 480px;
  /* margin: 32px auto; */
  /* padding: 0 16px; */
  padding-bottom: 100px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  padding-bottom: 15px;
}

.grid-card {
  background: #fff;
  
  /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); */
  overflow: hidden;
  text-align: left;
  padding: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.grid-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-bottom: 8px;
}

.card-info {
  width: 100%;
  text-align: left;
}

.card-info .title {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 4px;
  color: #013BAF;
}

.card-info .desc {
  line-height: 13px;
  font-size: 13px;
  color: #666;
  margin-bottom: 2px;
}

.card-info .vat {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}

.card-info .price {
  font-size: 14px;
  color: #000;
  font-weight: bold;
}



.bottom-nav {
  position: fixed;
  bottom: 0;
  
  width: 100%;
  max-width: 480px;
  background: white;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0;
  z-index: 1000;
  height: 50px; /* ✅ 높이 고정 */
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  color: #0051a3;
  text-decoration: none;
  font-weight: bold;
}

.nav-item img {
  width: 24px;
  height: 24px;
  margin-bottom: 2px;
}

.nav-item.active {
  color: #0051a3;
  font-weight: bold;
}

.nav-item.active img {
  filter: brightness(0) saturate(100%) invert(20%) sepia(80%) saturate(1400%) hue-rotate(190deg); /* 아이콘 색 강조 */
}

.gnb-spacer{
  display: none;

}

.gnb-spacer{
  list-style:none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background-color: #ccc;
  gap:1px;
  border-bottom: 1px #ccc solid;
}

.gnb-spacer > li{
  text-align: center;
  font-size: 14px;
  background-color: #fff;
}

.strike-gray {
  color: #6b7280 !important; /* gray-500 */
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: #6b7280;
}

.hidden-text{
  visibility: hidden;
}
.flex-row{
  display: flex;
  align-items: center;
}

.discount_percent{
  margin-right:5px;
  color: red;
  font-weight: bold;
}

.flex_row{
  display: flex;
  align-items: center;
}

#cart_count{
  text-align: center;
  display: none;
  font-size: 10px;
  width:15px;
  height: 15px;
  border-radius: 50%;
  color: #fff;
  background-color: red;
  position: absolute;
  right: -6px;
  top: -6px;
}


/* 수량 컨트롤 공통 */
.qty { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px;}

/* 버튼: 감소/증가 */
.qty-dec,
.qty-inc {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  background: #0051a3;
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}

.qty-dec:hover,
.qty-inc:hover { filter: brightness(1.05); }
.qty-dec:active,
.qty-inc:active { transform: translateY(1px); }
.qty-dec:disabled,
.qty-inc:disabled { opacity: .5; cursor: not-allowed; }

/* 입력창 */
.qty-input {
  width: 36px;
  height: 36px;
  text-align: center;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  outline: none;
}

/* number 화살표 제거 (크로스브라우저) */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input[type="number"] { -moz-appearance: textfield; }

/* 포커스 표시(가벼운 테두리) */
.qty-input:focus {
  box-shadow: 0 0 0 2px rgba(0, 81, 163, 0.35);
}
