/**
 * Werkking Category Grid v2.2
 * Full-width sections, content max 1600px
 * Overrides Astra container limits
 */

/* === ASTRA OVERRIDES === */
.wk-category-page .ast-container,
.tax-product_cat .ast-container,
.tax-product_cat .site-content > .ast-container {
    max-width: 100% !important;
    padding: 0 !important;
}

/* === RESET === */
.wk-category-page {
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
}

.wk-category-page *,
.wk-category-page *::before,
.wk-category-page *::after {
    box-sizing: border-box;
}

/* === CONTAINER (no padding on desktop - matches header) === */
.wk-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

/* === HERO (clean, on-brand) === */
.wk-cat-hero {
    padding: 24px 0 20px;
    background: #fff;
    color: #1e293b;
    border-bottom: 1px solid #e5e7eb;
}

.wk-breadcrumb {
    font-size: 13px;
    margin-bottom: 6px;
    color: #94a3b8;
}

.wk-breadcrumb a {
    color: #ea580c;
    text-decoration: none;
}

.wk-breadcrumb a:hover {
    text-decoration: underline;
}

.wk-sep {
    margin: 0 6px;
    color: #cbd5e1;
}

.wk-cat-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 4px;
    line-height: 1.2;
    color: #0f172a;
}

.wk-cat-count {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* === SUBCATEGORIES === */
.wk-subcats-section {
    padding: 24px 0 28px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.wk-subcats-title {
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wk-subcats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.wk-subcat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #1e293b;
    font-size: 14px;
    transition: all 0.15s;
}

.wk-subcat-card:hover {
    border-color: #ea580c;
    color: #ea580c;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.12);
}

.wk-subcat-card img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.wk-subcat-icon {
    font-size: 20px;
    line-height: 1;
}

.wk-subcat-info {
    display: flex;
    flex-direction: column;
}

.wk-subcat-name {
    font-weight: 600;
    line-height: 1.2;
}

.wk-subcat-count {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 400;
}

/* === PRODUCT GRID === */
.wk-products-section {
    padding: 32px 0 48px;
    background: #fff;
}

.wk-product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.wk-product-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.wk-product-card:hover {
    border-color: #ea580c;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Badges */
.wk-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #fff;
}

.badge-gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.badge-silver { background: linear-gradient(135deg, #6b7280, #4b5563); }
.badge-bronze { background: linear-gradient(135deg, #b45309, #92400e); }

.wk-discount {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #dc2626;
}

/* Card Image */
.wk-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #fafafa;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.wk-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

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

/* Card Body */
.wk-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wk-brand {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 2px;
}

.wk-card-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 6px;
    flex: 1;
}

.wk-card-title a {
    color: #111827;
    text-decoration: none;
}

.wk-card-title a:hover {
    color: #ea580c;
}

/* Star Rating (CSS-only) */
.wk-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.wk-stars {
    --percent: calc(var(--rating) / 5 * 100%);
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    letter-spacing: 1px;
}

.wk-stars::before {
    content: '\2605\2605\2605\2605\2605';
    background: linear-gradient(90deg, #f59e0b var(--percent), #d1d5db var(--percent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wk-review-count {
    font-size: 11px;
    color: #6b7280;
}

/* Price */
.wk-card-price {
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.wk-price-current {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.wk-price-old {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
}

/* CTA Button */
.wk-card-cta {
    display: block;
    text-align: center;
    padding: 8px 12px;
    background: #ea580c;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
    margin-top: auto;
}

.wk-card-cta:hover {
    background: #c2410c;
    color: #fff !important;
}

/* === PAGINATION === */
.wk-pagination {
    text-align: center;
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.wk-pagination a,
.wk-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all 0.15s;
}

.wk-pagination a:hover {
    border-color: #ea580c;
    color: #ea580c;
    background: #fff7ed;
}

.wk-pagination .current {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.wk-pagination .dots {
    border: none;
    color: #9ca3af;
}

/* === RELATED CATEGORIES === */
.wk-related-section {
    padding: 32px 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.wk-related-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1e293b;
}

.wk-related-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wk-related-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.15s;
}

.wk-related-link:hover {
    border-color: #ea580c;
    color: #ea580c;
}

.wk-related-count {
    font-size: 11px;
    color: #94a3b8;
}

/* === SEO TEXT SECTION (below products) === */
.wk-seo-section {
    padding: 48px 0 56px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.wk-seo-content {
    color: #374151;
    font-size: 16px;
    line-height: 1.8;
}

.wk-seo-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 32px 0 12px;
    line-height: 1.3;
}

.wk-seo-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 24px 0 8px;
    line-height: 1.3;
}

.wk-seo-content p {
    margin: 0 0 16px;
}

.wk-seo-content a {
    color: #ea580c;
    text-decoration: none;
    font-weight: 500;
}

.wk-seo-content a:hover {
    text-decoration: underline;
}

.wk-seo-content ul {
    margin: 0 0 16px;
    padding: 0 0 0 20px;
}

.wk-seo-content ul li {
    margin-bottom: 6px;
    line-height: 1.6;
}

.wk-seo-content strong {
    color: #0f172a;
}

/* === GUIDE SECTION (details open / expandable) === */
.wk-seo-content details.wk-guide {
    background: #fff7ed;
    border: 2px solid #ea580c;
    border-radius: 12px;
    padding: 0;
    margin: 0 0 32px;
    overflow: hidden;
}

.wk-seo-content details.wk-guide > summary {
    padding: 16px 20px;
    font-size: 18px;
    cursor: pointer;
    list-style: none;
    background: #ea580c;
    color: #fff;
}

.wk-seo-content details.wk-guide > summary::-webkit-details-marker {
    display: none;
}

.wk-seo-content details.wk-guide > summary strong {
    color: #fff;
}

.wk-seo-content details.wk-guide > p,
.wk-seo-content details.wk-guide > h3,
.wk-seo-content details.wk-guide > ul {
    padding: 0 20px;
}

.wk-seo-content details.wk-guide > p:first-of-type {
    padding-top: 16px;
}

.wk-seo-content details.wk-guide > ul {
    padding-left: 36px;
}

/* === FAQ STYLING === */
/* FAQs: 2-column layout on desktop */
.wk-seo-content .wk-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
    margin-bottom: 24px;
}

/* Mobile: show first 5, rest behind "Weiterlesen" */
.wk-faq-more {
    display: none;
}

@media (max-width: 768px) {
    .wk-seo-content .wk-faq-grid {
        grid-template-columns: 1fr;
    }
    .wk-faq-more {
        display: block;
    }
    .wk-faq-more summary {
        cursor: pointer;
        font-size: 15px;
        font-weight: 600;
        color: #ea580c;
        list-style: none;
        padding: 12px 0;
    }
    .wk-faq-more summary::-webkit-details-marker { display: none; }
}

.wk-seo-content details.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    background: #fff;
}

.wk-seo-content details.faq-item[open] {
    border-color: #ea580c;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.08);
}

.wk-seo-content summary.faq-question {
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    transition: background 0.15s;
}

.wk-seo-content summary.faq-question:hover {
    background: #f1f5f9;
}

.wk-seo-content summary.faq-question::-webkit-details-marker {
    display: none;
}

.wk-seo-content summary.faq-question::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: #94a3b8;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
}

.wk-seo-content details.faq-item[open] summary.faq-question::after {
    content: '-';
    color: #ea580c;
}

.wk-seo-content .faq-answer {
    padding: 14px 18px 16px;
    color: #475569;
    font-size: 15px;
    line-height: 1.7;
}

/* === INLINE SHOWCASE SHORTCODES (inside SEO text) === */
.wk-inline-showcase {
    margin: 24px 0 32px;
}

.wk-inline-showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 12px;
}

.wk-inline-brand-grid {
    grid-template-columns: repeat(3, 1fr);
}

.wk-inline-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.wk-inline-card:hover {
    border-color: #ea580c;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.wk-inline-card img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 8px;
}

.wk-inline-brand {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.wk-inline-name {
    font-size: 12px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.3;
    margin: 2px 0;
}

.wk-inline-stars {
    --percent: calc(var(--rating) / 5 * 100%);
    display: inline-block;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 1px;
}

.wk-inline-stars::before {
    content: '\2605\2605\2605\2605\2605';
    background: linear-gradient(90deg, #f59e0b var(--percent), #d1d5db var(--percent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wk-inline-price {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 4px 0;
}

.wk-inline-cta {
    font-size: 11px;
    font-weight: 600;
    color: #ea580c;
    margin-top: 4px;
}

.wk-inline-more {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #ea580c;
    text-decoration: none;
}

.wk-inline-more:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .wk-inline-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .wk-inline-brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === SUBCATEGORY SHOWCASES === */
.wk-showcase-section {
    padding: 36px 0;
    border-top: 1px solid #f1f5f9;
}

.wk-showcase-section:nth-child(odd) {
    background: #f8fafc;
}

.wk-showcase-header {
    margin-bottom: 20px;
}

.wk-showcase-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #0f172a;
}

.wk-showcase-title a {
    color: #0f172a;
    text-decoration: none;
}

.wk-showcase-title a:hover {
    color: #ea580c;
}

.wk-showcase-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 8px;
    line-height: 1.5;
}

.wk-showcase-link {
    font-size: 14px;
    font-weight: 600;
    color: #ea580c;
    text-decoration: none;
}

.wk-showcase-link:hover {
    text-decoration: underline;
}

.wk-showcase-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.wk-showcase-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}

.wk-showcase-card:hover {
    border-color: #ea580c;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.wk-showcase-card img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
}

.wk-showcase-brand {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.wk-showcase-name {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.3;
    margin: 4px 0;
}

.wk-showcase-price {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 4px;
}

/* === TOP BRANDS === */
.wk-brands-section {
    padding: 40px 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.wk-brands-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 24px;
}

.wk-brands-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.wk-brand-block {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.wk-brand-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}

.wk-brand-name {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.wk-brand-count {
    font-size: 12px;
    color: #94a3b8;
}

.wk-brand-products {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.wk-brand-product {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s;
}

.wk-brand-product:hover {
    border-color: #ea580c;
}

.wk-brand-product img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 6px;
}

.wk-bp-price {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.wk-brand-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #ea580c;
    text-decoration: none;
}

.wk-brand-link:hover {
    text-decoration: underline;
}

/* === USER REVIEWS SLIDER === */
.wk-reviews-section {
    padding: 40px 0 48px;
    background: #0f172a;
    color: #fff;
}

.wk-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.wk-reviews-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.wk-reviews-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

.wk-slider-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.wk-slider-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.wk-slider-btn:hover {
    background: #ea580c;
    border-color: #ea580c;
}

.wk-reviews-slider {
    overflow: hidden;
}

.wk-reviews-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 16px;
    transition: transform 0.5s ease;
    grid-auto-flow: column;
}

/* Each "page" is 6 cards (3 cols x 2 rows). Track width = pages * 100% */
.wk-reviews-track {
    width: 300%; /* 3 pages */
    display: grid;
    grid-template-columns: repeat(9, 1fr); /* 3 pages x 3 cols */
    grid-template-rows: repeat(2, auto);
    gap: 16px;
    transition: transform 0.5s ease;
}

.wk-review-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.wk-review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.wk-review-stars {
    --percent: calc(var(--rating) / 5 * 100%);
    display: inline-block;
    font-size: 16px;
    line-height: 1;
    letter-spacing: 2px;
}

.wk-review-stars::before {
    content: '\2605\2605\2605\2605\2605';
    background: linear-gradient(90deg, #f59e0b var(--percent), #475569 var(--percent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wk-review-author {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

.wk-review-text {
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e1;
    margin: 0 0 12px;
    flex: 1;
}

.wk-review-product-link {
    font-size: 12px;
    color: #ea580c;
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
}

.wk-review-product-link:hover {
    text-decoration: underline;
    color: #fb923c;
}

@media (max-width: 1024px) {
    .wk-review-card {
        min-width: calc(50% - 8px);
    }
}

@media (max-width: 768px) {
    .wk-review-card {
        min-width: 100%;
    }
    .wk-reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* === SECOND DESCRIPTION === */
.wk-second-desc {
    padding: 32px 0 48px;
    border-top: 1px solid #e2e8f0;
}

.wk-second-desc h2,
.wk-second-desc h3 {
    color: #1e293b;
}

.wk-second-desc p {
    color: #475569;
    line-height: 1.7;
}

.wk-no-products {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
}

/* === RESPONSIVE === */
@media (max-width: 1400px) {
    .wk-product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .wk-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .wk-container {
        padding: 0 24px;
    }
}

@media (max-width: 1024px) {
    .wk-showcase-products {
        grid-template-columns: repeat(2, 1fr);
    }
    .wk-brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wk-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .wk-cat-hero {
        padding: 20px 0 16px;
    }
    .wk-cat-title {
        font-size: 22px;
    }
    .wk-card-body {
        padding: 10px;
    }
    .wk-card-title {
        font-size: 12px;
    }
    .wk-price-current {
        font-size: 16px;
    }
    .wk-container {
        padding: 0 16px;
    }
    .wk-seo-content {
        font-size: 15px;
    }
    .wk-seo-content h2 {
        font-size: 19px;
    }
    .wk-showcase-products {
        grid-template-columns: repeat(2, 1fr);
    }
    .wk-brands-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .wk-product-grid {
        gap: 8px;
    }
    .wk-card-image {
        padding: 10px;
    }
    .wk-card-cta {
        font-size: 11px;
        padding: 7px 10px;
    }
}
