/* Z-index 계층 구조 정리 */
/*
  z-index 레벨:
  9999: 모바일 메뉴 (최상위)
  1000: 헤더 및 네비게이션
  100: 드롭다운 메뉴
  10: 일반 컨텐츠 오버레이
  1: 기본 컨텐츠
*/

/* 헤더 z-index 수정 */
.header {
  position: relative;
  z-index: 1000;
  background: #fff;
}

@media only screen and (max-width: 1279px) {
  .header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: #fff;
  }
}

/* 네비게이션 z-index 수정 */
.header .container nav .nav-inner {
  position: relative;
  z-index: 1001;
}

.header .container nav .nav-inner .gnb {
  position: relative;
  z-index: 1001;
}

.header .container nav .nav-inner .gnb > li ol {
  z-index: 1002;
  background: #fff;
}

.header .container nav .nav-back {
  z-index: 999;
}

/* 모바일 메뉴 z-index */
@media only screen and (max-width: 1279px) {
  .header .container nav .nav-inner input#mobile-menu:checked ~ .gnb {
    z-index: 9999;
    background: rgba(255, 255, 255, 0.98);
  }
}

/* WooCommerce 상품 카드 z-index 수정 */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  position: relative;
  z-index: 1;
}

.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
  z-index: 10;
}

/* 상품 이미지 호버 효과 z-index */
.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img {
  position: relative;
  z-index: 1;
}

/* 장바구니 버튼 z-index */
.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
  position: relative;
  z-index: 2;
}

/* Hero Section z-index */
.hero-section {
  position: relative;
  z-index: 1;
}

/* Product Cards z-index */
.product-card {
  position: relative;
  z-index: 1;
}

.product-card:hover {
  z-index: 10;
}

/* 메인 페이지 콘텐츠 여백 수정 (고정 헤더 대응) */
@media only screen and (max-width: 1279px) {
  body {
    padding-top: 5rem;
  }

  #main,
  .main-content {
    position: relative;
    z-index: 1;
  }
}

/* 로그인/회원가입 모달 z-index */
.login-page,
.register-page {
  position: relative;
  z-index: 1;
}

.login-wrapper,
.register-wrapper {
  position: relative;
  z-index: 1;
}

/* Dropdown 메뉴 z-index */
.dropdown-menu {
  position: absolute;
  z-index: 100;
  background: #fff;
}

/* WooCommerce My Account 네비게이션 */
.woocommerce-MyAccount-navigation {
  position: relative;
  z-index: 1;
}

/* 팝업 및 모달 z-index */
.modal,
.popup {
  z-index: 10000;
}

.modal-backdrop,
.popup-overlay {
  z-index: 9998;
}