/**
 * woocommerce-shop.css
 *
 * Ablageort: mastertheme-main/assets/css/woocommerce-shop.css
 * Einbinden in: mastertheme-main/includes/woocommerce.php
 *
 * Layout: Sidebar + 3-spaltiges Produktgitter
 * Design angelehnt an Screenshot 1 (Framery-Stil)
 */

/* ============================================================
   VARIABLEN
   ============================================================ */

:root {
    --lh-shop-sidebar-width: 200px;
    --lh-shop-gap: 40px;
    --lh-card-radius: 2px;
    --lh-card-bg: #ffffff;
    --lh-card-border: #e8e8e8;
    --lh-text-primary: #1a1a1a;
    --lh-text-secondary: #555555;
    --lh-text-muted: #999999;
    --lh-accent: #c0392b;        /* Rot wie im lechner+hayn Logo */
    --lh-font-size-label: 11px;
    --lh-font-size-price: 15px;
    --lh-font-size-name: 13px;
    --lh-letter-spacing: 0.08em;
}


/* ============================================================
   SHOP GESAMT-LAYOUT (Sidebar + Grid)
   ============================================================ */

/* .lh-shop-layout { */
/*     display: grid; */
/*     grid-template-columns: var(--lh-shop-sidebar-width) 1fr; */
/*     gap: var(--lh-shop-gap); */
/*     max-width: 1280px; */
/*     margin: 0 auto; */
/*     padding: 40px 24px 80px; */
/*     align-items: start; */
/* } */


/* ============================================================
   SIDEBAR
   ============================================================ */

.lh-shop-sidebar {
    position: sticky;
    top: 100px;
}

.lh-shop-sidebar .shop-widget {
    margin-bottom: 32px;
}

/* .lh-shop-sidebar .shop-widget-title { */
/*     font-size: var(--lh-font-size-label); */
/*     font-weight: 600; */
/*     letter-spacing: var(--lh-letter-spacing); */
/*     text-transform: uppercase; */
/*     color: var(--lh-text-muted); */
/*     border-bottom: 1px solid var(--lh-card-border); */
/*     padding-bottom: 8px; */
/*     margin: 0 0 12px 0; */
/* } */

/* Highlight Toggle Button */
.lh-highlight-toggle {
    display: inline-block;
    font-size: var(--lh-font-size-name);
    color: var(--lh-text-secondary);
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid var(--lh-card-border);
    border-radius: 2px;
    transition: all 0.15s ease;
}

.lh-highlight-toggle:hover {
    border-color: var(--lh-text-primary);
    color: var(--lh-text-primary);
}

.lh-highlight-toggle.active {
    background: var(--lh-text-primary);
    border-color: var(--lh-text-primary);
    color: #fff;
}


/* Kategorien-Liste (Fallback ohne Widget) */
.lh-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lh-cat-item {
    margin-bottom: 2px;
}

.lh-cat-item > a {
    display: block;
    font-size: var(--lh-font-size-name);
    color: var(--lh-text-secondary);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.15s ease;
}

.lh-cat-item > a:hover,
.lh-cat-item.current > a {
    color: var(--lh-accent);
}

.lh-cat-item.current > a {
    font-weight: 600;
}

/* Unterkategorien */
.lh-cat-children {
    list-style: none;
    margin: 4px 0 8px 12px;
    padding: 0;
}

.lh-cat-children li a {
    display: block;
    font-size: 12px;
    color: var(--lh-text-muted);
    text-decoration: none;
    padding: 2px 0;
    transition: color 0.15s ease;
}

.lh-cat-children li a:hover,
.lh-cat-children li.current a {
    color: var(--lh-accent);
}

/* WooCommerce Widget-Styles überschreiben */
.lh-shop-sidebar .widget_product_categories ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lh-shop-sidebar .widget_product_categories ul li a {
    font-size: var(--lh-font-size-name);
    color: var(--lh-text-secondary);
    text-decoration: none;
    display: block;
    padding: 4px 0;
    transition: color 0.15s ease;
}

.lh-shop-sidebar .widget_product_categories ul li a:hover,
.lh-shop-sidebar .widget_product_categories ul li.current-cat > a {
    color: var(--lh-accent);
}

.lh-shop-sidebar .widget_product_categories ul li.current-cat > a {
    font-weight: 600;
}

.lh-shop-sidebar .widget_product_categories .count {
    display: none;
}


/* ============================================================
   PRODUKTGITTER (3 Spalten)
   ============================================================ */

