/* ============================================================
   シングルカード (single-card shop) — list + detail pages.
   Design language matches the オリパ page dark-glass style:
   navy glass panels, #ff7ab8→#5fe7ff gradient accents.
   ============================================================ */

.singles-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 18px 90px;
    color: #eaf2ff;
}

.singles-page * {
    box-sizing: border-box;
}

/* ---------- hero ---------- */

.singles-hero {
    position: relative;
    text-align: center;
    padding: 34px 12px 26px;
    overflow: hidden;
}

.singles-hero::before,
.singles-hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .35;
    pointer-events: none;
}

.singles-hero::before {
    background: #ff7ab8;
    top: -60px;
    left: 4%;
}

.singles-hero::after {
    background: #5fe7ff;
    top: -40px;
    right: 4%;
}

.singles-hero-title {
    margin: 0;
    font-size: clamp(30px, 4.6vw, 46px);
    font-weight: 900;
    letter-spacing: .14em;
}

.singles-hero-sub {
    margin: 10px 0 0;
    font-size: clamp(13px, 1.6vw, 15px);
    letter-spacing: .22em;
    color: rgba(255, 255, 255, .66);
}

.singles-hero-sub::after {
    content: " ✦";
    color: #5fe7ff;
}

/* ---------- toolbar ---------- */

.singles-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 6px 0 14px;
}

.singles-search {
    flex: 1 1 240px;
    min-width: 0;
    position: relative;
}

.singles-search input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #eaf2ff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.singles-search input:focus {
    border-color: #5fe7ff;
    box-shadow: 0 0 0 3px rgba(95, 231, 255, .14);
}

.singles-search .mag {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, .45);
    font-size: 14px;
    pointer-events: none;
}

.singles-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.singles-pill {
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    color: rgba(255, 255, 255, .75);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .16);
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}

.singles-pill:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .09);
    color: #fff;
}

.singles-pill.active {
    color: #fff;
    border-color: #ff7ab8;
    box-shadow: 0 0 0 1px #ff7ab8, 0 0 14px rgba(255, 122, 184, .35);
    background: rgba(255, 122, 184, .10);
}

.singles-toolbar-right {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.singles-sort {
    padding: 10px 34px 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #eaf2ff;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23eaf2ff' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    cursor: pointer;
}

.singles-sort option {
    background: #111a2c;
    color: #eaf2ff;
}

.singles-filter-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #eaf2ff;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease;
}

.singles-filter-btn:hover {
    background: rgba(255, 255, 255, .09);
}

.singles-filter-btn.on {
    border-color: #5fe7ff;
    box-shadow: 0 0 0 1px #5fe7ff;
}

/* ---------- filter panel ---------- */

.singles-filter-panel {
    display: none;
    background: linear-gradient(180deg, #111a2c, #0b101f);
    border: 1px solid rgba(95, 231, 255, .20);
    border-radius: 16px;
    padding: 16px;
    margin: 0 0 16px;
}

.singles-filter-panel.open {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
}

.singles-filter-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, .6);
    margin: 0 0 5px;
}

.singles-filter-field input[type="number"] {
    width: 130px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #eaf2ff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.singles-filter-field input[type="number"]:focus {
    border-color: #5fe7ff;
}

.singles-filter-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, .8);
    padding-bottom: 9px;
    cursor: pointer;
}

.singles-filter-check input {
    width: 16px;
    height: 16px;
    accent-color: #5fe7ff;
}

.singles-filter-apply {
    padding: 10px 22px;
    border: none;
    border-radius: 11px;
    background: linear-gradient(135deg, #ff7ab8, #5fe7ff);
    color: #0a1020;
    font-weight: 900;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

/* ---------- result count ---------- */

.singles-count {
    font-size: 13px;
    color: rgba(255, 255, 255, .6);
    margin: 0 0 14px;
}

.singles-count strong {
    color: #ff7ab8;
    font-size: 17px;
    margin-right: 2px;
}

/* ---------- grid ---------- */

.singles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.singles-grid > * {
    min-width: 0;
}

@media (max-width: 1000px) {
    .singles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 720px) {
    .singles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 11px;
    }
}

.single-card {
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top left, rgba(95, 231, 255, .08), transparent 45%),
        linear-gradient(180deg, #131c30, #0a0f1e);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 18px;
    padding: 12px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.single-card:hover {
    transform: translateY(-4px);
    border-color: rgba(95, 231, 255, .45);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .45);
}

.single-card-imgbox {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, .35);
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 11px;
}

.single-card-imgbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.single-card.is-sold .single-card-imgbox img {
    filter: grayscale(1) brightness(.6);
}

