/**
 * Arman_BandenTop   Stylesheet
 * Huisstijl: banden-kopen.nl
 * Primair:   #21314b  |  Accent: #EF5B33  |  Border-radius: 6-10px
 */

/* ============================================================
   CSS Custom Properties
   ============================================================ */
.bandentop-widget {
    --bt-primary:       #21314b;
    --bt-primary-dark:  #162338;
    --bt-accent:        #EF5B33;
    --bt-accent-hover:  #d44e2a;
    --bt-bg:            #ffffff;
    --bt-bg-light:      #f8f9fb;
    --bt-border:        #e0e6ee;
    --bt-border-light:  #edf0f4;
    --bt-text:          #21314b;
    --bt-text-muted:    #888888;
    --bt-text-light:    #aaaaaa;
    --bt-radius:        10px;
    --bt-radius-sm:     6px;
    --bt-shadow:        0 2px 8px rgba(0, 0, 0, 0.07);
    --bt-shadow-hover:  0 12px 36px rgba(33, 49, 75, 0.18), 0 0 0 2px #21314b;
    --bt-font-sm:       11px;
    --bt-font-base:     13px;
    --bt-font-md:       14px;
    --bt-font-title:    15px;
}

/* ============================================================
   Widget wrapper
   ============================================================ */
.bandentop-widget {
    background: var(--bt-bg);
    border: 1px solid var(--bt-border);
    border-radius: var(--bt-radius);
    box-shadow: var(--bt-shadow);
    padding: 28px;
    margin: 32px 0;
    box-sizing: border-box;
    font-family: inherit;
    color: var(--bt-text);
}

/* ============================================================
   Header
   ============================================================ */
.bandentop-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bt-border-light);
}

.bandentop-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--bt-primary);
    margin: 0 0 4px;
    line-height: 1.2;
}

/* ============================================================
   Kolommen layout (default)
   ============================================================ */
.bandentop-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.bandentop-column {
    background: var(--bt-bg-light);
    border: 1px solid var(--bt-border);
    border-radius: var(--bt-radius-sm);
    padding: 18px;
    box-sizing: border-box;
    transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.bandentop-column:hover {
    box-shadow: 0 6px 20px rgba(33, 49, 75, 0.12);
    border-color: var(--bt-primary);
    transform: translateY(-2px);
}

/* ============================================================
   Seizoen titels
   ============================================================ */
.bandentop-season-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: var(--bt-font-title);
    font-weight: 700;
    color: var(--bt-primary);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bt-border);
}

/* Seizoen kleur-accent op de onderlijn */
.bandentop-column:has(.bandentop-season-zomer) .bandentop-season-title      { border-bottom-color: #f5a623; }
.bandentop-column:has(.bandentop-season-winter) .bandentop-season-title      { border-bottom-color: #3b82f6; }
.bandentop-column:has(.bandentop-season-all-season) .bandentop-season-title  { border-bottom-color: #1e8a4c; }

/* Seizoen iconen via Font Awesome */
.bandentop-season-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 13px;
    flex-shrink: 0;
}

.bandentop-season-zomer {
    background: rgba(245, 166, 35, 0.12);
    color: #e07b00;
}
.bandentop-season-winter {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}
.bandentop-season-all-season {
    background: rgba(30, 138, 76, 0.12);
    color: #16a34a;
}

/* ============================================================
   Lijst items
   ============================================================ */
.bandentop-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bandentop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--bt-border-light);
    transition: background 0.15s ease, padding-left 0.15s ease;
    border-radius: 4px;
}

.bandentop-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bandentop-item:hover {
    background: rgba(33, 49, 75, 0.04);
    padding-left: 5px;
}

/* Rang badges */
.bandentop-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid var(--bt-border);
    background: var(--bt-bg-light);
    color: var(--bt-primary);
}

/* Goud / zilver / brons */
.bandentop-item:nth-child(1) .bandentop-rank {
    background: #fef3c7;
    border-color: #f5a623;
    color: #92400e;
}
.bandentop-item:nth-child(2) .bandentop-rank {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #374151;
}
.bandentop-item:nth-child(3) .bandentop-rank {
    background: #fdf2e9;
    border-color: #d4905a;
    color: #7c3c21;
}

/* Product links */
.bandentop-product-link {
    flex: 1;
    color: var(--bt-primary);
    text-decoration: none;
    font-size: var(--bt-font-base);
    font-weight: 500;
    line-height: 1.35;
    transition: color 0.15s ease;
}

.bandentop-product-link:visited {
    color: var(--bt-primary);
}

.bandentop-product-link:hover {
    color: var(--bt-accent);
    text-decoration: underline;
}

/* ============================================================
   Tabs layout
   ============================================================ */
.bandentop-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.bandentop-tab-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 2px solid var(--bt-primary);
    border-radius: var(--bt-radius-sm);
    padding: 10px 20px;
    font-size: var(--bt-font-md);
    font-weight: 500;
    background: var(--bt-bg);
    color: var(--bt-primary);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    white-space: nowrap;
}

.bandentop-tab-btn:hover,
.bandentop-tab-btn.active:hover {
    background: var(--bt-accent) !important;
    border-color: var(--bt-accent) !important;
    color: #fff !important;
}

.bandentop-tab-btn.active {
    background: var(--bt-primary);
    border-color: var(--bt-primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(33, 49, 75, 0.3);
}

.bandentop-tab-count {
    font-size: var(--bt-font-sm);
    opacity: 0.7;
}

.bandentop-tab-panel { display: none; }
.bandentop-tab-panel.active { display: block; }

/* ============================================================
   Lijst layout
   ============================================================ */
.bandentop-list-section {
    margin-bottom: 24px;
}
.bandentop-list-section:last-child {
    margin-bottom: 0;
}

/* ============================================================
   Footer / Disclaimer
   ============================================================ */
.bandentop-footer {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid var(--bt-border-light);
}

.bandentop-disclaimer {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--bt-font-sm);
    color: var(--bt-text-muted);
    cursor: help;
}

