:root {
    --base-font-size: 14px;
    --text-font-weight: 400;
    --product-list-block-spacing: 36px;
    --gird-gap: 24px;

    --main-font:  'sans-serif';
    --font-body:  'Apple SD Gothic Neo','Arial', sans-serif; /* 원하는 폰트로 설정 */
    --font-heading:  'Apple SD Gothic Neo','Helvetica', sans-serif; /* 제목 폰트 설정 */
    --font-size-body: 16px; /* 본문 폰트 크기 설정 */
    --font-size-heading: 24px; /* 제목 폰트 크기 설정 */
    --font-size-rem: 1rem;
    
    --spacing-1: calc(var(--spacing-unit)* 1);
    --spacing-3: 10px; /* 원하는 값으로 설정 */
    --spacing-4: 16px; /* 원하는 값으로 설정 */
    --space-outer: 20px; /* 원하는 값으로 설정 */
    /*--spacing-unit: 4px;
    --spacing-unit-half: 2px;*/

    --gutter-x: 16px;
}

body {
    font-family: var(--font-body); /* 본문 폰트 */
    font-size: var(--font-size-body); /* 본문 폰트 크기 */
    line-height: 1.5; /* 줄 높이 설정 */
    color: #333; /* 본문 텍스트 색상 */
    justify-content: center;  /* 가로 가운데 */
    align-items: center;
    height: 100vh;   /* 뷰포트 높이 전체 */
    margin: 0;
}

button {
  color: #000; /* 모든 버튼 글자 검정색 */
}

@media screen and (min-width: 768px) {
    :root {
        --container-gutter: 40px;
        --grid-column-count: 20;
        --vertical-breather: 48px;
        --vertical-breather-tight: 48px;

        /* Typography */

    }

    .mobile-filter-toolbar {
        display: none!important;  /* PC 크기에서 모바일 필터 툴바 숨김 */
    }
}

@media screen and (min-width: 1200px) {
    :root {
        --vertical-breather: 64px;
        --vertical-breather-tight: 48px;
        --product-list-block-spacing: 48px;

        /* Typography */

    }
}



.ratio-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  display: block;
}
.ratio2-img {
  width: 100%;
  aspect-ratio: 3 / 4; /* 포트레이트 비율로 맞춤 */
  object-fit: cover;
  display: block;
}
.featured-banner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 20px 0px;
}

.featured-image img {
  width: 100%;
  height: 500px;
  display: block;
  object-fit: cover;
}

.featured-text {
  padding-top: 24px;
}

.featured-text .subtitle {
  font-size: 12px;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 8px;
}

.featured-text .title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
}

.index-top-banner {
  padding: 10px 20px;
  max-width: 1440px;
  margin: 0 auto;
}

.top-banner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.top-banner-card {
  position: relative;
  background-color: #fff;
}

.top-banner-card img {
  width: 100%;
  height: auto;
  display: block;
}

.banner-text {
  margin-top: 16px;
}

.banner-text .sub {
  font-size: 12px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 6px;
}

.banner-text h2 {
  font-size: 24px;
  font-weight: bold;
  line-height: 1.3;
  margin-bottom: 8px;
}




.index-container {
  margin:10px 20px;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding-left: var(--gutter-x);
  padding-right: var(--gutter-x);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(var(--gutter-x) * -0.5);
  margin-right: calc(var(--gutter-x) * -0.5);
}

.col {
  flex: 1;
  min-width: 25%;
  padding-left: calc(var(--gutter-x) * 0.5);
  padding-right: calc(var(--gutter-x) * 0.5);
  box-sizing: border-box;
}

.card {
  margin-bottom: var(--gutter-y);
  background-color: var(--color-white);
}

.card img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.top-banner-card img {
  width: 100%;
  height: 390px; /* 고정 높이 */
  object-fit: cover; /* 이미지가 비율 깨지지 않고 잘리는 방식 */
  display: block;
}

.text-block {
  padding-top: 12px;
}

