/* ===============================
   BASE CONTAINER
   =============================== */

.category-container {
    max-width: 1300px;
    margin: 30px auto 60px;
    padding: 0 16px;
}

/* ===============================
   BREADCRUMB
   =============================== */
.breadcrumb {
    font-size: 14px;
    margin-bottom: 14px;
    color: #777;
}
.breadcrumb a {
    color: #2E4F20;
    text-decoration: none;
}

/* ===============================
   HEADER
   =============================== */
.category-header {
    margin-bottom: 20px;
}
.category-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

/* ===============================
   MOBILE FILTER BUTTON
   =============================== */
.filter-toggle-btn {
    display: none;
    width: 100%;
    background: #2E4F20;
    color: white;
    padding: 12px 14px;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    margin-bottom: 18px;
    cursor: pointer;
    font-weight: 600;
}
.filter-toggle-btn i {
    margin-right: 6px;
}

/* ===============================
   SIDEBAR OVERLAY (Mobile Dark Background)
   =============================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 998;
}
.sidebar-overlay.visible {
    display: block;
}

/* ===============================
   MAIN LAYOUT (Desktop)
   =============================== */
.category-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
}

/* ===============================
   SIDEBAR
   =============================== */
.sidebar {
    background: white;
    padding: 0;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

/* Mobile Drawer */
.sidebar.visible {
    transform: translateX(0);
}

/* MOBILE CLOSE BUTTON */
.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 12px;
    right: 14px;
    background: #2E4F20;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
}

/* SIDEBAR BLOCK */
.sidebar-block {
    background: #fff;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.sidebar-block h2 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* CATEGORY LIST */
.sidebar-categories,
.sidebar-subcategories {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.sidebar-categories > li {
    margin-bottom: 6px;
}

.sidebar-categories a {
    font-size: 14px;
    color: #333;
    text-decoration: none;
}

.sidebar-categories li.active > a {
    font-weight: 700;
    color: #2E4F20;
}

/* SUBCATEGORIES */
.sidebar-subcategories {
    margin-top: 6px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid #ddd;
}
.sidebar-subcategories a {
    font-size: 13px;
    color: #666;
}
.sidebar-subcategories li.active a {
    font-weight: 600;
    color: #2E4F20;
}

/* ===============================
   FILTER FORM
   =============================== */
.filter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-form select,
.filter-form input {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

/* Filter Button */
.filter-btn {
    background: #2E4F20;
    color: white;
    border: none;
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 6px;
    width: 100%;
    transition: background 0.2s;
}
.filter-btn:hover {
    background: #3d6a2c;
}

/* ===============================
   TOOLBAR (Sortierung + Produktanzahl)
   =============================== */
.category-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.toolbar-left {
    font-size: 15px;
    font-weight: 600;
    color: #444;
}

.sort-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-form select {
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* ===============================
   PRODUCT GRID
   =============================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.product-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform .15s;
}

.product-card:hover {
    transform: translateY(-3px);
}

/* PRODUCT IMAGE */
.product-image-wrapper {
    position: relative;
    width: 100%;
    background: #f8f8f8;
    height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 4 / 5; /* oder 4/5, 3/4 etc. */
}
.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* DISCOUNT BADGE */
.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #d60000;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

/* PRODUCT INFO */
.product-info {
    padding: 16px 18px;
}

.product-title-link {
    text-decoration: none;
    color: black;
}
.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

/* SHORT DESCRIPTION */
.product-short {
    font-size: 13px;
    color: #444;
    height: 36px;
    overflow: hidden;
}

/* PRICE BLOCK */
.uvp-price {
    font-size: 14px;
    color: #999;
}
.uvp-label {
    font-weight: 700;
    margin-right: 5px;
    color: #555;
}
.strike {
    text-decoration: line-through;
}

.sale-price {
    margin-top: 2px;
    font-size: 22px;
    font-weight: 700;
    color: #2E4F20;
}

.limited-offer {
    font-size: 13px;
    color: #d60000;
    font-weight: 600;
}

.tax-note {
    font-size: 12px;
    color: #555;
}
.tax-note .versand-link {
    color: #333;
    text-decoration: underline;
}

/* DELIVERY */
.delivery-time {
    margin-top: 6px;
    font-size: 13px;
    color: #444;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {

    /* Sidebar → Drawer */
    .filter-toggle-btn {
        display: block;
    }

    .category-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 320px;
        height: 100%;
        padding-top: 60px;
        background: white;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform .3s ease;
        overflow-y: auto;
    }

    .sidebar-close-btn {
        display: block;
    }

    .sidebar.visible {
        transform: translateX(0);
    }
}

@media (max-width: 600px) {

    /* 2 Produkte pro Reihe */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .product-image-wrapper {
        height: 170px;
    }

    /* Toolbar stacking */
    .category-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
