/* =======================================
   Category Overview Styles (Modern Design)
   ======================================= */

/* Breadcrumb */
.product-detail-breadcrumb {
    font-size: 14px;
    margin-bottom: 10px;
    color: #777;
}
.product-detail-breadcrumb a {
    color: #005580;
    text-decoration: none;
}
.product-detail-breadcrumb a:hover {
    text-decoration: underline;
}

.category-hero {
    background: #f8f9fa;
    padding: 10px 0 40px 0;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.category-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #003055;
}

.category-hero .category-description {
    font-size: 1rem;
    color: #6c757d;
    max-width: 1000px;
    margin: 0 auto;
    line-height: 1.6;
    text-align: left;
}

/* =======================================
   Subcategories Grid (Modern Layout)
   ======================================= */

.subcategories-section {
    padding: 40px 0;
}

.subcategories-section h2 {
    text-align: center;
    font-size: 2rem;
    color: #003055;
    margin-bottom: 40px;
    font-weight: 600;
}

.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 0 20px;
    position: relative;
}

.subcategory-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: visible;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.subcategory-card:hover {
    z-index: 5;
}

.subcategory-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.subcategory-header {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}

.subcategory-header h3 {
    color: #003055;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.subcategory-header a {
    color: inherit;
    text-decoration: none;
}

.subcategory-header a:hover {
    color: #005580;
}

.subcategory-featured-image {
    padding: 30px;
    text-align: center;
    background: #fff;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.subcategory-featured-image img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.subcategory-card:hover .subcategory-featured-image img {
    transform: scale(1.05);
}

.subcategory-featured-image .placeholder {
    color: #6c757d;
    font-size: 3rem;
    opacity: 0.3;
}

/* =======================================
   More Categories Section
   ======================================= */

.more-categories-section {
    margin-top: 40px;
    text-align: center;
}

.more-categories-toggle {
    background: #f8f9fa;
    border: 2px solid #005580;
    color: #005580;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.more-categories-toggle:hover {
    background: #005580;
    color: white;
}

.more-categories-toggle .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 1rem;
}

.more-categories-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

.more-categories-toggle.expanded {
    background: #005580;
    color: white;
}

.more-categories-toggle.expanded .toggle-text::after {
    content: " ausblenden";
}

.more-categories-toggle.expanded .toggle-text::before {
    content: "Weitere Kategorien ";
}

.more-categories-toggle:not(.expanded) .toggle-text::after {
    content: "";
}

.more-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 0 20px;
    animation: slideDown 0.4s ease;
}

.more-categories-grid.hidden {
    display: none;
}

/* =======================================
   Sub-Subcategories (Direct Display)
   ======================================= */

