/* =============================================
   Groh Dryhire Produkte — Card Layout
   Standard: 5 Cards nebeneinander
   ============================================= */

.dryhire-products-wrap {
    width: 100%;
    margin: 2rem 0;
}

/* Header */
.dryhire-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.dryhire-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.dryhire-header__link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ms-accent-color, #690826);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.dryhire-header__link:hover {
    opacity: 0.7;
}

/* Toolbar */
.dryhire-toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.dryhire-search {
    flex: 1;
    min-width: 200px;
}

.dryhire-search-input,
.dryhire-filter-select {
    width: 100%;
    padding: 0.6em 0.9em;
    border: 1px solid var(--ms-border-color, rgba(128, 128, 128, 0.3));
    border-radius: 4px;
    background: var(--ms-input-bg, transparent);
    color: var(--ms-text-color, inherit);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.dryhire-search-input:focus,
.dryhire-filter-select:focus {
    outline: none;
    border-color: var(--ms-accent-color, #690826);
}

.dryhire-filter {
    min-width: 180px;
}

.dryhire-count {
    font-size: 0.8rem;
    opacity: 0.5;
    white-space: nowrap;
    margin-left: auto;
}

/* Grid — 5 Spalten als Standard */
.dryhire-grid {
    display: grid;
    gap: 1.2rem;
}

.dryhire-grid--cols-1 { grid-template-columns: 1fr; }
.dryhire-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.dryhire-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.dryhire-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.dryhire-grid--cols-5 { grid-template-columns: repeat(5, 1fr); }
.dryhire-grid--cols-6 { grid-template-columns: repeat(6, 1fr); }

/* ==================== Card ==================== */
.dryhire-product {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: var(--ms-card-bg, #fff);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
}

.dryhire-product:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

/* Bild */
.dryhire-product__image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #fff;
}

/* Platzhalter bei fehlendem Bild */
.dryhire-product__image--missing {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dryhire-product__image--missing {
    background: #f5f5f5;
}

.dryhire-product__image--missing::after {
    content: "Kein Bild";
    font-size: 0.8rem;
    color: #bbb;
    position: absolute;
}

.dryhire-product__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 7.5%;
    background: #fff;
    transition: transform 0.35s ease;
}

.dryhire-product:hover .dryhire-product__image img {
    transform: scale(1.08);
}

/* Content */
.dryhire-product__content {
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Kategorie-Badge */
.dryhire-product__category {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.45;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* Produktname */
.dryhire-product__name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.3rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Artikelnummer */
.dryhire-product__number {
    font-size: 0.7rem;
    opacity: 0.35;
    font-family: monospace;
    margin-bottom: 0.3rem;
}

/* Beschreibung */
.dryhire-product__desc {
    font-size: 0.78rem;
    line-height: 1.45;
    opacity: 0.6;
    margin: 0.2rem 0 0 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Fehlermeldung (nur Admins) */
.dryhire-error {
    background: #fef0f0;
    border: 1px solid #dc3232;
    border-radius: 4px;
    padding: 1rem 1.5rem;
    color: #8b0000;
}

.dryhire-error a {
    color: #690826;
    text-decoration: underline;
}

/* Leer-Zustand */
.dryhire-empty {
    text-align: center;
    padding: 3rem 1rem;
    opacity: 0.6;
}

/* ==================== Slider ==================== */

.dryhire-slider {
    position: relative;
    padding: 0 3rem;
}

.dryhire-slider__track {
    display: flex;
    gap: 1.2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* IE/Edge */
}

.dryhire-slider__track::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}

.dryhire-slider__track .dryhire-product {
    flex: 0 0 calc((100% - 4 * 1.2rem) / 5);
    scroll-snap-align: start;
    min-width: 0;
}

.dryhire-slider__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none !important;
    outline: none !important;
    background: rgba(0, 0, 0, 0.08);
    color: #555;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.dryhire-slider__btn:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #333;
}

.dryhire-slider__btn:disabled {
    opacity: 0.25;
    cursor: default;
}

.dryhire-slider__btn--prev {
    left: 0;
}

.dryhire-slider__btn--next {
    right: 0;
}

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

/* Tablet */
@media (max-width: 1024px) {
    .dryhire-grid--cols-5,
    .dryhire-grid--cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }

    .dryhire-slider__track .dryhire-product {
        flex: 0 0 calc((100% - 2 * 1.2rem) / 3);
    }
}

/* Tablet klein */
@media (max-width: 768px) {
    .dryhire-grid--cols-3,
    .dryhire-grid--cols-4,
    .dryhire-grid--cols-5,
    .dryhire-grid--cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .dryhire-toolbar {
        flex-direction: column;
    }

    .dryhire-filter {
        width: 100%;
    }

    .dryhire-count {
        margin-left: 0;
    }

    .dryhire-slider__track .dryhire-product {
        flex: 0 0 calc((100% - 1 * 1.2rem) / 2);
    }

    .dryhire-slider__btn {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }

    .dryhire-slider__btn--prev { left: -10px; }
    .dryhire-slider__btn--next { right: -10px; }
}

/* Mobil */
@media (max-width: 480px) {
    .dryhire-grid--cols-2,
    .dryhire-grid--cols-3,
    .dryhire-grid--cols-4,
    .dryhire-grid--cols-5,
    .dryhire-grid--cols-6 {
        grid-template-columns: 1fr;
    }

    .dryhire-slider__track .dryhire-product {
        flex: 0 0 100%;
    }

    .dryhire-slider__btn--prev { left: 4px; }
    .dryhire-slider__btn--next { right: 4px; }
}
