/* ============================================================
   Hundekumpel Produkte — Frontend Styles
   Bewusst schlank gehalten, damit es sich in jedes Theme einfügt.
   Farben und Abstände könnt ihr hier leicht anpassen.
   ============================================================ */

:root {
    --hk-primary:       #2c6e49;
    --hk-primary-hover: #1b4d34;
    --hk-text:          #333333;
    --hk-text-light:    #666666;
    --hk-bg-card:       #ffffff;
    --hk-border:        #e8e8e8;
    --hk-sale-bg:       #e74c3c;
    --hk-sale-text:     #ffffff;
    --hk-stock-bg:      #95a5a6;
    --hk-stock-text:    #ffffff;
    --hk-radius:        8px;
    --hk-shadow:        0 2px 8px rgba(0, 0, 0, 0.08);
    --hk-shadow-hover:  0 4px 16px rgba(0, 0, 0, 0.12);
    --hk-gap:           24px;
    --hk-transition:    0.2s ease;
}

/* ---- Header ---- */
.hk-products-header {
    margin-bottom: var(--hk-gap);
}

.hk-products-headline {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--hk-text);
    margin: 0;
    padding: 0;
}

/* ---- Grid ---- */
.hk-product-grid {
    display: grid;
    gap: var(--hk-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

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

/* ---- Card ---- */
.hk-product-card {
    background: var(--hk-bg-card);
    border: 1px solid var(--hk-border);
    border-radius: var(--hk-radius);
    overflow: hidden;
    transition: box-shadow var(--hk-transition), transform var(--hk-transition);
}

.hk-product-card:hover {
    box-shadow: var(--hk-shadow-hover);
    transform: translateY(-2px);
}

.hk-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.hk-product-link:hover,
.hk-product-link:focus {
    text-decoration: none;
    color: inherit;
}

/* ---- Image ---- */
.hk-product-image-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f7f7f7;
}

.hk-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hk-product-card:hover .hk-product-image {
    transform: scale(1.05);
}

.hk-product-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--hk-text-light);
    font-size: 0.875em;
}

/* ---- Badges ---- */
.hk-sale-badge,
.hk-stock-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    z-index: 2;
}

.hk-sale-badge {
    background: var(--hk-sale-bg);
    color: var(--hk-sale-text);
}

.hk-stock-badge {
    background: var(--hk-stock-bg);
    color: var(--hk-stock-text);
}

/* ---- Product Info ---- */
.hk-product-info {
    padding: 16px;
}

.hk-product-title {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--hk-text);
    margin: 0 0 8px 0;
    line-height: 1.3;
    /* Maximal 2 Zeilen */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hk-product-price {
    font-size: 1em;
    font-weight: 700;
    color: var(--hk-primary);
}

.hk-product-price del {
    color: var(--hk-text-light);
    font-weight: 400;
    font-size: 0.85em;
    margin-right: 6px;
}

.hk-product-price ins {
    text-decoration: none;
    color: var(--hk-sale-bg);
}

/* ---- WooCommerce price_html overrides ---- */
.hk-product-price .woocommerce-Price-amount {
    font-size: inherit;
}

.hk-product-price .woocommerce-Price-currencySymbol {
    font-size: inherit;
}

/* ---- Footer / Button ---- */
.hk-products-footer {
    margin-top: var(--hk-gap);
    text-align: center;
}

.hk-products-button {
    display: inline-block;
    padding: 12px 32px;
    background: var(--hk-primary);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95em;
    text-decoration: none;
    border-radius: var(--hk-radius);
    transition: background var(--hk-transition);
}

.hk-products-button:hover,
.hk-products-button:focus {
    background: var(--hk-primary-hover);
    color: #ffffff;
    text-decoration: none;
}

/* ---- Error / Empty State ---- */
.hk-no-products,
.hk-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--hk-text-light);
    font-style: italic;
}

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

@media (max-width: 768px) {
    .hk-columns-3,
    .hk-columns-4,
    .hk-columns-5,
    .hk-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hk-product-info {
        padding: 12px;
    }

    .hk-product-title {
        font-size: 0.875em;
    }

    .hk-product-price {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .hk-product-grid {
        gap: 16px;
    }

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