:root {
    --anafp-primary: #667eea;
    --anafp-secondary: #764ba2;
    --anafp-price: #b12704;
    --anafp-stars: #f59e0b;
    --anafp-btn-text: #ffffff;
}

/* ── Product Card ──────────────────────────────────────────────────── */

.anafp-product-card {
    display: flex;
    gap: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.anafp-product-image {
    flex-shrink: 0;
    width: 200px;
}

.anafp-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.anafp-product-info {
    flex: 1;
}

.anafp-product-title {
    font-size: 20px;
    margin: 0 0 8px;
    line-height: 1.3;
}

.anafp-product-brand {
    display: inline-block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.anafp-product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--anafp-price);
    margin-bottom: 8px;
}

.anafp-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.anafp-stars {
    color: var(--anafp-stars);
    font-size: 18px;
    letter-spacing: 1px;
}

.anafp-star.empty {
    color: #d1d5db;
}

.anafp-rating-text {
    font-size: 13px;
    color: #6b7280;
}

.anafp-product-features {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.anafp-product-features li {
    padding: 4px 0 4px 20px;
    position: relative;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.anafp-product-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--anafp-primary);
    font-weight: 700;
}

.anafp-buy-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--anafp-primary), var(--anafp-secondary));
    color: var(--anafp-btn-text) !important;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

.anafp-buy-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--anafp-primary) 40%, transparent);
    color: var(--anafp-btn-text) !important;
}

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .anafp-product-card {
        flex-direction: column;
    }
    .anafp-product-image {
        width: 100%;
        text-align: center;
    }
}

/* ── Top 10 Horizontal Product List ───────────────────────────────── */

.anafp-top10-list {
    margin: 28px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.anafp-top10-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: background 0.2s, box-shadow 0.2s;
}

.anafp-top10-row:hover {
    background: color-mix(in srgb, var(--anafp-primary) 4%, #fff);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--anafp-primary) 8%, transparent);
}

.anafp-top10-rank {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--anafp-primary), var(--anafp-secondary));
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anafp-top10-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anafp-top10-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.anafp-top10-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.anafp-top10-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anafp-top10-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #6b7280;
}

.anafp-top10-rating .anafp-stars {
    font-size: 14px;
    color: var(--anafp-stars);
}

.anafp-top10-rating-num {
    color: #9ca3af;
}

.anafp-top10-price {
    flex-shrink: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--anafp-price);
    min-width: 60px;
    text-align: right;
}

.anafp-top10-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--anafp-primary), var(--anafp-secondary));
    color: var(--anafp-btn-text) !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.2s;
}

.anafp-top10-btn:hover {
    opacity: 0.9;
    transform: scale(1.04);
    color: var(--anafp-btn-text) !important;
}

@media (max-width: 600px) {
    .anafp-top10-row {
        gap: 10px;
        padding: 12px 14px;
    }
    .anafp-top10-name {
        font-size: 14px;
    }
    .anafp-top10-price {
        display: none;
    }
    .anafp-top10-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* ── Comparison Table ──────────────────────────────────────────────── */

.anafp-compare {
    margin: 28px 0;
}

.anafp-compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.anafp-compare-table thead th {
    background: #fff;
    padding: 0;
    vertical-align: top;
}

.anafp-ct-label-col {
    width: 140px;
    min-width: 110px;
    background: color-mix(in srgb, var(--anafp-primary) 6%, #fafbff) !important;
}

.anafp-ct-product-col {
    width: calc((100% - 140px) / 2);
    text-align: center;
    padding: 28px 18px 20px !important;
}

.anafp-ct-product-col:not(:last-of-type) {
    border-right: 2px solid color-mix(in srgb, var(--anafp-primary) 12%, #f0f0f0);
}

.anafp-ct-thumb {
    width: 120px;
    height: 120px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anafp-ct-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.anafp-ct-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    margin-bottom: 6px;
}

.anafp-ct-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 13px;
    margin-bottom: 4px;
}

.anafp-ct-rating .anafp-stars {
    font-size: 16px;
    color: var(--anafp-stars);
}

.anafp-ct-rating-num {
    color: #9ca3af;
    font-size: 12px;
}

.anafp-ct-price {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--anafp-price);
}

/* Table body rows */
.anafp-compare-table tbody tr {
    transition: background 0.15s;
}

.anafp-compare-table tbody tr:nth-child(odd) {
    background: #fafafa;
}

.anafp-compare-table tbody tr:hover {
    background: color-mix(in srgb, var(--anafp-primary) 4%, #fff);
}

.anafp-compare-table tbody td {
    padding: 11px 18px;
    font-size: 14px;
    color: #374151;
    border-top: 1px solid #f3f4f6;
    vertical-align: middle;
}

/* Section headers (Key Features, Specifications) */
.anafp-ct-section td {
    background: linear-gradient(135deg, var(--anafp-primary), var(--anafp-secondary)) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
    padding: 10px 18px !important;
}

/* Feature bullet points */
.anafp-ct-bullet {
    color: var(--anafp-primary);
    font-weight: 700;
    margin-right: 6px;
}

.anafp-ct-label {
    font-size: 12px !important;
    font-weight: 700;
    color: var(--anafp-primary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: color-mix(in srgb, var(--anafp-primary) 6%, #fafbff);
    text-align: center;
}

.anafp-ct-val {
    text-align: center;
    line-height: 1.5;
}

/* Button row at the bottom */
.anafp-ct-btn-row td {
    padding: 20px 18px !important;
    text-align: center;
    background: #fff !important;
    border-top: 2px solid #f3f4f6;
}

.anafp-ct-btn-row td:first-child {
    background: color-mix(in srgb, var(--anafp-primary) 6%, #fafbff) !important;
}

.anafp-compare-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--anafp-primary), var(--anafp-secondary));
    color: var(--anafp-btn-text) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.anafp-compare-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--anafp-primary) 35%, transparent);
    color: var(--anafp-btn-text) !important;
}

@media (max-width: 600px) {
    .anafp-compare-table,
    .anafp-compare-table thead,
    .anafp-compare-table tbody,
    .anafp-compare-table th,
    .anafp-compare-table td {
        display: block;
        width: 100%;
    }

    .anafp-compare-table thead tr {
        display: flex;
    }

    .anafp-ct-label-col {
        display: none !important;
    }

    .anafp-ct-product-col {
        width: 50% !important;
        padding: 18px 12px !important;
    }

    .anafp-compare-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .anafp-ct-section {
        display: block !important;
    }

    .anafp-ct-section td {
        display: block !important;
        width: 100% !important;
    }

    .anafp-compare-table tbody td {
        border-top: none;
        padding: 6px 14px;
    }

    .anafp-ct-label {
        width: 100%;
        text-align: center;
        font-size: 11px !important;
        padding: 4px 0 !important;
        border-bottom: 1px solid #f3f4f6;
    }

    .anafp-ct-val {
        width: 50%;
        text-align: center;
    }

    .anafp-ct-btn-row {
        display: flex !important;
        flex-wrap: wrap;
    }

    .anafp-ct-btn-row td {
        width: 50%;
        text-align: center;
        padding: 14px 10px !important;
    }

    .anafp-ct-btn-row td:first-child {
        display: none;
    }
}
