/*shop-listing-css*/

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #f7f7f7;
}

a {
    text-decoration: none;
    color: black;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    padding: 40px;
}

/* ===== CONTENT LAYOUT ===== */
.content-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    align-items: start;
}

/* Wenn kein aside existiert */
.content-layout:not(:has(aside)) {
    grid-template-columns: 1fr;
}

.main-content {
    min-width: 0;
}

/* ===== HOME CONTENT ===== */
.home-products {
    padding: 40px;
}

/* ===== CONTENT HEADER ===== */
.content-header {
    padding: 12px 16px;
    margin: 20px 20px 0 20px;
    background: white;
    border-radius: 12px;
}

.content-header h2 {
    margin: 0;
    font-size: 20px;
}

.product-count {
    margin-top: 2px;
    font-size: 13px;
    color: #777;
}

/* ===== GRID ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
}

.main-content .grid {
    margin-top: 10px;
}

/* ===== GENERIC CARD ===== */
.card {
    height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: white;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #eee;
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}

.card span:first-of-type {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ===== PRODUCT CARD ===== */
.product-card {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card .card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.product-card span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    min-height: 1.25em;
    line-height: 1.25em;
    font-size: 1rem;
    word-break: break-word;
}

/* ===== DISCOUNT BADGE ===== */
.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: red;
    color: white;
    width: 45px;
    height: 30px;
    border-radius: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 2;
}

/* ===== PRICE ===== */
.price-box {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: auto;
    min-height: 24px;
    max-height: 32px;
}

.old-price {
    text-decoration: line-through;
    color: gray;
    font-size: 0.9rem;
}

.new-price {
    font-weight: bold;
    font-size: 1.1rem;
    color: black;
}

.product-card .old-price + .new-price {
    color: red;
}

/* ===== COLORS ===== */
.color-dots {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.color-dot:hover {
    transform: scale(1.3);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.color-dot.active {
    box-shadow:
        0 0 0 2px white,
        0 0 0 3px black;
}

.color-dot.more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    color: #333;
    background-color: #fff;
}

/* ===== SIDEBAR STACK ===== */
.sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== SIDEBAR BASIS ===== */
.sidebar {
    background: white;
    padding: 20px;
    border-radius: 12px;
}

.sidebar h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 22px;
}

.sidebar h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin-bottom: 8px;
}

.sidebar a {
    display: flex;
    justify-content: space-between;
    text-decoration: none;
    color: #333;
    padding: 8px;
    border-radius: 6px;
}

.sidebar a:hover {
    background: #f5f5f5;
}

.sidebar a.active {
    background: #ffe5ea;
    color: #e60023;
    font-weight: bold;
}

.count {
    color: #999;
    font-size: 12px;
}

/* ===== FILTER BLOCKS ===== */
.filter-block {
    margin-bottom: 24px;
}

