/* =============================================
   product-detail.css
   마늘먹인 의령메추리농장 - 상품 상세 페이지
   ============================================= */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg:            #ffffff;
  --color-text:          #2b2b2b;
  --color-text-sub:      #5c5c5c;
  --color-text-dark:     #111111;
  --color-text-gray:     #4a4a4a;
  --color-text-inactive: #aaaaaa;
  --color-primary:       #6b4a2b;
  --color-primary-dark:  #5a3d23;
  --color-cart:          #635447;
  --color-cart-badge:    #4b5b3a;
  --color-naverpay:      #00de5a;
  --color-star:          #ffc500;
  --color-red:           #e53935;
  --color-border:        #ebebeb;
  --color-border-light:  #f0f0f0;
  --color-bg-light:      #fafafa;
  --color-bg-mid:        #f7f7f7;
  --color-footer-bg:     #2b2b2b;
  --color-footer-text:   rgba(255,255,255,0.6);
  --color-footer-dim:    rgba(255,255,255,0.4);
  --color-footer-sep:    rgba(255,255,255,0.3);
  --color-phone-yellow:  #f4c542;
  --color-cs-box:        rgba(0,0,0,0.5);

  --font-base: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;

  --max-width:        1920px;
  --content-width:    1200px;
  --content-padding:      200px;
  --content-paddingding-md:   40px;
  --content-paddingding-sm:   20px;

  --gnb-height:       167px;
  --tab-height:       68px;

  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   10px;
  --radius-xl:   16px;

  --dur-fast:  0.18s;
  --dur-base:  0.28s;
  --dur-slow:  0.42s;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:  cubic-bezier(0.0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  overflow-x: hidden;
  padding-top: var(--gnb-height); /* fixed GNB 보정 (JS가 실측값으로 덮어씀) */
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
img { display: block; max-width: 100%; }
picture { display: contents; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ---------- 진입 애니메이션 ---------- */

@keyframes gd-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes gd-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes gd-scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.gd-entry {
  opacity: 0;
  animation: gd-fade-up var(--dur-slow) var(--ease) forwards;
}
.gd-entry[data-entry="0"] { animation-delay: 0.08s; }
.gd-entry[data-entry="1"] { animation-delay: 0.16s; }
.gd-entry[data-entry="2"] { animation-delay: 0.24s; }
.gd-entry[data-entry="3"] { animation-delay: 0.32s; }
.gd-entry[data-entry="4"] { animation-delay: 0.40s; }
.gd-entry[data-entry="5"] { animation-delay: 0.48s; }
.gd-entry[data-entry="6"] { animation-delay: 0.56s; }
.gd-entry[data-entry="7"] { animation-delay: 0.64s; }

/* 갤러리 진입 */
.goods__gallery {
  animation: gd-scale-in var(--dur-slow) var(--ease) 0.06s both;
}

/* IntersectionObserver 트리거 */
.js-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
}
.js-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ---------- GNB ---------- */

.gnb {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
}

.gnb__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px var(--content-padding);
  gap: 40px;
}

.gnb__logo { flex-shrink: 0; transition: opacity var(--dur-fast) var(--ease); }
.gnb__logo:hover,
.gnb__logo:focus-visible { opacity: 0.8; }
.gnb__logo img { width: 140px; height: auto; }

.gnb__nav { flex: 1; display: flex; justify-content: center; }
.gnb__menu-wrap { position: relative; }

.gnb__menu {
  display: flex;
  align-items: center;
  gap: 80px;
  padding: 12px 60px;
  border-radius: 60px;
  position: relative;
  z-index: 2;
}

.gnb__menu-li { position: relative; }

.gnb__menu-item {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-dark);
  padding: 16px 0;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}
.gnb__menu-item:hover,
.gnb__menu-item:focus-visible,
.gnb__menu-li.is-open .gnb__menu-item { color: var(--color-primary); }
.gnb__menu-item--active { color: var(--color-primary); }

.gnb__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--color-cart-badge);
  border-radius: 20px;
  padding: 20px;
  min-width: 140px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 300;
  /* visibility는 페이드아웃 완료 후 hidden으로 전환 */
  transition:
    opacity   0.22s var(--ease),
    transform 0.22s var(--ease),
    visibility 0s linear 0.22s;
}
.gnb__menu-li.is-open .gnb__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
  /* 열릴 때 visibility 즉시 적용 */
  transition:
    opacity   0.22s var(--ease),
    transform 0.22s var(--ease),
    visibility 0s linear 0s;
}

