@charset "utf-8";

:root{
    --goods_black: #0a0806;
    --goods_panel: #100d09;
    --goods_gold: #b38a50;
    --goods_paper: #ead9b8;
    --goods_muted: rgba(234,217,184,0.62);
}

body.goods_page{
    overflow-x: hidden;
    color: var(--goods_paper);
    background: var(--goods_black);
}

/* 기존 술 샵과 동일한 공용 헤더 표현 */
.goods_page .main_header{
    background: transparent;
    border-bottom-color: rgba(243,232,210,0.14);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.goods_page .main_header .main_menu_link{
    color: rgba(243,232,210,0.86);
    text-shadow: 0 1px 4px rgba(0,0,0,0.38);
}
.goods_page .main_header .main_menu_link_current::after{
    background: #c7923f;
}
.goods_page .main_header .main_menu_link[data-login-trigger]{
    border-color: rgba(243,232,210,0.4);
    color: #f3e8d2;
    background: rgba(11,9,7,0.16);
}
.goods_page .main_header .main_menu_link[data-login-trigger]:hover,
.goods_page .main_header .main_menu_link[data-login-trigger]:focus-visible{
    border-color: #c7923f;
    background: rgba(199,146,63,0.16);
}

/* 1920×1080 빈 진열장 위에 상품 PNG를 얹는 영역 */
.market_stage{
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 720px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(5,4,3,0.08), transparent 24%, transparent 76%, rgba(5,4,3,0.08)),
        url("../../images/bg/goods_showroom_bg_v2.png") center / cover no-repeat;
    isolation: isolate;
}

.goods_title{
    position: absolute;
    z-index: 30;
    top: 8vh;
    left: 6vw;
}
.goods_title > p{
    margin: 0 0 18px;
    color: var(--goods_gold);
    font-family: var(--font_title);
    font-size: 13px;
    letter-spacing: 0.18em;
}
.goods_title h1{
    margin: 0;
    font-family: var(--font_title);
    font-size: clamp(34px, 4vw, 68px);
    font-weight: 400;
    line-height: 1.25;
}
.collection_switch{
    display: flex;
    gap: 18px;
    margin-top: 18px;
    font-size: 13px;
}
.collection_switch a{
    color: rgba(234,217,184,0.5);
}
.collection_switch a.on{
    color: var(--goods_paper);
    text-decoration: underline;
    text-decoration-color: var(--goods_gold);
    text-underline-offset: 5px;
}

.goods_filters{
    position: relative;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 22px;
}
.goods_filter{
    padding: 7px 11px;
    border: 1px solid rgba(234,217,184,0.24);
    border-radius: 999px;
    background: rgba(13,11,8,0.32);
    color: rgba(234,217,184,0.58);
    font-size: 10px;
    cursor: pointer;
    transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}
.goods_filter:hover,
.goods_filter:focus-visible,
.goods_filter.on{
    border-color: var(--goods_gold);
    background: var(--goods_gold);
    color: #17110a;
    outline: none;
}
.goods_product[hidden]{
    display: none;
}

.goods_board{
    position: absolute;
    inset: 0;
}

/*
 * --item_left: 상품의 가로 위치
 * --item_bottom: 상품이 닿는 선반의 세로 위치
 * --item_width: PC에서 상품이 차지하는 너비
 */
.goods_product{
    --item_width: 8%;
    --item_nudge_y: 5px;
    position: absolute;
    z-index: 5;
    top: var(--item_bottom);
    left: var(--item_left);
    width: var(--item_width);
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    transform: translate(-50%, calc(-100% + var(--item_nudge_y)));
    transition: top 420ms cubic-bezier(.22,1,.36,1), left 420ms cubic-bezier(.22,1,.36,1);
}

