/* =============================
   WHITEFOX SHOP – DARK UI
   ============================= */

.whitefox-shop-wrapper {
    background: #05060f;
    padding: 20px;
    border-radius: 18px;
    color: #f1f5ff;
}

/* =============================
   2-Spalten Layout
   Sidebar fix + Content
   ============================= */

.whitefox-shop-wrapper .wfs-layout {
    display: grid !important;
    grid-template-columns: 480px minmax(0, 1fr) !important;
    gap: 24px;
    align-items: flex-start;
}

/* =============================
   Sidebar
   ============================= */

.wfs-sidebar {
    background: #080a18;
    border: 1px solid #161a2f;
    border-radius: 16px;
    padding: 18px 20px 20px;
    width: 480px !important;
    max-width: 100%;
    box-sizing: border-box;

    /* Sticky: bleibt beim Scrollen stehen */
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.wfs-filter-block {
    margin-bottom: 20px;
}

.wfs-sidebar h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    color: #dbe1ff;
}

.wfs-sidebar select,
.wfs-sidebar input[type=number] {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid #1b1f33;
    background: #0c0f1f;
    color: #f5f7ff;
    font-size: 14px;
}

.wfs-price-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wfs-price-range span {
    color: #7780b8;
    margin: 0 4px;
}

/* =============================
   Filteraktionen
   ============================= */

.wfs-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wfs-apply-button {
    width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f7dff, #6e56ff);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.wfs-reset-link {
    text-align: center;
    color: #9ba3d8;
    font-size: 13px;
    text-decoration: none;
}

.wfs-reset-link:hover {
    text-decoration: underline;
}

/* =============================
   Suchfeld oben in Sidebar
   ============================= */

.wfs-search-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.wfs-search-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #aab0e5;
}

#wfs-search {
    width: 100%;
    padding: 12px 16px;
    border-radius: 999px;
    background: #0b0e1c;
    border: 1px solid #1b1f33;
    color: #fff;
    font-size: 14px;
}

#wfs-search:focus {
    outline: none;
    border-color: #4f7dff;
}

.wfs-search-button {
    width: 100%;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f7dff, #6e56ff);
    border: none;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* (Optional) alter Suggest-Dropdown – aktuell nicht genutzt */
.wfs-search-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: #07091a;
    border: 1px solid #1b1f33;
    border-radius: 14px;
    display: none;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 20px 35px rgba(0,0,0,0.7);
    z-index: 50;
}

/* =============================
   Produktbereich – Wrapper
   (Kacheloptik kommt komplett
    aus deiner globalen wpk-grid CSS)
   ============================= */

.wfs-products-area {
    background: #07081a;
    padding: 18px 16px;
    border-radius: 16px;
    border: 1px solid #161a2f;
    position: relative;
}

.wfs-products-area.wfs-loading::after {
    content: "Lade Produkte …";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5,6,15,0.85);
    border-radius: 16px;
    font-size: 14px;
    color: #cbd5ff;
    z-index: 20;
}

.wfs-result-count {
    margin-bottom: 14px;
    color: #b5baf0;
    font-size: 15px;
}

.wfs-products-grid {
    width: 100%;
}

/* Wichtig:
   Hier KEIN eigenes Grid mehr,
   das macht komplett .wpk-grid aus
   deinem Customizer.
   Wir resetten nur UL, damit Woo
   nix verzieht. */
.wfs-products-grid ul.products {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

/* =============================
   FIX: Wenige Treffer (z.B. 1–2)
   sollen die Karten NICHT in die
   Breite ziehen.

   Wir erzwingen im Shop-Kontext
   ein Desktop-Grid mit fester
   Kartenbreite + linksbündigem
   Layout.
   ============================= */

@media (min-width: 769px) {
    /* Standard-Kartenbreite (bei Bedarf anpassen) */
    body .whitefox-shop-wrapper { --wfs-card-w: 260px; }

    body .whitefox-shop-wrapper .wfs-products-area ul.products {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(var(--wfs-card-w), var(--wfs-card-w))) !important;
        gap: 18px !important;
        justify-content: start !important;
        align-items: stretch !important;
    }

    body .whitefox-shop-wrapper .wfs-products-area ul.products li.product {
        width: auto !important;
        margin: 0 !important;
    }
}

/* =============================
   Pagination
   ============================= */

.wfs-pagination {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.wfs-page-link {
    padding: 6px 12px;
    border-radius: 999px;
    background: #0b0e1c;
    border: 1px solid #1b1f33;
    color: #c8cdf5;
    font-size: 13px;
    text-decoration: none;
}

.wfs-page-link.is-active {
    background: #4f7dff;
    border-color: #4f7dff;
    color: #fff;
}

.wfs-page-arrow {
    font-weight: bold;
}

.wfs-page-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #aab0e5;
    font-size: 14px;
    margin-left: 12px;
}

.wfs-page-jump input[type=number] {
    width: 60px;
    padding: 4px 6px;
    border-radius: 8px;
    border: 1px solid #1b1f33;
    background: #050713;
    color: #fff;
}

/* =============================
   Responsive Layouts
   ============================= */

@media (max-width: 1400px) {
    .whitefox-shop-wrapper .wfs-layout {
        grid-template-columns: 400px minmax(0,1fr) !important;
    }
}

