* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
    word-break: keep-all;
}
/* 폰트 */
.fa-user,
.fa-heart{
    font-weight: 500;
}

body {
    max-width: 500px;
    margin: 0 auto;
    font-family: 'Roboto', 'Noto Sans KR', sans-serif;
    font-size: 14px;
}
/* 공통 */
.sub-page-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #fff;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}




.sub-page-header .back-btn,
.sub-page-header .search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.sub-page-header ion-icon {
    font-size: 20px;
    color: #333;
}


.filter-wrap {
    border-bottom: 1px solid #eee;
    padding: 14px 20px;
}

.back-btn{
    background: none;
    border: none;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
}

.sub-page-header h1 {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
    text-align: center;}
/* 헤더 스타일 */
.header {
    background-color: #fff;
    padding:20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.header-top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.header-top p{
    font-size: 14px;
    margin: 0 12px 0 2px;
}

.header-top button{
    display: flex;
    align-items: center;
    background: none;
    border: none;
}

.header-top > div{
    display: flex;
    align-items: center;
}
.header-top .header-top-right{
    gap: 8px;
}

.location-btn,.noti-btn,.wish-btn{
    font-size: 24px;
    color: #666;
    padding: 0;
}
.location-dropdown-btn{
    font-size: 18px;
    color:#ef552b
}

.header-search {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 16px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 500px;
}

.header-search-input {
    flex: 1;
    border: none;
    background: none;
    padding: 8px 12px;
    font-size: 15px;
    color: #333;
    outline: none;
}

.header-search-input::placeholder {
    color: #999;
}

.header-search-btn {
    border: none;
    background: none;
    padding: 8px 12px;
    color: #999;
    font-size: 16px;
    cursor: pointer;
}

/* 왼쪽 헤더 부분 */
.left-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 햄버거 버튼 스타일 */
.hamburger-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #333;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn:hover {
    color: #0078ff;
}

.header .icons a {
    text-decoration: none;
    color:#777;
    font-size: 24px;
    margin-left: 14px;
}

.logo {
    position: relative;
    width: 100px;
    height: 40px;
}

.logo img {
    position: absolute;
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(calc(-50% - 8px), calc(-50% - 4px));
}

.logo-image {
    height: 32px;
}

.tabs {
    display: flex;
    background-color: white;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 15px;
}