.gnb__dropdown-list { display: flex; flex-direction: column; gap: 20px; }

.gnb__dropdown-item {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background-color var(--dur-fast) var(--ease);
}
.gnb__dropdown-item:hover,
.gnb__dropdown-item:focus-visible {
  background: rgba(255,255,255,0.18);
}

.gnb__overlay { display: none; }

.gnb__util { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }

.gnb__util-btn {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.gnb__util-btn:hover,
.gnb__util-btn:focus-visible { background: #f5f5f5; transform: translateY(-1px); }

.gnb__cart-count {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: 40px;
  background: var(--color-cart-badge);
  color: #fff;
  font-size: 12px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}


/* ---------- Breadcrumb ---------- */

.breadcrumb {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
}

.breadcrumb__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px var(--content-padding);
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
}

.breadcrumb__link {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-inactive);
  transition: color var(--dur-fast) var(--ease);
}
.breadcrumb__link:hover { color: var(--color-primary); }

.breadcrumb__item--current {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-sub);
}


/* ---------- 상품 상단 (2컬럼) ---------- */

.goods__top {
  padding: 50px var(--content-padding) 80px;
}

.goods__top__inner {
  display: grid;
  grid-template-columns: 536px 1fr;
  gap: 0;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  align-items: start;
}


/* ---------- 이미지 갤러리 ---------- */

.goods__gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.goods__gallery__main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f5f5f5;
  aspect-ratio: 1 / 1;
}

.goods__gallery__main-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.goods__gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: opacity var(--dur-base) var(--ease);
}

.goods__gallery__img.is-fading {
  opacity: 0;
}

.goods__gallery__badge {
  position: absolute;
  top: 0; left: 0;
  background: #ff752a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 0 0 var(--radius-lg) 0;
  letter-spacing: 0.05em;
  z-index: 2;
}

.goods__gallery__zoom {
  position: absolute;
  bottom: 14px; right: 14px;
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.45);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  backdrop-filter: blur(4px);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.goods__gallery__zoom:hover { background: rgba(0,0,0,0.65); transform: scale(1.08); }
.goods__gallery__zoom:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* 썸네일 목록 */
.goods__gallery__thumbs {
  display: flex;
  gap: 10px;
}

.goods__gallery__thumb {
  width: 112px; height: 112px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  background: #f5f5f5;
  padding: 0;
  flex-shrink: 0;
  transition:
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}
.goods__gallery__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.goods__gallery__thumb:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(107,74,43,0.2);
}
.goods__gallery__thumb:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.goods__gallery__thumb--active {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(107,74,43,0.2);
}


/* ---------- 갤러리 하단 상품후기 요약 ---------- */

.goods__gallery__review {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 21px 0;
  border-top: 1px solid #F5F5F5;
}

.gallery-review__label {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  flex-shrink: 0;
}

.gallery-review__stars {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.gallery-review__link {
  font-size: 14px;
  font-weight: 400;
  color: #ADADAD;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  margin-left: auto;
  transition: color var(--dur-fast) var(--ease);
}
.gallery-review__link:hover { color: var(--color-primary); }


/* ---------- 상품 정보 (Sticky) ---------- */

.goods__info {
  position: sticky;
  top: calc(var(--gnb-height) + 20px);
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding-left: 64px;
}

/* 헤더: 브랜드 + 상품명 + 액션 */
.goods__info__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.goods__info__brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand__icon {
  width: 36px; height: 36px;
  background: #F2F2F2;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.brand__name {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.goods__info__name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.goods__info__name {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
  letter-spacing: -0.023em;
  flex: 1;
}

.goods__info__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 4px;
}

.action-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--color-text-sub);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.action-btn:hover { background: #f5f5f5; color: var(--color-primary); }
.action-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* 설명 */
.goods__info__desc {
  font-size: 18px;
  font-weight: 500;
  color: #5C5C5C;
  line-height: 1.44;
  letter-spacing: -0.022em;
  margin-bottom: 16px;
}

/* 가격 */
.goods__info__price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 16px;
}