.text-block .label {
  font-size: 12px;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 4px;
}

.text-block h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.links a,
.banner-text a,
.text-block a {
  position: relative;
  font-size: 13px;
  margin-right: 10px;
  color: black;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
}

.links a::after,
.banner-text a::after,
.text-block a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: black;
  transition: width 0.3s ease;
}

.links a:hover::after,
.banner-text a:hover::after,
.text-block a:hover::after {
  width: 100%;
}

.archive-button {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 30px;
}

.archive-button a {
  display: inline-block;
  border: 1px solid black;
  padding: 10px 20px;
  font-size: 14px;
  text-transform: uppercase;
  text-decoration: none;
  color: black;
  font-weight: 500;
}

.archive-button a:hover {
  background-color: black;
  color: white;
}


.login-box,
.register-box {
    background: white;
    padding: 40px;
    margin: 40px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

input {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-box button,
.register-box button {
    width: 100%;
    background-color: black;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 5px;
}

.login_link,
.register_link {
    text-align:center;
    margin-top:10px;
}

.message {
    font-size: 0.9em;
    margin-bottom: 10px;
    text-align: center;
    display: none; /* 기본적으로 안 보이게 */
}

.error {
    color: red;
    display: block !important;
}

.success {
    color: blue;
    display: block !important;
}

select#gender {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
  font-size: 16px;
  appearance: none; /* 기본 브라우저 스타일 제거 */
  background-color: white;
}
select#gender::-ms-expand {
  display: none;
}

.mypage-wrapper {
    display: flex;
    margin: 60px auto;
    background: #fff;
    max-width: 1200px;
  }
  .mypage-wrapper-side {
    width: 220px;
    padding: 30px;
    border-right: 1px solid #eee;
  }
  .mypage-wrapper-side h1 {
    margin-bottom: 20px;
  }

  .mypage-wrapper-side h3 {
    margin-bottom: 20px;
    font-size: 18px;
  }
  .mypage-wrapper-side ul {
    list-style: none;
    padding: 0;
  }
  .mypage-wrapper-side li {
    margin-bottom: 15px;
    cursor: pointer;
    color: #333;
  }
  .mypage-wrapper-side li.active {
    font-weight: bold;
    color: #000;
  }
  .mypage-wrapper-main-content {
    flex: 1;
    padding: 30px;
  }
  .mypage-wrapper-main-section {
    display: none;
  }
  .mypage-wrapper-main-section.active {
    display: block;
  }

  .mypage-wrapper-main-section-title {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
  }

  .info-title {
    gap: 8px; /* '내 정보'와 '회원 ID' 간 간격 */
  }

  .custom-id-display {
    font-size: 14px;
    font-weight: normal;
    color: #666;
    margin-left: 25px;
    margin-top: 5px;
  }
  

  .mypage-info-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
  }
  
  .mypage-info-list li {
    margin-bottom: 12px;
    font-size: 14px;
  }

  .mypage-info-list .info-label {
    display: inline-block;
    width: 100px;
  }
  .info-label {
    display: inline-block;
    width: 100px;
  }
  
  .order-wrapper {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s;
  }
  
  .order-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: #fafafa;
    cursor: pointer;
    border-radius: 6px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .order-card-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  
  .order-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  
  .order-summary span {
    font-size: 14px;
    color: #333;
    margin-right: 16px;
  }
  
  .order-card:hover {
    background-color: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
  
  .order-card span {
    margin-right: 16px;
    font-size: 14px;
    color: #333;
  }
  
  .toggle-details {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
  }
  
  .order-detail {
    padding: 16px;
    background-color: #fff;
    border-top: 1px solid #eee;
    animation: fadeIn 0.3s ease-in-out;
  }
  
  .order-detail .item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .order-detail img {
    border-radius: 4px;
    width: 100px;
  }

  .order-detail .item div {
    font-size: 14px;
    color: #333;
  }

  .order-detail .item strong {
    font-weight: 600;
    display: inline-block;
  }
  
  .order-detail h4 {
    margin: 16px 0 8px;
    font-size: 16px;
    color: #222;
  }
  
  .order-detail p {
    font-size: 14px;
    margin: 4px 0;
  }
  
  .order-item {
    display: grid;
    grid-template-columns: 100px 1fr auto; /* 이미지 | 정보 | 가격/버튼 */
    align-items: start;
    gap: 12px;
    margin-bottom: 16px;
  }
  
  .order-item img {
    width: 100px;
    border-radius: 4px;
    flex-shrink: 0;
  }
  
  .order-item .item-info {
    flex-grow: 1;
    min-width: 180px;
  }
  
  .order-item .brand {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
  }
  
  .order-item .name {
    font-size: 14px;
    color: #333;
    display: block;
  }
  
  .order-item .meta {
    margin-top: 6px;
    font-size: 13px;
    color: #000;
    gap: 20px;
    margin-left: 20px;
  }
  
  .order-item .item-price {
    min-width: 90px;
    text-align: left;
    font-weight: bold;
    font-size: 15px;
    color: #000;
  }

  .item-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 100px 140px;
  gap: 16px;
  flex: 1;
  align-items: center;
  padding: 2rem 2px;
}

