/* ========================================
   Produkt Grid - Horizontal Scrolling
   ======================================== */

.produkt-grid-section {
    padding-top: 100px;
    padding-bottom: 30px;/*432*/
    background-color: #f5f1e9;
    border-radius: 8px;
    position: relative;
    z-index: 15;
    max-width: 1672px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0px;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;

}

.produkt-grid-section .container {
    max-width: 1325px;
    margin: 0 auto;
}

/* ========================================
   Header
   ======================================== */

.grid-header {
    text-align: left;
    margin-bottom: 50px;
    max-width: 100%;
}

.grid-headline {
    font-size: 5rem;
    font-weight: 200;
    color: #000000;
    line-height: 1.2;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.grid-intro {
    font-size: 1.25rem;
    font-weight: 200;
    line-height: 1.8;
    color: #000000;
    margin-bottom: 12px;
    max-width: 900px;
}

.grid-intro p {
    margin: 0 0 8px 0;
}

.grid-intro p strong {
    font-weight: 700;
}

/* ========================================
   Category Filter Buttons
   ======================================== */

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 60px;
}

.filter-btn {
    padding: 10px 47px;
    font-size: 1.05rem;
    font-weight: 500;
    color: #000000;
    background-color: transparent;
    border: 1px solid #000000;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    font-family: inherit;
    outline: none;
    white-space: nowrap;
}

.filter-btn:hover {
    background-color: transparent;
    border-color: #e73331;
    color: #000000;
}

.filter-btn.active {
    background-color: #e73331;
    border-color: #e73331;
    color: #ffffff;
}

.NIXfilter-btn.active:hover {
    background-color: transparent;
    border-color: #e73331;
    color: #e73331;
}

.filter-btn:focus {
    outline: 1px solid #e73331;
    outline-offset: 3px;
}

/* ========================================
   Products Grid - HORIZONTAL SCROLLING
   ======================================== */

.products-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: scroll;
    overflow-y: hidden;
    margin-bottom: 30px;
    padding-bottom: 47px;

    /* Smooth Scrolling */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}


/* Scrollbar Höhe */
.products-grid::-webkit-scrollbar {
    height: 6px;
}

/* Track (Hintergrund) */
.products-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border: 2px solid transparent;
    margin-left: 40px;  /* Padding links */
    margin-right: 40px; /* Padding rechts */
}

/* Thumb (Roter Balken) */
.products-grid::-webkit-scrollbar-thumb {
    background: #e73331;
    border-radius: 10px;
    border: 2px solid transparent;   /* verkleinert den sichtbaren Daumen */
    background-clip: content-box;    /* sorgt dafür, dass nur die Mitte gefärbt ist */
}

/* Thumb Hover */
.products-grid::-webkit-scrollbar-thumb:hover {
    background: #c82333;
}

/* Firefox */
.products-grid {
    scrollbar-width: thin;
    scrollbar-color: #e73331 rgba(0, 0, 0, 0.08);
}

/* Product Item */
.product-item {
    flex: 0 0 auto;
    width: 280px;
    position: relative;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Versteckt beim Filtern */
.product-item.hidden {
    display: none;
}

/* Product Link */
.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* ========================================
   Product Image & Container
   ======================================== */

.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #ffffff;
    border-radius: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product-item:hover .product-image-wrapper {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-item:hover .product-image {
    transform: scale(1.08);
}

/* ========================================
   Hover Overlay
   ======================================== */

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(56, 36, 23, 0.60);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 30px;
    z-index: 10;
}

.product-item:hover .product-overlay {
    opacity: 1;
    visibility: visible;
}

/* Overlay Content */
.overlay-content {
    width: 100%;
    text-align: center;
    color: #ffffff;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-item:hover .overlay-content {
    transform: translateY(0);
}

/* Product Name */
.product-name {
    font-size: 1.25rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.3;
}

/* Product Description */
.product-desc {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #ffffff;
    margin-bottom: 10px;
}

/* Article Number */
.product-artnr {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}


/* ========================================
   No Results Message
   ======================================== */

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #000000;
    display: none;
}