.bandentop-disclaimer-icon {
    display: flex;
    align-items: center;
    color: var(--bt-primary);
    opacity: 0.5;
    flex-shrink: 0;
}

.bandentop-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: var(--bt-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: var(--bt-radius-sm);
    min-width: 200px;
    width: max-content;
    max-width: 280px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    white-space: normal;
}

.bandentop-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 14px;
    border: 6px solid transparent;
    border-top-color: var(--bt-primary);
}

.bandentop-disclaimer:hover .bandentop-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .bandentop-widget {
        padding: 18px 14px;
        margin: 20px 0;
    }

    .bandentop-columns {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bandentop-tab-btn {
        padding: 8px 14px;
        font-size: var(--bt-font-base);
    }

    .bandentop-tooltip {
        left: auto;
        right: 0;
        min-width: 180px;
    }

    .bandentop-tooltip::after {
        left: auto;
        right: 14px;
    }
}

@media (max-width: 480px) {
    .bandentop-tabs-nav {
        gap: 6px;
    }

    .bandentop-tab-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .bandentop-title {
        font-size: 17px;
    }
}
/* ============================================================
   Seizoen highlight (PDP – actief seizoen)
   ============================================================ */

/* Kolom-highlight voor het huidig product-seizoen */
.bandentop-column--active {
    position: relative;
    border-color: var(--bt-primary) !important;
    box-shadow: 0 0 0 2px rgba(33, 49, 75, 0.12), 0 4px 16px rgba(33, 49, 75, 0.10) !important;
    background: linear-gradient(160deg, #f0f4fa 0%, var(--bt-bg-light) 100%) !important;
}

.bandentop-column--active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--bt-radius-sm);
    border: 2px solid var(--bt-primary);
    pointer-events: none;
}

/* Badge "Huidig seizoen" bovenin de actieve kolom */
.bandentop-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--bt-primary);
    background: rgba(33, 49, 75, 0.07);
    border: 1px solid rgba(33, 49, 75, 0.18);
    border-radius: 20px;
    padding: 3px 10px 3px 6px;
    margin-bottom: 10px;
}

.bandentop-active-badge svg {
    color: var(--bt-primary);
    flex-shrink: 0;
}

/* Inline "huidig seizoen" label in list-layout */
.bandentop-active-inline {
    font-size: 10px;
    font-weight: 600;
    color: var(--bt-primary);
    background: rgba(33, 49, 75, 0.07);
    border-radius: 20px;
    padding: 2px 8px;
    margin-left: 6px;
    white-space: nowrap;
}

/* List-sectie highlight */
.bandentop-list-section--active {
    border-left: 3px solid var(--bt-primary);
    padding-left: 14px;
    margin-left: -3px;
}

/* Tab met actief-seizoen dot indicator */
.bandentop-tab-btn--season-active {
    position: relative;
}

.bandentop-tab-active-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bt-accent);
    margin-left: 4px;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Tab panel header (toont SEO-titel inclusief merk) */
.bandentop-tab-panel-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bt-border-light);
}

.bandentop-tab-panel-title {
    font-size: var(--bt-font-title);
    font-weight: 700;
    color: var(--bt-primary);
}

/* ============================================================
   "Bekijk alle [seizoen]banden" categorie-link
   ============================================================ */
.bandentop-category-link-wrap {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--bt-border-light);
}

.bandentop-category-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--bt-font-sm);
    font-weight: 600;
    color: var(--bt-primary);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.18s ease, gap 0.18s ease;
}

.bandentop-category-link svg {
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.bandentop-category-link:hover {
    color: var(--bt-accent);
    gap: 8px;
    text-decoration: none;
}

.bandentop-category-link:hover svg {
    transform: translateX(3px);
}

/* ============================================================
   Seizoen kleur-accenten per kolom (ook in tabs)
   ============================================================ */
.bandentop-column--zomer .bandentop-season-title      { border-bottom-color: #f5a623; }
.bandentop-column--winter .bandentop-season-title     { border-bottom-color: #3b82f6; }
.bandentop-column--all-season .bandentop-season-title { border-bottom-color: #1e8a4c; }

/* Bijpassende actieve-state kleuren per seizoen */
.bandentop-column--zomer.bandentop-column--active      { border-color: #f5a623 !important; }
.bandentop-column--winter.bandentop-column--active     { border-color: #3b82f6 !important; }
.bandentop-column--all-season.bandentop-column--active { border-color: #1e8a4c !important; }

.bandentop-column--zomer.bandentop-column--active .bandentop-active-badge      { color: #92400e; background: rgba(245,166,35,0.10); border-color: rgba(245,166,35,0.3); }
.bandentop-column--winter.bandentop-column--active .bandentop-active-badge     { color: #1e3a8a; background: rgba(59,130,246,0.10); border-color: rgba(59,130,246,0.3); }
.bandentop-column--all-season.bandentop-column--active .bandentop-active-badge { color: #14532d; background: rgba(30,138,76,0.10); border-color: rgba(30,138,76,0.3); }

/* Product count badge */
.bandentop-product-count {
    font-size: var(--bt-font-sm);
    color: var(--bt-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================
   Max-items admin veld: voeg Top 10 toe aan MaxItems source
   ============================================================ */
/* (Wordt afgehandeld in MaxItems.php – zie model) */