.single-card-noimg {
    color: rgba(255, 255, 255, .25);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
}

/* ---------- badges ---------- */

.sbadge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    backdrop-filter: blur(4px);
}

.sbadge.cond {
    color: #ffb3d4;
    border: 1px solid rgba(255, 122, 184, .65);
    background: rgba(20, 8, 16, .55);
}

.sbadge.psa {
    color: #9fe9ff;
    border: 1px solid rgba(95, 231, 255, .65);
    background: rgba(6, 16, 24, .55);
}

.sbadge.low {
    color: #ffd98a;
    border: 1px solid rgba(255, 207, 106, .65);
    background: rgba(24, 16, 4, .55);
}

.sbadge.sold {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .4);
    background: rgba(90, 90, 100, .75);
}

/* ---------- card info ---------- */

.single-card-name {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
    margin: 0 0 4px;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}

.single-card-meta {
    font-size: 11.5px;
    color: rgba(255, 255, 255, .5);
    margin: 0 0 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.single-card-price {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 19px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 11px;
    font-variant-numeric: tabular-nums;
}

.single-card-price img {
    width: 19px;
    height: 19px;
}

.single-card.is-sold .single-card-price {
    color: rgba(255, 255, 255, .45);
}

.single-card-btn {
    display: block;
    text-align: center;
    padding: 10px 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #5fe7ff, #ff7ab8);
    color: #0a1020;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    transition: transform .15s ease, filter .15s ease;
    margin-top: auto;
}

.single-card-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.single-card.is-sold .single-card-btn {
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .55);
}

.singles-empty {
    text-align: center;
    color: rgba(255, 255, 255, .5);
    padding: 60px 0;
    font-size: 14px;
}

/* ============================================================
   detail page
   ============================================================ */

.single-detail-back {
    display: inline-block;
    color: rgba(255, 255, 255, .6);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    margin: 4px 0 18px;
}

.single-detail-back:hover {
    color: #5fe7ff;
}

.single-detail {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 26px;
    align-items: start;
}

@media (max-width: 820px) {
    .single-detail {
        grid-template-columns: 1fr;
    }
}

.single-detail-imgbox {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(95, 231, 255, .08), transparent 45%),
        linear-gradient(180deg, #131c30, #0a0f1e);
    border: 1px solid rgba(255, 255, 255, .10);
    /* Box hugs the image (no forced 3:4) so low-res / off-ratio cards
       don't letterbox with dark bands. Padding is the only frame. */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    cursor: zoom-in;
}

.single-detail-imgbox img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.single-detail.is-sold .single-detail-imgbox img {
    filter: grayscale(1) brightness(.6);
}

.single-detail-info {
    background:
        radial-gradient(circle at top right, rgba(255, 122, 184, .07), transparent 45%),
        linear-gradient(180deg, #111a2c, #090d1b);
    border: 1px solid rgba(95, 231, 255, .18);
    border-radius: 20px;
    padding: 24px;
}

.single-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.single-detail-badges .sbadge {
    position: static;
}

.single-detail-name {
    margin: 0 0 8px;
    font-size: clamp(20px, 2.6vw, 27px);
    font-weight: 900;
    line-height: 1.4;
}

.single-detail-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    margin: 0 0 18px;
}

.single-detail-meta span + span::before {
    content: "・";
    margin: 0 4px;
}

.single-detail-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .10);
    margin: 0 0 14px;
}