/* 테두리 대신 상품 뒤쪽에만 은은한 빛이 생깁니다. */
.goods_product::before{
    content: "";
    position: absolute;
    z-index: -1;
    right: -28%;
    bottom: -12%;
    left: -28%;
    height: 74%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(210,170,108,0.18), rgba(210,170,108,0) 70%);
    opacity: 0;
    transform: scale(0.72);
    transition: opacity 300ms ease, transform 380ms cubic-bezier(.22,1,.36,1);
    pointer-events: none;
}
.goods_product img{
    display: block;
    width: 100%;
    height: clamp(52px, 6.3vw, 116px);
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 8px 7px rgba(0,0,0,0.38)) brightness(0.93);
    transform-origin: center bottom;
    transition:
        transform 380ms cubic-bezier(.22,1,.36,1),
        filter 300ms ease;
}

/* 가격표는 선택한 상품에서만 조용하게 나타납니다. */
.goods_tag{
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    min-width: max-content;
    padding: 5px 8px;
    color: #d9bc8a;
    background: rgba(10,8,6,0.82);
    font-size: clamp(9px, .68vw, 12px);
    line-height: 1;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translate(-50%, -4px);
    transition: opacity 240ms ease, transform 280ms ease;
    pointer-events: none;
}
.goods_product:hover,
.goods_product:focus-visible{
    z-index: 25;
    outline: none;
}
.goods_product:hover::before,
.goods_product:focus-visible::before{
    opacity: 1;
    transform: scale(1);
}
.goods_product:hover img,
.goods_product:focus-visible img{
    filter: drop-shadow(0 16px 13px rgba(0,0,0,0.52)) brightness(1.08);
    transform: translateY(-6px) scale(1.055);
}
.goods_product:hover .goods_tag,
.goods_product:focus-visible .goods_tag{
    opacity: 1;
    transform: translate(-50%, 0);
}

/* 세트 구성은 어두운 화보 프레임과 별도 정보 행으로 정돈합니다. */
.set_stage{
    position: relative;
    min-height: 640px;
    padding: clamp(72px, 7vw, 112px) clamp(24px, 5vw, 88px) clamp(80px, 8vw, 124px);
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0, rgba(179,138,80,0.09), transparent 38%),
        #0a0806;
    border-top: 1px solid rgba(179,138,80,0.28);
}
.set_title{
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    max-width: 1440px;
    margin: 0 auto clamp(38px, 4vw, 64px);
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(234,217,184,0.18);
}
.set_title p{
    margin: 0 0 6px;
    color: var(--goods_gold);
    font-family: Arial, sans-serif;
    font-size: 10px;
    letter-spacing: .18em;
}
.set_title h2{
    margin: 0;
    font-size: clamp(30px, 3.2vw, 50px);
    font-weight: 400;
    line-height: 1.2;
}
.set_title .set_introduction{
    margin: 0;
    color: rgba(234,217,184,0.52);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.75;
    letter-spacing: 0;
    text-align: right;
}
.set_board{
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: clamp(18px, 2.2vw, 36px);
    max-width: 1440px;
    margin: 0 auto;
}
.set_product{
    position: relative;
    min-width: 0;
    padding: 0;
    border: 0;
    color: var(--goods_paper);
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}
.set_product::before{
    display: none;
}
.set_visual{
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: clamp(16px, 1.8vw, 28px);
    overflow: hidden;
    border: 1px solid rgba(234,217,184,0.13);
    background:
        radial-gradient(circle at 50% 34%, rgba(234,217,184,0.12), transparent 54%),
        linear-gradient(145deg, #17120d, #0d0a07);
    transition: border-color 300ms ease, background-color 300ms ease;
}
.set_visual::before{
    content: "";
    position: absolute;
    right: 10%;
    bottom: 8%;
    left: 10%;
    height: 16%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(0,0,0,0.76), transparent 70%);
    filter: blur(5px);
}
.set_product img{
    position: relative;
    z-index: 1;
    width: 88%;
    height: 88%;
    max-width: 88%;
    object-fit: contain;
    filter: drop-shadow(0 16px 13px rgba(0,0,0,.58)) brightness(.94);
    transition: transform 380ms cubic-bezier(.22,1,.36,1), filter 300ms ease;
}
.set_meta{
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: baseline;
    padding: 17px 2px 0;
    border-top: 1px solid transparent;
}
.set_number{
    color: var(--goods_gold);
    font-family: Arial, sans-serif;
    font-size: 10px;
    letter-spacing: .12em;
}
.set_meta strong{
    font-size: 16px;
    font-weight: 400;
}
.set_price{
    color: rgba(234,217,184,0.56);
    font-family: Arial, sans-serif;
    font-size: 12px;
}
.set_product:hover,
.set_product:focus-visible{
    outline: none;
}
.set_product:hover .set_visual,
.set_product:focus-visible .set_visual{
    border-color: rgba(179,138,80,0.62);
}
.set_product:hover img,
.set_product:focus-visible img{
    filter: drop-shadow(0 20px 17px rgba(0,0,0,.64)) brightness(1.04);
    transform: scale(1.015);
}

