/* =========================================================
   배때지 V2 전체 페이지 반응형 인터랙션
   PC: hover
   모바일: active/touch
========================================================= */

:root{
    --v2-motion-fast:.16s;
    --v2-motion-normal:.24s;
    --v2-shadow-hover:0 10px 28px rgba(0,0,0,.13);
}

/* 모든 클릭 요소 기본 반응 */
button,
a,
[role="button"],
[data-full-image],
[data-order-size],
[data-gallery-index]{
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
}

/* 키보드 접근성 */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible{
    outline:2px solid #111;
    outline-offset:3px;
}

/* 버튼·카드 공통 전환 */
.v2-icon-button,
.v2-icon,
.v2-gallery-wish,
.v2-buy-wish,
.v2-gallery-camera,
.v2-gallery-thumb,
.v2-size-options button,
.v2-choice-grid button,
.v2-choice button,
.v2-profile-summary button,
.v2-profile button,
.v2-feature-card,
.v2-feature,
.v2-trust-row,
.v2-buy-bar a,
.v2-buy-bar button,
.v2-buybar a,
.v2-related-grid > a,
.v2-product-card,
.product-card,
.bottom-nav__item{
    transition:
        transform var(--v2-motion-fast) ease,
        box-shadow var(--v2-motion-normal) ease,
        background-color var(--v2-motion-fast) ease,
        border-color var(--v2-motion-fast) ease,
        color var(--v2-motion-fast) ease,
        opacity var(--v2-motion-fast) ease;
}

/* PC에서 마우스 올렸을 때만 */
@media (hover:hover) and (pointer:fine){

    .v2-icon-button:hover,
    .v2-icon:hover{
        background:#f3f3f1;
        border-radius:50%;
        transform:translateY(-2px);
    }

    .v2-gallery-camera:hover{
        animation:none !important;
        transform:translateY(-6px) scale(1.08);
        box-shadow:0 12px 28px rgba(0,0,0,.24);
    }

    .v2-gallery-thumb:hover{
        transform:translateY(-5px) scale(1.06);
        border-color:#111;
        box-shadow:0 9px 22px rgba(0,0,0,.22);
    }

    .v2-gallery-wish:hover,
    .v2-buy-wish:hover{
        transform:translateY(-3px) scale(1.1);
        color:#e43161;
        border-color:#e43161;
        box-shadow:0 8px 20px rgba(228,49,97,.18);
    }

    .v2-feature-card:hover,
    .v2-feature:hover{
        transform:translateY(-3px);
        border-color:#bbb3d7;
        box-shadow:var(--v2-shadow-hover);
    }

    .v2-trust-row:hover{
        transform:translateY(-2px);
        background:#292929;
        box-shadow:0 9px 22px rgba(0,0,0,.2);
    }

    .v2-size-options button:hover,
    .v2-choice-grid button:hover,
    .v2-choice button:hover{
        transform:translateY(-2px);
        border-color:#111;
        box-shadow:0 6px 16px rgba(0,0,0,.1);
    }

    .v2-profile-summary button:hover,
    .v2-profile button:hover{
        transform:translateY(-2px);
        background:#333;
    }

    .v2-buy-bar a:hover,
    .v2-buy-bar button:hover,
    .v2-buybar a:hover{
        transform:translateY(-3px);
        box-shadow:0 9px 22px rgba(0,0,0,.18);
    }

    .v2-related-grid > a:hover,
    .v2-product-card:hover,
    .product-card:hover{
        transform:translateY(-5px);
    }

    .v2-related-grid > a:hover img,
    .v2-product-card:hover img,
    .product-card:hover img{
        transform:scale(1.045);
    }

    .bottom-nav__item:hover{
        color:#111;
        transform:translateY(-3px);
    }
}

/* 모바일 터치 반응 */
.v2-icon-button:active,
.v2-icon:active,
.v2-gallery-camera:active,
.v2-gallery-thumb:active,
.v2-gallery-wish:active,
.v2-buy-wish:active,
.v2-feature-card:active,
.v2-feature:active,
.v2-trust-row:active,
.v2-size-options button:active,
.v2-choice-grid button:active,
.v2-choice button:active,
.v2-profile-summary button:active,
.v2-profile button:active,
.v2-buy-bar a:active,
.v2-buy-bar button:active,
.v2-buybar a:active,
.v2-related-grid > a:active,
.v2-product-card:active,
.product-card:active,
.bottom-nav__item:active{
    transform:scale(.96);
    opacity:.82;
}

/* 상품 이미지 확대 효과 */
.v2-related-image,
.v2-product-card__image,
.product-card__image{
    overflow:hidden;
}

.v2-related-image img,
.v2-product-card img,
.product-card img{
    transition:transform .35s ease;
}

/* 위시리스트 활성 상태 */
.v2-gallery-wish.active,
.v2-buy-wish.active,
.wish-button.active,
[data-wish].active{
    color:#e43161 !important;
    border-color:#e43161 !important;
    background:#fff5f8 !important;
    animation:v2WishPop .32s ease;
}

@keyframes v2WishPop{
    0%{transform:scale(.75)}
    55%{transform:scale(1.22)}
    100%{transform:scale(1)}
}

/* 선택된 옵션 */
.v2-size-options button.active,
.v2-choice-grid button.selected,
.v2-choice button.selected,
[data-order-size].active{
    background:#111 !important;
    color:#fff !important;
    border-color:#111 !important;
    box-shadow:0 6px 16px rgba(0,0,0,.18);
}

/* 하단 네비 활성 상태 */
.bottom-nav__item.active{
    color:#111;
    font-weight:800;
}

.bottom-nav__item.active svg{
    stroke-width:2.2;
}

/* 화면 크기별 자연스러운 반응 */
@media(max-width:480px){

    .v2-gallery-camera:hover,
    .v2-gallery-thumb:hover,
    .v2-product-card:hover,
    .product-card:hover{
        transform:none;
    }

    .v2-buy-bar,
    .v2-buybar,
    .bottom-nav{
        padding-bottom:max(
            8px,
            env(safe-area-inset-bottom)
        );
    }
}

@media(min-width:621px){

    .v2-page,
    .v2i-shell,
    .page{
        width:100%;
        max-width:620px;
        margin-right:auto;
        margin-left:auto;
    }
}

/* 움직임 최소화 설정 대응 */
@media(prefers-reduced-motion:reduce){

    *,
    *::before,
    *::after{
        animation-duration:.01ms !important;
        animation-iteration-count:1 !important;
        transition-duration:.01ms !important;
        scroll-behavior:auto !important;
    }
}
