/*
 * after.css — 최종 로드 오버라이드 (키트 CSS 체인 마지막)
 * BRICKS-GUIDE §11.2 스펙 강제: 상세 2단(776/376 sticky), 메인 섹션 리듬
 */

/* ---------- 상품 상세 2단 (§8: start 776 / end 376 sticky) ---------- */
.view-goods-top {
  display: flex !important;
  justify-content: space-between;
  gap: 24px;
}
.view-goods-start {
  width: 776px !important;
  flex: 0 0 776px;
  word-break: keep-all;
}
.view-goods-end {
  width: 376px !important;
  flex: 0 0 376px;
  position: sticky;
  top: var(--header-height);
  align-self: flex-start;
}
/* Woo 갤러리 이미지 → 776px 꽉 참 */
.view-goods-start .woocommerce-product-gallery,
.view-goods-start .woocommerce-product-gallery__wrapper,
.view-goods-start .woocommerce-product-gallery__image {
  width: 100% !important;
  max-width: 100% !important;
}
.view-goods-start .woocommerce-product-gallery img {
  width: 100%;
  height: auto;
  display: block;
}
/* 구매영역 요소 간격 (원본: 브랜드→타이틀→가격→폼) */
.view-goods-end .product-title { margin: 8px 0 12px; }
.view-goods-end .product-price { margin-bottom: 20px; }
.view-goods-end form.cart { margin: 16px 0; }
.view-goods-end .single_add_to_cart_button {
  width: 100%;
  background: #000;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  padding: 15px 0;
  border: 0;
  cursor: pointer;
}
/* 브레드크럼 구분자/간격 */
.page-utility .breadcrumb { display: flex; gap: 4px; list-style: none; margin: 0; padding: 16px 0; font-size: 12px; color: #999; }
.page-utility .breadcrumb li + li::before { content: ">"; margin-right: 4px; color: #ccc; }

/* ---------- 메인 섹션 리듬 (§5 원본 간격) ---------- */
.cmpt-product-grid { padding: 56px 0 40px; }
._root_1c6cz_1.shared-heading { margin: 0 0 28px; }
._root_1c6cz_1 .heading-main,
.shared-heading .heading-main { font-size: 24px; line-height: 32px; font-weight: 600; margin: 0; }
.tiles-grid.cols-5 { gap: 64px 8px; }
.tiles-grid.cols-3 { gap: 64px 16px; }
.button-more {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  color: #000;
  border: 1px solid #ddd;
  padding: 10px 28px;
  text-decoration: none;
}
/* 브랜드/키워드/특가 정렬 */
.brand-card-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.brand-card-item { width: 168px; }
.brand-card-item img { width: 100%; display: block; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 12px; }
.keyword-item {
  display: inline-block;
  border: 1px solid #eee;
  border-radius: 22px;
  padding: 12px 24px;
  font-size: 15px;
  color: #000;
  text-decoration: none;
}
.cmpt-special-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cmpt-special-visual img, .cmpt-special-visual { width: 100%; display: block; }
.mgz-carousel img { width: 100%; display: block; }
.lb-carousel img { width: 100%; display: block; }

/* ---------- 브레드크럼 (원본 .breadcrumb 스타일 매핑) ---------- */
.brxe-woocommerce-breadcrumbs nav .navigation {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 18px;
  color: #999;
}
.brxe-woocommerce-breadcrumbs .navigation > a {
  color: #999;
  text-decoration: none;
}
.brxe-woocommerce-breadcrumbs .navigation > a:hover { color: #000; }
.brxe-woocommerce-breadcrumbs .separator::before { content: ">"; color: #ccc; font-size: 10px; }

/* ---------- 페이지네이션 (원본 .pagination 서클 스타일) ---------- */
.bricks-pagination ul.page-numbers {
  display: flex;
  gap: 8px;
  justify-content: center;
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
}
.bricks-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid #ddd;
  border-radius: 17px;
  font-size: 13px;
  color: #000;
  text-decoration: none;
  padding: 0 6px;
}
.bricks-pagination .page-numbers.current {
  background: #000;
  color: #fff;
  border-color: #000;
}
.bricks-pagination .page-numbers.next, .bricks-pagination .page-numbers.prev { border: 0; }

/* 히어로 슬라이드 높이 균일 (원본 470:572 비율 슬라이드) */
.keyvisual-carousel .swiper-slide { display: flex; align-items: stretch; }
.keyvisual-carousel .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
/* GNB 원본 타이포 보정 */
.global-header .header-nav .brxe-text-link > a,
.global-header .header-nav .brxe-dropdown .brx-submenu-toggle > a {
  font-size: 15px;
  font-weight: 600;
  color: #000;
  text-decoration: none;
}

/* 히어로 슬라이드 높이 균일 (원본 470:572) */
#mainCategoryHeroCarousel .swiper-slide {
  aspect-ratio: 470 / 572;
  overflow: hidden;
}
#mainCategoryHeroCarousel .swiper-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}
/* 상세 구매 폼 세로 스택 (옵션/수량/버튼 각 한 줄) */
.view-goods-end form.cart {
  display: block !important;
}
.view-goods-end form.cart .variations,
.view-goods-end form.cart table.variations {
  width: 100% !important;
  display: block !important;
}
.view-goods-end form.cart select {
  width: 100% !important;
  border: 1px solid #ddd;
  padding: 12px 14px;
  font-size: 13px;
}
.view-goods-end form.cart .quantity,
.view-goods-end form.cart .woocommerce-variation-add-to-cart {
  display: flex;
  width: 100%;
  margin-top: 12px;
}
.view-goods-end form.cart .quantity input {
  text-align: center;
}

/* 상세 구매 폼 완전 세로 스택 (variations 테이블 셀 블록화) */
.view-goods-end form.cart table.variations,
.view-goods-end form.cart table.variations tbody,
.view-goods-end form.cart table.variations tr,
.view-goods-end form.cart table.variations th,
.view-goods-end form.cart table.variations td {
  display: block !important;
  width: 100% !important;
}
.view-goods-end form.cart td.value { padding: 8px 0 0; }
.view-goods-end form.cart select {
  width: 100% !important;
  border: 1px solid #ddd;
  padding: 12px 14px;
  font-size: 13px;
}
.view-goods-end form.cart .quantity { margin-top: 16px; width: 100%; }
.view-goods-end form.cart .single_add_to_cart_button {
  display: block !important;
  width: 100% !important;
  margin-top: 16px;
  background: #000;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  padding: 15px 0;
  border: 0;
  cursor: pointer;
}

/* 수량 블록과 구매 버튼 완전 분리 (원본: 수량 줄 → 전폭 구매 버튼) */
.view-goods-end form.cart .woocommerce-variation-add-to-cart,
.view-goods-end form.cart .variations_button {
  display: block !important;
  width: 100% !important;
}
.view-goods-end form.cart .quantity {
  display: inline-flex !important;
  margin-bottom: 16px;
}

/* 메인 하단: 매거진/기획전/특가 그리드 정렬 */
.cmpt-special-list { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 16px; }
.cmpt-special-list img { width: 100%; height: auto; display: block; }
.mgz-carousel .swiper-slide { display: flex; align-items: center; justify-content: center; }
.mgz-carousel img { max-width: 100%; height: auto; }
.cmpt-magazine .container-fixed, .cmpt-special .container-fixed { max-width: 1816px; margin: 0 auto; padding: 0 16px; }

/* 푸터 (#footer 스코프 보강 — footer.css가 #footer 기준) */
#footer .footer-collapse { display: block; }
#footer .footer-nav .footer-col { display: block; }
#footer .footer-nav .footer-col .footer-link { display: block; color: #666; font-size: 13px; line-height: 26px; text-decoration: none; }
#footer .footer-nav .footer-col .footer-link:hover { color: #000; }
#footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1816px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  border-top: 1px solid #eee;
}
#footer .footer-cs { font-size: 13px; line-height: 22px; color: #666; margin: 0; }
#footer .footer-info { font-size: 12px; line-height: 20px; color: #999; margin: 8px 0 0; }
#footer .footer-end .button-icon { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; background-color: #fff; border-radius: 50%; border: 1px solid #eee; }
#footer .footer-action .footer-button {
  display: flex; align-items: center; justify-content: center;
  max-width: 1816px; width: 100%; margin: 0 auto;
  background: none; border: 0; cursor: pointer;
  font-size: 14px; font-weight: 700; color: #000; padding: 24px 0;
}
#footer .footer-action + .footer-collapse { border-top: 1px solid #eee; }
#footer .footer-collapse { overflow: visible; }