.sub-subcategories {
    margin-top: 1rem;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.sub-subcategories ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sub-subcategories li {
    border-bottom: 1px solid #e9ecef;
}

.sub-subcategories li:last-child {
    border-bottom: none;
}

.sub-subcategories a {
    display: block;
    padding: 6px 8px;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

/* Sub-subcategories section styles */
.sub-subcategories {
    margin-top: 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    min-height: 120px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sub-subcategories ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sub-subcategories li {
    border-bottom: 1px solid #e9ecef;
}

/* Remove border from last item in any sub-subcategories list */
.sub-subcategories .visible-sub-subs li:last-child,
.sub-subcategories .hidden-sub-subs li:last-child {
    border-bottom: none;
}

/* But if there are hidden items, keep border on last visible item */
.sub-subcategories.has-hidden-items .visible-sub-subs li:last-child {
    border-bottom: 1px solid #e9ecef;
}

.sub-subcategories a {
    display: block;
    padding: 6px 8px;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.sub-subcategories a:hover {
    background: white;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
}

/* Hidden sub-subcategories (initially hidden) - same styling as visible ones */
.hidden-sub-subs {
    margin-top: 0;
    animation: slideDown 0.3s ease-out;
}

/* More sub-subcategories section */
.more-sub-subs-section {
    margin-top: auto;
    text-align: center;
    padding-top: 8px;
}

.more-sub-subs-toggle {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #003055;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.more-sub-subs-toggle:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.more-sub-subs-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.more-sub-subs-toggle .toggle-icon {
    font-size: 10px;
    transition: transform 0.2s;
}

.more-sub-subs-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.no-sub-subcategories {
    padding: 12px;
    color: #6c757d;
    font-style: italic;
    font-size: 0.85rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =======================================
   Animations
   ======================================= */

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* =======================================
   Breadcrumb Navigation
   ======================================= */

.breadcrumb-nav {
    background: #f8f9fa;
    padding: 15px 0;
    margin-bottom: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: #6c757d;
}

.breadcrumb a {
    color: #005580;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #003055;
    text-decoration: underline;
}

.breadcrumb .current {
    color: #6c757d;
    font-weight: 500;
}

/* =======================================
   Mobile Responsiveness
   ======================================= */

@media (max-width: 1200px) {
    .subcategories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 992px) {
    .subcategories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .subcategories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }

    .category-hero {
        padding: 30px 0;
    }
    
    .category-hero h1 {
        font-size: 2rem;
    }
    
    .category-hero .category-description {
        font-size: 0.9rem;
        padding: 0 20px;
    }

    .subcategories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .subcategory-featured-image {
        padding: 20px;
        min-height: 150px;
    }

    .subcategory-featured-image img {
        max-height: 120px;
    }
}

@media (max-width: 480px) {
    .subcategory-header {
        padding: 15px;
    }

    .subcategory-header h3 {
        font-size: 1.1rem;
    }

    .subcategories-section h2 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
}

/* More sub-subcategories section */
.more-sub-subs-section {
    position: relative;
    margin-top: 8px;
}

    .more-sub-subs-toggle {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 6px;
        padding: 6px 12px;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        font-size: 0.8rem;
        font-weight: 500;
        color: #003055;
        transition: all 0.2s;
        gap: 4px;
    }

    .more-sub-subs-toggle:hover {
        background: #e9ecef;
        color: #003055;
    }.more-sub-subs-toggle .toggle-icon {
    font-size: 10px;
    transition: transform 0.2s;
}

.more-sub-subs-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.hidden-sub-subs-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.hidden-sub-subs-container.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hidden-sub-subs {
    list-style: none;
    padding: 8px 0;
    margin: 0;
    background: white;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.hidden-sub-subs li {
    border-bottom: 1px solid #e9ecef;
}

.hidden-sub-subs li:last-child {
    border-bottom: none;
}

.hidden-sub-subs a {
    display: block;
    padding: 6px 8px;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    background: #f8f9fa;
}

.hidden-sub-subs a:hover {
    background: white;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
}

/* =======================================
   Top Products Section (wie auf Startseite)
   ======================================= */
.featured-products {
    margin-top: 40px;
    padding: 40px 0;
    background: #f8f9fa;
}

.featured-products h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    color: #005580;
}

/* Basis: 4 Spalten Desktop, responsive Reduktion */
.featured-products .products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Tablet quer: 3 Spalten */
@media (max-width: 1200px) {
    .featured-products .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet: 2 Spalten */
@media (max-width: 992px) {
    .featured-products .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .featured-products .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-item {
    position: relative;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.product-item img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.product-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #005580;
}

.product-item h3 a {
    color: inherit;
    text-decoration: none;
}

.product-item h3 a:hover {
    text-decoration: underline;
}

.product-item .description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

.product-item .price-container {
    margin-bottom: 10px;
}

.product-item .current-price {
    font-size: 18px;
    font-weight: bold;
    color: #005580;
    display: block;
    margin-bottom: 5px;
}

.product-item .old-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.product-item .stock-status {
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.product-item .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.product-item .status-dot.green {
    background-color: #28a745;
}

.product-item .status-dot.red {
    background-color: #dc3545;
}

.product-item .discount-label {
    position: absolute;
    top: 30px;
    left: 10px;
    background-color: #005580;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 7px 30px;
    transform: rotate(-15deg);
    transform-origin: left;
    z-index: 10;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-radius: 5px;
}

.product-item .bookmark {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ccc;
    font-size: 20px;
    transition: color 0.3s ease;
    z-index: 3;
}

.product-item .bookmark:hover,
.product-item .bookmark.active {
    color: #dc3545;
}

.product-item .image-container {
    position: relative;
    margin-bottom: 15px;
    width: 100%;
}

.product-item .thumbnails-container {
    display: none; /* Versteckt für Clean Look */
}

.no-products {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-products h3 {
    color: #005580;
    margin-bottom: 10px;
}