/* =============================================================================
   Shop Customizations – Frontend Styles
   Lädt nur auf Produktseiten (is_product)
   ============================================================================= */


/* ── Horizontale Filter-Leiste ── */
.sc-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    padding: 14px 0;
    border-bottom: 1px solid #e5e5e5;
}

.sc-filter-dropdown {
    position: relative;
}

/* ── Filter-Buttons: Galaxus-Style ── */
/* !important nötig um Theme-Button-Styles zu überschreiben */
.sc-filter-bar .sc-filter-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 9px 16px !important;
    background: #f2f2f2 !important;
    border: 1.5px solid transparent !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: #222 !important;
    cursor: pointer !important;
    transition: border-color 0.15s, background 0.15s, color 0.15s !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
}

.sc-filter-bar .sc-filter-btn:hover {
    background: #e8e8e8 !important;
    border-color: #bbb !important;
    color: #000 !important;
}

.sc-filter-bar .sc-filter-btn.sc-filter-btn--active {
    background: #111 !important;
    border-color: #111 !important;
    color: #fff !important;
}

.sc-filter-bar .sc-filter-btn--active .sc-filter-arrow {
    color: #fff !important;
    opacity: 1;
}

.sc-filter-arrow {
    font-size: 10px;
    color: inherit;
    opacity: 0.6;
    transition: transform 0.2s;
}

.sc-filter-dropdown.sc-open .sc-filter-arrow {
    transform: rotate(180deg);
}

/* Dropdown-Panel: display:none muss Theme-Styles überschreiben */
.sc-filter-bar .sc-filter-dropdown-panel {
    display: none !important;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 9999;
    padding: 6px 0;
    max-height: 320px;
    overflow-y: auto;
}

.sc-filter-bar .sc-filter-dropdown.sc-open .sc-filter-dropdown-panel {
    display: block !important;
}

.sc-filter-bar .sc-filter-option {
    display: flex !important;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 13px;
    color: #333 !important;
    text-decoration: none !important;
    transition: background 0.15s;
    background: transparent !important;
}

.sc-filter-bar .sc-filter-option:hover {
    background: #f5f5f5 !important;
    text-decoration: none !important;
    color: #111 !important;
}

.sc-filter-option--active {
    font-weight: 700;
    color: #111;
}

.sc-filter-option--active::before {
    content: '✓ ';
    color: #111;
}

.sc-filter-option span {
    color: #999;
    font-size: 12px;
    margin-left: 8px;
}

/* ── Farben Chip-Leiste ── */
.sc-farbe-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.sc-farbe-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    background: #f7f7f7;
    border: 1.5px solid transparent;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: #333 !important;
    text-decoration: none !important;
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
}

.sc-farbe-chip:hover {
    border-color: #bbb;
    background: #efefef;
    color: #111 !important;
    text-decoration: none !important;
}

.sc-farbe-chip--active {
    border-color: #222 !important;
    background: #fff !important;
    font-weight: 700;
    color: #111 !important;
}

.sc-farbe-chip-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.sc-filter-reset-bar {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    background: transparent;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #666;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
    margin-left: 4px;
}

.sc-filter-reset-bar:hover {
    border-color: #c00;
    color: #c00;
    text-decoration: none;
}

/* Originale WC Variations-Tabelle verstecken */
.variations { display: none !important; }


/* ── Abschnitts-Labels – exakt wie Theme (.form-row label) ── */
.sc-section-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent, #000);
    display: block;
    margin-bottom: 8px;
}

/* ── Material-Buttons – passend zu .variable-item.button-variable-item ── */
.sc-material-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sc-mat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    flex-shrink: 0;
}
.sc-mat-icon svg {
    display: block;
    width: auto;
    height: 36px;
    max-width: 32px;
}

.sc-mat-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none !important;
    background: #F7F7F7 !important;
    color: var(--text, #555) !important;
    border: 2px solid transparent !important;
    border-radius: 50px !important;
    padding: 6px 18px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    transition: border-color 0.2s, color 0.2s;
}

.sc-mat-btn:hover {
    border-color: var(--border, #DEDACE) !important;
    color: var(--accent, #000) !important;
    background: #F7F7F7 !important;
    box-shadow: none !important;
}

.sc-mat-btn.sc-active {
    border-color: var(--accent, #222) !important;
    color: var(--accent, #000) !important;
    background: #fff !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

/* ── Größe-Trigger – passend zu Variation Select (border-radius: 25px) ── */
#gf-size-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    box-sizing: border-box;
    text-align: left;
    background: #fff !important;
    color: var(--text, #555) !important;
    border: 1px solid var(--border, #DEDACE) !important;
    border-radius: 25px !important;
    padding: 11px 20px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    transition: border-color 0.3s ease;
    margin-bottom: 4px;
}

#gf-size-trigger:hover {
    border-color: var(--primary, #CA9236) !important;
    background: #fff !important;
    box-shadow: none !important;
}

#gf-size-trigger.sc-has-selection {
    color: var(--text, #555) !important;
    border-color: var(--border, #DEDACE) !important;
}

/* ── Modal ── */
#gf-size-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 9998;
}

#gf-size-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    z-index: 9999;
    width: 92%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 12px;
}

#gf-size-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #eee;
}

#gf-size-hdr h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#gf-size-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    padding: 4px 8px;
}

#gf-size-body {
    display: flex;
}

#gf-size-visual {
    width: 210px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 16px;
    background: var(--background_light, #f5f3eb);
    border-right: 1px solid #ebe8e0;
    /* Quadratischer Innenbereich für Portrait + Landscape */
    min-height: 260px;
}

/* Single-Size-Preview */
#gf-preview-rect {
    border: 2px solid #333;
    background: #fff;
    box-shadow: 2px 3px 10px rgba(0,0,0,.12);
    transition: width 0.25s ease, height 0.25s ease;
    flex-shrink: 0;
}

#gf-preview-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.4;
}

