/* ==========================================================================
   Ppdl Custom Styles
   ========================================================================== */

/* 기본 스타일 */
:root {
    --primary-color: #707070;
    --secondary-color: #707070;
    --bg-color: #f0f0f0;
    --footer-bg: #707070;
    --border-color: #707070;
    --text-color: #707070;
    
    /* 파스텔 컬러 팔레트 */
    --pastel-pink: #FFF5F5;
    --pastel-peach: #FFFBF7;
    --pastel-cream: #FFFEF9;
    --pastel-orange: #FFF8F0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

/* 헤더 스타일 */
.main-header {
    padding: 20px 0;
    background-color: #f0f0f0;
    border-bottom: 1px solid #707070;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 헤더 내부 컨테이너 기준점 */
.main-header .row {
    position: relative;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    color: #707070 !important;
}

/* 데스크톱: 햄버거 좌측 하단 고정 */
@media (min-width: 992px) {
    .hamburger-fixed {
        position: absolute;
        left: 15px;
        top: 68px; /* 전체 화면에서 더 아래로 */
    }
}

.logo {
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.3s;
}

.logo img {
    height: clamp(35px, 5vw, 80px);
    width: auto;
    display: block;
}

.logo:hover {
    opacity: 0.7;
}

/* 햄버거 메뉴 */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger-icon {
    width: 25px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s;
}

/* 상단 네비게이션 */
.top-nav {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 1001;
    display: flex;
    justify-content: flex-end;
}

.top-nav .nav-link {
    color: var(--text-color);
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-nav .nav-link:hover {
    color: var(--primary-color);
}

.top-nav .nav-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
}

.top-nav .nav-text {
    display: inline-block;
}

/* 장바구니 배지 */
.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #d32f2f;
    color: #f0f0f0;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* 드롭다운 메뉴 스타일 */
.top-nav .dropdown-menu {
    border: 1px solid #707070;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 160px;
    margin-top: 0.5rem;
}

.top-nav .dropdown-item {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.2s;
}

.top-nav .dropdown-item:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

.top-nav .dropdown-divider {
    margin: 0.5rem 0;
    border-color: #707070;
}

/* 메인 컨텐츠 */
.main-content {
    min-height: calc(100vh - 400px);
    background-color: #f0f0f0;
    padding: 60px 0;
}

/* New 섹션 */
.new-section {
    margin-bottom: 20px;
}

.category-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 300;
    text-transform: lowercase;
    color: #1d1d1f;
    letter-spacing: -1px;
    line-height: 1.1;
}

.view-all-link {
    font-size: 1rem;
    color: #707070;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

.view-all-link:hover {
    color: #707070;
    text-decoration: none;
}

/* 카테고리 헤더 */
.category-header {
    margin-bottom: 50px;
}

.category-description {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-top: 10px;
}

/* 상품 그리드 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px 30px;
    margin-bottom: 60px;
}

/* 검색 페이지와 위시리스트 페이지에서는 더 좁은 간격 사용 */
.search-page .product-grid,
.main-content .row.g-4 {
    gap: 0px;
}

@media (max-width: 767.98px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 30px 20px;
    }
}

@media (max-width: 575.98px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 100px 20px;
}

.empty-message {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin: 0;
}

/* 하위 카테고리 섹션 */
.subcategory-section {
    margin-bottom: 60px;
}

.subcategory-section:last-child {
    margin-bottom: 0;
}

.subcategory-title {
    font-family: 'Chilgok', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    color: #707070;
}

.empty-state-small {
    text-align: center;
    padding: 40px 20px;
    background: var(--pastel-cream);
    border-radius: 12px;
}

.empty-message-small {
    font-size: 1rem;
    color: var(--secondary-color);
    margin: 0;
}

/* 상품 카드 */
.product-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 그리드 내부의 상품 카드는 width 제한 없음 */
.product-grid .product-card {
    width: 100%;
    max-width: 100%;
}

.product-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Swiper 컨테이너 */
.product-swiper {
    width: 100%;
    padding: 0 50px 25px 50px; /* 버튼 공간 확보 */
    position: relative;
}

.product-swiper .swiper-slide {
    width: 320px !important;
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    height: auto;
}

.product-swiper .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.product-swiper .product-card {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    height: 420px;
    flex-shrink: 0;
}

/* 모바일: 카드 너비 100%로 조정 */
@media (max-width: 767px) {
    .product-swiper .swiper-slide {
        width: 100% !important;
        min-width: 100%;
        max-width: 100%;
    }
    
    .product-swiper .product-card {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: 380px;
    }
    
    .product-thumbnail {
        height: 220px;
    }
    
    .product-name {
        font-size: 17px;
        color: #707070;
    }
    
    .product-summary {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 17px;
        color: #707070;
    }
}

/* 모든 디바이스: 페이지네이션 숨김 */
.product-swiper .swiper-pagination {
    display: none;
}

/* Swiper 네비게이션 버튼 */
.product-swiper .swiper-button-prev,
.product-swiper .swiper-button-next {
    color: #1d1d1f;
    background-color: rgba(255, 255, 255, 0.95);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* disabled 클래스 무시 (항상 활성화) */
.product-swiper .swiper-button-prev.swiper-button-disabled,
.product-swiper .swiper-button-next.swiper-button-disabled {
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

.product-swiper .swiper-button-prev:hover,
.product-swiper .swiper-button-next:hover {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.product-swiper .swiper-button-prev::after,
.product-swiper .swiper-button-next::after {
    font-size: 18px;
    font-weight: bold;
}

/* Swiper 페이지네이션 */
.product-swiper .swiper-pagination {
    bottom: 10px;
}

.product-swiper .swiper-pagination-bullet {
    background-color: #707070;
    opacity: 0.3;
}

.product-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}

/* 상품 썸네일 */
.product-thumbnail {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    max-width: 400px;
    margin: 0 auto;
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    .product-thumbnail {
        height: 0;
        padding-bottom: 100%; /* 모바일에서는 1:1 비율 유지 */
    }
}

.product-thumbnail-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover .product-thumbnail-image {
    transform: scale(1.08);
}

.product-thumbnail-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.product-thumbnail-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/img/brand_image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.2;
    z-index: 1;
}

.product-thumbnail-placeholder::after {
    content: '상품 준비 중';
    position: relative;
    z-index: 2;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    opacity: 1;
}

.product-info {
    padding: 16px;
    background: white;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    margin-bottom: 0 !important;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: #707070;
    line-height: 1.2;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
}

.product-summary {
    font-size: 15px;
    font-weight: 400;
    color: #86868b;
    line-height: 1.4;
    letter-spacing: -0.1px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
    margin-bottom: 12px;
    flex: 1;
    min-height: 42px;
    max-height: 42px;
}

.product-price {
    font-size: 18px;
    font-weight: 600;
    color: #707070;
    margin: 0;
}

.original-price {
    text-decoration: line-through;
    color: var(--secondary-color);
    margin-right: 8px;
    font-size: 0.9rem;
}

.sale-price {
    color: #d32f2f;
    font-weight: 600;
}

/* 푸터 */
.main-footer {
    background-color: #707070;
    color: #f0f0f0;
    padding: 60px 0 40px;
    border-top: 1px solid #707070;
}

.footer-content {
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: 2px;
    color: #f0f0f0;
}

.footer-logo img {
    height: clamp(30px, 4vw, 70px);
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}


.footer-info p {
    margin-bottom: 2px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #f0f0f0;
}

.company-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 12px !important;
    color: #f0f0f0;
}

.footer-bottom {
        padding-top: 10px;
}

.footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.copyright {
    font-size: 0.8rem;
    margin: 0;
    color: #f0f0f0;
}

.footer-icon-credits {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-icon-credits p {
    font-size: 0.7rem;
    color: #f0f0f0;
    margin: 0;
}

.footer-icon-credits a {
    color: #f0f0f0;
    text-decoration: none;
}

.footer-icon-credits a:hover {
    color: #f0f0f0;
    text-decoration: underline;
}

.footer-notice {
    font-size: 0.75rem;
    color: #f0f0f0;
    margin: 0;
}

/* 링크를 우측 끝으로 */
.footer-links {
    font-size: 0.85rem;
    white-space: nowrap;
}

.footer-links a {
    color: #f0f0f0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #f0f0f0;
}

.footer-links span {
    margin: 0 8px;
    color: #f0f0f0;
}

/* 화면이 작아지면 링크를 다음 줄로 보내고 우측 정렬 */
@media (max-width: 575.98px) {
    .footer-bottom-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-links {
        align-self: flex-end;
        margin-top: 8px;
    }
}

/* 오프캔버스 메뉴 */
.offcanvas {
    max-width: 280px;
}

.offcanvas-body .nav-link {
    color: var(--text-color);
    padding: 12px 0;
    transition: color 0.3s;
}

.offcanvas-body .nav-link:hover {
    color: var(--primary-color);
}

/* 사이드 메뉴 중첩 구조 */
.offcanvas-body .nav-item {
    position: relative;
}

.offcanvas-body .nav-item.has-submenu > .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offcanvas-body .nav-item.has-submenu > .nav-link::after {
    content: '›';
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.offcanvas-body .nav-item.has-submenu.active > .nav-link::after {
    transform: rotate(90deg);
}

.offcanvas-body .submenu {
    list-style: none;
    padding-left: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.offcanvas-body .nav-item.has-submenu.active > .submenu {
    max-height: 500px;
}

.offcanvas-body .submenu .nav-link {
    padding-left: 20px;
    font-size: 0.9rem;
}

.offcanvas-body .submenu .nav-item {

}

.offcanvas-body .submenu .nav-item:last-child {
    border-bottom: none;
}

/* 하위 메뉴 2단계 */
.offcanvas-body .submenu .submenu {
    /* 중첩 서브메뉴도 기본은 숨김 */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.offcanvas-body .submenu .nav-item.has-submenu.active > .submenu {
    /* 2단계 서브메뉴가 active일 때만 표시 */
    max-height: 500px;
}

.offcanvas-body .submenu .submenu .nav-link {
    padding-left: 40px;
    font-size: 0.85rem;
}

/* 에러 페이지 */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 반응형 디자인 */
@media (max-width: 991.98px) {
    .top-nav .nav-link {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .main-header .row {
        align-items: center;
    }
}

@media (max-width: 767.98px) {
    .logo {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 40px 0;
    }
    
    .footer-logo {
        font-size: 1.5rem;
    }
    
    .top-nav .nav-link {
        padding: 0.3rem;
    }
    
    /* 모바일에서는 텍스트 숨기고 아이콘만 표시 */
    .top-nav .nav-text {
        display: none;
    }
    
    .top-nav .nav-icon {
        display: inline-block;
    }
    
    .top-nav .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .product-card {
        width: 267px;
        max-width: 267px;
    }
    
    .product-swiper .swiper-slide {

    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 0.9rem;
        color: #707070;
    }
    
    .product-summary {
        font-size: 0.8rem;
    }
    
    .product-price {
        font-size: 0.9rem;
        color: #707070;
    }
}

/* 유틸리티 클래스 */
.btn-primary {
    background-color: #707070;
    border-color: #707070;
    color: #f0f0f0;
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 400;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #707070;
    border-color: #707070;
    color: #f0f0f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 400;
    transition: all 0.3s ease;
}

/* 로딩 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

/* 햄버거 아이콘: 모든 화면에서 타이틀바 하단 고정 */
.hamburger-fixed {
    position: absolute;
    left: 15px;
    bottom: 10px;
    top: auto; /* 데스크톱 전용 top 설정을 무효화 */
    z-index: 1001;
}

/* 모바일에서 햄버거 메뉴 중앙 정렬 */
@media (max-width: 991.98px) {
    .hamburger-fixed {
        position: absolute;
        left: 15px;
        bottom: 50%;
        transform: translateY(50%);
        top: auto;
    }
}

/* 제품 상세 페이지 */
.product-detail-page {
    padding: 0;
}

.product-detail-page .container-fluid {
    padding: 0;
}

.product-detail-page .row {
    margin: 0;
}

.product-detail-info {
    position: sticky;
    top: 80px;
    background-color: #f0f0f0;
    border-right: 1px solid #707070;
    overflow-y: auto;
    align-self: flex-start;
}

/* 데스크톱에서 스크롤바 항상 표시 */
@media (min-width: 992px) {
    .product-detail-info {
        overflow-y: scroll;
        max-height: calc(100vh - 100px);
    }
}

.product-image-container {
    background: #f0f0f0;
    flex: 1;
}

.product-image-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 0;
}

.product-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 1px;
    background: #f0f0f0;
    max-width: 1000px;     /* 이미지 박스 최대 너비 1000px */
    width: 100%;           /* 가로는 부모 요소에 맞춤 */
    margin: 0px 5px 5px 15px;      /* 가운데 정렬 */
    /* max-height 제거: 세로 비율 유지를 위해 높이 제한 없음 */
}

.product-image-wrapper img {
    width: 100%;           /* 박스 너비에 맞춤 */
    height: auto;          /* 비율 유지하면서 높이 자동 */
    display: block;        /* img 태그 하단 여백 제거 */
    /* object-fit과 max-height 제거: 원본 비율 유지 */
}

.product-image-wrapper .product-placeholder {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 1.2rem;
    background: #f5f5f5;
    border-radius: 8px;
}

.product-detail-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border-color);
}

.product-detail-price,
.product-detail-shipping {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
}

.price-label,
.shipping-label {
    font-weight: 400;
    color: var(--text-color);
}

.price-value,
.shipping-value {
    font-weight: 500;
}

.option-buttons .btn {
    border-radius: 0;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-qty {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background: #f0f0f0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-input {
    width: 60px;
    height: 30px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.total-price {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-weight: 500;
}

.product-info-section h6 {
    font-weight: 500;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.product-image-item {
    width: 100%;
    aspect-ratio: 3/4;
    background: #f0f0f0;
    border: 1px solid var(--border-color);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-item .product-placeholder {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

@media (max-width: 991.98px) {
    .product-detail-info {
        position: relative;
        top: 0;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        overflow-y: visible;
    }
    
    .product-image-item {
        aspect-ratio: 3/4;
    }
    
    /* 모바일에서 정보 영역을 위로, 이미지 영역을 아래로 */
    .product-detail-page .row {
        display: flex;
        flex-direction: column;
    }
    
    .product-detail-page .product-detail-info {
        order: 1;
    }
    
    .product-detail-page .product-image-container {
        order: 2;
    }
}

/* ==========================================
   리뷰 섹션
   ========================================== */

.review-section {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border-color);
}

.review-summary {
    background: #f0f0f0;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.review-summary-left {
    text-align: center;
    padding-right: 40px;
    border-right: 1px solid var(--border-color);
}

.review-avg-rating {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.review-total-count {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-bar-label {
    width: 60px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.rating-bar-graph {
    flex: 1;
    height: 8px;
    background: #707070;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 12px;
}

.rating-bar-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

.rating-bar-count {
    width: 40px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* 별점 표시 */
.stars {
    color: #ffa500;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.stars-large {
    font-size: 2rem;
}

.stars-small {
    font-size: 0.9rem;
}

/* 별점 입력 (클릭 가능) */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    font-size: 2rem;
    cursor: pointer;
}

.star-rating input {
    display: none;
}

.star-rating label {
    color: #707070;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #ffa500;
}

/* 리뷰 목록 */
.review-list {
    margin-top: 40px;
}

.review-item {
    padding: 25px 20px;
    border: 1px solid var(--border-color);
    background: #f0f0f0;
    margin-bottom: 15px;
    border-radius: 8px;
    transition: all 0.2s;
}

.review-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: #707070;
}

.review-item:last-child {
    margin-bottom: 0;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.review-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.review-author {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.review-verified {
    display: inline-block;
    background: var(--pastel-peach);
    color: #ff6b35;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 8px;
}

.review-date {
    color: var(--secondary-color);
    font-size: 0.85rem;
    white-space: nowrap;
}

.review-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--text-color);
}

.review-content {
    color: #707070;
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.review-actions {
    display: flex;
    gap: 15px;
}

.review-action-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.review-action-btn:hover {
    color: var(--primary-color);
}

.review-helpful-count {
    color: var(--primary-color);
}

/* 리뷰 작성 폼 */
.review-write-section {
    background: #f0f0f0;
    padding: 40px;
    border-radius: 8px;
    margin-top: 40px;
}

.review-form-group {
    margin-bottom: 25px;
}

.review-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.review-form-group input,
.review-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.review-form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.review-sort {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

    /* product-tabs-nav 폰트 조정 */
    .product-tabs-nav {
        display: flex;
        justify-content: space-around;
        border-bottom: 1px solid #707070;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .product-tabs-nav .nav-link {
        font-size: clamp(0.75rem, 2.2vw, 0.85rem);
        padding: 0.6rem 0.9rem;
    }
    
    /* 정렬/필터 버튼 */
    .review-sort,
    .review-sort-buttons,
    .qna-sort-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: flex-start;
        margin-bottom: 15px;
    }
    
    .review-sort-btn,
    .review-sort-buttons .btn,
    .qna-sort-buttons .btn {
        font-size: clamp(0.7rem, 2vw, 0.8rem) !important;
        padding: 6px 12px !important;
        white-space: nowrap;
        line-height: 1.3;
        border: 1px solid #707070;
        border-radius: 4px;
    }
    
    /* 리뷰 정렬 버튼 그룹 */
    .review-header {
        flex-direction: column;
        gap: 10px;
    }
    
    /* 상품 이미지 슬라이더 */
    .product-detail-images {
        max-width: 100%;
        overflow: hidden;
    }
    
    .product-detail-images .swiper-slide,
    .product-detail-images img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }
/* 정보 섹션의 메인 이미지 */
.product-main-image-mobile {
    width: 100%;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    max-height: 500px;
    background: #f8f8f8; /* 여백 부분 배경색 */
}

.product-main-image-mobile img {
    width: 100%;
    max-height: 500px;
    height: auto;
    display: block;
    object-fit: contain; /* 전체 이미지 표시 */
}

.review-sort-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 8px 16px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.review-sort-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* 리뷰 페이지네이션 */
.review-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.review-pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
}

.review-pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    color: #f0f0f0;
    border-color: var(--primary-color);
}

.review-pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.review-pagination button.active {
    background: var(--primary-color);
    color: #f0f0f0;
    border-color: var(--primary-color);
}


/* ==========================================
   상품 상세 탭 섹션
   ========================================== */

   .product-tabs-section {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border-color);
}

.product-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 60px;
}

.product-tab-btn {
    padding: clamp(12px, 2vw, 20px) clamp(20px, 5vw, 60px);
    background: none;
    border: none;
    font-size: clamp(0.85rem, 2.5vw, 1.8rem);
    font-weight: 500;
    color: var(--secondary-color);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.product-tab-btn:hover {
    color: var(--text-color);
}

.product-tab-btn.active {
    color: var(--primary-color);
}

.product-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.product-tabs-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-tab-pane {
    display: none;
}

.product-tab-pane.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Q&A 섹션 */
.qna-section {
    padding: 20px 0;
}

.qna-write-section {
    background: #f0f0f0;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.qna-item {
    padding: 25px 0;
    border-bottom: 1px solid var(--border-color);
}

.qna-item:last-child {
    border-bottom: none;
}

.qna-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.qna-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 8px;
}

.qna-type-product {
    background: #e3f2fd;
    color: #1976d2;
}

.qna-type-shipping {
    background: #f3e5f5;
    color: #7b1fa2;
}

.qna-type-etc {
    background: #e8f5e9;
    color: #388e3c;
}

.qna-private-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: #fce4ec;
    color: #c2185b;
    margin-right: 8px;
}

.qna-answered-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: 500;
}

.qna-unanswered-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: #f0f0f03e0;
    color: #ef6c00;
    font-weight: 500;
}

.qna-date {
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.qna-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.qna-content {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 12px;
}

.qna-author {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.qna-answer {
    background: #f0f0f0;
    padding: 20px;
    border-left: 3px solid var(--primary-color);
    margin-top: 15px;
    border-radius: 4px;
}

.qna-answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #707070;
}

.qna-answer-content {
    color: var(--text-color);
    line-height: 1.7;
}

.qna-actions {
    display: flex;
    gap: 10px;
}

.qna-answer-form {
    margin-top: 15px;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 4px;
}

.qna-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.qna-pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
}

.qna-pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    color: #f0f0f0;
    border-color: var(--primary-color);
}

