/* ==========================================================================
   Outfit Single — Gallery + Pieces  ·  oso- namespace
   ========================================================================== */

/* ── Full-width dark wrapper ─────────────────────────────────────────────── */
.oso-wrap {
    position: relative;
    background: var(--color-black);
    border-top: var(--outfit-section-divider);
    border-bottom: none;
}

/* ── Section shell ───────────────────────────────────────────────────────── */
.oso {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
    padding-block: clamp(1.5rem, 1.5rem, 1rem);
}

/* ── Two-column grid ─────────────────────────────────────────────────────── */
.oso__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
}

/* ── Gallery ─────────────────────────────────────────────────────────────── */
.oso__gallery {
    position: sticky;
    top: calc(var(--header-h, 64px) + 1.5rem);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Main image wrapper */
.oso__main-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    /* enable touch swipe */
    touch-action: pan-y;
    user-select: none;
}
.oso__main-wrap::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32%;
    background: linear-gradient(to top,
        rgba(0,0,0,0.5) 0%,
        rgba(0,0,0,0.22) 42%,
        rgba(0,0,0,0) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Creator badge — overlaid top-left of the main image */
.oso__creator {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 5px 10px 5px 5px;
    border-radius: 999px;
    background: rgba(0,0,0,0.52);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-decoration: none;
    transition: background 0.2s ease;
}
.oso__creator:hover { background: rgba(0,0,0,0.72); }
.oso__creator-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(201,169,122,0.55);
    flex-shrink: 0;
    display: block;
}
.oso__creator-name {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.oso__main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.25s ease;
}
.oso__main-img.is-fading { opacity: 0; }

/* Counter badge */
.oso__counter {
    position: absolute;
    top: 0.85rem;
    right: 0.75rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    padding: 0.38rem 0.6rem;
    border-radius: 999px;
}

.oso__published {
    position: absolute;
    bottom: 0.85rem;
    left: 0.85rem;
    z-index: 3;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.76);
    text-shadow: 0 1px 10px rgba(0,0,0,0.45);
}

/* Thumbnail strip */
.oso__thumbs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.35rem;
}
.oso__thumb {
    width: 100%;
    aspect-ratio: 56 / 72;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease;
}
.oso__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oso__thumb:hover { border-color: rgba(255,255,255,0.3); transform: translateY(-1px); }
.oso__thumb.is-active { border-color: var(--color-accent); }

/* ── Pieces panel ────────────────────────────────────────────────────────── */
.oso__pieces {
    display: flex;
    flex-direction: column;
    padding-top: 0.25rem;
}

/* Stat line */
.oso__stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    margin: 0 0 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.oso__stat-label { color: rgba(255,255,255,0.35); text-transform: uppercase; font-weight: 600; letter-spacing: 0.1em; }
.oso__stat-sep   { color: rgba(255,255,255,0.2); }
.oso__stat-cost  { color: var(--color-accent); font-weight: 500; }

/* Piece list */
.oso__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.oso__piece {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0.5rem 0.9rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    border-left: 2px solid transparent;
    transition: border-left-color 0.2s ease, background 0.2s ease;
}
.oso__piece:hover {
    border-left-color: var(--color-accent);
    background: rgba(255,255,255,0.02);
}
.oso__piece:last-child {
    border-bottom: none;
}

/* Piece thumbnail */
.oso__piece-img {
    width: 64px;
    height: 80px;
    border-radius: 3px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.oso__piece-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oso__piece-img--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
}

/* Piece info */
.oso__piece-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.oso__piece-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-white);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.oso__piece-brand {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
}

/* Price + shop */
.oso__piece-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.oso__piece-price {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255,255,255,0.65);
}
.oso__piece-shop {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
    text-decoration: none;
    border: 1px solid rgba(201,169,122,0.3);
    border-radius: 2px;
    padding: 3px 8px;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.oso__piece-shop:hover {
    background: rgba(201,169,122,0.08);
    border-color: rgba(201,169,122,0.6);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .oso__inner { grid-template-columns: 1fr; }
    .oso__gallery { position: static; }
    .oso__main-wrap { aspect-ratio: 4 / 5; max-width: 480px; }
}
@media (max-width: 480px) {
    .oso__piece-img { width: 52px; height: 66px; }
    .oso__piece-shop { display: none; } /* price still shows; shop hidden on very small screens */
}
@media (prefers-reduced-motion: reduce) {
    .oso__main-img, .oso__thumb, .oso__piece,
    .oso__creator-name, .oso__piece-shop { transition: none; }
}