.goods__info__price__amount {
  font-family: 'Lato', var(--font-base);
  font-size: 32px;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.006em;
  line-height: 1.25;
}

.goods__info__price__unit {
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

/* 인증정보 */
.goods__info__cert {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #F5F5F5;
}

.cert__label {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  min-width: 72px;
}

.cert__badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cert-badge {
  flex-shrink: 0;
  line-height: 0;
}

.cert-badge img {
  height: 80px;
  width: auto;
  display: block;
}

/* 기본정보 탭 테이블 인증 배지 */
.spec-cert-badges {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.spec-cert-badge {
  height: 80px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .cert-badge img  { height: 60px; }
  .spec-cert-badge { height: 60px; }
}

/* 메타 정보 */
.goods__info__meta {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.goods__info__meta__row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid #F5F5F5;
}

.meta__label {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
  white-space: nowrap;
  padding-top: 2px;
}

.meta__value {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta__ship-type {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text);
}

.meta__arrival {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-sub);
}
.meta__arrival strong {
  color: #F44336;
  font-weight: 500;
}

.meta__ship-cost {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-sub);
}


/* ---------- 미니카트 ---------- */

.mini-cart {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid #F5F5F5;
  margin-top: 4px;
  padding-top: 20px;
}

/* 상품 선택 박스 */
.goods__wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #F7F7F7;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  flex-wrap:wrap;
}

.goods__wrapper__name {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.5;
}

.goods__wrapper__controls {
  display: flex;
  align-items: center;
  justify-content:space-between;
  gap: 16px;
  flex-shrink: 0;
  width:100%;
}

/* 수량 컨트롤 */
.qty__control {
  display: flex;
  align-items: center;
  gap: 0;
}

.qty__btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text);
  background: #fff;
  border: 1px solid #EBEBEB;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.qty__btn:hover { background: #f5f5f5; border-color: var(--color-border); }
.qty__btn:active { background: #ebebeb; }
.qty__btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.qty__btn:disabled { opacity: 0.35; cursor: default; }

.qty__input {
  width: 40px; height: 30px;
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  font-family: var(--font-base);
  color: var(--color-text);
  border: none;
  background: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
  padding: 0 6px;
}
.qty__input::-webkit-inner-spin-button,
.qty__input::-webkit-outer-spin-button { display: none; }
.qty__input:focus { outline: none; }

/* 상품 단가 */
.goods__item-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-shrink: 0;
}

.item-price__num {
  font-family: 'Lato', var(--font-base);
  font-size: 22px;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.009em;
}

.item-price__unit {
  font-size: 14px;
  color: var(--color-text);
}

/* 주문금액 */
.goods-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 12px 0 20px;
}

.summary__label {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
}

