/* DVD-Laden.info Custom Styles */

:root {
    --dvd-primary: #1a237e;
    --dvd-secondary: #ff6f00;
    --dvd-dark: #0d1117;
}

/* DVD Card */
.dvd-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.dvd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.dvd-card .card-img-top {
    height: 280px;
    object-fit: cover;
    background-color: #f0f0f0;
}

.dvd-card .dvd-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dvd-secondary);
}

/* Featured badge */
.badge-featured {
    background: linear-gradient(135deg, #ff6f00, #ff8f00);
    color: white;
}

/* FSK badges */
.fsk-badge {
    display: inline-block;
    padding: 0.15em 0.5em;
    line-height: 1.4;
    text-align: center;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    vertical-align: middle;
}

.fsk-0  { background-color: #fff; color: #333; border: 1px solid #ddd; }
.fsk-6  { background-color: #f5c518; color: #333; }
.fsk-12 { background-color: #f5c518; color: #333; }
.fsk-16 { background-color: #0288d1; }
.fsk-18 { background-color: #d32f2f; }

/* Condition badges */
.condition-neu       { background-color: #2e7d32; color: white; }
.condition-wie_neu   { background-color: #43a047; color: white; }
.condition-gut       { background-color: #1976d2; color: white; }
.condition-akzeptabel{ background-color: #f57c00; color: white; }
.condition-defekt    { background-color: #c62828; color: white; }

/* Format badges */
.format-dvd          { background-color: #5c6bc0; color: white; }
.format-bluray       { background-color: #0277bd; color: white; }
.format-4k_uhd       { background-color: #6a1b9a; color: white; }

/* Search filter sidebar */
.filter-sidebar .form-label {
    font-weight: 600;
    font-size: 0.875rem;
}

/* Placeholder image */
.dvd-placeholder {
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 3rem;
}

/* Hero section */
.hero-section {
    background: #1884ff;
    color: white;
    padding: 1.25rem 0;
}

/* Barcode-Scan-Formular in der Hero-Box */
.hero-scan {
    max-width: 480px;
}

/* "So einfach geht's"-Schritte in der Hero-Box */
.hero-steps {
    max-width: 920px;
}

.hero-step-icon {
    position: relative;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.hero-step-num {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #1884ff;
    font-size: 0.8rem;
    font-weight: 700;
}

#scanVideo {
    max-height: 320px;
    object-fit: cover;
}

/* Einheitliche, dezente Ueberschriften auf allen Seiten
   (Bootstrap-Defaults h1=2,5rem / h2=2rem sind zu dominant). */
h1, .h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

h2, .h2 {
    font-size: 1.25rem;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Detail page info table */
.dvd-detail-table th {
    width: 160px;
    font-weight: 600;
    color: #555;
}

/* Messages */
.message-unread {
    background-color: #e3f2fd;
    font-weight: 600;
}

/* Header-Logo: Navbar exakt auf die im Logo-PNG eingebackene
   Hintergrundfarbe (#191c22) einfaerben, damit es nahtlos sitzt. */
header .navbar.bg-dark {
    background-color: #191c22 !important;
}

.site-logo {
    height: 56px;
    width: auto;
    display: block;
}

/* Admin link in navbar */
.nav-admin-link {
    color: var(--dvd-secondary) !important;
}

/* Gallery thumbnails */
.dvd-gallery-thumb {
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.dvd-gallery-thumb:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* Lazy loading */
img.lazy {
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

img.loaded {
    opacity: 1;
}

/* Pro-Seller badge */
.badge-pro {
    background: linear-gradient(135deg, #1a237e, #3949ab);
    color: white;
}

/* Shop header */
.shop-header {
    background: linear-gradient(135deg, var(--dvd-primary) 0%, #283593 100%);
    color: white;
    padding: 2rem 0;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.shop-header .shop-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.5);
}

/* Footer */
footer.bg-dark .text-muted {
    color: #adb5bd !important;
}

footer.bg-dark a.text-muted:hover {
    color: #fff !important;
}

/* Category listing hero */
.category-hero {
    text-align: left;
    padding: 1rem 0;
}

.category-hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

.category-hero p {
    color: #666;
    font-size: 1.05rem;
    margin: 0;
}

/* Kategorie-Chips auf der Startseite (kompakte Leiste; die grossen
   Bild-Kacheln gibt es auf /kategorien) */
.home-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.home-category-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.9rem 0.35rem 0.4rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    text-decoration: none;
    color: #212529;
    font-weight: 600;
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.home-category-chip:hover {
    border-color: #1884ff;
    box-shadow: 0 2px 10px rgba(24, 132, 255, 0.18);
    transform: translateY(-1px);
    color: #1884ff;
}

.home-category-chip-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.home-category-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef5ff;
    color: #1884ff;
}

.home-category-chip-count {
    background: #eef5ff;
    color: #1884ff;
    border-radius: 999px;
    padding: 0.05rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Category cards grid */
.category-card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.category-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 220px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.category-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover .category-card-img {
    transform: scale(1.08);
}

.category-card-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--dvd-primary) 0%, #3949ab 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 4rem;
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.05) 100%
    );
    transition: background 0.3s ease;
}

.category-card:hover .category-card-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.35) 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
}

.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    z-index: 2;
    color: white;
}

.category-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.category-card-count {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    display: inline-block;
}

@media (min-width: 768px) {
    .category-card {
        height: 240px;
    }
    .category-card-title {
        font-size: 1.3rem;
    }
}

@media (min-width: 1200px) {
    .category-card {
        height: 260px;
    }
}

/* Category show hero banner */
.category-show-hero {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 240px;
    margin-bottom: 1.5rem;
}

.category-show-hero--no-img {
    background: linear-gradient(135deg, var(--dvd-primary) 0%, #3949ab 100%);
}

.category-show-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    animation: heroSlowZoom 20s ease-in-out infinite alternate;
}

@keyframes heroSlowZoom {
    0%   { transform: scale(1);    }
    100% { transform: scale(1.08); }
}

.category-show-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.15) 100%
    );
}

.category-show-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 1.5rem 2rem;
    color: white;
}

.category-show-hero-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.category-show-hero-count {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
    .category-show-hero {
        height: 260px;
    }
    .category-show-hero-content h1 {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .category-show-hero-img {
        animation: none;
    }
}

/* Rating stars */
.star-rating {
    color: #f5c518;
    font-size: 1.1rem;
}

.star-rating .bi-star {
    color: #ddd;
}

/* ---------------------------------------------------------------------------
   PWA Install-Banner (siehe templates/layout/install-banner.php,
   public/assets/js/install-banner.js)
   --------------------------------------------------------------------------- */
.pwa-install-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1080;
    background: var(--pwa-banner-bg, #212529);
    color: var(--pwa-banner-fg, #fff);
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.25);
    padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
}

.pwa-install-banner--bottom { bottom: 0; }
.pwa-install-banner--top { top: 0; }

.pwa-install-banner__inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
}

.pwa-install-banner__icon img {
    border-radius: 0.5rem;
    display: block;
}

.pwa-install-banner__text {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.pwa-install-banner__title { font-size: 0.95rem; }
.pwa-install-banner__body,
.pwa-install-banner__ios { font-size: 0.85rem; opacity: 0.9; }

.pwa-install-banner__actions {
    display: flex;
    gap: 0.5rem;
    flex: 0 0 auto;
}

/* Tap-Targets >= 44px (Barrierefreiheit) */
.pwa-install-banner__actions .btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 575.98px) {
    .pwa-install-banner__inner {
        flex-wrap: wrap;
    }
    .pwa-install-banner__actions {
        width: 100%;
        justify-content: flex-end;
    }
}
