/* =====================================================
   Stonesy Partner System – Muster CSS
   Minimalistisch · Schwarz/Weiß
   ===================================================== */

/* ---- Layout ---- */
.stonesy-muster-wrap {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    align-items: start;
    max-width: 100%;
    margin: 0 auto;
    padding-bottom: 120px;
}
@media (max-width: 768px) {
    .stonesy-muster-wrap { grid-template-columns: 1fr; }
}

/* ---- Notices ---- */
.stonesy-notice {
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 3px solid;
}
.stonesy-notice--success { background: #f6faf7; border-color: #2d7a4f; color: #1a4d32; }
.stonesy-notice--error   { background: #fdf6f6; border-color: #c0392b; color: #7a1a1a; }

/* =====================================================
   FILTER SIDEBAR
   ===================================================== */
.stonesy-muster-filters {
    position: sticky;
    top: 24px;
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 0;
    overflow: hidden;
}

.stonesy-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e8e8e8;
}
.stonesy-filter-header strong {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #111;
}
.stonesy-filter-reset {
    font-size: 11px;
    color: #c0392b;
    text-decoration: none;
    letter-spacing: .03em;
    font-weight: 600;
}
.stonesy-filter-reset:hover { color: #a02020; text-decoration: underline; }

/* Search */
.stonesy-filter-group--search {
    padding: 14px 20px;
    border-bottom: 1px solid #e8e8e8;
}
.stonesy-filter-search {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid #ddd;
    font-size: 13px;
    background: transparent;
    box-sizing: border-box;
    color: #111;
    outline: none;
}
.stonesy-filter-search::placeholder { color: #bbb; }
.stonesy-filter-search:focus { border-bottom-color: #111; }

/* Filter Groups */
.stonesy-filter-group { border-bottom: 1px solid #e8e8e8; }
.stonesy-filter-group:last-child { border-bottom: none; }

.stonesy-filter-toggle {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 14px 20px !important;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #111 !important;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: left;
    line-height: 1;
}


.stonesy-filter-item--child {
    padding-left: 36px !important;
    font-size: 12px;
    color: #777;
}

.stonesy-filter-toggle:hover { background: #f3f3f3 !important; color: #111 !important; }

.stonesy-toggle-icon {
    font-size: 10px;
    color: #999;
    transition: transform .2s;
    font-style: normal;
}
.stonesy-filter-toggle[aria-expanded="false"] .stonesy-toggle-icon { transform: rotate(-90deg); }
.stonesy-filter-toggle[aria-expanded="false"] + .stonesy-filter-items { display: none; }

.stonesy-filter-items { padding: 4px 0 12px; }

.stonesy-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: background .12s;
    user-select: none;
}
.stonesy-filter-item:hover { background: #f3f3f3; color: #111; }
.stonesy-filter-item.is-active { background: #f3f3f3; color: #111; font-weight: 600; }
.stonesy-filter-item input[type="radio"] { display: none; }

.stonesy-filter-count { margin-left: auto; font-size: 11px; color: #bbb; font-weight: 400; }

.stonesy-color-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.12);
    flex-shrink: 0;
}

/* =====================================================
   MATERIAL GRID
   ===================================================== */
.stonesy-result-info {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 20px;
    letter-spacing: .02em;
}

.stonesy-material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    align-items: start;
}
@media (max-width: 480px) {
    .stonesy-material-grid { grid-template-columns: repeat(2, 1fr); }
}

.stonesy-material-card { background: #fff; }

.stonesy-material-card label {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: #fff;
    border: 1px solid #e8e8e8;
    transition: background .15s, border-color .15s;
    position: relative;
}
.stonesy-material-card label:hover { background: #f3f3f3; border-color: #ccc; }

.stonesy-material-card:has(input:checked) label {
    background: #f3f3f3;
    border-color: #111;
    outline: 1px solid #111;
}

.stonesy-material-checkbox { display: none; }

/* Card Image – immer quadratisch, nie verzerrt */
.stonesy-card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #f3f3f3;
}
.stonesy-card-img-wrap img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .4s ease;
}
.stonesy-material-card label:hover .stonesy-card-img-wrap img { transform: scale(1.04); }

.stonesy-card-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #ddd;
}

/* Check Badge */
.stonesy-card-check-badge {
    position: absolute;
    top: 8px; right: 8px;
    width: 22px; height: 22px;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    opacity: 0;
    transform: scale(.5);
    transition: opacity .18s, transform .18s;
}
.stonesy-material-card:has(input:checked) .stonesy-card-check-badge {
    opacity: 1;
    transform: scale(1);
}

/* Card Info */
.stonesy-card-info { padding: 10px 12px 12px; }
.stonesy-card-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: .01em;
}
.stonesy-card-art {
    display: block;
    font-size: 11px;
    color: #aaa;
    margin-top: 3px;
    letter-spacing: .02em;
}

.stonesy-no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: #aaa;
    padding: 48px 0;
    font-size: 14px;
}

/* =====================================================
   ADDRESS FORM
   ===================================================== */
.stonesy-address-section {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid #e8e8e8;
}
.stonesy-address-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 24px;
}

.stonesy-address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .stonesy-address-grid { grid-template-columns: 1fr; } }