@media (max-width: 1100px) {
    .whitefox-shop-wrapper .wfs-layout {
        grid-template-columns: 1fr !important;
    }

    .wfs-sidebar {
        position: static;
        max-height: none;
        overflow: visible;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .whitefox-shop-wrapper {
        padding: 14px;
    }
}

/* =============================
   FIX: WooCommerce ::before/::after
   verursachen "Lücke" in Spalte 1
   ============================= */

.wpk-grid .wpk-products::before,
.wpk-grid .wpk-products::after {
    content: none !important;
    display: none !important;
}


/* =============================
   Globaler Loader (sichtbar auch auf Mobile)
   ============================= */

body.wfs-global-loading::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(5,6,15,0.55);
    z-index: 9998;
}

body.wfs-global-loading::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin-left: -22px;
    margin-top: -22px;
    border-radius: 999px;
    border: 3px solid rgba(255,255,255,0.25);
    border-top-color: rgba(255,255,255,0.95);
    animation: wfsSpin 0.9s linear infinite;
    z-index: 9999;
}

@keyframes wfsSpin {
    to { transform: rotate(360deg); }
}

/* =============================
   Mobile: 3-spaltige Kachel-Ansicht
   ============================= */

@media (max-width: 768px) {
    .wfs-products-area ul.products {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 10px !important;
        align-items: stretch;
    }

    .wfs-products-area ul.products li.product {
        width: auto !important;
        margin: 0 !important;
    }

    /* Titel / Buttons etwas kompakter */
    .wfs-products-area ul.products li.product .woocommerce-loop-product__title {
        font-size: 12px !important;
        line-height: 1.2 !important;
    }
    .wfs-products-area ul.products li.product .price {
        font-size: 13px !important;
    }
    .wfs-products-area ul.products li.product .button,
    .wfs-products-area ul.products li.product a.button {
        font-size: 12px !important;
        padding: 8px 10px !important;
    }
}

/* =========================================================
   WHITEFOX SHOP – SIDEBAR LUXURY REVAMP
   Ziel: Premium Look passend zu den Produktkarten
   ========================================================= */

/* Sidebar-Card: mehr Tiefe + Glas */
body .whitefox-shop-wrapper .wfs-sidebar{
  background: radial-gradient(circle at top left, rgba(56,189,248,.10), rgba(15,23,42,.92)) !important;
  border: 1px solid rgba(148,163,184,.26) !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 55px rgba(0,0,0,.55) !important;
  padding: 18px 18px 16px !important;
}

/* Section spacing */
body .whitefox-shop-wrapper .wfs-filter-block{ margin-bottom: 16px !important; }

/* Überschriften */
body .whitefox-shop-wrapper .wfs-sidebar h3{
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: .18em !important;
  text-transform: uppercase !important;
  color: rgba(203,213,255,.86) !important;
  margin: 0 0 10px !important;
}

/* Search label */
body .whitefox-shop-wrapper .wfs-search-label{
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
  color: rgba(203,213,255,.86) !important;
}

/* Inputs + Selects */
body .whitefox-shop-wrapper .wfs-sidebar select,
body .whitefox-shop-wrapper .wfs-sidebar input[type="number"],
body .whitefox-shop-wrapper #wfs-search{
  height: 44px !important;
  border-radius: 14px !important;
  background: rgba(2,6,23,.55) !important;
  border: 1px solid rgba(148,163,184,.22) !important;
  color: rgba(241,245,255,.95) !important;
  font-weight: 700 !important;
  letter-spacing: .02em !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important;
  outline: none !important;
}

body .whitefox-shop-wrapper .wfs-sidebar select:focus,
body .whitefox-shop-wrapper .wfs-sidebar input[type="number"]:focus,
body .whitefox-shop-wrapper #wfs-search:focus{
  border-color: rgba(56,189,248,.55) !important;
  box-shadow: 0 0 0 4px rgba(56,189,248,.10), inset 0 1px 0 rgba(255,255,255,.05) !important;
}

body .whitefox-shop-wrapper #wfs-search::placeholder{ color: rgba(148,163,184,.70) !important; }

/* Preisreihe */
body .whitefox-shop-wrapper .wfs-price-range{ gap: 10px !important; }
body .whitefox-shop-wrapper .wfs-price-range span{
  color: rgba(148,163,184,.75) !important;
  font-weight: 900 !important;
}

/* Buttons: Premium Ice */
body .whitefox-shop-wrapper .wfs-search-button,
body .whitefox-shop-wrapper .wfs-apply-button{
  height: 46px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(56,189,248,.45) !important;
  background: linear-gradient(135deg, rgba(56,189,248,.42), rgba(15,23,42,.92)) !important;
  color: rgba(241,245,255,.96) !important;
  font-weight: 950 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  box-shadow: 0 16px 38px rgba(0,0,0,.55), 0 0 20px rgba(56,189,248,.10) !important;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease !important;
}

body .whitefox-shop-wrapper .wfs-search-button:hover,
body .whitefox-shop-wrapper .wfs-apply-button:hover{
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 20px 48px rgba(0,0,0,.65), 0 0 26px rgba(56,189,248,.16) !important;
}

/* Reset-Link */
body .whitefox-shop-wrapper .wfs-reset-link{
  display: inline-flex !important;
  justify-content: center !important;
  padding: 10px 12px !important;
  border-radius: 999px !important;
  background: rgba(2,6,23,.35) !important;
  border: 1px solid rgba(148,163,184,.18) !important;
  color: rgba(203,213,255,.86) !important;
  font-weight: 900 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  transition: border-color .15s ease, transform .15s ease, background .15s ease !important;
}

.wfs-reset-link:hover{
  border-color: rgba(251,191,36,.40) !important;
  background: rgba(251,191,36,.08) !important;
  transform: translateY(-1px);
}