.no-results p {
    font-size: 1.25rem;
    margin: 0;
}

/* ========================================
   Load Animation
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-item {
    animation: fadeInUp 0.6s ease forwards;
}

.product-item:nth-child(1) { animation-delay: 0.05s; }
.product-item:nth-child(2) { animation-delay: 0.1s; }
.product-item:nth-child(3) { animation-delay: 0.15s; }
.product-item:nth-child(4) { animation-delay: 0.2s; }
.product-item:nth-child(5) { animation-delay: 0.25s; }
.product-item:nth-child(6) { animation-delay: 0.3s; }
.product-item:nth-child(7) { animation-delay: 0.35s; }
.product-item:nth-child(8) { animation-delay: 0.4s; }

/* ========================================
   Scroll Hint (Optional - Dezenter Hinweis)
   ======================================== */

.products-grid-wrapper {
    position: relative;
}

/* Fade-Out Effect am rechten Rand */
.products-grid-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 20px;
    width: 60px;
    background: linear-gradient(
            to right,
            transparent,
            #f5f0eb 80%
    );
    pointer-events: none;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Fade ausblenden wenn ganz rechts gescrollt */
.products-grid.scrolled-end + .products-grid-wrapper::after {
    opacity: 0;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1600px) {
    .produkt-grid-section .container {
        max-width: 1400px;
    }

    .product-item {
        width: 300px;
    }
}

@media (max-width: 1400px) {
    .produkt-grid-section .container {
        max-width: 1200px;
    }

    .grid-headline {
        font-size: 3.5rem;
    }

    .product-item {
        width: 280px;
    }

    .products-grid {
        gap: 25px;
    }
}

@media (max-width: 1200px) {
    .produkt-grid-section .container {
        max-width: 1100px;
    }

    .produkt-grid-section {
        padding: 80px 0 100px;
    }

    .grid-headline {
        font-size: 3rem;
    }

    .product-item {
        width: 260px;
    }

    .products-grid {
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .produkt-grid-section {
        padding: 60px 0 80px;
    }

    .produkt-grid-section .container {
        padding: 0 30px;
    }

    .grid-header {
        margin-bottom: 40px;
    }

    .grid-headline {
        font-size: 2.5rem;
    }

    .grid-intro {
        font-size: 1.125rem;
    }

    .category-filter {
        gap: 12px;
        margin-bottom: 40px;
    }

    .filter-btn {
        padding: 12px 28px;
        font-size: 0.9rem;
    }

    .product-item {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .produkt-grid-section {
        padding: 50px 0 60px;
    }

    .produkt-grid-section .container {
        padding: 0 20px;
    }

    .grid-headline {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .grid-intro {
        font-size: 1.1rem;
    }

    .category-filter {
        gap: 10px;
        margin-bottom: 30px;
    }

    .filter-btn {
        padding: 10px 24px;
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }

    .product-item {
        width: 280px;
    }

    .products-grid {
        gap: 16px;
    }

    /* Scrollbar auf Mobile dünner */
    .products-grid::-webkit-scrollbar {
        height: 6px;
    }

    /* Overlay auf Mobile immer sichtbar */
    .product-overlay {
        opacity: 1;
        visibility: visible;
        background: rgba(56, 36, 23, 0.60);
    }

    .overlay-content {
        transform: translateY(0);
    }

    .product-name {
        font-size: 1.125rem;
    }

    .product-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .grid-headline {
        font-size: 1.75rem;
    }

    .category-filter {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        flex-shrink: 0;
    }

    .product-item {
        width: 280px;
    }

    .products-grid {
        gap: 12px;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .category-filter {
        display: none;
    }

    .product-overlay {
        display: none;
    }

    .products-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow: visible;
    }

    .product-item {
        width: auto;
    }
}