/* 공용 헤더에 넣지 않고 스크롤바 옆에 고정한 장바구니 */
.cart_button{
    position: fixed;
    z-index: 96;
    top: calc(var(--header_height, 84px) + 15px);
    right: 13px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 52px;
    padding: 0;
    border: 1px solid rgba(179,138,80,0.64);
    border-radius: 50%;
    color: var(--goods_paper);
    background: rgba(10,8,6,0.9);
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    cursor: pointer;
}
.cart_button svg{
    width: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
}
.cart_count{
    position: absolute;
    top: -7px;
    right: -5px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 20px;
    color: var(--goods_black);
    background: var(--goods_gold);
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
}

.panel_overlay{
    position: fixed;
    z-index: 109;
    inset: var(--header_height, 84px) 0 0;
    visibility: hidden;
    background: rgba(5,4,3,0.46);
    opacity: 0;
    transition: opacity 320ms ease, visibility 320ms ease;
}
.panel_overlay.on{
    visibility: visible;
    opacity: 1;
}
.side_panel{
    position: fixed;
    z-index: 110;
    top: var(--header_height, 84px);
    right: 0;
    width: min(380px, 92vw);
    height: calc(100dvh - var(--header_height, 84px));
    padding: 32px 34px 28px;
    overflow-y: auto;
    color: var(--goods_paper);
    background: rgba(10,8,6,0.985);
    border-left: 1px solid rgba(179,138,80,0.78);
    transform: translateX(103%);
    transition: transform 420ms cubic-bezier(.22,1,.36,1);
}
.side_panel.on{
    transform: translateX(0);
}
.panel_close{
    position: absolute;
    top: 15px;
    right: 20px;
    padding: 0;
    border: 0;
    color: var(--goods_gold);
    background: transparent;
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 200;
    cursor: pointer;
}
.panel_kicker{
    margin: 0 0 15px;
    color: var(--goods_gold);
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: .18em;
}
.panel_image{
    width: 100%;
    height: min(35vh, 310px);
    margin: 5px 0 12px;
    object-fit: contain;
    filter: drop-shadow(0 18px 14px rgba(0,0,0,.42));
}
.side_panel h2{
    margin: 5px 0 7px;
    font-size: clamp(27px, 2.7vw, 38px);
    font-weight: 400;
}
.panel_price{
    display: block;
    color: var(--goods_gold);
    font-size: 21px;
    font-weight: 400;
}
.panel_description{
    margin: 15px 0 18px;
    color: var(--goods_muted);
    line-height: 1.7;
}
.panel_information{
    margin: 0 0 20px;
    border-top: 1px solid rgba(179,138,80,0.42);
}
.panel_information div{
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(179,138,80,0.25);
}
.panel_information dt,
.panel_information dd{
    margin: 0;
}
.panel_information dt{
    color: rgba(234,217,184,0.52);
}
.add_cart_button{
    width: 100%;
    padding: 13px;
    border: 1px solid var(--goods_gold);
    color: var(--goods_paper);
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: color 220ms ease, background-color 220ms ease;
}
.add_cart_button:hover{
    color: var(--goods_black);
    background: var(--goods_gold);
}

