.eqo-nutrition,
.eqo-ranking,
.eqo-badges {
    box-sizing: border-box;
    font-family: Lato, Arial, sans-serif;
}

.eqo-nutrition *,
.eqo-ranking *,
.eqo-badges * {
    box-sizing: border-box;
}

.eqo-nutrition {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 15px;
}

.eqo-nutrition-title {
    margin: 0;
    color: #8cc63f;
    font-size: clamp(32px, 5vw, 42px);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.eqo-nutrition-subtitle {
    margin: 6px 0 14px;
    color: #666;
    text-align: center;
}

.eqo-nutrition-subtitle span {
    color: #999;
    font-size: 14px;
}

.eqo-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 30px;
}

.eqo-nutrition-item-full {
    grid-column: span 2;
}

.eqo-nutrition-label {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    color: #7c9f2f;
    font-size: 15px;
    font-weight: 600;
}

.eqo-nutrition-label-warning {
    color: #c8a100;
}

.eqo-nutrition-label-link {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}

.eqo-nutrition-label-link:hover {
    text-decoration: underline;
}

.eqo-nutrition-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
}

.eqo-nutrition-icon img {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.eqo-nutrition-meta {
    display: inline-flex;
    margin-left: auto;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
}

.eqo-progress {
    position: relative;
    height: 26px;
    margin: 5px 0 10px;
    overflow: hidden;
    border-radius: 3px;
    background: #ddd;
}

.eqo-progress-fill {
    position: relative;
    width: 0;
    height: 100%;
    background: #8cc63f;
    transition: width 1.2s ease-out;
}

.eqo-progress-fill::after {
    content: attr(data-value) "%";
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    color: #000;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.eqo-nutrition-note {
    margin: 10px 0 0;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.eqo-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.eqo-badges-compact {
    margin: 6px 0;
    gap: 5px;
}

.eqo-badge-link {
    display: inline-flex;
    color: inherit;
    text-decoration: none;
}

.eqo-badge-link:hover {
    text-decoration: none;
    filter: brightness(.98);
}

.eqo-badge {
    display: inline-flex;
    min-height: 22px;
    padding: 3px 9px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.eqo-badges:not(.eqo-badges-compact) .eqo-badge {
    min-height: 28px;
    padding: 5px 12px;
    font-size: 12px;
}

.eqo-badge-gold {
    border-color: #d4af37;
    background: linear-gradient(180deg, #fff7d6 0%, #f4d87a 100%);
    color: #6b4f00;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 2px rgba(0,0,0,.06);
}

.eqo-badge-silver {
    border-color: #c5ccd6;
    background: linear-gradient(180deg, #f8fafc 0%, #dfe4ea 100%);
    color: #4b5563;
}

.eqo-badge-bronze {
    border-color: #b98152;
    background: linear-gradient(180deg, #f7ebe3 0%, #d6a77a 100%);
    color: #6f3f1c;
}

.eqo-badge-danger {
    border-color: #e5a7a7;
    background: #fff0f0;
    color: #9f2525;
}

.eqo-tooltip {
    position: relative;
}

.eqo-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 9999;
    bottom: calc(100% + 9px);
    left: 50%;
    width: max-content;
    max-width: min(260px, 80vw);
    padding: 8px 10px;
    transform: translateX(-50%);
    border-radius: 9px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}

.eqo-tooltip:hover::after,
.eqo-tooltip:focus-visible::after {
    opacity: 1;
}

.eqo-info {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border: 1px solid #9ca3af;
    border-radius: 50%;
    color: #6b7280;
    font-family: Georgia, serif;
    font-size: 12px;
    font-weight: 700;
    cursor: help;
}

.eqo-message {
    padding: 10px 12px;
    border-left: 4px solid #8cc63f;
    background: #f7faf3;
}

.eqo-message-error {
    border-left-color: #b91c1c;
    background: #fff5f5;
    color: #7f1d1d;
}

.eqo-ranking {
    max-width: 1000px;
    margin: 24px auto;
}

.eqo-ranking-head {
    margin-bottom: 18px;
}

.eqo-ranking-head h2 {
    margin-bottom: 6px;
}

.eqo-ranking-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 12px;
}

.eqo-ranking-card {
    display: flex;
    min-width: 0;
    padding: 14px;
    align-items: center;
    gap: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.04);
}

.eqo-ranking-image {
    width: 90px;
    height: 90px;
    flex: 0 0 90px;
    overflow: hidden;
    border-radius: 10px;
    background: #f3f4f6;
}

.eqo-ranking-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eqo-ranking-body {
    min-width: 0;
}

.eqo-ranking-body h3 {
    margin: 2px 0 5px;
    font-size: 20px;
}

.eqo-ranking-position {
    color: #8cc63f;
    font-size: 14px;
    font-weight: 800;
}

.eqo-ranking-value {
    margin-bottom: 8px;
    color: #4b5563;
}

@media (max-width: 768px) {
    .eqo-nutrition-grid {
        grid-template-columns: 1fr;
    }

    .eqo-nutrition-item-full {
        grid-column: span 1;
    }

    .eqo-nutrition-label {
        flex-wrap: wrap;
    }

    .eqo-nutrition-meta {
        width: 100%;
        margin-left: 26px;
    }

    .eqo-ranking-card {
        align-items: flex-start;
    }

    .eqo-ranking-image {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }
}

/* ==========================================================
   Ranking product cards — v0.1.3
   ========================================================== */
.eqo-ranking {
    --eqo-green: #8cc63f;
    --eqo-green-dark: #668f2c;
    --eqo-border: #e5e7eb;
    --eqo-muted: #6b7280;
    max-width: 1120px;
    padding: 0 15px;
}

.eqo-ranking-head {
    margin-bottom: 22px;
    padding: 20px 22px;
    border: 1px solid #e8ecdF;
    border-radius: 18px;
    background: linear-gradient(135deg, #fbfff7 0%, #f5f9ef 100%);
}

.eqo-ranking-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.eqo-ranking-eyebrow {
    margin: 0 0 4px;
    color: var(--eqo-green-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.eqo-ranking-head h2 {
    margin: 0;
    color: #263018;
    font-size: clamp(27px, 4vw, 38px);
    line-height: 1.15;
}

.eqo-ranking-description {
    max-width: 760px;
    margin: 10px 0 0;
    color: #596151;
    line-height: 1.55;
}

.eqo-ranking-count {
    display: inline-flex;
    min-height: 32px;
    padding: 5px 11px;
    align-items: center;
    border: 1px solid #dbe7cb;
    border-radius: 999px;
    background: #fff;
    color: #52633b;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.eqo-ranking-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.eqo-ranking-card {
    position: relative;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    min-height: 190px;
    padding: 16px;
    align-items: stretch;
    gap: 16px;
    overflow: hidden;
    border: 1px solid var(--eqo-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 41, 55, .06);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.eqo-ranking-card:hover {
    transform: translateY(-2px);
    border-color: #cfd8c3;
    box-shadow: 0 14px 32px rgba(31, 41, 55, .10);
}

.eqo-ranking-position {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    display: inline-flex;
    min-width: 40px;
    height: 40px;
    padding: 0 9px;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 13px;
    background: var(--eqo-green);
    color: #fff;
    box-shadow: 0 4px 12px rgba(76, 105, 36, .24);
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.eqo-ranking-position-hash {
    margin-right: 1px;
    font-size: 11px;
    opacity: .8;
}

.eqo-ranking-card-place-1 .eqo-ranking-position {
    background: linear-gradient(145deg, #d4af37, #a77b00);
}

.eqo-ranking-card-place-2 .eqo-ranking-position {
    background: linear-gradient(145deg, #aeb6c2, #6f7885);
}

.eqo-ranking-card-place-3 .eqo-ranking-position {
    background: linear-gradient(145deg, #c48755, #87502d);
}

.eqo-ranking-image {
    width: 118px;
    height: 100%;
    min-height: 158px;
    border-radius: 14px;
    background: #f4f6f1;
}

.eqo-ranking-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.eqo-ranking-image img {
    transition: transform .25s ease;
}

.eqo-ranking-card:hover .eqo-ranking-image img {
    transform: scale(1.035);
}

.eqo-ranking-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 25% 20%, rgba(255,255,255,.9), transparent 30%),
        linear-gradient(145deg, #eef5e6, #dbe8cc);
    color: #71943f;
    font-size: 48px;
    font-weight: 800;
    text-transform: uppercase;
}

.eqo-ranking-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.eqo-ranking-card-topline {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.eqo-ranking-weight {
    color: var(--eqo-muted);
    font-size: 12px;
    white-space: nowrap;
}

.eqo-ranking-product-title {
    margin: 9px 0 11px !important;
    font-size: 20px !important;
    line-height: 1.25;
}

.eqo-ranking-product-title a {
    color: #202719;
    text-decoration: none;
}

.eqo-ranking-product-title a:hover {
    color: var(--eqo-green-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.eqo-ranking-metric {
    display: flex;
    margin-bottom: 14px;
    align-items: center;
    gap: 9px;
}

.eqo-ranking-metric-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    padding: 6px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f1f6ea;
}

.eqo-ranking-metric-icon img {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.eqo-ranking-metric-label {
    display: block;
    color: var(--eqo-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.1;
    text-transform: uppercase;
}

.eqo-ranking-value {
    display: inline;
    margin: 0;
    color: #253014;
    font-size: 20px;
    font-weight: 800;
}

.eqo-ranking-per {
    margin-left: 3px;
    color: var(--eqo-muted);
    font-size: 11px;
}

.eqo-ranking-card-footer {
    display: flex;
    margin-top: auto;
    padding-top: 11px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #eef0ec;
}

.eqo-ranking-category {
    max-width: 48%;
    overflow: hidden;
    color: var(--eqo-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eqo-ranking-button {
    display: inline-flex;
    min-height: 32px;
    padding: 6px 11px;
    align-items: center;
    gap: 5px;
    border-radius: 9px;
    background: var(--eqo-green);
    color: #fff !important;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    transition: background .15s ease, transform .15s ease;
}

.eqo-ranking-button:hover {
    transform: translateX(1px);
    background: #78ad32;
}

.eqo-ranking-unlinked {
    color: #9ca3af;
    font-size: 11px;
    font-style: italic;
}

@media (max-width: 900px) {
    .eqo-ranking-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .eqo-ranking {
        padding: 0 10px;
    }

    .eqo-ranking-head {
        padding: 17px;
    }

    .eqo-ranking-heading-row {
        display: block;
    }

    .eqo-ranking-count {
        margin-top: 10px;
    }

    .eqo-ranking-card {
        grid-template-columns: 88px minmax(0, 1fr);
        min-height: 160px;
        padding: 12px;
        gap: 12px;
        border-radius: 15px;
    }

    .eqo-ranking-image {
        width: 88px;
        min-height: 136px;
    }

    .eqo-ranking-position {
        top: 7px;
        left: 7px;
        min-width: 34px;
        height: 34px;
        border-radius: 11px;
        font-size: 14px;
    }

    .eqo-ranking-card-topline {
        align-items: flex-start;
    }

    .eqo-ranking-product-title {
        margin: 7px 0 9px !important;
        font-size: 17px !important;
    }

    .eqo-ranking-metric-icon {
        width: 29px;
        height: 29px;
        flex-basis: 29px;
    }

    .eqo-ranking-value {
        font-size: 17px;
    }

    .eqo-ranking-category,
    .eqo-ranking-unlinked {
        display: none;
    }

    .eqo-ranking-card-footer {
        justify-content: flex-end;
    }
}

/* Virtual product page: /{EAN}/ */
.eqo-product-page {
    width: 100%;
    padding: 32px 18px 56px;
    box-sizing: border-box;
}

.eqo-product-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.eqo-product-hero {
    display: grid;
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    margin-bottom: 34px;
    padding: 26px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.eqo-product-hero-image {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    background: #f5f7f2;
}

.eqo-product-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.eqo-product-category {
    margin: 0 0 7px;
    color: #7c9f2f;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.eqo-product-hero h1 {
    margin: 0 0 14px;
    color: #1f2937;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.08;
}

.eqo-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
}

.eqo-product-nutrition-wrap {
    padding: 10px 0;
}

@media (max-width: 760px) {
    .eqo-product-page {
        padding: 20px 12px 40px;
    }

    .eqo-product-hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 18px;
    }

    .eqo-product-hero-image {
        max-height: 320px;
    }
}