.stonesy-field { display: flex; flex-direction: column; gap: 6px; }
.stonesy-field--full { grid-column: 1 / -1; }

.stonesy-field label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #888;
}
.stonesy-required { color: #c0392b; }

.stonesy-field input[type="text"] {
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    font-size: 14px;
    background: #fff;
    transition: border-color .2s, background .2s;
    width: 100%;
    box-sizing: border-box;
    color: #111;
}
.stonesy-field input[type="text"]:focus { outline: none; border-color: #111; background: #fff; }
.stonesy-field input[type="text"]:hover { background: #f3f3f3; }

.stonesy-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 14px 36px;
    background: #111;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background .2s;
}
.stonesy-submit-btn:hover   { background: #333; }
.stonesy-submit-btn:active  { background: #000; }
.stonesy-submit-btn:disabled { background: #999; cursor: not-allowed; }

.stonesy-submit-hint { font-size: 11px; color: #bbb; margin-top: 10px; letter-spacing: .02em; }

/* =====================================================
   STICKY SELECTION BAR
   ===================================================== */
.stonesy-sticky-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    background: #111;
    color: #fff;
    padding: 0 24px;
    height: 0;
    overflow: hidden;
    transition: height .25s ease;
    box-shadow: 0 -2px 20px rgba(0,0,0,.2);
}
.stonesy-sticky-bar.is-visible { height: 64px; }

.stonesy-sticky-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.stonesy-sticky-left { display: flex; align-items: center; gap: 14px; }

.stonesy-sticky-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px; height: 28px;
    background: #fff;
    color: #111;
    font-size: 13px;
    font-weight: 700;
    padding: 0 8px;
}
.stonesy-sticky-label { font-size: 13px; color: #aaa; letter-spacing: .02em; }

.stonesy-sticky-preview { display: flex; }
.stonesy-sticky-preview img {
    width: 28px; height: 28px;
    object-fit: cover;
    border: 2px solid #111;
    margin-left: -6px;
}
.stonesy-sticky-preview img:first-child { margin-left: 0; }

.stonesy-sticky-cta {
    padding: 10px 28px;
    background: #FFFFFF !important;
    color: #111;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.stonesy-sticky-cta:hover { background: #FFFFFF; }

.stonesy-sticky-max-hint {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 8px;
    font-size: 11px;
    color: #f5a623;
}

/* =====================================================
   DOCUMENTS GRID
   ===================================================== */
.stonesy-documents-grid {
    display: block !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
}
.stonesy-document-card {
    display: flex;
	border: 1px solid #e8e8e8;
	margin-bottom: 10px;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: background .15s;
}
.stonesy-document-card:hover { background: #f3f3f3; }
.stonesy-document-icon { font-size: 24px; flex-shrink: 0; }
.stonesy-document-title { font-size: 13px; font-weight: 600; color: #111; line-height: 1.3; }
.stonesy-document-download {
    font-size: 11px;
    color: #999;
    margin-top: 3px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

/* =====================================================
   Paginierung
   ===================================================== */
.stonesy-pagination {
    display: flex;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.stonesy-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e8e8e8;
    font-size: 13px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.stonesy-page-btn:hover { background: #f3f3f3; border-color: #ccc; }
.stonesy-page-btn.is-active {
    background: #111;
    color: #fff;
    border-color: #111;
}