/*
Theme Name: Twenty Twenty-Three Child
Template: twentytwentythree
Version: 1.0
*/

/* ============== GMBS: Store List ============== */

/* 그리드: 데스크톱 3열 / 모바일 2열, 리스트 모드(1열) */
.gmbs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 1024px) {
  .gmbs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.gmbs-grid.is-list {
  grid-template-columns: 1fr !important;
}

/* 카드(직각, 테두리 없음) */
.gmbs-store-card {
  border: none !important;
  border-radius: 0 !important;
  background: #fff;
  overflow: hidden;
}
.gmbs-store-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.gmbs-store-banner {
  height: 180px;
  background: #f5f5f7 center/cover no-repeat;
}
.gmbs-store-meta {
  padding: 16px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
}
.gmbs-store-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.gmbs-store-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}
.gmbs-store-address {
  grid-column: 1/-1;
  color: #666;
  font-size: 13px;
}

/* 도칸 기본 섀도우 제거 */
.dokan-seller-listing .store-lists-tools,
.dokan-seller-listing .store-wrapper,
.dokan-seller-listing .store-content,
.dokan-seller-listing .dokan-single-seller {
  box-shadow: none !important;
}

/* ---------- 툴바 ---------- */

/* 1) "총 스토어가 표시됩니다: n" 숨김 (여러 케이스 커버) */
.dokan-seller-listing .store-lists-tools .store-count,
.dokan-seller-listing .store-lists-tools .result-count,
.dokan-seller-listing .store-lists-tools p:first-child,
.dokan-seller-listing .store-lists-tools > div:first-child {
  display: none !important;
}

/* 2) 필터 버튼 = 아이콘만, 직각, 색상 (#9DFF20/검정) */
.dokan-seller-listing
  .store-lists-tools
  .dokan-store-listing-filter-wrap
  .dokan-btn,
.dokan-seller-listing
  .store-lists-tools
  .dokan-store-listing-filter-wrap
  button,
.dokan-seller-listing
  .store-lists-tools
  .dokan-btn.dokan-store-list-filter-button {
  background: #9dff20 !important;
  border-color: #9dff20 !important;
  color: #111 !important;
  background-image: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  line-height: 1 !important;
  padding: 10px 12px !important;
  /* 텍스트 감추기(아이콘만 보이게) */
  font-size: 0 !important;
}
.dokan-seller-listing
  .store-lists-tools
  .dokan-store-listing-filter-wrap
  .dokan-btn
  span,
.dokan-seller-listing
  .store-lists-tools
  .dokan-store-listing-filter-wrap
  .dokan-btn
  .label {
  display: none !important;
}
/* 아이콘은 정상 크기로 */
.dokan-seller-listing
  .store-lists-tools
  .dokan-store-listing-filter-wrap
  .dokan-btn
  i,
.dokan-seller-listing
  .store-lists-tools
  .dokan-store-listing-filter-wrap
  .dokan-btn
  .dashicons,
.dokan-seller-listing
  .store-lists-tools
  .dokan-store-listing-filter-wrap
  .dokan-btn
  svg {
  font-size: 18px !important;
  width: auto;
  height: auto;
}

/* 3) 그리드/목록 토글 활성 색상 (#9DFF20) */
.dokan-seller-listing .store-lists-tools .layout-switcher a.active,
.dokan-seller-listing .store-lists-tools .layout-switcher a.is-active,
.dokan-seller-listing .store-lists-tools .layout-switcher button.active {
  background: #9dff20 !important;
  border-color: #9dff20 !important;
  color: #111 !important;
  box-shadow: none !important;
}
/* ===== GMBS: Store List — toolbar & grid ===== */

/* (1) 툴바 박스섀도우 제거 */
.dokan-seller-listing .store-lists-tools,
.dokan-seller-listing .dokan-store-listing-filter-wrap {
  box-shadow: none !important;
}

/* (2) "총 스토어가 표시됩니다: n" 숨김 (여러 케이스 커버) */
.dokan-seller-listing .store-lists-tools .store-count,
.dokan-seller-listing .store-lists-tools .result-count,
.dokan-seller-listing .store-lists-tools p:first-child,
.dokan-seller-listing .store-lists-tools > div:first-child {
  display: none !important;
}

/* (3) 필터 버튼 → 검색 아이콘만 / 직각 / 컬러 적용 */
.dokan-seller-listing
  .store-lists-tools
  .dokan-store-listing-filter-wrap
  .dokan-btn,
.dokan-seller-listing
  .store-lists-tools
  .dokan-store-listing-filter-wrap
  button,
.dokan-seller-listing
  .store-lists-tools
  .dokan-btn.dokan-store-list-filter-button {
  background: #9dff20 !important;
  border-color: #9dff20 !important;
  color: #111 !important;
  background-image: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 10px 12px !important;
  line-height: 1 !important;
  font-size: 0 !important; /* 텍스트 숨김 */
}
/* 버튼 안의 기존 라벨 숨김 */
.dokan-seller-listing
  .store-lists-tools
  .dokan-store-listing-filter-wrap
  .dokan-btn
  span,