.qna-pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qna-pagination button.active {
    background: var(--primary-color);
    color: #f0f0f0;
    border-color: var(--primary-color);
}

/* 배송/반품 정보 섹션 */
.shipping-info-section {
    padding: 20px 0;
}

.info-section {
    margin-bottom: 40px;
}

.info-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--text-color);
}

.info-content {
    padding: 20px 0;
}

.info-content p {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 0.95rem;
}

.info-content h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    margin-top: 20px;
    color: var(--text-color);
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.info-list li {
    padding: 8px 0;
    padding-left: 15px;
    position: relative;
    color: var(--text-color);
    line-height: 1.7;
    font-size: 0.9rem;
}

.info-list li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--text-color);
}

.delivery-item {
    margin-bottom: 10px;
}

.delivery-item strong {
    color: var(--text-color);
}

.delivery-item p {
    margin: 0;
    padding-left: 10px;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* ==========================================
   리뷰 섹션
   ========================================== */

.review-section {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border-color);
}

.review-summary {
    background: #f0f0f0;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.review-summary-left {
    text-align: center;
    padding-right: 40px;
    border-right: 1px solid var(--border-color);
}

.review-avg-rating {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.review-total-count {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.rating-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.rating-bar-label {
    width: 60px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.rating-bar-graph {
    flex: 1;
    height: 8px;
    background: #707070;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 12px;
}

.rating-bar-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

.rating-bar-count {
    width: 40px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* 별점 표시 */
.stars {
    color: #ffa500;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.stars-large {
    font-size: 2rem;
}

.stars-small {
    font-size: 0.9rem;
}

/* 별점 입력 (클릭 가능) */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    font-size: 2rem;
    cursor: pointer;
}

.star-rating input {
    display: none;
}

.star-rating label {
    color: #707070;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
}

/* 리뷰 작성 폼 */
.review-write-section {
    background: #f0f0f0;
    padding: 40px;
    border-radius: 8px;
    margin-top: 40px;
}

.review-form-group {
    margin-bottom: 25px;
}

.review-form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.review-form-group input,
.review-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.review-form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.review-sort {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.review-sort-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 8px 16px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.review-sort-btn.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* 리뷰 페이지네이션 */
.review-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.review-pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
}

.review-pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    color: #f0f0f0;
    border-color: var(--primary-color);
}

.review-pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.review-pagination button.active {
    background: var(--primary-color);
    color: #f0f0f0;
    border-color: var(--primary-color);
}

/* ==========================================
   검색 모달
   ========================================== */

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
}

.search-modal-content {
    background: #f0f0f0;
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.search-modal-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
}

.search-input {
    flex: 1;
    border: none;
    font-size: 1.2rem;
    padding: 10px;
    outline: none;
}

.search-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0 10px;
    transition: color 0.2s;
}

