/* ============================================================
   사장님마켓 — 상품 카드(랜딩의 상품 줄 · 상품 목록)와 상품 소개 화면
   landing.css 의 색·글꼴 변수를 그대로 쓴다 (landing.css 다음에 불러온다)
   ============================================================ */

/* ── 상품 카드 ─────────────────────────────────────────── */
.shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.shop-all {
    flex: none; display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 21px;
    background: var(--white); border: 1.5px solid var(--blue); color: var(--blue); font-size: 14px; font-weight: 700;
    transition: background .18s ease;
}
.shop-all:hover { background: var(--blue-soft); }
.pcard {
    display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: var(--white);
    border: 1px solid var(--line); box-shadow: var(--shadow-s); transition: transform .22s ease, box-shadow .22s ease;
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.pc-pic { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface); }
.pc-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.pcard:hover .pc-pic img { transform: scale(1.04); }
.pc-in { display: flex; flex-direction: column; flex: 1; padding: 16px; }
.pc-name { font-size: 16px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); }
.pc-name:hover { color: var(--blue); }
.pc-sum {
    margin: 6px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.pc-price { font-size: 19px; font-weight: 800; letter-spacing: -.5px; color: var(--ink); white-space: nowrap; }
.pc-price span { font-size: 14px; font-weight: 700; margin-left: 1px; }
.pc-buy {
    flex: none; display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 19px;
    background: var(--blue); color: var(--white); font-size: 13.5px; font-weight: 700; transition: background .18s ease;
}
.pc-buy:hover { background: var(--blue-dim); }

/* 랜딩 — 옆으로 넘겨 보는 한 줄 (넓은 화면에서는 네 칸씩) */
.prail {
    display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 54px) / 4); gap: 18px; margin-top: 40px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px;
}
.prail::-webkit-scrollbar { display: none; }
.prail > .pcard { scroll-snap-align: start; }
@media (max-width: 1040px) { .prail { grid-auto-columns: calc((100% - 36px) / 3); } }
@media (max-width: 760px) {
    .shop-head { flex-direction: column; align-items: flex-start; gap: 16px; }
    .prail {
        grid-auto-columns: min(250px, 70vw); gap: 14px; margin-top: 28px;
        margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad);
    }
}

/* 상품 목록 */
.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }
@media (max-width: 1040px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
    .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
    .pgrid .pc-in { padding: 12px; }
    .pgrid .pc-name { font-size: 14.5px; }
    .pgrid .pc-sum { display: none; }
    .pgrid .pc-foot { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 10px; }
    .pgrid .pc-price { font-size: 17px; }
    .pgrid .pc-buy { justify-content: center; }
}

/* ── 상품 소개 화면 ────────────────────────────────────── */
.shop-page { padding: clamp(104px, 12vw, 132px) 0 clamp(72px, 9vw, 110px); }
.shop-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.shop-notes > div { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.shop-notes b { font-size: 14.5px; font-weight: 800; }
.shop-notes p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.shop-notes a { color: var(--blue); font-weight: 700; }
@media (max-width: 760px) { .shop-notes { grid-template-columns: 1fr; margin-top: 40px; } }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-2); }
.crumbs a:hover { color: var(--blue); }
.crumbs i { font-style: normal; color: var(--line); }
.crumbs span { color: var(--muted); }