.order-actions button {
  font-size: var(--base-font-size);
  background-color: #fff;
  color: #000;
  border: none;
  padding: 8px 14px;
  margin-right: 10px;
  border-radius: 4px;
  cursor: pointer;
}

.order-actions .tracking-link a {
  font-size: var(--font-size-rem);
  text-decoration: underline;
  margin-left: 14px;
}

.return-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
}

.return-modal .modal-content {
  background: #fff;
  padding: 30px 25px;
  border-radius: 12px;
  width: 380px;
  max-width: 90%;
  position: relative;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  font-family: 'Pretendard', sans-serif;
}

.return-modal h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.return-modal .close-return-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  font-size: 20px;
  color: #888;
}

/* ✅ radio 버튼을 가로 탭 형태로 변경 */
.radio-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.radio-group input[type="radio"] {
  display: none;
}

.radio-group label {
  padding: 8px 20px;
  border: 1px solid #ddd;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: all 0.2s ease;
}

.radio-group input[type="radio"]:checked + label {
  background: #111;
  color: #fff;
  border-color: #111;
}

.conditional-section {
  margin-top: 10px;
}

.conditional-section label {
  font-weight: 500;
  margin-bottom: 5px;
}

.return-modal select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  appearance: none;
  background: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="gray" viewBox="0 0 16 16"><path d="M3.204 5h9.592L8 10.481 3.204 5z"/></svg>') no-repeat right 10px center;
  background-size: 12px;
  margin-bottom: 10px;
}

#submit-return-btn {
  width: 100%;
  padding: 12px;
  background: #111;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  margin-top: 15px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#submit-return-btn:hover {
  background: #333;
}