#gf-preview-label span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #999;
    margin-top: 1px;
}

/* Modal-Chip-Grid */
#gf-size-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px;
    overflow-y: auto;
    max-height: 70vh;
    align-content: start;
}

.gf-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 12px 8px;
    border: 1.5px solid #e5e0d8;
    border-radius: 10px;
    cursor: pointer;
    background: #fafaf8;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.gf-row:hover {
    border-color: #aaa;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.07);
}

.gf-row.gf-sel {
    border-color: #222 !important;
    border-width: 2px;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.10);
}

.gf-row-name {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    line-height: 1.2;
}

.gf-row-price {
    font-size: 12px;
    color: #888;
    font-weight: 400;
}

/* WÄHLEN-Button ausblenden – Klick auf Chip reicht */
.gf-row-btn { display: none !important; }

/* ── Rahmen Farbauswahl ── */
.sc-rahmen-farbe-wrap {
    margin-bottom: 16px;
}

.sc-color-swatches {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.sc-color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 4px;
    box-shadow: none !important;
}

.sc-swatch-circle {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid transparent !important;
    transition: border-color 0.2s, transform 0.15s;
    box-sizing: border-box;
}

.sc-color-swatch:hover .sc-swatch-circle {
    border-color: #888 !important;
    transform: scale(1.08);
}

.sc-color-swatch.sc-active .sc-swatch-circle {
    border-color: #333 !important;
    transform: scale(1.08);
}

.sc-swatch-label {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ── Filter Widget (Sidebar) ──────────────────────────────────────────────── */

.sc-filter-section {
    margin-bottom: 24px;
}

.sc-filter-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #333;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.sc-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sc-filter-list li {
    margin: 0;
    padding: 0;
}

.sc-filter-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    border-bottom: none;
    transition: color 0.15s;
}

.sc-filter-list li a:hover {
    color: #000;
}

.sc-filter-list li a span {
    font-size: 11px;
    color: #aaa;
    margin-left: 6px;
}

.sc-filter-list li.sc-filter-active a {
    font-weight: 700;
    color: #000;
}

.sc-filter-list li.sc-filter-active a::before {
    content: '✕ ';
    font-size: 10px;
    color: #999;
}

/* ── Filter Reset Button ── */
.sc-filter-reset {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    font-size: 13px;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.sc-filter-reset:hover {
    background: #e0e0e0;
    color: #111;
    text-decoration: none;
}

.sc-color-swatch.sc-active .sc-swatch-label {
    color: #1a1a1a;
    font-weight: 700;
}

/* ── Kategorieseiten: Beliebte Themen ── */
.sc-related-themes {
    margin-bottom: 32px;
    text-align: center;
}

.sc-related-themes-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent, #000);
    margin-bottom: 14px;
}

.sc-related-themes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.sc-related-theme-btn {
    display: inline-block;
    background: #F7F7F7;
    color: var(--text, #555) !important;
    border: 1px solid var(--border, #DEDACE);
    border-radius: 50px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    white-space: nowrap;
}

.sc-related-theme-btn:hover {
    border-color: var(--primary, #CA9236);
    color: var(--accent, #000) !important;
    background: #fff;
}

/* ── Galerie: cremefarbener Hintergrund + Schatten nur auf Slide 1 (Artwork) ── */
.woocommerce-product-gallery__image:first-child {
    background: #f5f0e8;
}
.woocommerce-product-gallery__image:first-child > a {
    display: block;
    margin: 65px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.10),
        0 8px 20px rgba(0, 0, 0, 0.14),
        4px 16px 40px rgba(0, 0, 0, 0.12);
}

/* ── Kategorie-SEO: H1, Einleitung, Bottom-Beschreibung ── */
.sc-cat-seo-top {
    margin-bottom: 24px;
}
.sc-cat-h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.sc-cat-intro {
    color: #555;
    font-size: 0.97rem;
    line-height: 1.7;
    max-width: 720px;
    margin-bottom: 8px;
}
.sc-cat-seo-bottom {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e8e4de;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.75;
    max-width: 800px;
}
.sc-cat-seo-bottom h2,
.sc-cat-seo-bottom h3 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    margin: 24px 0 8px !important;
    color: #222 !important;
    line-height: 1.4 !important;
}
.sc-cat-seo-bottom p {
    margin-bottom: 12px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    #gf-size-body { flex-direction: column; }
    #gf-size-visual { width: 100%; min-height: 160px; border-right: none; border-bottom: 1px solid #ebe8e0; flex-direction: row; gap: 20px; }
    #gf-size-list { grid-template-columns: repeat(2, 1fr); }
}