.cart_panel h2{
    margin-bottom: 24px;
}
.cart_list{
    display: grid;
    gap: 12px;
}
.cart_empty{
    padding: 76px 0;
    color: rgba(234,217,184,0.48);
    text-align: center;
}
.cart_item{
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 11px;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(234,217,184,0.14);
}
.cart_item img{
    width: 64px;
    height: 64px;
    object-fit: contain;
}
.cart_item h3{
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 400;
}
.cart_item p{
    margin: 0;
    color: var(--goods_gold);
    font-size: 13px;
}
.cart_quantity{
    display: inline-grid;
    grid-template-columns: 28px minmax(30px,auto) 28px;
    align-items: center;
    margin-top: 9px;
    border: 1px solid rgba(234,217,184,0.22);
}
.cart_quantity button{
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    color: var(--goods_paper);
    background: rgba(234,217,184,0.05);
    font-family: Arial, sans-serif;
    font-size: 17px;
    cursor: pointer;
}
.cart_quantity button:hover,
.cart_quantity button:focus-visible{
    color: var(--goods_black);
    background: var(--goods_gold);
    outline: 0;
}
.cart_quantity output{
    min-width: 30px;
    color: var(--goods_paper);
    font-family: Arial, sans-serif;
    font-size: 12px;
    text-align: center;
}
.cart_item .cart_item_remove{
    padding: 7px;
    border: 0;
    color: rgba(234,217,184,0.5);
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}
.cart_item .cart_item_remove:hover,
.cart_item .cart_item_remove:focus-visible{
    color: var(--goods_gold);
    outline: 0;
}
.cart_toast{
    position: fixed;
    z-index: 130;
    left: 50%;
    bottom: 28px;
    width: max-content;
    max-width: min(360px,calc(100vw - 32px));
    padding: 13px 18px;
    border: 1px solid rgba(199,146,63,0.7);
    color: var(--goods_paper);
    background: rgba(10,8,6,0.94);
    box-shadow: 0 12px 34px rgba(0,0,0,0.34);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%,12px);
    transition: opacity 220ms ease, visibility 220ms ease, transform 280ms ease;
    pointer-events: none;
}
.cart_toast.on{
    opacity: 1;
    visibility: visible;
    transform: translate(-50%,0);
}
.cart_total{
    display: flex;
    justify-content: space-between;
    margin-top: 26px;
    padding-top: 17px;
    border-top: 1px solid var(--goods_gold);
}
.cart_total strong{
    color: var(--goods_gold);
    font-size: 20px;
}
.checkout_button{
    width: 100%;
    min-height: 48px;
    margin-top: 22px;
    border: 1px solid var(--goods_gold);
    color: var(--goods_black);
    background: var(--goods_gold);
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    transition: color 220ms ease, background-color 220ms ease;
}
.checkout_button:hover,
.checkout_button:focus-visible{
    color: var(--goods_paper);
    background: transparent;
    outline: 0;
}
.checkout_notice{
    margin: 9px 0 0;
    color: rgba(234,217,184,0.48);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

/* 좁은 노트북·태블릿부터는 제목과 상품이 겹치지 않도록 목록으로 전환합니다. */
@media(max-width: 1100px){
    .market_stage{
        aspect-ratio: auto;
        min-height: 0;
        padding: 280px 18px 52px;
        background: var(--goods_black);
    }
    .market_stage::before{
        content: "";
        position: absolute;
        z-index: 0;
        top: 0;
        right: 0;
        left: 0;
        height: clamp(430px, 56vw, 620px);
        background:
            linear-gradient(rgba(10,8,6,0.16), rgba(10,8,6,0.48)),
            url("../../images/bg/goods_showroom_bg_v2.png") center top / cover no-repeat;
        -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 68%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 0%, #000 68%, transparent 100%);
        pointer-events: none;
    }
    .goods_board{
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: repeat(3,minmax(0,1fr));
        gap: 12px;
    }
    .goods_product{
        position: relative;
        inset: auto;
        width: 100%;
        min-height: 176px;
        padding: 18px 8px 37px;
        border: 1px solid rgba(179,138,80,0.17);
        background: rgba(16,13,9,0.78);
        transform: none;
    }
    .goods_product::before{
        right: 5%;
        bottom: 14%;
        left: 5%;
        height: 55%;
    }
    .goods_product img{
        height: 124px;
    }
    .goods_tag{
        top: auto;
        bottom: 12px;
        color: var(--goods_paper);
        background: transparent;
        opacity: 1;
        transform: translateX(-50%);
    }
    .goods_product:hover img,
    .goods_product:focus-visible img{
        transform: translateY(-3px) scale(1.03);
    }
    .set_stage{
        min-height: 0;
        padding: 68px 18px 82px;
    }
    .set_title{
        margin-bottom: 36px;
    }
    .set_board{
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 34px 16px;
    }
}

@media(max-width: 800px){
    .market_stage{
        padding-top: 220px;
    }
    .goods_title{
        top: 5vh;
    }
    .goods_title h1{
        font-size: 32px;
    }
}

/* 공용 헤더의 모바일 햄버거 구조와 동일하게 맞춥니다. */
@media(max-width: 768px){
    .goods_page .main_header{
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .goods_page .main_header .mobile_menu_button span,
    .goods_page .main_header .mobile_menu_button.menu_button_open span{
        background: #f3e8d2;
    }
    .goods_page .main_header .main_nav{
        border-left-color: rgba(243,232,210,0.16);
        background: rgba(11,9,7,0.97);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
    }
    .goods_page .main_header .main_nav .main_menu_link{
        color: rgba(243,232,210,0.86);
        text-shadow: 0 1px 4px rgba(0,0,0,0.38);
    }
    .goods_page .main_header .main_nav .main_menu_link_current::after{
        background: #c7923f;
    }
    .goods_page .main_header .main_nav .main_menu_link[data-login-trigger]{
        border-color: rgba(243,232,210,0.4);
        color: #f3e8d2;
        background: rgba(243,232,210,0.06);
    }
    .cart_button{
        top: auto;
        right: 13px;
        bottom: 17px;
    }
    .panel_overlay{
        inset: 0;
    }
    .side_panel{
        top: auto;
        bottom: 0;
        width: 100%;
        height: min(82dvh,720px);
        padding: 29px 24px 23px;
        border-top: 1px solid var(--goods_gold);
        border-left: 0;
        transform: translateY(103%);
    }
    .side_panel.on{
        transform: translateY(0);
    }
    .panel_image{
        height: min(30vh,235px);
    }
}

@media(max-width: 600px){
    .goods_filters{
        gap: 6px;
        margin-top: 17px;
    }
    .goods_filter{
        padding: 7px 9px;
        font-size: 9px;
    }
    .goods_board{
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 9px;
    }
    .set_title{
        display: block;
    }
    .set_title .set_introduction{
        margin-top: 18px;
        text-align: left;
    }
    .set_board{
        grid-template-columns: 1fr;
        gap: 34px;
    }
    .set_visual{
        aspect-ratio: 4 / 3;
        padding: 20px;
    }
}

@media(max-width: 520px){
    .goods_title{
        top: 28px;
        left: 24px;
    }
    .goods_title > p{
        margin-bottom: 10px;
        font-size: 11px;
    }
    .goods_title h1{
        font-size: 28px;
        line-height: 1.2;
    }
}

@media(max-width: 420px){
    .goods_product{
        min-height: 163px;
    }
    .goods_product img{
        height: 111px;
    }
}
