/* =============================================================
   Hello Elementor Child - 앱 전용 레이아웃 CSS
   - 헤더, 푸터, 탭바, 드로어, 검색 모달
   - .us-* 접두사로 격리, 충돌 최소화
   - 전역 폰트 강제 통일 실험 블록 제거 (레이아웃 역할만 유지)
================================================================ */

/* =============================================================
   1. 전역 초기화 및 공통 설정
================================================================ */
body,
body *{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

body{
    background: #fff;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.us-drawer-open{
    overflow: hidden !important;
}

body .us-app-container{
    padding-top: 60px;    /* 헤더 높이 */
    padding-bottom: 70px; /* 탭바 높이 */
}

/* =============================================================
   2. 헤더 & 탭바 (고정 레이아웃)
================================================================ */
body .us-app-header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #eee;
    z-index: 10000;
}

body .us-header-inner{
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 하단 탭바 */
body .us-app-tabbar{
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
}

body .us-tab-item{
    flex: 1;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px;
    text-decoration: none;
    color: #333;
}

body .us-tab-icon svg{
    width: 22px;
    height: 22px;
    color: #333;
}

body .us-tab-text{
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

/* =============================================================
   3. 드로어 오버레이 및 본체
================================================================ */
body .us-drawer-overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 20000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(8px);
}

body.us-drawer-open .us-drawer-overlay{
    display: block;
    opacity: 1;
}

/* 드로어 본체 */
body .us-category-drawer{
    position: fixed;
    top: 0;
    height: 100%;
    background: #fff;
    z-index: 20001;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 70%;
    left: -70%;
}

@media (min-width: 768px){
    body .us-category-drawer{
        width: 350px !important;
        left: -350px !important;
    }
}

body.us-drawer-open .us-category-drawer{
    left: 0 !important;
}

body .us-drawer-body{
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 80px;
}

body .us-drawer-header{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

/* =============================================================
   드로어 타이틀(CATEGORY) - SEARCH 타이틀과 동일 스타일
============================================================= */
body .us-drawer-title{
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700;
    font-size: 18px;
    color: #000 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

body .us-drawer-close{
    background: transparent !important;
    border: none !important;
    font-size: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    -webkit-tap-highlight-color: transparent;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #000 !important;
}

body .us-drawer-close:active{
    transform: scale(0.9);
    opacity: 0.6;
}

/* =============================================================
   4. 카테고리 목록 및 아코디언
================================================================ */
body .us-cat-list,
body .us-cat-list li{
    list-style: none !important;
}

body .us-cat-link{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
}

body .us-sub-cat-list{
    display: none;
    background: #f8f8f8;
}

body .us-cat-item.is-open .us-sub-cat-list{
    display: block;
}

body .us-sub-link{
    display: block;
    padding: 15px 25px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    border-bottom: 1px solid #f1f1f1;
}

body .us-arrow{
    transition: transform 0.3s;
    border: solid #999;
    border-width: 0 1px 1px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(-45deg);
}

body .us-cat-item.is-open .us-arrow{
    transform: rotate(45deg);
}

/* =============================================================
   5. 로고 및 헤더 아이콘
================================================================ */
body .us-logo a{
    font-family: 'Montserrat', sans-serif !important;
    font-size: 26px;
    font-weight: 900;
    color: #fc1111 !important;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: -0.5px;
}

body .us-header-icons{
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
}

body .us-icon-link{
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px;
    height: 36px;
    color: #333;
    position: relative;
}

body .us-svg-icon{
    width: 24px !important;
    height: 24px !important;
    stroke-width: 1.8px;
    display: block;
}

/* 알림 점 */
body .us-notice-btn.has-new::after{
    content: '';
    position: absolute;
    top: 2px !important;
    right: 2px !important;
    width: 8px;
    height: 8px;
    background-color: #ff3366 !important;
    border-radius: 50%;
    border: 1.5px solid #fff;
    animation: us-pulse-red 1.5s infinite ease-in-out;
    z-index: 99;
}

@keyframes us-pulse-red{
    0%{
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.7);
    }
    70%{
        transform: scale(1.2);
        box-shadow: 0 0 0 5px rgba(255, 51, 102, 0);
    }
    100%{
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 51, 102, 0);
    }
}

/* =============================================================
   6. 검색 모달 (Search Modal)
================================================================ */
body .us-search-modal{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 30000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.3s ease;
}

body .us-search-modal.is-active{
    display: flex;
}

body .us-search-modal-content{
    background: #fff;
    width: 100%;
    max-width: 380px;
    border-radius: 24px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: us-modal-up 0.3s ease-out;
}

@keyframes us-modal-up{
    from{
        transform: translateY(20px);
        opacity: 0;
    }
    to{
        transform: translateY(0);
        opacity: 1;
    }
}

body .us-search-close{
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    appearance: none !important;
    -webkit-appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

body .us-search-close:hover,
body .us-search-close:focus,
body .us-search-close:active,
body .us-search-close:focus-visible{
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

body .us-search-title{
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #000 !important;
    font-size: 18px;
    display: block;
    margin-bottom: 20px;
    text-align: center;
}

body .us-search-input{
    width: 100%;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 25px;
    background: #f9f9f9;
    color: #000;
}

body .us-search-input::placeholder{
    color: #999;
    opacity: 1;
    font-weight: 700;
}



body .us-filter-label{
    font-size: 13px;
    font-weight: 700;
    color: #888;
    margin-bottom: 12px;
}

body .us-filter-options{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 20px;
}

body .us-filter-item{
    display: flex;
    align-items: center;
    width: calc(50% - 5px);
    margin-bottom: 10px;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #333;
}

body .us-filter-item input[type="radio"]{
    accent-color: #000;
}

body .us-search-error-msg{
    width: 100%;
    text-align: center;
    font-weight: 700;
    color: #000 !important;
    display: none;
    margin-bottom: 15px !important;
}

body .us-search-submit-wrap{
    display: flex;
    justify-content: center;
    width: 100%;
}

body .us-search-submit{
    width: 100%;
    padding: 16px;
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

body .us-search-submit:active{
    background: #eee;
}

/* =============================================================
   7. Shop 상단 여백 제거 (앱 느낌)
============================================================= */

/* WooCommerce 기본 헤더 영역 제거 */
.woocommerce-products-header{
    padding: 0 !important;
    margin: 0 !important;
}

/* Shop 상단 공간 제거 */
.woocommerce-products-header + *{
    margin-top: 0 !important;
}

/* 전체 Woo 영역 상단 여백 제거 */
body.woocommerce-page .site-main{
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 경우에 따라 생기는 추가 여백 제거 */
body.woocommerce-page .content-area{
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* =============================================================
   8. 전역 스크롤바 폭 변화 방지
============================================================= */
html{
    scrollbar-gutter: stable;
}

/* =========================================================
   9. [GLOBAL] Empty Cart Guard Toast
   - 장바구니 비어 있을 때 cart 진입 차단 안내용
========================================================= */
body #usCartEmptyToast{
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, calc(-50% + 6px));
    z-index: 10050;
    width: min(360px, calc(100vw - 40px));
    padding: 14px 16px;
    background: rgba(255,255,255,.96);
    color: #111;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 16px 40px rgba(0,0,0,.18);
    transition: opacity .16s ease, transform .16s ease;
}

body #usCartEmptyToast.is-show{
    opacity: 1;
    transform: translate(-50%, -50%);
}

@media (max-width: 768px){
    body #usCartEmptyToast{
        width: min(320px, calc(100vw - 32px));
        padding: 13px 14px;
        border-radius: 12px;
    }
}


/* =========================================================
   [GLOBAL] FONT WEIGHT TOKEN
   - 굵기만 전체 통일용
========================================================= */
body{
  --us-fw: 700;
}

/* =========================================================
   [GLOBAL] SEARCH / DRAWER FONT-WEIGHT UNIFY
   - 앱 공통 UI도 전부 700 통일
   - layout.css 맨 마지막
========================================================= */

body .us-search-title,
body .us-search-close,
body .us-search-input,
body .us-search-input::placeholder,
body .us-filter-label,
body .us-filter-item,
body .us-filter-item *,
body .us-search-error-msg,
body .us-search-submit,
body .us-drawer-title,
body .us-drawer-close,
body .us-cat-link,
body .us-sub-link,
body .us-tab-text{
  font-weight: 700 !important;
}

/* =========================================================
   [TABBAR] Cart dot
   - 하단 장바구니 아이콘 오른쪽 상단에 빨간 점 표시
========================================================= */

body .us-app-tabbar .us-tab-item{
    position: relative;
}

body .us-app-tabbar .us-tab-icon{
    position: relative;
}

body .us-app-tabbar .us-tab-item.has-cart-items .us-tab-icon::after{
    content: '';
    position: absolute;
    top: -2px;
    right: -4px;
    width: 8px;
    height: 8px;
    background-color: #ff3366;
    border-radius: 50%;
    border: 1.5px solid #fff;
    animation: us-pulse-red 1.5s infinite ease-in-out;
    z-index: 99;
}

@media (max-width: 767px){
    body .us-app-tabbar .us-tab-item.has-cart-items .us-tab-icon::after{
        top: -2px;
        right: -3px;
    }
}

/* =========================================================
   [HEADER] 로고 오른쪽 텍스트 추가
========================================================= */

.us-app-header .us-logo a{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.us-app-header .us-logo a::after{
  content: "PREMIUM 레플리카 쇼핑몰"; /* 원하는 문구로 변경 */
  display: inline-block;
  color: #111;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
}

@media (max-width: 767px){
  .us-app-header .us-logo a{
    gap: 6px;
  }

  .us-app-header .us-logo a::after{
    font-size: 10px;
    letter-spacing: .15px;
  }
}