.summary__price {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.total__amount {
  font-family: 'Lato', var(--font-base);
  font-size: 36px;
  font-weight: 500;
  color: #F44336;
  letter-spacing: -0.006em;
  line-height: 1.15;
  transition: transform 0.15s var(--ease-spring);
}
.total__amount.is-animating { transform: scale(1.06); }

.total__unit {
  font-size: 20px;
  font-weight: 400;
  color: #F44336;
  letter-spacing: -0.02em;
}

/* 구매 버튼 3개 */
.mini-cart__footer {
  display: flex;
  align-items:center;
  justify-content:flex-end;
  gap: 8px;
}

.btn-buy {
  flex:0 0 auto;
  width:100%;
  max-width:180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 60px;
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 500;
  font-family: var(--font-base);
  letter-spacing: -0.02em;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}
.btn-buy:active { transform: scale(0.97); }
.btn-buy:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.btn-buy--naverpay {
  background: #00DE5A;
  color: #fff;
  border: 1px solid #00DE5A;
}
.btn-buy--naverpay:hover { background: #00c94f; transform: translateY(-1px); }

.btn-buy--cart {
  background: #fff;
  color: #635447;
  border: 1px solid #635447;
}
.btn-buy--cart:hover { background: #faf6f3; transform: translateY(-1px); }

.btn-buy--primary {
  background: #6B4A2B;
  color: #fff;
  border: none;
}
.btn-buy--primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}



/* ---------- 탭 내비게이션 ---------- */

.goods__tabs {
  position: sticky;
  top: var(--gnb-height);
  z-index: 100;
  background: #FAFAFA;
  border-bottom: 1px solid #D6D6D6;
  transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.goods__tabs__inner {
  display: flex;
  align-items: stretch;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.goods__tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 24px 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.02em;
  color: var(--color-cart);
  background: #F7F7F7;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: background var(--dur-fast) var(--ease), font-weight var(--dur-fast) var(--ease);
}
.goods__tab:hover { background: #f0f0f0; }
.goods__tab:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px; }

/* 활성 탭: 흰 배경 + 하단 경계선 덮기 */
.goods__tab--active {
  font-weight: 700;
  background: #FFFFFF;
}
.goods__tab--active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: #D6D6D6;
}
.goods__tab--active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: #FFFFFF;
}

/* 카운트 — 버블 없이 텍스트만 */
.goods__tab__count {
  font-size: 16px;
  font-weight: 500;
  color: #2B2B2B;
  line-height: 20px;
  letter-spacing: -0.0125em;
}


/* ---------- 탭 콘텐츠 ---------- */

.goods__tab-sections {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.tab-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.tab-section:last-child { border-bottom: none; }


/* ---------- 상품 상세 이미지 ---------- */

.goods__detail__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.detail-img-wrap { width: 100%; }
.detail-img { width: 100%; max-width: 100%; display: block; height: auto; }


/* 상품 기본 정보 테이블 */
.goods__spec {
  max-width: 1200px;
  margin: 0 auto;
}

.goods__spec__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 24px;
}

.goods__spec__table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--color-text);
}
.goods__spec__table th,
.goods__spec__table td {
  padding: 14px 20px;
  font-size: 15px;
  line-height: 1.6;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
.goods__spec__table th {
  width: 160px;
  font-weight: 600;
  color: var(--color-text-sub);
  background: var(--color-bg-light);
}
.goods__spec__table td { color: var(--color-text); }


/* ---------- 후기 섹션 ---------- */

.review__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.review__summary {
  background: var(--color-bg-light);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  margin-bottom: 40px;
}

.review__summary__score-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.review__avg-num {
  font-size: 52px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
  letter-spacing: -0.03em;
}

.review__avg-stars {
  display: flex;
  gap: 3px;
}

.review__total-count {
  font-size: 15px;
  color: var(--color-text-sub);
  margin-left: 8px;
}
.review__total-count strong { color: var(--color-text); font-weight: 700; }

/* 후기 목록 */
.review__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--color-border);
}

.review__item {
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.review__item__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.review__item__stars { display: flex; gap: 2px; }

.review__item__author {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.review__item__date {
  font-size: 13px;
  color: var(--color-text-sub);
  margin-left: auto;
}

.review__item__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.review__item__body {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-sub);
  line-height: 1.7;
  margin-bottom: 14px;
}

.review__item__like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-sub);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 30px;
  padding: 5px 12px;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.review__item__like:hover {
  background: #fff3ee;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* 페이지네이션 */
.review__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 40px 0 32px;
}

.pagination__btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--color-text-sub);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.pagination__btn:hover:not(:disabled) { background: var(--color-bg-light); color: var(--color-text); }
.pagination__btn:disabled { opacity: 0.3; cursor: default; }

.pagination__page {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-sub);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.pagination__page:hover { background: var(--color-bg-light); color: var(--color-text); }
.pagination__page--active {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

/* 리뷰 작성 */
.review__write {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 20px;
}

.btn-review-write {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  background: var(--color-cart);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-base);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn-review-write:hover { background: var(--color-primary); transform: translateY(-1px); }


/* ---------- 상품문의 섹션 ---------- */

.qna__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.qna__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.qna__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
}

.btn-qna-write {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 24px;
  background: var(--color-cart);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-base);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn-qna-write:hover { background: var(--color-primary); transform: translateY(-1px); }

.qna__table-wrap { overflow-x: auto; }

.qna__table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--color-text);
}

.qna__th {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
  white-space: nowrap;
}
.qna__th--title { text-align: left; }
.qna__th--num { width: 80px; }
.qna__th--author { width: 120px; }
.qna__th--date { width: 120px; }
.qna__th--status { width: 120px; }