.return-unavailable {
  color: #999;
  font-size: 13px;
  padding: 8px 0;
  text-align: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.logout-btn {
  border: none;
  cursor: pointer;
}

.profile-wrapper {
  background: #fff;
  padding: 40px;
  margin: 40px;
  width: 100%;
  max-width: 500px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.btn-group {
  margin-top: 30px;
  display: flex;
  gap: 10px;
}

.btn-group button {
  flex: 1;
  padding: 12px 20px;
  border: none;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-save {
  background-color: #000 !important;
  color: #fff;
  border: 1px solid #000;
}

.btn-save:hover {
  background-color: #333;
  color: #fff;
}

.btn-cancel {
  background-color: #f1f1f1;
  color: #333;
}

.btn-cancel:hover {
  background-color: #ddd;
}

/* 주소록 타이틀 */
.between-title {
  justify-content: space-between;
}

.add-address-btn {
  padding: 6px 12px;
  font-size: 14px;
  background: white;
  border: 1px solid #000;
  cursor: pointer;
}

/* 주소 카드 */
.address-card {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  background-color: #fff;
  transition: box-shadow 0.3s;
  position: relative;
}

/* 호버 시 살짝 그림자 */
.address-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 기본 배송지 텍스트 */
.address-card span {
  font-size: 12px;
  color: #888;
}

/* 연락처/주소 텍스트 */
.address-card p {
  margin: 6px 0;
  font-size: 14px;
  color: #333;
}

/* 수정 / 삭제 버튼 영역 */
.address-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.address-actions button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  background-color: #f3f3f3;
  transition: background-color 0.2s;
}

.address-actions button:hover {
  background-color: #e0e0e0;
}

.default-badge {
  display: inline-block;
  background-color: #f0f0f0;
  color: #555;
  font-size: 12px;
  padding: 2px 6px;
  margin-left: 4px;
  border-radius: 12px;
}

/* 모달 기본 숨김 */
.modal {
  display: none; /* JS에서 toggle */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4); /* 어두운 반투명 배경 */
}

/* 모달 오픈 애니메이션 */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 모달 콘텐츠 */
.modal-content {
  background-color: #fff;
  margin: 100px auto;
  padding: 30px 24px;
  border-radius: 12px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease-out;
}

/* 닫기 버튼 */
.close-modal {
  float: right;
  font-size: 24px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
}

.close-modal:hover {
  color: #000;
}

/* 제목 */
.modal-content h3 {
  font-size: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

/* 라벨 + 인풋 */
#address-form label {
  display: block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
}

#address-form input[type="text"],
#address-form input[type="tel"] {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 6px;
  box-sizing: border-box;
}

/* 기본 배송지 체크박스 */
.default-address-wrapper {
  display: flex;
  align-items: center; /* 수직 정렬 */
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.4;
}

.default-address-wrapper input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: black;
  vertical-align: middle;
  margin: 0;
  position: relative;
  top: 6px; /* 미세하게 내리기 */
}

/* 버튼 영역 */
.modal-buttons {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-buttons button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cancel-btn {
  background-color: #eee;
  color: #333;
}

.cancel-btn:hover {
  background-color: #ddd;
}

.modal-buttons button[type="submit"] {
  background-color: #000;
  color: #fff;
}

.modal-buttons button[type="submit"]:hover {
  background-color: #333;
}
 

  @media (max-width: 768px) {
    .top-banner-grid {
      grid-template-columns: 1fr;
    }

    .col {
      min-width: 50%;
      margin-bottom: 10px;
    }

    .featured-text .title {
      font-size: 24px;
    }

    .featured-text .links a {
      margin-bottom: 10px;
      font-size: 14px;
    }

    .banner-text h2 {
      font-size: 20px;
    }

    .banner-text .sub,
    .featured-text .subtitle,
    .text-block .label {
      font-size: 10px !important;
    }

    .featured-image img,
    .top-banner-card img {
      height: 400px;
    }

    .mypage-wrapper {
      flex-direction: column;
      padding: 10px;
    }

    .mypage-wrapper-side {
      width: 100%;
      border-right: none;
      border-bottom: 1px solid #eee;
      padding-bottom: 20px;
      margin-bottom: 20px;
    }

    .mypage-wrapper-side ul {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-around;
    }

    .mypage-info-list li {
      font-size: 15px;
    }

    .mypage-wrapper-side h1 {
      font-size: 24px;
    }

    .mypage-wrapper-main-section {
      max-width: 500px;
      margin-left: auto;
      margin-right: auto;
    }

    .order-card {
      flex-direction: row;
      align-items: center; /* 이게 세로 중앙 정렬 핵심! */
    }
  
    .order-card-inner {
      flex-direction: row;
      align-items: center;
    }
    .order-summary {
      flex-direction: column;
      flex: 1;
    }
  
    .toggle-details {
      margin-left: 8px;
      align-self: center;
    }

    .order-item {
      flex-direction: column;
      align-items: flex-start;
    }
  
    .order-item .item-price {
      align-self: flex-end;
      margin-top: 8px;
    }

  }