.pd-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4.5vw, 60px); margin-top: 22px; align-items: start; }
.pd-main { position: relative; aspect-ratio: 1 / 1; border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.pd-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.pd-main img.on { opacity: 1; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.pd-thumbs::-webkit-scrollbar { display: none; }
.pd-thumbs button {
    flex: none; width: 76px; height: 76px; padding: 0; border-radius: 14px; overflow: hidden; cursor: pointer;
    background: var(--surface); border: 2px solid transparent; opacity: .72; transition: opacity .18s ease, border-color .18s ease;
}
.pd-thumbs button.on { border-color: var(--blue); opacity: 1; }
.pd-thumbs button:hover { opacity: 1; }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pd-buy { position: sticky; top: 92px; }
.pd-name { margin: 10px 0 0; font-size: clamp(25px, 3.6vw, 36px); font-weight: 800; letter-spacing: -1px; line-height: 1.25; }
.pd-sum { margin: 12px 0 0; font-size: 15.5px; line-height: 1.7; color: var(--muted); }
.pd-price { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.pd-price strong { font-size: clamp(28px, 4vw, 36px); font-weight: 800; letter-spacing: -1px; }
.pd-price strong span { font-size: .56em; font-weight: 700; margin-left: 2px; }
.pd-price em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--green); }
.pd-facts { margin: 20px 0 0; display: grid; gap: 10px; }
.pd-facts > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; font-size: 14px; line-height: 1.6; }
.pd-facts dt { color: var(--muted-2); font-weight: 600; }
.pd-facts dd { margin: 0; color: var(--ink-2); }
.pd-go {
    display: flex; align-items: center; justify-content: center; height: 56px; margin-top: 26px; border-radius: 16px;
    background: var(--blue); color: var(--white); font-size: 16.5px; font-weight: 800; transition: background .18s ease;
}
.pd-go:hover { background: var(--blue-dim); }
.pd-go.off { background: var(--surface); color: var(--muted-2); border: 1px solid var(--line); }
.pd-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--muted-2); }

.pd-sec { margin-top: clamp(52px, 7vw, 84px); }
.pd-h { margin: 0; font-size: clamp(20px, 2.8vw, 26px); font-weight: 800; letter-spacing: -.6px; }
.pd-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.pd-point { padding: 24px 22px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.pd-point .n { font-size: 13px; font-weight: 800; color: var(--blue); }
.pd-point b { display: block; margin-top: 8px; font-size: 17px; font-weight: 800; letter-spacing: -.4px; }
.pd-point p { margin: 6px 0 0; font-size: 14px; line-height: 1.65; color: var(--muted); }
.pd-story { max-width: 760px; margin-top: 20px; }
.pd-story p { margin: 0 0 18px; font-size: 16px; line-height: 1.85; color: var(--ink-2); }
.pd-story figure { margin: 26px 0 30px; border-radius: 22px; overflow: hidden; background: var(--surface); }
.pd-story img { width: 100%; height: auto; display: block; }
.pd-spec { width: 100%; max-width: 760px; margin-top: 18px; border-collapse: collapse; border-top: 2px solid var(--ink); }
.pd-spec th, .pd-spec td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.65; text-align: left; vertical-align: top; }
.pd-spec th { width: 150px; font-weight: 700; color: var(--muted); background: var(--surface); white-space: nowrap; }
.pd-guide { max-width: 760px; margin-top: 16px; padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.pd-guide p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.75; color: var(--ink-2); }
.pd-guide p:last-child { margin: 0; color: var(--muted); }
.pd-guide a { color: var(--blue); font-weight: 700; }

.pd-bar { display: none; }
@media (max-width: 860px) {
    .pd-top { grid-template-columns: 1fr; }
    .pd-buy { position: static; }
    .pd-points { grid-template-columns: 1fr; }
    .pd-spec th { width: 104px; white-space: normal; }
    /* 좁은 화면 — 구매 버튼을 화면 아래에 붙여 둔다 */
    .pd-bar {
        position: fixed; inset: auto 0 0 0; z-index: 50; display: flex; align-items: center; gap: 14px;
        padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96);
        border-top: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    }
    .pd-bar > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
    .pd-bar b { font-size: 17px; font-weight: 800; letter-spacing: -.4px; }
    .pd-bar span { font-size: 12px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .pd-bar a {
        flex: none; display: inline-flex; align-items: center; height: 48px; padding: 0 22px; border-radius: 14px;
        background: var(--blue); color: var(--white); font-size: 15px; font-weight: 800;
    }
    .shop-page { padding-bottom: 120px; }
    .pd-go { display: none; }
    .pd-go.off { display: flex; }
}