.single-detail-price .amount {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 28px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.single-detail-price .amount img {
    width: 26px;
    height: 26px;
}

.paid-only-pill {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    color: #ffd98a;
    border: 1px solid rgba(255, 207, 106, .55);
    background: rgba(255, 207, 106, .10);
}

.single-detail-stock {
    font-size: 13.5px;
    font-weight: 800;
    margin: 0 0 18px;
}

.single-detail-stock.ok { color: #3ad29f; }
.single-detail-stock.low { color: #ffd98a; }
.single-detail-stock.out { color: #ff6b8a; }

.single-detail-desc {
    font-size: 13.5px;
    line-height: 1.9;
    color: rgba(255, 255, 255, .78);
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 16px;
    margin: 0 0 20px;
    white-space: pre-line;
}

.single-buy-btn {
    display: block;
    width: 100%;
    padding: 15px 0;
    border: none;
    border-radius: 13px;
    background: linear-gradient(135deg, #5fe7ff, #ff7ab8);
    color: #0a1020;
    font-size: 16px;
    font-weight: 900;
    font-family: inherit;
    letter-spacing: .06em;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: transform .15s ease, filter .15s ease;
}

.single-buy-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.single-buy-btn:disabled,
.single-buy-btn.disabled {
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .5);
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.single-paid-note {
    text-align: center;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .5);
    margin: 10px 0 0;
}

/* ---------- success / error banners ---------- */

.single-banner {
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.7;
    margin: 0 0 16px;
}

.single-banner.success {
    background: rgba(58, 210, 159, .12);
    border: 1px solid rgba(58, 210, 159, .45);
    color: #7ce8c4;
}

.single-banner.error {
    background: rgba(255, 107, 138, .10);
    border: 1px solid rgba(255, 107, 138, .45);
    color: #ff9db4;
}

.single-banner a {
    color: #5fe7ff;
    font-weight: 900;
}

/* ---------- confirm modal ---------- */

.sconfirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 14, .78);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 18px;
}

.sconfirm-overlay.show {
    display: flex;
}

.sconfirm {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(180deg, #131c30, #0a0f1e);
    border: 1px solid rgba(95, 231, 255, .25);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}

.sconfirm h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 900;
    text-align: center;
}

.sconfirm-rows {
    margin: 0 0 18px;
}

.sconfirm-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 2px;
    font-size: 13.5px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.sconfirm-row .k {
    color: rgba(255, 255, 255, .6);
    flex: 0 0 auto;
}

.sconfirm-row .v {
    font-weight: 800;
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-width: 0;
    overflow-wrap: anywhere;
}

.sconfirm-row .v.neg {
    color: #ff6b8a;
}

.sconfirm-warn {
    font-size: 12px;
    color: #ff9db4;
    text-align: center;
    margin: 0 0 14px;
    line-height: 1.7;
}

.sconfirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sconfirm-cancel {
    padding: 12px 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .05);
    color: #eaf2ff;
    font-size: 14px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
}

.sconfirm-actions .single-buy-btn {
    padding: 12px 0;
    font-size: 14px;
}

/* ---------- mobile toolbar stacking ---------- */

@media (max-width: 720px) {
    .singles-page {
        padding: 8px 12px 70px;
    }

    .singles-toolbar-right {
        margin-left: 0;
        width: 100%;
    }

    .singles-sort {
        flex: 1;
    }

    .singles-filter-btn {
        flex: 0 0 auto;
    }

    .single-card-name {
        font-size: 12.5px;
    }

    .single-card-price {
        font-size: 16px;
    }

    .single-detail-info {
        padding: 18px;
    }
}

/* ============================================================
   real photos gallery (customer detail page)
   ============================================================ */

.single-realphotos {
    margin-top: 34px;
}

.single-realphotos-title {
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 900;
    margin: 0 0 4px;
    letter-spacing: .06em;
}

.single-realphotos-sub {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .55);
    margin: 0 0 16px;
}

.single-realphotos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.single-realphoto {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .10);
    aspect-ratio: 3 / 4;
    transition: transform .16s ease, border-color .16s ease;
}

.single-realphoto:hover {
    transform: translateY(-3px);
    border-color: rgba(95, 231, 255, .45);
}

.single-realphoto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 720px) {
    .single-realphotos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ============================================================
   lightbox (in-page photo viewer with zoom) — no new tabs
   ============================================================ */

.single-realphoto { cursor: zoom-in; }

.lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    background: rgba(3, 6, 12, .92);
    backdrop-filter: blur(6px);
    touch-action: none;
    user-select: none;
}

.lb-overlay.open { display: block; }

.lb-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lb-stage img {
    max-width: 92vw;
    max-height: 86vh;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    transform-origin: center center;
    will-change: transform;
    -webkit-user-drag: none;
    cursor: grab;
}

.lb-stage img.grabbing { cursor: grabbing; }

.lb-close,
.lb-nav,
.lb-controls button {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background .15s ease, transform .15s ease;
}

.lb-close:hover,
.lb-nav:hover,
.lb-controls button:hover {
    background: rgba(255, 255, 255, .18);
}

.lb-close {
    top: 16px;
    right: 16px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
}

.lb-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    padding-bottom: 4px;
}

.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-nav.hidden { display: none; }

.lb-controls {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.lb-controls button {
    position: static;
    width: 48px;
    height: 44px;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.lb-counter {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    padding: 5px 14px;
    backdrop-filter: blur(6px);
}

.lb-counter.hidden { display: none; }

.lb-hint {
    position: absolute;
    bottom: 78px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .5);
    text-align: center;
    pointer-events: none;
}

@media (max-width: 720px) {
    .lb-controls { bottom: 16px; }
    .lb-hint { bottom: 68px; }
    .lb-nav { width: 42px; height: 42px; font-size: 26px; }
}