.dokan-seller-listing
  .store-lists-tools
  .dokan-store-listing-filter-wrap
  .dokan-btn
  .label {
  display: none !important;
}
/* 검색 아이콘 삽입 (Dashicons) */
.dokan-seller-listing
  .store-lists-tools
  .dokan-store-listing-filter-wrap
  .dokan-btn::before {
  content: "\f179"; /* dashicons-search */
  font-family: "dashicons";
  font-size: 18px;
  line-height: 1;
  color: #111;
}

/* (4) 그리드/목록 토글 버튼의 활성 색상(#9DFF20) */
.dokan-seller-listing .store-lists-tools .layout-switcher a.active,
.dokan-seller-listing .store-lists-tools .layout-switcher a.is-active,
.dokan-seller-listing .store-lists-tools .layout-switcher button.active {
  background: #9dff20 !important;
  border-color: #9dff20 !important;
  color: #111 !important;
  box-shadow: none !important;
}

/* (5) 카드 레이아웃 — 3열/2열 + 간격(그리드), 리스트 모드 1열 */
.gmbs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 1024px) {
  .gmbs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.gmbs-grid.is-list {
  grid-template-columns: 1fr !important;
}

/* (6) 카드(직각, 테두리 없음) — 요청 반영 */
.gmbs-store-card {
  border: none !important;
  border-radius: 0 !important;
  background: #fff;
  overflow: hidden;
}
.gmbs-store-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.gmbs-store-banner {
  height: 180px;
  background: #f5f5f7 center/cover no-repeat;
}
.gmbs-store-meta {
  padding: 16px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
}
.gmbs-store-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.gmbs-store-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}
.gmbs-store-address {
  grid-column: 1/-1;
  color: #666;
  font-size: 13px;
}

/* GMBS: 이 인스턴스용 검색 스타일 */
.gmbs-search--pill .wp-block-search__button {
  background: transparent !important; /* 버튼 배경색 */
  color: #111; /* 텍스트 색 */
  border: none;
  border-radius: 999px; /* 알약 모양 */
  padding: 0.6em 1em;
}

.gmbs-search--pill .wp-block-search__input {
  border: 1px solid #111;
  border-right: none; /* 버튼과 붙었을 때 경계 제거 */
  border-radius: 999px 0 0 999px;
  padding: 0.6em 0.9em;
}

/* 버튼이 오른쪽에 붙는 기본 레이아웃 가정.
   만약 "버튼이 내부에(inside)"인 스타일을 쓰면 여백만 조절해도 OK */
.gmbs-search--pill .wp-block-search__inside-wrapper {
  gap: 0; /* 인풋-버튼 사이 간격 제거 */
}

/* 외모 > 사용자 정의하기 > 추가 CSS */
#billing_last_name_field,
#shipping_last_name_field {
  display: none !important;
}

/* ===== GMBS: 이름 단일 필드 — 화면에서 '성' 숨김 ===== */

/* WooCommerce 체크아웃/주소 폼 */
.gmbs-hide-lastname,
#billing_last_name_field,
#shipping_last_name_field {
  display: none !important;
}

/* 내 계정 > 계정 상세 */
#account_last_name_field {
  display: none !important;
}

/* Dokan 셀러 가입 폼(Last Name 라벨+인풋 모두) */
label[for="last-name"],
#last-name {
  display: none !important;
}

/* GMBS: 내 계정 > 계정 정보에서 '성' 숨김 */
.woocommerce-account
  .woocommerce-EditAccountForm
  label[for="account_last_name"],
.woocommerce-account .woocommerce-EditAccountForm #account_last_name {
  display: none !important;
}
/* 지원 브라우저에서는 래퍼 <p>도 함께 제거 */
.woocommerce-account .woocommerce-EditAccountForm p:has(#account_last_name) {
  display: none !important;
}

/* ===== GMBS | Checkout UX (KR) ===== */

/* (1) 섹션 간격(요청 1,2): 제목과 내용 사이 간격 축소 */
.woocommerce .woocommerce-checkout h3,
.woocommerce .woocommerce-checkout h2 {
  margin-bottom: 0.6rem;
}
.woocommerce .woocommerce-checkout .form-row {
  margin-bottom: 0.6rem;
}

/* (2) 숨김 유틸 */
.gmbs-hidden {
  display: none !important;
}