.tab {
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

.tab.active {
    background-color: #ef552b;
    color: white;
}

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

.icon-btn {
    color: #666;
    font-size: 20px;
    text-decoration: none;
}

/* 네비게이션 메뉴 */
.nav-menu {
    display: flex;
    height: 48px;
    line-height: 48px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* iOS 스크롤 부드럽게 */
    scrollbar-width: none; /* Firefox 스크롤바 숨기기 */
    -ms-overflow-style: none; /* IE/Edge 스크롤바 숨기기 */
    background-color: white;
}

.nav-menu.sticky {
    position: sticky;
    top: 56px; 
    left: 0;
    right: 0;
    z-index: 99;
    border-bottom: 1px solid #eee;
}

/* Webkit (Chrome, Safari, Opera) 스크롤바 숨기기 */
.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-item {
    flex-basis: 20%;
    padding: 0 20px;
    font-size: 16px;
    white-space: nowrap;
    color: #333;
    text-decoration: none;
    text-align: center;
}

.nav-item.active {
    color: #ef552b;
    border-bottom: 2px solid #ef552b;
    font-weight: bold;
}

/* 카테고리 아이콘 */
.category-items {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: white;
    gap:15px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Webkit 브라우저(Chrome, Safari 등)에서 스크롤바 숨기기 */
.category-items::-webkit-scrollbar {
    display: none;
}

.category-item-img {
    width: 52px;
    height: 52px;
    background-color: #f5f5f5;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-item-img img {
    width: 95%;
    height: 95%;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    font-size: 12px;
    color:#333;
}

.img-txt {
    font-size: 14px;
    margin-top: 8px;
}

.icon-circle {
    width: 50px;
    height: 50px;
    background-color: #ffeae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.icon-circle i {
    color: #ef552b;
    font-size: 20px;
}

.icon-text {
    font-size: 12px;
    color: #333;
    text-align: center;
}

/* 배너 슬라이더 */
.banner-slider-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
}

.banner-slider {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 슬라이드 위치 설정 */
.banner-slide:nth-child(1) { transform: translateX(0); }
.banner-slide:nth-child(2) { transform: translateX(100%); }
.banner-slide:nth-child(3) { transform: translateX(200%); }
.banner-slide:nth-child(4) { transform: translateX(300%); }
.banner-slide:nth-child(5) { transform: translateX(400%); }

/* 활성화된 슬라이드와 그 다음 슬라이드들의 위치 */
.banner-slide.active {
    transform: translateX(0);
}

.banner-slide.active ~ .banner-slide {
    transform: translateX(100%);
}

/* 활성화된 슬라이드 이전 슬라이드들의 위치 */
.banner-slide.active ~ .banner-slide {
    transform: translateX(100%);
}

.banner-slide.prev {
    transform: translateX(-100%);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* 슬라이더 내비게이션 버튼 스타일 */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.slider-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* 모바일 화면에서 버튼 크기 조정 */
@media (max-width: 768px) {
    .slider-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    body {
        font-size: 15px;
    }
    
    .banner-content .banner-title h1 {
        font-size: 24px;
    }
    
    .banner-content .banner-title h2 {
        font-size: 20px;
    }
}

.section-title {
    padding:0 20px;
    font-size: 20px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    font-weight: 600;
}

.section-title .view-all {
    font-size: 16px;
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.section-title .view-all i {
    font-size: 10px;
    margin-left: 4px;
}


.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.product-card .product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-card .product-image .cart-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-card .product-image .cart-btn ion-icon {
    font-size: 20px;
    color: #fff;
}

.product-card .product-info {
    padding: 12px 0;
}

.product-card .product-info .name {
    font-size: 15px;
    color: #333;
    line-height: 20px;
    height: 20px;
    width: 100%;
    margin-bottom: 8px;
    width: 100%;
    height: 17.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card .product-info .price {
    margin-bottom: 6px;
}

.product-card .product-info .price .discount {
    color: #ff4747;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.product-card .product-info .price .current-price {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.product-card .product-info .price .original-price {
    color: #999;
    font-size: 14px;
    text-decoration: line-through;
}

.product-card .product-info .review {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
}

.product-card .product-info .review .divider {
    color: #ddd;
}

.product-card .product-info .review .count {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #999;
}

.product-card .product-info .review .count ion-icon {
    font-size: 14px;
    margin-right: 1px;
}

/* 프로모션 배너 */
.promo-banner {
    margin: 20px 10px;
    padding: 15px;
    background-color: #ffefe9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ef552b;
}


/* 가로 스크롤 상품 그리드 */
.scroll-product-grid {
    display: flex;
    overflow-x: auto;
    padding:24px 20px;
    gap: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scroll-product-grid::-webkit-scrollbar {
    display: none;
}

.scroll-product-grid .product-card {
    width: 150px;
    flex-shrink: 0;
}

/* 로딩 스피너 스타일 */
.loading-spinner {
    text-align: center;
    padding: 20px 0;
    color: #999;
}

/* 무한 스크롤을 위한 제품 그리드 조정 */
#infinit-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px;
}

.sub-page.product-section{
}

/* 장바구니 아이콘 및 상품 수 표시 스타일 복원 */
.cart-icon {
    position: relative;
    display: inline-block;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ef552b;
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    box-sizing: border-box;
    border: 1px solid white;
}

/* 검색창 스타일 */
.search-container {
    padding: 12px;
    background-color: #f5f5f5;
}


.sub-page-header .search-input {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    padding: 12px 15px;
    font-size: 16px;
    color: #333;
    background: #f5f5f5;
}

.search-input:focus {
    outline: none;
}

.search-button {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
    cursor: pointer;
}

.search-button:focus {
    outline: none;
}

/* 위치 정보 스타일 */
.location-info {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

.location-info i {
    margin-right: 4px;
    color: #555;
}

.location-info span {
    font-weight: 400;
}

/* 하단 네비게이션 스타일 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 500px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #ddd;
    z-index: 100;
}

.bottom-nav .bottom-nav-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #777;
    width: 25%;
    padding: 10px 0;
    text-align: center;
    font-size: 12px;
}

.bottom-nav-icon {
    font-size: 28px;
}

.bottom-nav .bottom-nav-item.active {
    color: #ef552b;
}

/* 여백 조정 (하단 네비게이션 때문에) */
.page-bottom-padding {
    height: 70px;
}

/* 맨 위로 버튼 스타일 */
.back-to-top-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(239, 85, 43, 1); /* 약간 투명한 주황색 */
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}


/* 버튼 호버 효과 */
.auth-btn:hover {
    color: #0078ff;
}

/* 메뉴 섹션 스타일 */
.menu-section {
    padding: 20px 0;
    border-bottom: 8px solid #f5f5f5;
}

.menu-section-title {
    padding: 0 20px 15px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* 메뉴 아이템 스타일 - 카테고리용 */
.category-menu .menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    text-decoration: none;
    color: #333;
    font-size: 17px;
    border-bottom: 1px solid #f5f5f5;
}

.category-menu .menu-item-text {
    flex: 1;
}

.category-menu .menu-item-arrow {
    color: #e6e6e6;
    font-size: 9px;
    padding-left: 6px;
}

/* 설정 메뉴 아이템 스타일 */
.menu-section .menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    border-bottom: 1px solid #f5f5f5;
}

.menu-section .menu-item-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-section .menu-item-icon {
    color: #666;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.menu-section .menu-item-text {
    flex: 1;
}

.menu-section .menu-item-arrow {
    color: #999;
    font-size: 12px;
}

/* 마지막 아이템의 border 제거 */
.menu-section .menu-item:last-child {
    border-bottom: none;
}

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

.flag-icon {
    width: 24px;
    height: 16px;
    object-fit: contain;
    border-radius: 2px;
}

.country-flag i {
    font-size: 12px;
    color: #999;
}

.menu-item:active {
    background-color: #f5f5f5;
}

body.menu-open {
    overflow: hidden; /* 메뉴 열려있을 때 본문 스크롤 방지 */
}

/* 사이드 메뉴 오버레이 스타일 */
/*
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}
*/

/* 오버레이가 표시될 때 스크롤 방지 */
body.menu-open {
    overflow: hidden;
}

/* 카테고리 메뉴 아이템의 화살표 스타일 수정 */
.category-menu .menu-item-arrow {
    color: #ccc;  /* 더 연한 회색으로 변경 (#999 → #ccc) */
    font-size: 10px;  /* 12px에서 10px로 크기 감소 */
    padding-left: 8px;
}

/* 호버 시 화살표 색상 변경 (선택사항) */
.category-menu .menu-item:hover .menu-item-arrow {
    color: #bbb;
}
.noti-btn{
    position: relative;
}
.noti-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #ef552b;
    color: white;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-weight: 600;
}

/* 하단 네비게이션의 noti-count */
.bottom-nav-item .noti-count {
    top: 0;
    right: -4px;
}

/* 사이드 메뉴의 noti-count */
.quick-menu-item .noti-count {
    top: -4px;
    right: -4px;
}

/* 헤더의 noti-count */
.header .noti-count {
    top: -4px;
    right: -4px;
}

/* 장바구니 팝업 */
.cart-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.cart-popup.show {
    display: block;
}

.cart-popup .popup-content {
    position: absolute;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 20px;
    transition: bottom 0.3s ease;
}

.cart-popup.show .popup-content {
    bottom: 0;
}

.cart-popup .product-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

.cart-popup .product-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.cart-popup .select-box {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 15px;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 20px;
}

.cart-popup .option-group {
    margin-bottom: 20px;
}

.cart-popup .option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 8px;
}

.cart-popup .option-info {
    flex: 1;
}
.cart-popup .price-wrap {
    display: flex;
    justify-content: space-between;
}
.cart-popup .price-info {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-popup .current-price {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.cart-popup .original-price {
    font-size: 15px;
    color: #999;
    text-decoration: line-through;
    line-height: 1;
    margin-top: 1px;
}

.cart-popup .quantity-selector {
    height: 32px;
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cart-popup .quantity-btn {
    width: 32px;
    height: 100%;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #333;
}

.cart-popup .quantity-input {
    width: 40px;
    height: 100%;
    font-size: 14px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.cart-popup .total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.cart-popup .total-label {
    font-size: 16px;
    color: #333;
}

.cart-popup .total-amount {
    font-size: 22px;
    font-weight: 700;
    color: #ef552b;
}

.cart-popup .add-to-cart-btn {
    width: 100%;
    height: 46px;
    background: #ef552b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.cart-popup .add-to-cart-btn ion-icon {
    font-size: 20px;
}


/* 헤더 검색 관련 스타일 수정 */

.sub-page-header h1 {
    transform: translateX(0);
    opacity: 1;
    transition: all 0.3s ease;
}

.search-input-wrap {
    position: absolute;
    left: 50px;
    right: 50px;
    height: 36px;
    opacity: 0;
    transform: translateX(20px);
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-input-wrap.active {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}


.search-input-wrap.active .search-input {
    transform: scale(1);
}

.search-input::placeholder {
    color: #999;
}

.search-close-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.search-input-wrap.active .search-close-btn {
    opacity: 1;
    transition-delay: 0.1s;
}

.search-close-btn ion-icon {
    font-size: 20px;
}

/* 검색 활성화 시 타이틀 숨김 애니메이션 */
.sub-page-header.searching h1 {
    transform: translateX(-20px);
    opacity: 0;
    pointer-events: none;
}

/* 검색 입력창 포커스 효과 */
.search-input:focus {
    background: #f0f0f0;
    outline: none;
}

.slider-indicator {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 12px;
    color: white;
    font-size: 13px;
    font-weight: 500;
}

.slider-indicator span {
    color: rgba(255, 255, 255, 0.8);
}