.qna__tr { transition: background var(--dur-fast) var(--ease); }
.qna__tr:hover { background: #faf9f8; }

.qna__td {
  padding: 16px;
  font-size: 14px;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border-light);
  text-align: center;
  vertical-align: middle;
}
.qna__td--title { text-align: left; }

.qna__title-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text);
  font-family: var(--font-base);
  text-align: left;
  line-height: 1.5;
  transition: color var(--dur-fast) var(--ease);
}
.qna__title-btn:hover { color: var(--color-primary); }

.qna__lock { color: var(--color-text-sub); flex-shrink: 0; }

.qna__status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
}
.qna__status--waiting {
  background: #fff8e1;
  color: #f57c00;
  border: 1px solid #ffe082;
}
.qna__status--answered {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}


/* ---------- 배송/교환/반품 섹션 ---------- */

.shipping__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.shipping__block {
  background: var(--color-bg-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.shipping__block__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  padding: 18px 24px;
  background: var(--color-bg-mid);
  border-bottom: 1px solid var(--color-border);
}

.shipping__table {
  width: 100%;
  border-collapse: collapse;
}
.shipping__table th,
.shipping__table td {
  padding: 14px 24px;
  font-size: 14px;
  line-height: 1.7;
  border-bottom: 1px solid var(--color-border-light);
  text-align: left;
  vertical-align: top;
}
.shipping__table tr:last-child th,
.shipping__table tr:last-child td { border-bottom: none; }
.shipping__table th {
  width: 140px;
  font-weight: 600;
  color: var(--color-text-sub);
  white-space: nowrap;
}
.shipping__table td { color: var(--color-text); }
.shipping__table td strong { font-weight: 700; color: var(--color-primary); }


/* ---------- 하단 고정 구매바 (fixed-buy-bar) ---------- */

/* ── 바 외곽: 투명, 슬라이드 트랜지션 담당 ── */
.fixed-buy-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 900;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.fixed-buy-bar.is-active  { transform: translateY(0); }
.fixed-buy-bar.is-hidden  { transform: translateY(100%) !important; }
.fixed-buy-bar[hidden]    { display: none !important; }

/* ── 토글 탭: 120×30px 핸들, 상단 둥근 모서리 ── */
.fixed-buy-bar__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 30px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  outline: none;
}
.fixed-buy-bar__toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

/* 화살표 아이콘: 닫힘=∧, 열림=∨(180° 회전) */
.fixed-buy-bar__toggle-icon {
  display: block;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}
.fixed-buy-bar.is-open .fixed-buy-bar__toggle-icon {
  transform: rotate(180deg);
}

/* ── 메인 바디: 흰 배경 + 그림자 + 아이폰 safe-area ── */
.fixed-buy-bar__body {
  background: #fff;
  box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* 내부 콘텐츠 최대 너비 */
.fixed-buy-bar__panel-inner,
.fixed-buy-bar__footer {
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

/* ── 옵션 패널 (slide up/down) ── */
.fixed-buy-bar__option-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.fixed-buy-bar__panel-inner {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 30px var(--content-padding);
}

/* 상품명 */
.fixed-buy-bar__name {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: #2B2B2B;
  text-align: left;
  letter-spacing: -0.02em;
}

/* 수량 + 금액 행 */
.fixed-buy-bar__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid #2B2B2B;
  border-bottom: 1px solid #2B2B2B;
}

/* 수량 표시 span */
.fixed-buy-bar__qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 30px;
  font-size: 20px;
  font-weight: 500;
  color: #2B2B2B;
}

/* 주문금액 */
.fixed-buy-bar__summary {
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
.fixed-buy-bar__summary-label {
  font-size: 16px;
  font-weight: 500;
  color: #2B2B2B;
  line-height: 20px;
  margin-right: 10px;
  padding-bottom: 2px;
}
.fixed-buy-bar__total {
  font-family: 'Lato', sans-serif;
  font-size: 36px;
  font-weight: 500;
  color: #F44336;
  line-height: 1.15;
}
.fixed-buy-bar__summary-unit {
  font-size: 20px;
  color: #F44336;
  line-height: 1;
  padding-bottom: 3px;
}

/* ── 버튼 영역 (항상 노출): 3버튼 각 190px × 60px ── */
.fixed-buy-bar__footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 20px var(--content-padding);
}

