/* =========================================================================
   Pur Digital – Showroom Detail-Seite
   Lädt nach showroom.css – erweitert die vorhandenen Variablen/Basis-Styles.
   ========================================================================= */

/* ---------- Breadcrumb --------------------------------------------------- */
.sd-breadcrumb {
    margin-top: var(--sr-header-h);
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: .6rem 0;
    font-size: .85rem;
}
.sd-breadcrumb a {
    color: var(--violet);
    font-weight: 600;
}
.sd-breadcrumb a:hover { text-decoration: underline; }
.sd-bc-sep {
    margin: 0 .5rem;
    color: var(--ink-muted);
}
.sd-breadcrumb span { color: var(--ink-muted); }

/* ---------- Case Hero ---------------------------------------------------- */
.sd-hero-case {
    padding: clamp(3rem, 7vw, 5.5rem) 0;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 80% 18%, rgba(201, 162, 39, .18), transparent 22rem),
        linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.sd-hero-case .sr-container {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
}
.sd-hero-copy h1 {
    margin: .9rem 0 1rem;
    color: var(--ink);
    font-size: clamp(2.1rem, 5vw, 4.6rem);
    font-weight: 950;
    letter-spacing: -.035em;
}
.sd-hero-copy p {
    max-width: 60ch;
    margin: 0;
    color: var(--ink-muted);
    font-size: 1.08rem;
    text-wrap: pretty;
}
.sd-sold-badge {
    position: static;
    display: inline-flex;
    width: fit-content;
    margin-left: .55rem;
    vertical-align: middle;
}
.sd-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.4rem;
}
.sd-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .72rem 1.15rem;
    border: 1px solid color-mix(in srgb, var(--violet) 30%, var(--line));
    border-radius: 999px;
    color: var(--violet);
    font-weight: 900;
}
.sd-secondary-btn:hover {
    background: color-mix(in srgb, var(--violet) 10%, transparent);
}
.sd-request-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .72rem 1.15rem;
    border-radius: 999px;
    color: #18131f;
    background: var(--accent);
    font-weight: 900;
}
.sd-request-btn:hover {
    color: #18131f;
    filter: brightness(1.04);
}
.sd-device-stage {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2rem);
}
.sd-device-stage .sr-browser {
    width: min(100%, 780px);
}
.sd-phone {
    right: clamp(.6rem, 2vw, 1.4rem);
    bottom: clamp(.6rem, 2vw, 1.4rem);
}

/* ---------- Legacy Hero -------------------------------------------------- */
.sd-hero {
    background: var(--ink);
    max-height: 560px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sd-hero-img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    display: block;
}
.sd-hero-placeholder {
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.25);
}
.sd-hero-placeholder svg { width: 80px; height: 80px; }

/* ---------- Content Grid ------------------------------------------------- */
.sd-content { padding: 3rem 0 4rem; }

.sd-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: start;
}

/* ---------- Hauptinhalt -------------------------------------------------- */
.sd-title-block { margin-bottom: 2rem; }

.sd-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    margin: .5rem 0 .75rem;
    color: var(--ink);
}
.sd-teaser {
    font-size: 1.1rem;
    color: var(--ink-muted);
    margin: 0;
    line-height: 1.6;
}

.sd-description {
    color: var(--ink);
    line-height: 1.75;
    margin-bottom: 2.5rem;
}
.sd-description p {
    margin: 0 0 1.2em;
}

.sd-section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--line);
}

.sd-video-section { margin-top: 1rem; }

/* ---------- Meta-Sidebar ------------------------------------------------- */
.sd-meta { position: sticky; top: 80px; }

.sd-meta-card {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--violet) 5%, transparent), var(--card-shadow);
    overflow: hidden;
    margin-bottom: 1rem;
}

.sd-meta-row {
    padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.sd-meta-row:last-child { border-bottom: none; }
.sd-meta-tags { border-bottom: 1px solid var(--line); }

.sd-meta-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.sd-meta-value {
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink);
}
.sd-tech-requirement {
    background:
        linear-gradient(135deg, rgba(201,162,39,.16), rgba(82,2,152,.08)),
        var(--card-bg);
}
.sd-tech-requirement .sd-meta-value {
    color: var(--ink);
    font-weight: 800;
}
.sd-tech-requirement small {
    display: block;
    color: var(--ink-muted);
    font-size: .78rem;
    line-height: 1.45;
}

.sd-meta-url {
    padding: 1rem 1.1rem;
}
.sd-url-btn {
    display: block;
    text-align: center;
    background: var(--violet);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    padding: .7rem 1.2rem;
    border-radius: 999px;
    transition: background .15s, transform .15s;
    text-decoration: none;
}
.sd-url-btn:hover {
    background: var(--violet-light);
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
}

.sd-back-link {
    display: block;
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink-muted);
    padding: .5rem;
}
.sd-back-link:hover { color: var(--violet); text-decoration: none; }

/* ---------- Galerie ------------------------------------------------------- */
.sd-gallery-section {
    padding: 0 0 4rem;
    border-top: 1px solid var(--line);
    padding-top: 3rem;
}
.sd-gallery-section .sd-section-title { margin-bottom: 1.5rem; }

.sd-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.sd-gallery-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--line);
    cursor: pointer;
    padding: 0;
    background: var(--bg-soft);
    transition: transform .2s, box-shadow .2s;
    display: block;
}
.sd-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(82,2,152,.15);
}
.sd-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.sd-gallery-item:hover img { transform: scale(1.05); }

/* ---------- Lightbox ----------------------------------------------------- */
.sd-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sd-lightbox[hidden] { display: none; }

.sd-lb-inner {
    max-width: min(90vw, 1200px);
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sd-lb-img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    box-shadow: 0 8px 48px rgba(0,0,0,.6);
}

.sd-lb-close,
.sd-lb-prev,
.sd-lb-next {
    position: fixed;
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: background .15s;
    border-radius: 50%;
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}
.sd-lb-close:hover,
.sd-lb-prev:hover,
.sd-lb-next:hover { background: rgba(255,255,255,.25); }

.sd-lb-close { top: 1rem; right: 1rem; font-size: 1.4rem; }
.sd-lb-prev  { left: 1rem; top: 50%; transform: translateY(-50%); font-size: 2rem; }
.sd-lb-next  { right: 1rem; top: 50%; transform: translateY(-50%); font-size: 2rem; }

/* Hide prev/next when only 1 image */
.sd-lightbox[data-count="1"] .sd-lb-prev,
.sd-lightbox[data-count="1"] .sd-lb-next { display: none; }

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 860px) {
    .sd-hero-case .sr-container {
        grid-template-columns: 1fr;
    }
    .sd-device-stage {
        min-height: 280px;
        padding: .5rem;
    }
    .sd-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .sd-meta { position: static; }
    .sd-meta-card { display: grid; grid-template-columns: 1fr 1fr; }
    .sd-meta-url { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .sd-hero { max-height: 260px; }
    .sd-hero-img { max-height: 260px; }
    .sd-gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .sd-meta-card { display: block; }
    .sd-lb-prev { left: .35rem; }
    .sd-lb-next { right: .35rem; }
}
