:root {
    --primary-color: #333;
    --accent-color: #d63384; /* Ein dezentes Kunst-Magenta oder Gold? Nehmen wir ein cleanes Grau/Schwarz */
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: #333;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
    letter-spacing: 1px;
}

/* Masonry Grid via CSS Columns */
.masonry-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 576px) { .masonry-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .masonry-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1400px) { .masonry-grid { grid-template-columns: repeat(4, 1fr); } }

.masonry-item {
    /* Grid items fit automatically */
}

/* Cards */
.artwork-card {
    position: relative;
    border: none;
    background: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
    overflow: hidden;
}

/* Admin Image Link Icon */
.admin-image-link {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    color: #333;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #ddd;
    text-decoration: none !important;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1;
}

.admin-image-link:hover {
    background: #333 !important;
    color: #fff !important;
    border-color: #333;
    transform: scale(1.1);
}


.artwork-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.artwork-card img {
    width: 100%;
    height: 280px;      /* Feste Höhe behalten für ruhiges Raster */
    object-fit: contain; /* Bild wird NICHT abgeschnitten, sondern eingepasst */
    object-position: center; /* Zentriert im Rahmen */
    display: block;
    background-color: #f8f9fa; /* Leichter Hintergrund für den Rahmen */
}

.artwork-info {
    padding: 1rem;
}

.artwork-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.artwork-meta {
    font-size: 0.85rem;
    color: #666;
}

/* Sidebar / Filters */
.filter-sidebar {
    background: white;
    padding: 1.5rem;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    border-right: 1px solid #eee;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: #999;
    margin-bottom: 0.8rem;
}

.tag-cloud .badge {
    font-weight: 400;
    margin-right: 3px;
    margin-bottom: 3px;
    cursor: pointer;
    text-decoration: none;
}
.tag-cloud .badge:hover {
    background-color: #333 !important;
    color: white !important;
}

.year-list a {
    display: block;
    padding: 2px 0;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
}
.year-list a:hover, .year-list a.active {
    color: var(--accent-color);
    font-weight: 600;
}

/* Search Bar */
.main-search {
    border-radius: 50px;
    padding: 0.7rem 1.5rem;
    border: 1px solid #ddd;
    box-shadow: none;
    background-color: #f1f1f1;
}
.main-search:focus {
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
    border-color: #ccc;
}

/* Range Slider */
.range-slider-container {
    position: relative;
    height: 20px;
    margin-top: 10px;
}

.range-slider-container input[type=range] {
    position: absolute;
    width: 100%;
    pointer-events: none; /* Allows click through */
    -webkit-appearance: none;
    background: transparent;
    z-index: 2;
    top: 0;
}

.range-slider-container input[type=range]::-webkit-slider-thumb {
    pointer-events: auto;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #333;
    cursor: pointer;
    margin-top: -6px; /* center on track */
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Firefox thumb */
.range-slider-container input[type=range]::-moz-range-thumb {
    pointer-events: auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #333;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.range-slider-container input[type=range]:focus {
    outline: none;
}

.range-slider-container input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: transparent; 
}

/* Track for Firefox */
.range-slider-container input[type=range]::-moz-range-track {
    width: 100%;
    height: 4px;
    background: transparent;
    border-radius: 2px;
}

.slider-track {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    position: absolute;
    top: 6px; /* Half of thumb height roughly, adjusted visually */
    border-radius: 2px;
    z-index: 1;
}

.slider-track-highlight {
    height: 4px;
    background: #333;
    position: absolute;
    top: 6px;
    z-index: 1;
    border-radius: 2px;
}

/* Color Badges */
.color-badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    border: 2px solid transparent; /* Platzhalter für Border */
}

.color-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.color-badge.active {
    border: 2px solid #333 !important; /* Dunkler Rand bei Auswahl */
    box-shadow: 0 0 0 2px white, 0 2px 5px rgba(0,0,0,0.3); /* Doppelter Rand Effekt */
    transform: scale(1.1);
}

/* Overlay Visibility Logic */
.artwork-overlay {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none; /* Klicks durchlassen wenn unsichtbar? */
}

/* Zeige Overlay bei Hover */
.artwork-card:hover .artwork-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Zeige Overlay immer wenn 'show-info' aktiv ist */
.artwork-card.show-info .artwork-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Sold Ribbon */
.sold-ribbon-wrapper {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 100px;
    overflow: hidden;
    z-index: 15;
    pointer-events: none;
}

.sold-ribbon {
    position: absolute;
    font-family: sans-serif;
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    text-align: center;
    line-height: 22px;
    transform: rotate(-45deg);
    width: 140px;
    background: #dc3545; /* Bootstrap Danger Red - Fallback */
    color: #fff;
    bottom: 25px;
    right: -35px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

/* Custom Strong Shadows for Action Buttons */
.btn-flag, .btn-fab {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-flag:hover, .btn-fab:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.4) !important;
    transform: translateY(-1px);
}
/* --- Price Tag Styling --- */
.price-tag {
    position: relative;
    display: inline-block;
    height: 24px;
    line-height: 24px;
    padding: 0 10px 0 8px;
    color: #fff;
    font-weight: bold;
    font-size: 0.85rem;
    border-radius: 0 3px 3px 0;
    margin-left: 12px; /* Platz für die Spitze */
    box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
    z-index: 1;
}

/* Die Spitze (Dreieck links) */
.price-tag::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 12px 12px 0;
    border-color: transparent currentColor transparent transparent;
}

/* Das Loch */
.price-tag::after {
    content: "";
    position: absolute;
    left: -5px; /* Etwas weiter rechts in die Spitze schieben */
    top: 10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff; /* Das Loch ist weiß (Durchblick) oder dunkel? Weiß wirkt meist wie ein Loch auf dunklem Grund */
    box-shadow: 0 0 1px rgba(0,0,0,0.5);
}

/* Der Faden (String) */
.price-tag-string {
    position: absolute;
    left: -14px;
    top: 4px;
    width: 10px;
    height: 10px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    border-right: none;
    border-bottom: none;
    transform: rotate(-15deg);
    z-index: 0;
    pointer-events: none;
}

/* Farb-Varianten */
.price-tag.bg-success {
    background-color: #198754 !important;
    color: #198754; /* currentColor für ::before */
}
.price-tag.bg-success {
    color: #fff; /* Textfarbe wieder auf weiß setzen, nachdem currentColor genutzt wurde? Nein, currentColor nutzt die Textfarbe. */
}

/* Korrektur: Wir nutzen eine CSS Variable für die Farbe */
.price-tag {
    --tag-color: #6c757d;
    background-color: var(--tag-color) !important;
}
.price-tag::before {
    border-right-color: var(--tag-color);
}

.price-tag.bg-success {
    --tag-color: #198754;
}

.price-tag.bg-info {
    --tag-color: #17a2b8;
}

.price-tag.bg-primary {
    --tag-color: #0d6efd;
}