/* ---------- 푸터 (#footer 대신 .global-footer-wrap 스코프) ---------- */
.global-footer-wrap { background-color: #f8f8f8; min-width: 1280px; margin: 0 auto; }
.global-footer-wrap .footer-sitemap { border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.global-footer-wrap .footer-action .footer-button {
  display: flex; align-items: center; justify-content: center;
  max-width: 1816px; width: 100%; margin: 0 auto;
  background: none; border: 0; cursor: pointer;
  font-size: 14px; font-weight: 700; color: #000; padding: 24px 0;
}
.global-footer-wrap .footer-action + .footer-collapse { border-top: 1px solid #eee; }
.global-footer-wrap .footer-nav {
  display: flex; flex-wrap: wrap; gap: 0 48px;
  padding: 22px 16px 44px; max-width: 1816px; width: 100%; margin: 0 auto;
}
.global-footer-wrap .footer-col .footer-col-title { display: block; font-size: 13px; font-weight: 700; color: #000; margin-bottom: 10px; }
.global-footer-wrap .footer-col .footer-link { display: block; color: #666; font-size: 13px; line-height: 26px; text-decoration: none; }
.global-footer-wrap .footer-col .footer-link:hover { color: #000; }
.global-footer-wrap .footer-bottom {
  display: flex; justify-content: space-between; align-items: flex-start;
  max-width: 1816px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid #eee;
}
.global-footer-wrap .footer-cs { font-size: 13px; line-height: 22px; color: #666; margin: 0; }
.global-footer-wrap .footer-info { font-size: 12px; line-height: 20px; color: #999; margin: 8px 0 0; }
.global-footer-wrap .footer-end .button-icon {
  display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  background: #fff; border-radius: 50%; border: 1px solid #eee; margin-left: 8px;
}

/* ---------- 메인 매거진/기획전 중앙 레이아웃 ---------- */
.cmpt-magazine .mgz-carousel { max-width: 1088px; margin: 0 auto; }
.cmpt-magazine img { width: 100%; height: auto; display: block; }
.cmpt-special .container-fixed { text-align: center; }
.special-cards {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 48px; max-width: 1280px; margin: 0 auto;
  text-align: left;
}
.special-card { border: 1px solid #eee; padding: 28px 24px; }
.special-card .special-brand { font-size: 13px; color: #999; letter-spacing: 1px; }
.special-card .special-title { font-size: 22px; line-height: 30px; font-weight: 600; margin: 8px 0; }
.special-card .special-desc { font-size: 13px; color: #666; margin: 0; }
.button-more.mg-more {
  display: inline-block; margin: 24px auto 0; border: 1px solid #ddd;
  padding: 10px 32px; font-size: 13px; color: #000; text-decoration: none;
  text-align: center;
}
.cmpt-magazine { text-align: center; }
.cmpt-magazine .shared-heading { text-align: center; }

/* 상세 관련상품 4열 그리드 */
.tiles-grid.cols-4 { grid-template-columns: repeat(4, 1fr); gap: 64px 16px; }
@media (max-width: 1279px) { .tiles-grid.cols-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) { .tiles-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }

/* 리뷰 섹션 (원본 crema 위젯 대체 스타일) */
.brxe-product-reviews #reviews { max-width: 1088px; margin: 0 auto; }
.brxe-product-reviews .woocommerce-Reviews-title { font-size: 24px; font-weight: 600; margin-bottom: 24px; }
.brxe-product-reviews .commentlist { list-style: none; margin: 0; padding: 0; }
.brxe-product-reviews .commentlist .review {
  border-bottom: 1px solid #eee; padding: 20px 0;
}
.brxe-product-reviews .commentlist .review .comment-author { font-weight: 600; font-size: 13px; }
.brxe-product-reviews .commentlist .review .comment-meta { font-size: 12px; color: #999; }
.brxe-product-reviews .commentlist .review .description { font-size: 13px; line-height: 20px; margin-top: 8px; }
.brxe-product-reviews .comment-form {
  border: 1px solid #eee; padding: 24px; margin-top: 24px;
}
.brxe-product-reviews .comment-form .comment-form-rating select,
.brxe-product-reviews .comment-form input[type="text"],
.brxe-product-reviews .comment-form input[type="email"],
.brxe-product-reviews .comment-form textarea {
  width: 100%; border: 1px solid #ddd; padding: 10px 12px; font-size: 13px;
}
.brxe-product-reviews .comment-form .submit {
  background: #000; color: #fff; font-size: 14px; font-weight: 600;
  padding: 14px 40px; border: 0; cursor: pointer;
}

/* 상품문의 / 상품고시정보 / 배송안내 (원본 구조) */
.view-goods-qna, .view-goods-gosi, .view-goods-shipinfo {
  max-width: 1088px; margin: 0 auto; padding: 0 16px;
}
.gosi-row { display: flex; flex-wrap: wrap; border-top: 1px solid #eee; }
.gosi-row .gosi-cell {
  width: 25%; padding: 16px; box-sizing: border-box;
  border-bottom: 1px solid #eee; display: block;
}
.gosi-cell .gosi-label { font-size: 15px; line-height: 22px; font-weight: 600; margin: 0 0 8px; }
.gosi-cell .gosi-value { font-size: 13px; line-height: 19px; color: #666; margin: 0; }
.qna-empty { padding: 40px 0; text-align: center; }
.button-more { display: inline-block; border: 1px solid #ddd; padding: 10px 28px; font-size: 13px; color: #000; text-decoration: none; }
.shipinfo-block { border: 1px solid #eee; padding: 24px; }
.shipinfo-title { font-size: 15px; font-weight: 600; margin: 16px 0 8px; }
.shipinfo-title:first-child { margin-top: 0; }
.shipinfo-text { font-size: 13px; line-height: 20px; color: #666; white-space: pre-line; }

/* ============================================================
   상품평 — 한국 쇼핑몰 스타일 (요약/마스킹 리스트/별점 위젯 폼)
   ============================================================ */
.brxe-product-reviews #reviews { max-width: 1088px; }

/* 상품평 헤딩: "상품평" → 타이틀 스타일 정리 */
.brxe-product-reviews .woocommerce-Reviews-title {
  font-size: 24px; font-weight: 600; letter-spacing: -0.5px;
}

/* 등록된 리뷰 요약 바 (JS가 삽입) */
.gw-review-summary {
  display: flex; align-items: center; gap: 20px;
  border: 1px solid #eee; background: #fafafa;
  padding: 20px 28px; margin: 0 0 24px;
}
.gw-review-summary .gw-avg { font-size: 40px; font-weight: 700; line-height: 1; }
.gw-review-summary .gw-avg small { font-size: 16px; color: #999; font-weight: 400; }
.gw-review-summary .gw-stars { color: #f5a623; font-size: 18px; letter-spacing: 2px; }
.gw-review-summary .gw-count { font-size: 13px; color: #666; margin-left: auto; }
.gw-review-summary .gw-count strong { color: #000; font-size: 16px; }

/* 리뷰 리스트 행 (마스킹 작성자/별점/옵션/날짜) */
.brxe-product-reviews .commentlist { margin: 0; padding: 0; }
.brxe-product-reviews .commentlist .review {
  border-bottom: 1px solid #eee; padding: 20px 4px;
  display: grid; grid-template-columns: 110px 1fr; gap: 0 20px;
}
.brxe-product-reviews .commentlist .review .gw-review-left {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}
.brxe-product-reviews .commentlist .review .gw-review-stars { color: #f5a623; font-size: 13px; letter-spacing: 1px; }
.brxe-product-reviews .commentlist .review .gw-review-meta { font-size: 12px; color: #999; line-height: 18px; }
.brxe-product-reviews .commentlist .review .gw-review-meta .gw-author { font-weight: 600; color: #000; }
.brxe-product-reviews .commentlist .review .gw-review-meta .gw-option { color: #999; }
.brxe-product-reviews .commentlist .review .comment-author,
.brxe-product-reviews .commentlist .review .comment-meta {
  display: contents;
}
.brxe-product-reviews .commentlist .review .comment-author img,
.brxe-product-reviews .commentlist .review .avatar { display: none; }
.brxe-product-reviews .commentlist .review .description {
  font-size: 13px; line-height: 20px; color: #000; margin: 0; white-space: pre-line;
}
.brxe-product-reviews .commentlist .review .comment-meta .comment-metadata { display: contents; }

/* 등록 폼: 한국몰 등록 스타일 */
.brxe-product-reviews .comment-reply-title {
  font-size: 16px; font-weight: 600; margin: 32px 0 12px;
  border-top: 1px solid #eee; padding-top: 24px;
}
.brxe-product-reviews .comment-form { border: 1px solid #eee; padding: 24px 28px; background: #fcfcfc; }
.brxe-product-reviews .comment-form p { margin: 0 0 16px; }
.brxe-product-reviews .comment-form label { font-size: 13px; font-weight: 600; color: #000; display: block; margin-bottom: 6px; }
.brxe-product-reviews .comment-form .comment-form-rating label { margin-bottom: 10px; }

/* 별점 위젯: select 숨기고 큰 별 5개 표시 (JS 연동) */
.brxe-product-reviews .comment-form-rating { position: relative; }
.brxe-product-reviews .comment-form-rating select#rating { position: absolute; opacity: 0; pointer-events: none; }
.gw-star-widget { display: flex; gap: 6px; font-size: 28px; line-height: 1; user-select: none; }
.gw-star-widget button {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: #ddd; font-size: inherit; line-height: 1;
  transition: color 0.1s;
}
.gw-star-widget button.on { color: #f5a623; }
.gw-star-widget .gw-star-label { margin-left: 10px; font-size: 13px; color: #666; align-self: center; }

/* 내용 textarea + 글자수 카운터 */
.brxe-product-reviews .comment-form textarea#comment {
  width: 100%; min-height: 120px; border: 1px solid #ddd; padding: 14px 16px;
  font-size: 13px; line-height: 20px; resize: vertical; box-sizing: border-box;
}
.brxe-product-reviews .comment-form textarea#comment:focus { outline: none; border-color: #000; }
.gw-char-count { text-align: right; font-size: 12px; color: #999; margin-top: 6px; }

/* 이름/이메일 행 2단 */
.brxe-product-reviews .comment-form .comment-form-author,
.brxe-product-reviews .comment-form .comment-form-email {
  display: inline-block; width: calc(50% - 8px); vertical-align: top;
}
.brxe-product-reviews .comment-form .comment-form-author { margin-right: 12px; }
.brxe-product-reviews .comment-form input[type="text"],
.brxe-product-reviews .comment-form input[type="email"] {
  width: 100%; border: 1px solid #ddd; padding: 12px 14px; font-size: 13px; box-sizing: border-box;
}
.brxe-product-reviews .comment-form input:focus,
.brxe-product-reviews .comment-form textarea:focus { outline: none; border-color: #000; }

/* 등록 버튼: 검정 전폭 */
.brxe-product-reviews .comment-form .submit,
.brxe-product-reviews .comment-form input#submit {
  display: block; width: 100%;
  background: #000; color: #fff !important;
  font-size: 15px; font-weight: 600; padding: 16px 0;
  border: 0; cursor: pointer; margin-top: 8px;
}
/* 로그인 안내 문구 */
.brxe-product-reviews .woocommerce-noreviews,
.brxe-product-reviews p.comment-notes { font-size: 13px; color: #666; }

/* WC 기본 별 위젯 중복 숨김 (커스텀 큰 별 위젯 사용) */
.comment-form-rating p.stars,
.comment-form-rating .star-rating,
.brxe-product-reviews .comment-form-rating .stars {
  display: none !important;
}