.search-modal-close:hover {
    color: var(--text-color);
}

.search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.search-placeholder {
    text-align: center;
    color: var(--secondary-color);
    padding: 60px 20px;
    font-size: 1.1rem;
}

.search-result-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f0f0f0;
}

.search-result-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--secondary-color);
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.search-result-price {
    margin-bottom: 5px;
}

.search-result-price .original-price {
    text-decoration: line-through;
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-right: 8px;
}

.search-result-price .sale-price {
    color: #d32f2f;
    font-weight: 600;
}

.search-result-category {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.search-view-all {
    display: block;
    text-align: center;
    padding: 20px;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    border-top: 1px solid var(--border-color);
    transition: background 0.2s;
}

.search-view-all:hover {
    background: #f0f0f0;
}

@media (max-width: 767px) {
    .search-modal {
        padding-top: 20px;
    }
    
    .search-modal-content {
        max-width: 95%;
        max-height: 90vh;
    }
    
    .search-input {
        font-size: 1rem;
    }
    
    .search-result-image {
        width: 60px;
        height: 60px;
    }
}

/* 검색 결과 페이지 */
.search-page {
    padding: 60px 0;
}

.search-page-header {
    margin-bottom: 40px;
    text-align: center;
}

.search-page-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.search-controls {
    display: flex;
    justify-content: flex-end;
}

.search-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-pagination .pagination-ellipsis {
    padding: 8px 12px;
    color: var(--secondary-color);
}

/* 리뷰 모바일 반응형 */
@media (max-width: 767px) {
    .review-item {
        padding: 20px 15px;
        margin-bottom: 12px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .review-header > div:first-child {
        width: 100%;
    }
    
    .review-date {
        font-size: 0.8rem;
    }
    
    .review-title {
        font-size: 0.95rem;
    }
    
    .review-content {
        font-size: 0.85rem;
    }
    
    .review-summary {
        padding: 20px 15px;
    }
    
    .review-avg-rating {
        font-size: 1.2rem !important;
    }
    
    .stars-large {
        font-size: 1.5rem !important;
    }
}

/* ================================
   버튼 스타일 통일
   ================================ */
.btn {
    padding: 14px 32px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    line-height: 1.5;
}

.btn-lg {
    padding: 16px 40px !important;
    font-size: 1.1rem !important;
}

.btn-sm {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: #505050 !important;
    border-color: #505050 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.btn-outline-primary {
    background-color: white !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.btn-outline-secondary {
    background-color: white !important;
    border-color: #ddd !important;
    color: #666 !important;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa !important;
    border-color: #ccc !important;
    color: #333 !important;
}

