/*
 * ARH Produkte – Produktliste, Seitennavigation, Sortierung, Suchformular.
 *
 * Enthält die Grundstyles, die bisher von Toolset Views geliefert wurden.
 * Alle weiteren Anpassungen kommen unverändert aus dem Theme (arh/style.css, Zusätzliches CSS).
 */

/* Container (bisher .wpv-pagination: Clearfix) */
.arh-ps-results::before,
.arh-ps-results::after {
    content: " ";
    display: table;
}
.arh-ps-results::after {
    clear: both;
}
.arh-ps-results {
    transition: opacity .25s ease-in-out;
}
/* Abstand wie bisher (Toolset gab vor der Liste ein leeres Filterformular mit form-Margin aus) */
.tax-produktkategorien .entry-content > .arh-ps-results {
    padding-top: 1.12em;
}
.arh-ps-results.is-loading {
    opacity: .35;
    pointer-events: none;
}

/* 10px Abstand zwischen oberer Leiste (Seitennavigation/Sortierung) und Produkten */
.arh-ps-results .rhs_sort_page + .rhs_product_row {
    padding-top: 10px;
}

/* Suche: Trefferzahl, Hinweis, Vorschläge */
.arh-ps-summary,
.arh-ps-hint,
.arh-ps-empty-title,
.arh-ps-suggestions {
    clear: both;
    margin: 20px 0 0 10px;
}
.arh-ps-empty-title {
    margin-top: 10px;
}
.arh-ps-suggestions p {
    margin: 10px 0 0;
}
.arh-ps-sep {
    margin: 0 .35em;
    color: #999;
}

/* Seitennavigation */
.wpv-pagination-nav-links-container {
    display: flex;
    padding-left: 0;
    margin-left: 0;
    list-style: none !important;
}
.wpv-pagination-nav-links-container .page-link {
    font-size: .9em;
    padding: .15em .45em .2em;
    line-height: 1.25;
    border: 1px solid #dee2e6;
    margin: 2px;
    text-decoration: none !important;
}
.wpv-pagination-nav-links-container a.page-link:focus,
.wpv-pagination-nav-links-container a.page-link:hover {
    background-color: #f5f6f8;
}
.wpv-filter-next-link,
.wpv-filter-previous-link,
.wpv-filter-pagination-link {
    z-index: 10;
    display: inline-block;
}

/* Sortierung */
select.wpv-sort-control-select {
    display: inline;
    width: auto;
}
/* Auf gleicher Höhe wie „Seite: x von y“ (überschreibt margin-top:12px!important aus dem Theme) */
.arh-ps-results select.wpv-sort-control-select {
    margin-top: 4px !important;
}

/* ------------------------------------------------------------------ *
 * Produkt-Einzelseite
 * ------------------------------------------------------------------ */

/* Die Inhaltsvorlage steckt in der gleichnamigen Box des Themes. Ohne diese Regel bekäme die
   innere Box nochmals 75%/50% Breite, Float und Einzug → schmale Textspalte. */
.single-produkt .arh_single_product_info .arh_single_product_info {
    float: none;
    width: auto;
    margin-top: 0;
    padding-left: 0;
}

/* Beschriftungen (Erscheinung, Bestellnummer, Einzelpreis) fett – der Theme-Reset setzt <b> auf normal */
.single-produkt .arh_single_product_info b {
    font-weight: 700;
}

/* ------------------------------------------------------------------ *
 * Mobile Ansicht (unter 768px) – Desktop bleibt unverändert
 * ------------------------------------------------------------------ */
@media (max-width: 767px) {
    /* Kategorieseite mittig: Einzug der Kopf-Liste aus der Theme-Vorlage entfernen */
    .tax-produktkategorien ul.entry-header {
        padding-left: 0;
        margin-left: 0;
    }

    /* Leiste: Zeile 1 Seitenzahlen, Zeile 2 „Seite x von y“ + „Sortieren“ mit beiden Feldern */
    .arh-ps-results .rhs_sort_page {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 6px;
        row-gap: 8px;
        text-align: left;
    }
    /* Produkt-Einzelseite: Text steht unter dem Bild – doppelten Einzug/Abstand der
       verschachtelten .arh_single_product_info (Theme + Inhaltsvorlage) aufheben */
    .single-produkt .post-content-inner > .arh_single_product_info {
        margin-top: 20px;
        padding-left: 0;
    }

    /* Clearfix des Themes würde im Flex-Layout als leeres Element Abstand erzeugen */
    .arh-ps-results .rhs_sort_page::before,
    .arh-ps-results .rhs_sort_page::after {
        display: none;
    }
    .arh-ps-results .rhs_sort_page > ul.wpv-pagination-nav-links-container {
        order: -2;
        flex: 0 0 100%;
        flex-wrap: wrap;
        margin: 0 !important;
    }
    .arh-ps-results .rhs_sort_page > span {
        order: -1;
        margin: 0 12px 0 0 !important;
    }
    .arh-ps-results .rhs_sort_page select.wpv-sort-control-select {
        margin-top: 0 !important;
    }
}

/* Schmale Handys: „Seite x von y“ in eigener Zeile, damit „Sortieren“ mit beiden Feldern zusammenbleibt */
@media (max-width: 419px) {
    .arh-ps-results .rhs_sort_page > span {
        flex: 0 0 100%;
    }
}

/* Titelfeld im Suchformular (bisher per input[name="wpv_post_search"] im Theme gestylt) */
.arh-ps-form input.arh-ps-titel {
    float: left;
    width: 150px;
    padding-left: 10px;
    margin-left: 10px;
    height: 40px;
}
