/* ==========================================================================
   PRODUKT-FILTER
   ========================================================================== */

.product-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-item {
    flex: 1 1 200px;
}

.product-filter .filter-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 1em;
    color: #333;
}

.product-filter .filter-item select {
    width: 100%;
    max-width: 100%;
    padding: 8px;
    box-sizing: border-box;
    margin-bottom: 0;
    color: black;
    height: 40px;
    font-size: 1em;
}

/* ==========================================================================
   SLIDER
   ========================================================================== */

#price-range,
#size-range {
    margin-top: 20px;
}

#price-slider,
#size-slider {
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
    background: #f9f9f9;
    border: 1px solid #ccc;
    cursor: pointer;
}

.ui-slider .ui-slider-handle {
    background: #000000;
    border: 2px solid #ffffff;
    width: 30px;
    height: 30px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    border-radius: 50%;
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
}

.ui-slider .ui-slider-handle:hover {
    background: #333333;
    border-color: #ffffff;
}

.ui-slider {
    background: #ffffff;
    height: 6px;
    border-radius: 3px;
    margin-left: 10px;
    margin-right: 30px;
    margin-bottom: 10px;
}

.ui-slider .ui-slider-range {
    background: #000000;
}

/* ==========================================================================
   PRODUKT-GRID
   ========================================================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #e1e1e1;
    padding: 15px;
    text-align: center;
    transition: box-shadow 0.3s;
    background-color: #faedf7;
}

.product-item:hover {
    box-shadow: 0 0px 0px rgba(0,0,0,0.1);
}

.product-item img {
    max-width: 100%;
    height: auto;
}

.product-item h3 {
    font-size: 1.2em;
    margin: 10px 0;
    color: black;
    text-decoration-color: red !important;
}

.product-item .price {
    color: #8c007e !important;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.product-item .size,
.product-item .category,
.product-item .fabric {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #4d4b4b !important;
}

.product-item .product-details-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 15px;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    border: none;
    font-size: 0.95em;
}

.product-item .product-details-btn:hover {
    background-color: #333333;
    color: #ffffff;
}

/* Infinite Scroll */
#cpg-load-more {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
}

#cpg-load-more .cpg-loading-text {
    color: #666;
    font-size: 0.95em;
}

/* ==========================================================================
   PRODUKTDETAILSEITE
   ========================================================================== */

.cpg-product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Galerie */
.cpg-product-gallery {
    position: sticky;
    top: 100px;
    align-self: start;
}

.cpg-main-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.cpg-main-image img {
    max-width: 100%;
    max-height: 1000px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.cpg-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cpg-thumb {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.cpg-thumb:hover,
.cpg-thumb.active {
    border-color: #8c007e;
}

.cpg-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Produktinfo */
.cpg-product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cpg-product-title {
    font-size: 2em;
    margin: 0;
    color: #1a1a1a;
    line-height: 1.2;
}

.cpg-product-price {
    font-size: 1.6em;
    font-weight: 700;
    color: #8c007e;
}

.cpg-product-price del {
    color: #999;
    font-size: 0.75em;
    margin-right: 8px;
}

.cpg-product-price ins {
    text-decoration: none;
}

.cpg-product-short-desc {
    color: #555;
    line-height: 1.6;
    font-size: 0.95em;
}

.cpg-product-short-desc p {
    margin: 0;
}

/* Attribute-Tabelle */
.cpg-product-attributes table {
    width: 100%;
    border-collapse: collapse;
}

.cpg-product-attributes th,
.cpg-product-attributes td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.95em;
}

.cpg-product-attributes th {
    color: #666;
    font-weight: 600;
    width: 120px;
}

.cpg-product-attributes td {
    color: #1a1a1a;
}

/* Stock-Status */
.cpg-stock {
    font-weight: 600;
}

.cpg-stock--instock {
    color: #27ae60;
}

.cpg-stock--outofstock {
    color: #e74c3c;
}

.cpg-stock--onbackorder {
    color: #f39c12;
}

/* Buttons */
.cpg-product-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.cpg-btn {
    display: inline-block;
    padding: 14px 30px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.25s;
    border: 2px solid transparent;
    flex: 1;
    min-width: 160px;
}

.cpg-btn-cart {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

.cpg-btn-cart:hover {
    background-color: #333;
    border-color: #333;
    color: #ffffff;
}

.cpg-btn-buy {
    background-color: #8c007e;
    color: #ffffff;
    border-color: #8c007e;
}

.cpg-btn-buy:hover {
    background-color: #a3009a;
    border-color: #a3009a;
    color: #ffffff;
}

.cpg-btn-disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    border-color: #ccc;
}

/* Beschreibung */
.cpg-product-description {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.cpg-product-description h3 {
    font-size: 1.1em;
    margin: 0 0 10px 0;
    color: #1a1a1a;
}

.cpg-product-description p {
    color: #555;
    line-height: 1.7;
}

/* Zurück-Link */
.cpg-back-link {
    color: #8c007e;
    text-decoration: none;
    font-size: 0.95em;
}

.cpg-back-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   WARENKORB
   ========================================================================== */

.cpg-cart {
    max-width: 900px;
    margin: 0 auto;
}

.cpg-cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.cpg-cart-empty p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}

/* Cart Items */
.cpg-cart-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cpg-cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.cpg-cart-item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.cpg-cart-item-name {
    margin: 0;
    font-size: 1em;
}

.cpg-cart-item-name a {
    color: #1a1a1a;
    text-decoration: none;
}

.cpg-cart-item-name a:hover {
    color: #8c007e;
}

.cpg-cart-item-price {
    font-size: 0.9em;
    color: #8c007e;
    margin-top: 4px;
}

.cpg-cart-item-quantity label {
    display: block;
    font-size: 0.8em;
    color: #444;
    margin-bottom: 4px;
}

.cpg-cart-item-quantity input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 0.95em;
}