/* (3) 주문 요약 아이템 스타일 (썸네일 + 수량배지 + 벤더명) */
.gmbs-os-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.gmbs-os-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}
.gmbs-os-thumb-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.gmbs-os-qty {
  position: absolute;
  left: -6px;
  top: -6px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 999px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.gmbs-os-text {
  min-width: 0;
}
.gmbs-os-name {
  font-weight: 600;
  line-height: 1.3;
}
.gmbs-os-vendor {
  font-weight: 700;
  opacity: 0.85;
  margin-top: 2px;
  font-size: 0.92em;
}

/* (4) 쿠폰 토글 */
.gmbs-coupon {
  border-top: 1px solid #eee;
  margin-top: 8px;
  padding-top: 8px;
}
.gmbs-coupon-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.gmbs-coupon-body {
  padding: 10px 0 0 0;
}
.gmbs-coupon .input-text {
  width: 100%;
}

/* (5) 배송 주소 요약 카드 + “수정” 버튼 */
.gmbs-ship-summary {
  margin-top: 12px;
}
.gmbs-ship-title {
  margin: 0 0 0.5rem;
}
.gmbs-ship-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 12px;
}
.gmbs-ship-lines strong {
  display: block;
  font-size: 1.05em;
  margin-bottom: 2px;
}
.gmbs-ship-edit {
  background: #9dff20;
  border: 1px solid #111;
  color: #111;
  padding: 8px 12px;
  border-radius: 0;
  cursor: pointer;
}

/* (6) 이메일 안내문 */
.gmbs-email-help {
  margin: 0.35rem 0 0;
  font-size: 0.9em;
  opacity: 0.8;
}

/* (7) 우편번호 인라인 배치 */
.gmbs-postcode-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gmbs-zip-btn {
  background: #9dff20;
  border: 1px solid #000;
  border-radius: 0;
  padding: 0 12px;
  height: 40px;
}

/* (8) 상단 알림 바가 남아 있어도 숨김(테마/플러그인 잔여물 방지) */
.woocommerce .woocommerce-notices-wrapper,
.woocommerce-notices-wrapper {
  display: none !important;
}

/* Woo 공지 래퍼가 "내용이 비거나 리스트가 비면" 감춤 (사이트 전역) */
.woocommerce .woocommerce-error:empty,
.woocommerce .woocommerce-message:empty,
.woocommerce .woocommerce-info:empty,
.woocommerce .woocommerce-error ul:empty,
.woocommerce .woocommerce-message ul:empty,
.woocommerce .woocommerce-info ul:empty,
.woocommerce .woocommerce-notices-wrapper:empty {
  display: none !important;
}
/* 기타 플러그인이 만든 빈 alert/notice 박스 예방 */
.woocommerce [role="alert"]:empty,
.woocommerce [class*="notice"]:empty,
.woocommerce [class*="alert"]:empty {
  display: none !important;
}

/* ===== GMBS Pager (숫자형 + 정삼각형) ===== */
.gmbs-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px; /* 좌/우 화살표와 숫자 뭉치 사이 간격 */
  height: 28px; /* 고정 높이 */
  line-height: 1;
  user-select: none;
}

/* 화살표 버튼(클릭 영역) */
.gmbs-pager__arrow {
  width: 28px;
  height: 28px; /* 고정 클릭영역 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000; /* triangle stroke 색상 (currentColor 사용) */
  text-decoration: none;
}
.gmbs-pager__arrow .gmbs-tri {
  width: 18px;
  height: 18px; /* 삼각형 자체 크기(정삼각형) */
  display: block;
}
.gmbs-pager__arrow:hover .gmbs-tri polygon {
  fill: #9cfe20;
  stroke: #9cfe20;
}
.gmbs-pager__arrow.is-disabled {
  pointer-events: none;
  color: #d0d0d0; /* 비활성: 연한 회색 stroke */
}
.gmbs-pager__arrow.is-disabled .gmbs-tri polygon {
  fill: #fff;
  stroke: #d0d0d0;
}

/* 숫자 묶음 */
.gmbs-pager__nums {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

/* 페이지 숫자(기본) */
.gmbs-page,
.gmbs-page.is-current,
.gmbs-page--dots {
  display: inline-block;
  height: 22px;
  line-height: 22px; /* 텍스트를 정확히 수직 중앙 */
  vertical-align: middle; /* 서로 간 세로정렬 일치 */
}
.gmbs-page {
  font-size: 16px; /* 기본 숫자 크기(작은 쪽) */
  color: #000;
  text-decoration: none;
  padding: 0 1px; /* 2자리 이상 때도 자연스러운 폭 확보(줄바꿈 금지) */
}

/* 현재 페이지 */
.gmbs-page.is-current {
  font-size: 20px; /* 현재 숫자: 조금 더 큼 (정확 픽셀 지정) */
  color: #9cfe20; /* 요구 컬러 */
  font-weight: 700;
}

/* 줄임표 */
.gmbs-page--dots {
  color: #bdbdbd; /* 연한 회색 점 세 개 */
  font-size: 16px;
  letter-spacing: 1px;
}