.filter-block:last-child {
    margin-bottom: 0;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.filter-price-range {
    font-size: 14px;
    color: #444;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    aside {
        display: none;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .product-card img {
        height: 150px;
    }

    .home-products {
        padding: 20px;
    }

    .breadcrumb {
        padding: 20px;
    }
}

/* =========================
   FILTER SIDEBAR
========================= */

.filter-sidebar h3 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 22px;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.filter-section {
    border-top: 1px solid #eee;
    padding-top: 12px;
}

.filter-section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.filter-section summary {
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-section summary::-webkit-details-marker {
    display: none;
}

.filter-section summary::after {
    content: "+";
    font-size: 18px;
    font-weight: 400;
}

.filter-section[open] summary::after {
    content: "−";
}

.filter-section > *:not(summary) {
    margin-top: 12px;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

.filter-checkbox input {
    margin: 0;
}

/* =========================
   COLORS
========================= */
.filter-colors-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
}

.color-choice {
    min-width: 0;
    cursor: pointer;
}

.color-choice-input {
    display: none;
}

.color-choice-ui {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.color-choice:hover .color-choice-ui {
    background: #f6f6f6;
}

.color-choice-input:checked + .color-choice-ui {
    background: #111;
    color: #fff;
    border-color: #111;
}

.filter-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.filter-small-text {
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================
   SIZE GROUPS
========================= */

.size-groups {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.size-group-title {
    font-size: 12px;
    font-weight: 700;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.size-option {
    gap: 0;
}

.size-option input {
    display: none;
}

.size-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.size-option:hover .size-pill {
    border-color: #999;
}

.size-option input:checked + .size-pill {
    border-color: #111;
    background: #111;
    color: #fff;
}
/* =========================
   PRICE
========================= */

.price-filter {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.price-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-input-group label {
    font-size: 12px;
    color: #666;
}

.price-input-group input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
}

.price-range-display {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 6px;
    align-items: center;
}

.price-range-sliders {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.price-range-sliders input[type="range"] {
    width: 100%;
}

/* =========================
   ACTIONS
========================= */

.filter-actions {
    margin-top: 6px;
}

.filter-apply-btn {
    width: 100%;
    border: none;
    background: #111;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
}

.filter-apply-btn:hover {
    opacity: 0.92;
}

/* =========================
   HEADER / SORT / CHIPS
========================= */

.listing-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.listing-header-left {
    min-width: 0;
}

.listing-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.sort-form {
    margin: 0;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.active-filter-chips {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f3f3;
    border: 1px solid #ddd;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    color: #222;
    text-decoration: none;
}

.filter-chip:hover {
    background: #ececec;
}

.chip-x {
    font-weight: 700;
    line-height: 1;
}

/* =========================
   FILTER RESET
========================= */

.filter-reset {
    margin-top: 10px;
}

.filter-reset-link {
    padding: 0;
    border: none;
    background: none;
    color: #666;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

.filter-reset-link:hover {
    color: #222;
}

.filter-reset a {
    font-size: 12px;
    color: #666;
    text-decoration: underline;
}

/* =========================
   RESPONSIVE HEADER
========================= */

@media (max-width: 768px) {
    .listing-header-top {
        flex-direction: column;
        align-items: stretch;
    }

    .listing-header-right {
        justify-content: flex-start;
    }

    .sort-select {
        width: 100%;
    }
}
/* =========================
 MEHR Button
========================= */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    padding: 10px 20px 30px;
}

.load-more-form {
    margin: 0;
}

.load-more-btn {
    border: none;
    background: #111;
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
}

.load-more-btn:hover {
    opacity: 0.92;
}

/* =========================================================
   Mobile Filter Drawer
   ========================================================= */

.mobile-filter-open-btn,
.mobile-filter-backdrop,
.mobile-filter-drawer-head {
    display: none;
}

@media (max-width: 768px) {

    .mobile-filter-open-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;

        min-height: 40px;
        padding: 0 14px;

        border: 1px solid #111111;
        border-radius: 999px;

        background: #ffffff;
        color: #111111;

        font-weight: 800;

        cursor: pointer;
    }

    .mobile-filter-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 8998;
        background: rgba(0, 0, 0, 0.35);
    }

    .mobile-filter-backdrop.is-open {
        display: block;
    }

    .sidebar-stack {
        position: fixed;
        top: 0;
        right: 0;

        width: min(90vw, 390px);
        height: 100dvh;

        z-index: 8999;

        overflow-y: auto;

        padding: 0 16px 20px;

        background: #ffffff;

        transform: translateX(100%);
        transition: transform 0.2s ease;

        box-shadow: -20px 0 40px rgba(0, 0, 0, 0.18);
    }

    .sidebar-stack.is-open {
        transform: translateX(0);
    }

    .mobile-filter-drawer-head {
        position: sticky;
        top: 0;

        z-index: 2;

        display: flex;
        align-items: center;
        justify-content: space-between;

        min-height: 62px;

        background: #ffffff;
        border-bottom: 1px solid #eeeeee;
    }

    .mobile-filter-drawer-head strong {
        font-size: 18px;
        font-weight: 900;
    }

    .mobile-filter-drawer-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-filter-reset-all {
        color: #111111;
        font-size: 13px;
        font-weight: 800;
        text-decoration: underline;
    }

    .mobile-filter-close {
        width: 38px;
        height: 38px;

        border: none;
        border-radius: 999px;

        background: #f3f4f6;
        color: #111111;

        font-size: 26px;
        line-height: 1;

        cursor: pointer;
    }

    body.mobile-filter-open {
        overflow: hidden;
    }

    .listing-header-top {
        gap: 12px;
    }

    .listing-header-right {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}