/* .lh-shop-main ul.products { */
/*     display: grid; */
/*     grid-template-columns: repeat(3, 1fr); */
/*     gap: 1px; */
/*     list-style: none; */
/*     margin: 0; */
/*     padding: 0; */
/*     background: var(--lh-card-border); */
/*     border: 1px solid var(--lh-card-border); */
/* } */

.lh-shop-main ul.products::before,
.lh-shop-main ul.products::after {
    display: none;
}


/* ============================================================
   PRODUKTKARTE
   ============================================================ */

.lh-shop-main ul.products li.product {
    background: var(--lh-card-bg);
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    position: relative;
    transition: background 0.2s ease;
}

.lh-shop-main ul.products li.product:hover {
    background: #fafafa;
}

/* Produktbild */
.lh-shop-main ul.products li.product a.woocommerce-loop-product__link {
    display: block;
    text-decoration: none;
}

.lh-shop-main ul.products li.product img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    object-position: center;
    padding: 24px;
    display: block;
    box-sizing: border-box;
}

/* Produktname */
.lh-shop-main ul.products li.product .woocommerce-loop-product__title {
    font-size: var(--lh-font-size-name);
    font-weight: 400;
    color: var(--lh-text-muted);
    padding: 0 20px 4px;
    margin: 0;
    line-height: 1.4;
}

/* Preis */
.lh-shop-main ul.products li.product .price {
    font-size: var(--lh-font-size-price);
    font-weight: 700;
    color: var(--lh-text-primary);
    padding: 0 20px 20px;
    display: block;
}

.lh-shop-main ul.products li.product .price del {
    color: var(--lh-text-muted);
    font-weight: 400;
    font-size: 13px;
    margin-right: 6px;
}

/* "In den Warenkorb"-Button ausblenden (wie Screenshot 1) */
.lh-shop-main ul.products li.product .button,
.lh-shop-main ul.products li.product .added_to_cart {
    display: none;
}

/* Badge (Sale etc.) */
.lh-shop-main ul.products li.product .onsale {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--lh-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 2px;
    margin: 0;
    min-height: auto;
    min-width: auto;
    line-height: 1.5;
}

/* WooCommerce Sortierung / Ergebniszahl */
.lh-shop-main .woocommerce-result-count {
    font-size: 12px;
    color: var(--lh-text-muted);
    margin-bottom: 16px;
}

.lh-shop-main .woocommerce-ordering {
    margin-bottom: 16px;
}

.lh-shop-main .woocommerce-ordering select {
    font-size: 12px;
    border: 1px solid var(--lh-card-border);
    padding: 6px 10px;
    border-radius: 2px;
    background: #fff;
    color: var(--lh-text-secondary);
}


/* ============================================================
   "WEITERE PRODUKTE" BUTTON
   ============================================================ */

.lh-load-more-wrap {
    text-align: center;
    margin-top: 48px;
}

.lh-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: var(--lh-letter-spacing);
    text-transform: uppercase;
    color: var(--lh-text-primary);
    text-decoration: none;
    border: 1px solid var(--lh-card-border);
    padding: 12px 28px;
    border-radius: 40px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.lh-load-more-btn:hover {
    border-color: var(--lh-text-primary);
    color: var(--lh-text-primary);
}

.lh-load-more-icon {
    font-size: 16px;
    font-weight: 300;
    line-height: 1;
}

/* Ladezustand */
.lh-load-more-btn.loading {
    opacity: 0.5;
    pointer-events: none;
}


/* ============================================================
   AJAX FILTER: LADEZUSTAND
   ============================================================ */

.lh-shop-main ul.products.lh-loading {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Kein Ergebnis */
.lh-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 14px;
    color: var(--lh-text-muted);
}


/* ============================================================
   PAGINATION (Fallback, wenn kein Load More)
   ============================================================ */

.lh-shop-main .woocommerce-pagination {
    text-align: center;
    margin-top: 48px;
}

.lh-shop-main .woocommerce-pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 4px;
    padding: 0;
    margin: 0;
}

.lh-shop-main .woocommerce-pagination ul li a,
.lh-shop-main .woocommerce-pagination ul li span {
    display: block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    font-size: 13px;
    border: 1px solid var(--lh-card-border);
    border-radius: 2px;
    color: var(--lh-text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.lh-shop-main .woocommerce-pagination ul li span.current,
.lh-shop-main .woocommerce-pagination ul li a:hover {
    background: var(--lh-text-primary);
    color: #fff;
    border-color: var(--lh-text-primary);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    .lh-shop-layout {
        grid-template-columns: 180px 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .lh-shop-layout {
        grid-template-columns: 1fr;
    }

    .lh-shop-sidebar {
        position: static;
    }

    .lh-shop-main ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .lh-shop-main ul.products {
        grid-template-columns: 1fr;
    }
}