.fixed-buy-bar__footer .btn-buy {
  width: 190px;
  height: 60px;
  border-radius: var(--radius-md);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

/* NPay 버튼: 피그마 #00DE5A 그린, 블랙 마크 이미지 */
.fixed-buy-bar__footer .btn-buy--naverpay {
  background: #00DE5A;
  border: 1px solid #00DE5A;
}
.fixed-buy-bar__footer .btn-buy--naverpay:hover {
  background: #00c94f;
  border-color: #00c94f;
}

/* Cart 버튼: 피그마 white/border #635447 */
.fixed-buy-bar__footer .btn-buy--cart {
  background: #fff;
  color: #635447;
  border: 1px solid #635447;
}
.fixed-buy-bar__footer .btn-buy--cart:hover { background: #faf6f3; }

/* 바로구매 버튼: 피그마 #635447 */
.fixed-buy-bar__footer .btn-buy--primary {
  background: #635447;
  border: none;
}
.fixed-buy-bar__footer .btn-buy--primary:hover {
  background: #4e3e35;
}


/* ---------- 장바구니 토스트 ---------- */

.cart-toast {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 950;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: #2B2B2B;
  color: #fff;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}
.cart-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cart-toast__icon {
  flex-shrink: 0;
}


/* ---------- 라이트박스 ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
  cursor: pointer;
}

.lightbox__content {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 900px);
  max-height: 90vh;
  animation: gd-scale-in var(--dur-base) var(--ease-out);
}

.lightbox__close {
  position: absolute;
  top: -44px; right: 0;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  transition: background var(--dur-fast) var(--ease);
}
.lightbox__close:hover { background: rgba(255,255,255,0.3); }

.lightbox__img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  display: block;
}


/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-footer-bg);
  padding: 80px var(--content-padding);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-inner {
  max-width: var(--max-width);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 50px;
}

.footer-content { display: flex; gap: 50px; align-items: flex-start; }
.footer-logo { width: 154px; height: auto; flex-shrink: 0; }
.footer-info { display: flex; flex-direction: column; gap: 20px; }

.footer-links { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.footer-link {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-bg);
  position: relative;
  transition: opacity var(--dur-fast) var(--ease);
}
.footer-link::after {
  content: '';
  position: absolute;
  right: -8px; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 12px;
  background: var(--color-footer-sep);
}
.footer-link:last-child::after { display: none; }
.footer-link:hover { opacity: 0.8; }

.footer-address { font-style: normal; display: flex; flex-direction: column; }
.footer-address p {
  font-size: 14px;
  color: var(--color-footer-text);
  line-height: 1.8;
}

.footer-copyright {
  font-size: 14px;
  color: var(--color-footer-dim);
}

.footer-cs {
  background: var(--color-cs-box);
  border-radius: var(--radius-lg);
  padding: 40px 50px;
  display: flex;
  gap: 50px;
  flex-shrink: 0;
  min-height: 244px;
  align-items: flex-start;
}

.footer-cs__item { display: flex; flex-direction: column; gap: 4px; }

.footer-cs__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-bg);
  margin-bottom: 4px;
}

.footer-cs__phones,
.footer-cs__account { display: flex; flex-direction: column; gap: 2px; }

.footer-cs__phone,
.footer-cs__bank {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-phone-yellow);
}

.footer-cs__depositor {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-bg);
}

.footer-cs__hours,
.footer-cs__note {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-footer-text);
  line-height: 1.35;
  margin-top: 8px;
}

.goods__contents{
    position:relative;
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* 1600px */
@media (max-width: 1600px) {
  :root { --content-padding: 80px; }
  .breadcrumb__inner { padding: 14px var(--content-padding); }
}

/* 1280px */
@media (max-width: 1280px) {
  :root { --content-padding: var(--content-paddingding-md); }

  .gnb__menu { gap: 40px; padding: 12px 40px; }
  .goods__top { padding: 40px var(--content-paddingding-md) 60px; }
  .goods__top__inner {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .goods__info { padding-left: 40px; }
  .goods__gallery__thumbs { flex-wrap: wrap; }
  .goods__gallery__thumb { width: 80px; height: 80px; }
}

/* 1024px — 탭릿 */
@media (max-width: 1024px) {
  .gnb__nav,
  .gnb__dropdown { display: none; }

  .goods__top__inner {
    grid-template-columns: 480px 1fr;
    gap: 32px;
  }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-cs { width: 100%; }
}

/* 768px — 모바일 */
@media (max-width: 768px) {
  :root {
    --content-padding: var(--content-paddingding-sm);
    --gnb-height: 72px;
  }

  .gnb__inner { padding: 16px var(--content-paddingding-sm); }
  .gnb__logo img { width: 100px; }

  .breadcrumb__inner { padding: 12px var(--content-paddingding-sm); }

  /* 1컬럼 */
  .goods__top { padding: 24px 0 0; }
  .goods__top__inner {
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
  }

  .goods__gallery { padding: 0 var(--content-paddingding-sm); }
  .goods__gallery__thumbs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .goods__gallery__thumbs::-webkit-scrollbar { display: none; }
  .goods__gallery__thumb { width: 72px; height: 72px; flex-shrink: 0; }

  .goods__info {
    position: static;
    padding: 24px var(--content-paddingding-sm) calc(80px + env(safe-area-inset-bottom));
    padding-left: var(--content-paddingding-sm);
  }

  .goods__info__name { font-size: 22px; }
  .goods__info__price__amount { font-size: 26px; }
  .total__amount { font-size: 28px; }

  .mini-cart__footer { grid-template-columns: 1fr 1fr 1fr; }
  .btn-buy { height: 52px; font-size: 15px; }
  .goods__wrapper { flex-wrap: wrap; gap: 10px; }
  .goods__wrapper__controls { width: 100%; justify-content: space-between; }

  /* 탭 스크롤 */
  .goods__tabs__inner {
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0;
  }
  .goods__tabs__inner::-webkit-scrollbar { display: none; }
  .goods__tab {
    flex: 0 0 auto;
    padding: 16px 20px;
    font-size: 14px;
  }

  .goods__tab-sections { padding: 0 var(--content-paddingding-sm); }
  .tab-section { padding: 40px 15px; }

  /* 후기 요약 */
  .review__summary { padding: 24px; }
  .review__avg-num { font-size: 40px; }

  /* 문의 테이블 */
  .qna__th--author,
  .qna__td--author,
  .qna__th--date,
  .qna__td--date { display: none; }
  .qna__th--num { width: 48px; }
  .qna__th--status { width: 90px; }

  /* 배송 테이블 */
  .shipping__table th { width: 90px; }
  .shipping__table th,
  .shipping__table td { padding: 12px 16px; font-size: 13px; }

  /* 모바일: 네이버페이 전체 너비, cart/구매 각 1fr */
  .fixed-buy-bar__footer {
    flex-wrap: wrap;
    justify-content: stretch;
    padding: 12px var(--content-paddingding-sm);
    gap: 6px;
  }
  .fixed-buy-bar__footer .btn-buy {
    width: auto;
    flex: 1 1 0;
    height: 52px;
    font-size: 16px;
  }
  .fixed-buy-bar__footer .btn-buy--naverpay {
    flex: 0 0 100%;
    height: 52px;
  }
  .fixed-buy-bar__footer .btn-buy--naverpay img {
    height: 22px;
    width: auto;
  }
  .fixed-buy-bar__panel-inner {
    gap: 20px;
    padding: 20px var(--content-paddingding-sm);
  }
  /* 옵션 패널 폰트 조정 */
  .fixed-buy-bar__name { font-size: 15px; }
  .fixed-buy-bar__total { font-size: 26px; }
  .fixed-buy-bar__summary-label { font-size: 13px; }

  /* Footer */
  .site-footer { padding: 40px var(--content-paddingding-sm); }
  .footer-content { flex-direction: column; gap: 20px; }
  .footer-cs { flex-direction: column; gap: 24px; padding: 24px; min-height: auto; }

  .goods__spec__table th { width: 100px; }
  .goods__spec__table th,
  .goods__spec__table td { padding: 12px 14px; font-size: 13px; }
}

/* 480px */
@media (max-width: 480px) {
  .review__summary__score-wrap { flex-wrap: wrap; }
}


/* =============================================
   REDUCED MOTION
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .gd-entry { opacity: 1; animation: none; }
  .goods__gallery { animation: none; }
  .js-reveal { opacity: 1; transform: none; transition: none; }
}
