/* ========================================================================== 
   Czytamy Etykiety - Product Recommendation Cards
   Refactored: base -> shared components -> long template -> short template -> responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens and base scope
   -------------------------------------------------------------------------- */
.ce-product-card {
    --ce-color-ink: #053b37;
    --ce-color-muted: #484949;
    --ce-color-green: #55c89a;
    --ce-color-green-dark: #1c9a72;
    --ce-color-surface: #f0f0f1;
    --ce-color-surface-dark: #c0c0c1;
    --ce-color-border: #bfe9dc;
    --ce-color-border-strong: #84d9bf;
    --ce-color-white: #ffffff;
    --ce-color-danger: #ef6a4f;

    --ce-radius-sm: 10px;
    --ce-radius-md: 14px;
    --ce-radius-lg: 22px;
    --ce-radius-pill: 999px;

    --ce-focus-ring: 0 0 0 3px rgba(85, 200, 154, 0.35);

    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    color: var(--ce-color-ink);
    font-family: inherit;
}

.ce-product-card,
.ce-product-card * {
    box-sizing: border-box;
}

.ce-product-card img {
    display: block;
    max-width: 100%;
    height: auto;
}

.ce-product-card a {
    color: inherit;
    text-underline-offset: 0.18em;
}

.ce-product-card :focus-visible {
    outline: none;
    box-shadow: var(--ce-focus-ring);
}

/* --------------------------------------------------------------------------
   2. Shared small components
   -------------------------------------------------------------------------- */
.ce-product-card__image {
    position: relative;
    z-index: 1;
    width: auto;
    max-width: min(280px, 88%);
    max-height: 330px;
    border-radius: 10px;
    object-fit: contain;
    transform: none;
    filter: none;
}

.ce-product-card__badge,
.ce-product-card-short__badge {
    display: block;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.ce-product-card__badge::before,
.ce-product-card-short__badge::before {
    content: none;
}

.ce-product-card__badge img,
.ce-product-card-short__badge img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ce-product-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.72rem 1.35rem;
    border: 0;
    border-radius: var(--ce-radius-sm);
    background: var(--ce-color-green);
    color: var(--ce-color-white) !important;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.1;
    text-decoration: none;
    box-shadow: none;
    transition: background-color 160ms ease;
}

.ce-product-card__button:hover,
.ce-product-card__button:focus {
    color: var(--ce-color-ink);
    background: #3fb989;
    transform: none;
    box-shadow: none;
}

.ce-product-card__button--secondary {
    background: var(--ce-color-surface);
    color: var(--ce-color-ink) !important;
}

/* --------------------------------------------------------------------------
   3. Long template - hero
   -------------------------------------------------------------------------- */
.ce-product-card--long {
    isolation: isolate;
}

.ce-product-card__hero {
    overflow: hidden;
    border: 2px solid var(--ce-color-border);
    border-radius: var(--ce-radius-lg);
    background: var(--ce-color-white);
    box-shadow: none;
}

.ce-product-card__hero-main {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4.75rem);
    align-items: center;
    padding: clamp(2rem, 5vw, 4.5rem);
}

.ce-product-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.ce-product-card__intro {
    min-width: 0;
}

.ce-product-card__title {
    max-width: 760px;
    margin: 0;
    color: var(--ce-color-ink);
    font-size: clamp(2.65rem, 7vw, 5.7rem);
    font-weight: 900;
    line-height: 0.94;
    letter-spacing: -0.055em;
}

.ce-product-card__brand {
    margin: 0.35em 0 0.85em;
    color: var(--ce-color-green);
    font-size: clamp(1.65rem, 4.2vw, 3.6rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.045em;
}

.ce-product-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: clamp(1.5rem, 4vw, 2.8rem);
    color: var(--ce-color-muted);
    font-size: clamp(1rem, 1.7vw, 1.2rem);
    font-weight: 700;
}

.ce-product-card__meta-item,
.ce-product-card-short__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.ce-product-card__meta-item::before,
.ce-product-card-short__meta-item::before {
    display: none;
}