.cpg-cart-item-subtotal {
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
}

.cpg-cart-item-remove a {
    color: #8c007e;
    font-size: 1.5em;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
}

.cpg-cart-item-remove a:hover {
    color: #a3009a;
    background: #faedf7;
}

/* Totals */
.cpg-cart-footer {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cpg-cart-totals {
    background: #faedf7;
    border-radius: 8px;
    padding: 25px 30px;
}

.cpg-cart-totals-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95em;
    color: #555;
}

.cpg-cart-shipping-note {
    font-size: 0.8em;
    color: #888;
    padding: 0 0 4px 0;
    line-height: 1.4;
}

.cpg-cart-totals-row.cpg-cart-total {
    border-top: 2px solid #ddd;
    margin-top: 8px;
    padding-top: 15px;
    font-size: 1.2em;
    font-weight: 700;
    color: #1a1a1a;
}

.cpg-cart-totals-row.cpg-discount {
    color: #27ae60;
}

/* Cart Actions */
.cpg-cart-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cpg-btn-update {
    background: #ffffff;
    color: #333;
    border: 2px solid #ddd;
    padding: 12px 24px;
    flex: 0;
    min-width: auto;
}

.cpg-btn-update:hover {
    border-color: #333;
}

.cpg-btn-continue {
    background: #ffffff;
    color: #8c007e;
    border: 2px solid #8c007e;
    padding: 12px 24px;
    flex: 0;
    min-width: auto;
}

.cpg-btn-continue:hover {
    background: #faedf7;
    color: #8c007e;
}

.cpg-btn-checkout {
    background: #8c007e;
    color: #ffffff;
    border: 2px solid #8c007e;
    padding: 12px 30px;
    flex: 0;
    min-width: auto;
}

.cpg-btn-checkout:hover {
    background: #a3009a;
    border-color: #a3009a;
    color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 767px) {
    .filter-item {
        flex: 1 1 100%;
        margin-bottom: 0;
    }

    #price-range,
    #size-range {
        margin-top: 15px;
    }

    #price-slider,
    #size-slider {
        padding: 10px;
    }

    /* Produktdetailseite */
    .cpg-product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cpg-product-gallery {
        position: static;
    }

    .cpg-product-title {
        font-size: 1.5em;
    }

    .cpg-product-actions {
        flex-direction: column;
    }

    .cpg-btn {
        min-width: auto;
    }

    /* Warenkorb */
    .cpg-cart-item {
        grid-template-columns: 60px 1fr;
        gap: 10px;
    }

    .cpg-cart-item-image img {
        width: 60px;
        height: 60px;
    }

    .cpg-cart-item-quantity,
    .cpg-cart-item-subtotal,
    .cpg-cart-item-remove {
        grid-column: 2;
    }

    .cpg-cart-item-remove {
        justify-self: end;
    }

    .cpg-cart-actions {
        flex-direction: column;
    }

    .cpg-btn-update,
    .cpg-btn-continue,
    .cpg-btn-checkout {
        flex: 1;
        text-align: center;
    }
}