.ce-product-card__meta-item + .ce-product-card__meta-item::before,
.ce-product-card-short__meta-item + .ce-product-card-short__meta-item::before {
    content: "|";
    display: inline-block;
    width: auto;
    height: auto;
    margin: 0 0.85rem;
    background: transparent;
    color: var(--ce-color-muted);
    font-weight: 700;
}

.ce-product-card__meta a,
.ce-product-card-short__meta a {
    color: var(--ce-color-green-dark);
    font-weight: 800;
}

.ce-product-card__recommendation {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 92px;
    max-width: 720px;
    margin-left: 58px;
    padding: 14px 28px 14px 74px;
    border: 0;
    border-radius: 12px;
    background: var(--ce-color-surface);
    color: var(--ce-color-ink);
    box-shadow: none;
    overflow: visible;
}

.ce-product-card__badge {
    position: absolute;
    top: 50%;
    left: -58px;
    z-index: 2;
    width: 116px;
    height: 116px;
    transform: translateY(-50%);
}

.ce-product-card__recommendation strong {
    position: relative;
    z-index: 1;
    font-size: clamp(1.25rem, 3vw, 2.45rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.ce-product-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: clamp(1.5rem, 3vw, 2.2rem);
}

.ce-product-card__quote,
.ce-product-card-short__quote {
    position: relative;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    align-items: center;
    padding: clamp(1.65rem, 4vw, 3rem) clamp(2rem, 5vw, 4.5rem);
    border-top: 1px solid rgba(85, 200, 154, 0.22);
    background: var(--ce-color-surface);
}

.ce-product-card__quote::before,
.ce-product-card-short__quote::before {
    content: "";
    position: absolute;
    top: -34px;
    width: 70px;
    height: 34px;
    background: var(--ce-color-surface);
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.ce-product-card__quote::before {
    left: clamp(90px, 22vw, 250px);
}

.ce-product-card__quote-icon,
.ce-product-card-short__quote-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 85px;
    height: 85px;
    padding: 0;
    border-radius: 50%;
    background: var(--ce-color-green);
    color: var(--ce-color-white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 6rem;
    font-weight: 900;
    line-height: 1;
}

.ce-product-card__quote-icon::before,
.ce-product-card-short__quote-icon::before {
    content: "“";
    display: block;
    line-height: 1;
    transform: rotate(180deg) translateY(0.04em);
    transform-origin: center;
    padding-top: 35px;
}

.ce-product-card__quote p,
.ce-product-card-short__quote p {
    max-width: 820px;
    margin: 0;
    color: var(--ce-color-muted);
    font-size: clamp(1.05rem, 2vw, 1.55rem);
    font-weight: 600;
    line-height: 1.35;
}

/* --------------------------------------------------------------------------
   4. Shared long/short sections
   -------------------------------------------------------------------------- */
.ce-product-card__section,
.ce-product-card-short__section {
    margin-top: clamp(2.6rem, 5vw, 4.5rem);
}

.ce-product-card__section h2,
.ce-product-card-short__section h2 {
    margin: 0 0 clamp(1.2rem, 3vw, 2rem);
    color: var(--ce-color-ink);
    font-size: clamp(1.75rem, 3.6vw, 3rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.ce-product-card__section h2::after,
.ce-product-card-short__section h2::after {
    content: "";
    display: block;
    width: 72px;
    height: 5px;
    margin-top: 0.65rem;
    border-radius: var(--ce-radius-pill);
    background: var(--ce-color-green);
}

.ce-product-card__score-box,
.ce-product-card-short__score-box {
    display: grid;
    grid-template-columns: minmax(180px, 290px) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
    padding: clamp(1.6rem, 4vw, 3rem);
    border: 0;
    border-radius: var(--ce-radius-md);
    background: var(--ce-color-surface);
    box-shadow: none;
}

.ce-product-card__score,
.ce-product-card-short__score {
    position: relative;
    color: var(--ce-color-green);
}

.ce-product-card__score::after,
.ce-product-card-short__score::after {
    content: "";
    position: absolute;
    top: 8%;
    right: 0;
    width: 1px;
    height: 84%;
    background: rgba(85, 200, 154, 0.28);
}

.ce-product-card__score-value,
.ce-product-card-short__score-value {
    color: var(--ce-color-green);
    font-size: clamp(4.2rem, 10vw, 8.2rem);
    font-weight: 900;
    line-height: 0.82;
    letter-spacing: -0.08em;
}

.ce-product-card__score-max,
.ce-product-card-short__score-max {
    color: var(--ce-color-green);
    font-size: clamp(1.9rem, 4vw, 3.3rem);
    font-weight: 900;
    letter-spacing: -0.05em;
}

.ce-product-card__score strong,
.ce-product-card-short__score strong {
    display: block;
    padding-left: clamp(2rem, 5vw, 4rem);
    color: var(--ce-color-green-dark);
    font-size: clamp(1.05rem, 2vw, 1.55rem);
    font-weight: 800;
    line-height: 1;
}

.ce-product-card__score-description,
.ce-product-card-short__score-description {
    max-width: 720px;
    margin: 0;
    color: var(--ce-color-muted);
    font-size: clamp(1.05rem, 2vw, 1.32rem);
    font-weight: 500;
    line-height: 1.45;
}

/* --------------------------------------------------------------------------
   5. Long template - accordion criteria
   -------------------------------------------------------------------------- */
.ce-product-card__criteria {
    display: grid;
    gap: 0.9rem;
}

.ce-product-card__criterion {
    overflow: hidden;
    border: 2px solid var(--ce-color-border);
    border-radius: var(--ce-radius-md);
    background: var(--ce-color-white);
    box-shadow: none;
}

.ce-product-card__criterion[open] {
    border-color: var(--ce-color-border-strong);
}

.ce-product-card__criterion-summary {
    display: grid;
    grid-template-columns: 42px minmax(180px, 0.9fr) auto minmax(160px, 1fr) 28px;
    gap: clamp(0.75rem, 2vw, 1.2rem);
    align-items: center;
    padding: clamp(0.95rem, 2vw, 1.25rem);
    background: var(--ce-color-white);
    cursor: pointer;
    list-style: none;
}

.ce-product-card__criterion-summary::-webkit-details-marker {
    display: none;
}

.ce-product-card__criterion-summary::after {
    content: "›";
    grid-column: 5;
    color: #b7c8c4;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform 160ms ease;
}

.ce-product-card__criterion[open] .ce-product-card__criterion-summary::after {
    transform: rotate(-90deg);
}

.ce-product-card__criterion-icon,
.ce-product-card-short__criterion-icon {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ce-color-green);
}

.ce-product-card__criterion-icon {
    width: 38px;
    height: 38px;
}

.ce-product-card__criterion-icon::before,
.ce-product-card-short__criterion-icon::before {
    content: "✓";
    color: var(--ce-color-white);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}

.ce-product-card__criterion-summary strong {
    color: var(--ce-color-ink);
    font-size: clamp(1rem, 1.7vw, 1.15rem);
    font-weight: 900;
    line-height: 1.1;
}

.ce-product-card__criterion-rating {
    color: var(--ce-color-green-dark);
    font-size: clamp(1rem, 1.8vw, 1.18rem);
    font-weight: 900;
    white-space: nowrap;
}

.ce-product-card__criterion-summary em {
    color: var(--ce-color-muted);
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    font-style: normal;
    font-weight: 500;
    line-height: 1.25;
}

.ce-product-card__criterion-content {
    padding: 28px 24px 28px 88px;
    background: #f3f7f5;
    color: var(--ce-color-muted);
}

.ce-product-card__criterion-content p {
    max-width: 820px;
    margin: 0;
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   6. Long template - details and ingredients
   -------------------------------------------------------------------------- */
.ce-product-card__info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border-radius: var(--ce-radius-md);
    background: var(--ce-color-surface);
}

.ce-product-card__info-box {
    padding: clamp(1.35rem, 3vw, 2.2rem);
}

.ce-product-card__info-box--positive {
    background: #d6f3e9;
}

.ce-product-card__info-box h3 {
    margin: 0 0 1rem;
    color: var(--ce-color-ink);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-weight: 900;
    line-height: 1.15;
}

.ce-product-card__info-box ul {
    display: grid;
    gap: 0.6rem;
    padding: 0;
    padding-left: 0 !important;
    margin: 0;
    list-style: none;
}

.ce-product-card__info-box li {
    position: relative;
    padding-left: 1.75rem;
    color: var(--ce-color-muted);
    font-weight: 600;
    line-height: 1.35;
}

.ce-product-card__info-box li::before {
    position: absolute;
    left: 0;
    top: 0;
    margin-top: 0;
    font-weight: 400;
}

.ce-product-card__info-box--positive li::before {
    content: "✓";
    color: var(--ce-color-green-dark);
    font-size: 35px;
}

.ce-product-card__info-box--negative li::before {
    content: "×";
    color: var(--ce-color-danger);
    font-size: 35px;
}

.ce-product-card__content {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ce-color-muted);
}

.ce-product-card__content p {
    max-width: 900px;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   7. Short template - compact long layout
   -------------------------------------------------------------------------- */
.ce-product-card--short {
    max-width: 980px;
}

.ce-product-card-short__hero {
    overflow: hidden;
    border: 2px solid var(--ce-color-border);
    border-radius: var(--ce-radius-lg);
    background: var(--ce-color-white);
    box-shadow: none;
}

.ce-product-card-short__hero-main {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    padding: 46px 56px 42px;
}

.ce-product-card-short__media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
}

.ce-product-card-short__media .ce-product-card__image {
    max-width: 235px;
    max-height: 320px;
}

.ce-product-card-short__intro {
    min-width: 0;
}

.ce-product-card-short__title {
    margin: 0;
    color: var(--ce-color-ink);
    font-size: clamp(2.5rem, 5vw, 4.25rem);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.ce-product-card-short__brand {
    margin: 8px 0 26px;
    color: var(--ce-color-green);
    font-size: clamp(1.65rem, 3.2vw, 2.75rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.045em;
}

.ce-product-card-short__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 34px;
    color: var(--ce-color-muted);
    font-size: 1.1rem;
    font-weight: 700;
}

.ce-product-card-short__recommendation {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 82px;
    max-width: 100%;
    margin: 0 0 0 50px;
    padding: 12px 26px 12px 66px;
    border: 0;
    border-radius: 13px;
    background: var(--ce-color-surface);
    box-shadow: none;
    overflow: visible;
}

.ce-product-card-short__badge {
    position: absolute;
    top: 50%;
    left: -50px;
    z-index: 2;
    width: 100px;
    height: 100px;
    transform: translateY(-50%);
}

.ce-product-card-short__recommendation strong {
    color: var(--ce-color-ink);
    font-size: clamp(1.45rem, 2.8vw, 2.2rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.ce-product-card-short__quote::before {
    left: 165px;
}

.ce-product-card-short__criteria {
    display: grid;
    gap: 18px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ce-product-card-short__criterion {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 15px 18px;
    border: 2px solid var(--ce-color-border);
    border-radius: 12px;
    background: var(--ce-color-white);
}

.ce-product-card-short__criterion-icon {
    width: 38px;
    height: 38px;
}

.ce-product-card-short__criterion-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.ce-product-card-short__criterion-main strong {
    color: var(--ce-color-ink);
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.1;
}

.ce-product-card-short__criterion-main em {
    color: var(--ce-color-muted);
    font-size: 1rem;
    font-style: normal;
    font-weight: 500;
    line-height: 1.25;
}

.ce-product-card-short__criterion-rating {
    color: var(--ce-color-green-dark);
    font-size: 1.08rem;
    font-weight: 900;
    white-space: nowrap;
}

.ce-product-card-short__footer,
.ce-product-card-short__button {
    display: none;
}

/* --------------------------------------------------------------------------
   8. Notices
   -------------------------------------------------------------------------- */
.ce-product-card--notice,
.ce-product-card--debug {
    max-width: 900px;
    margin: 1rem auto;
    padding: 1rem 1.25rem;
    border: 2px solid var(--ce-color-border);
    border-radius: var(--ce-radius-md);
    background: var(--ce-color-surface);
    color: var(--ce-color-ink);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   9. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .ce-product-card__hero-main,
    .ce-product-card-short__hero-main {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 34px 28px;
    }

    .ce-product-card__media,
    .ce-product-card-short__media {
        justify-content: flex-start;
        min-height: auto;
    }

    .ce-product-card__score-box,
    .ce-product-card-short__score-box,
    .ce-product-card__info-grid {
        grid-template-columns: 1fr;
    }

    .ce-product-card__score::after,
    .ce-product-card-short__score::after {
        display: none;
    }

    .ce-product-card__criterion-summary {
        grid-template-columns: 38px minmax(0, 1fr) 28px;
    }

    .ce-product-card__criterion-summary::after {
        grid-column: 3;
        grid-row: 1;
    }

    .ce-product-card__criterion-rating,
    .ce-product-card__criterion-summary em {
        grid-column: 2 / -1;
    }

    .ce-product-card__criterion-content {
        padding: 22px;
    }

    .ce-product-card-short__quote {
        grid-template-columns: 64px minmax(0, 1fr);
        padding: 30px 28px;
    }

    .ce-product-card-short__quote::before {
        left: 72px;
    }

    .ce-product-card-short__quote-icon {
        width: 64px;
        height: 64px;
        font-size: 4rem;
    }
}

@media (max-width: 560px) {
    .ce-product-card {
        --ce-radius-lg: 18px;
    }

    .ce-product-card__hero-main,
    .ce-product-card__quote,
    .ce-product-card-short__hero-main,
    .ce-product-card-short__quote,
    .ce-product-card__score-box,
    .ce-product-card-short__score-box,
    .ce-product-card__info-box {
        padding: 24px 20px;
    }

    .ce-product-card__title,
    .ce-product-card-short__title {
        font-size: clamp(2.15rem, 13vw, 3.3rem);
    }

    .ce-product-card__brand,
    .ce-product-card-short__brand {
        font-size: clamp(1.45rem, 8vw, 2.15rem);
    }

    .ce-product-card__recommendation,
    .ce-product-card-short__recommendation {
        width: calc(100% - 34px);
        min-height: 68px;
        margin-left: 34px;
        padding-left: 46px;
    }

    .ce-product-card__badge,
    .ce-product-card-short__badge {
        left: -34px;
        width: 68px;
        height: 68px;
    }

    .ce-product-card__actions {
        display: grid;
    }

    .ce-product-card__button {
        width: 100%;
    }

    .ce-product-card__quote,
    .ce-product-card-short__quote {
        grid-template-columns: 1fr;
    }

    .ce-product-card__quote::before,
    .ce-product-card-short__quote::before {
        left: 54px;
    }

    .ce-product-card-short__criterion,
    .ce-product-card__criterion-summary {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .ce-product-card-short__criterion-rating,
    .ce-product-card__criterion-rating,
    .ce-product-card__criterion-summary em,
    .ce-product-card__criterion-summary::after {
        grid-column: 2;
    }
}

/* --------------------------------------------------------------------------
   10. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .ce-product-card *,
    .ce-product-card *::before,
    .ce-product-card *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
/* ==========================================================================
   Single review title and brand cleanup
   ========================================================================== */

.single-ce_product_card .entry-header,
.single-ce_product_card .entry-title,
.single-ce_product_card .page-title {
    display: none;
}

.single-ce_product_card .ce-product-card .ce-product-card__title {
    display: block;
    max-width: 760px;
    margin: 0;
    font-size: 46px;
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.single-ce_product_card .ce-product-card .ce-product-card__brand {
    font-size: 35px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.035em;
}

.single-ce_product_card .ce-product-card--short .ce-product-card-short__title {
    font-size: 46px;
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.single-ce_product_card .ce-product-card--short .ce-product-card-short__brand {
    font-size: 35px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.035em;
}
/* All H2 headings inside single review card */
.single-ce_product_card .ce-product-card h2 {
    font-size: 35px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.035em;
}