/* ============================================================
   Affiliate Products — Clean Review-Style Design v2.1
   ============================================================ */

/* ── Single Product Box ──────────────────────────────────── */
.afp-single-box {
    background: #fff;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    padding: 0;
    margin: 36px auto;
    max-width: 1100px !important;
    width: 100% !important;
    box-shadow: 0 6px 32px rgba(0,0,0,0.12);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Category / header banner — hidden on single product, shown on comparison as badge */
.afp-single-box .afp-category { display: none; }

.afp-category {
    background: #f1f5f9;
    color: #374151;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 11px 24px;
    text-align: center;
    border-radius: 0;
    border-bottom: 1px solid #e2e8f0;
}

/* Header Color Variations */
.afp-header-indigo  { background: #3730a3; color: #fff; border-bottom: none; }
.afp-header-blue    { background: #1d4ed8; color: #fff; border-bottom: none; }
.afp-header-purple  { background: #7e22ce; color: #fff; border-bottom: none; }
.afp-header-teal    { background: #0f766e; color: #fff; border-bottom: none; }
.afp-header-green   { background: #15803d; color: #fff; border-bottom: none; }
.afp-header-red     { background: #b91c1c; color: #fff; border-bottom: none; }
.afp-header-orange  { background: #c2410c; color: #fff; border-bottom: none; }
.afp-header-pink    { background: #be185d; color: #fff; border-bottom: none; }
.afp-header-gray    { background: #374151; color: #fff; border-bottom: none; }
.afp-header-amber   { background: #CA8A04; color: #fff; border-bottom: none; }
.afp-header-dark    { background: #1e293b; color: #fff; border-bottom: none; }

/* Border Colors — all normalized to plain */
.afp-color-indigo,
.afp-color-blue,
.afp-color-purple,
.afp-color-teal,
.afp-color-green,
.afp-color-red,
.afp-color-orange,
.afp-color-pink,
.afp-color-gray,
.afp-color-amber,
.afp-color-dark   { border-color: #d1d5db; }

/* Two-column layout: image | details */
.afp-product-content {
    display: grid !important;
    grid-template-columns: 1fr 1.15fr !important;
    gap: 0 !important;
    align-items: stretch !important;
}

.afp-product-content-left {
    text-align: left !important;
    padding: 28px 32px 28px 28px;
    border-right: 1px solid #e8ecf1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.afp-product-right-column {
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 24px;
}

.afp-product-right-column .afp-product-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.afp-product-right-column .afp-product-image img {
    width: 100% !important;
    height: 320px !important;
    object-fit: contain !important;
}

/* Image panel */
.afp-single-box .afp-product-image {
    text-align: center !important;
    margin: 0 !important;
    background: none;
    padding: 28px 24px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 300px;
    width: 100% !important;
}

.afp-single-box .afp-product-image img {
    width: 100% !important;
    height: 320px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    transition: transform 0.3s ease;
}

.afp-single-box .afp-product-image img:hover {
    transform: scale(1.03);
}

/* Product title */
.afp-product-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    margin: 0 0 10px 0 !important;
    color: #0f172a !important;
    text-align: left !important;
    text-decoration: none !important;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* Description */
.afp-description {
    font-size: 14.5px !important;
    line-height: 1.7 !important;
    margin: 0 0 18px 0 !important;
    color: #4b5563 !important;
    text-align: left !important;
}

/* Pros/Cons wrapper — single product */
.afp-single-box .afp-pros-cons-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin: 12px 0 !important;
}

.afp-single-box .afp-pros,
.afp-single-box .afp-cons {
    text-align: left !important;
    margin: 0 0 4px 0 !important;
    background: none;
    border-radius: 0;
    padding: 0;
}

.afp-single-box .afp-pros { border-top: none; }
.afp-single-box .afp-cons { border-top: none; margin-top: 10px !important; }

.afp-single-box .afp-pros strong,
.afp-single-box .afp-cons strong {
    display: block !important;
    font-size: 10px !important;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px !important;
    font-weight: 800 !important;
    color: #6b7280;
}

/* Grid/Table pros/cons */
.afp-product-grid .afp-pros,
.afp-product-grid .afp-cons,
.afp-comparison-box .afp-pros,
.afp-comparison-box .afp-cons,
.afp-comparison-table-style .afp-pros,
.afp-comparison-table-style .afp-cons {
    text-align: left;
    margin: 14px 0;
}

.afp-pro-item,
.afp-con-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 9px;
    font-size: 14px;
    line-height: 1.5;
    color: #1e293b;
}

.afp-pro-item svg { color: #16a34a; flex-shrink: 0; margin-top: 3px; }
.afp-con-item svg { color: #dc2626; flex-shrink: 0; margin-top: 3px; }

/* ── Buttons ─────────────────────────────────────────────── */
.afp-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.afp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 13px;
}

.afp-button-yellow {
    background: #EAB308;
    color: #fff;
}
.afp-button-yellow:hover {
    background: #CA8A04;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234,179,8,0.4);
}

.afp-button-orange {
    background: #ea580c;
    color: #fff;
}
.afp-button-orange:hover {
    background: #c2410c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234,88,12,0.4);
}

.afp-button-blue {
    background: #1d4ed8;
    color: #fff;
}
.afp-button-blue:hover {
    background: #1e40af;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29,78,216,0.4);
}

.afp-button-green {
    background: #15803d;
    color: #fff;
}
.afp-button-green:hover {
    background: #166534;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21,128,61,0.4);
}

/* ── Comparison Grid ─────────────────────────────────────── */
.afp-comparison-table { margin: 40px 0; }

.afp-comparison-title {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin: 0 0 28px 0;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.afp-comparison-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0 auto;
    justify-content: center;
}

.afp-columns-2 { max-width: 860px; }
.afp-columns-3 { max-width: 1200px; }

.afp-columns-2 .afp-comparison-item-wrap { flex: 0 1 calc(50% - 10px); }
.afp-columns-3 .afp-comparison-item-wrap { flex: 0 1 calc(33.333% - 14px); }
.afp-columns-4 .afp-comparison-item-wrap { flex: 0 1 calc(25% - 15px); }

.afp-comparison-item-wrap {
    display: flex;
    flex-direction: column;
}

.afp-comparison-item-wrap .afp-category {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 8px 16px;
    text-align: center;
    margin: 0;
}

.afp-comparison-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex: 1;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.afp-comparison-item.afp-has-badge {
    border-radius: 0 0 10px 10px;
}

.afp-comparison-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}

.afp-comparison-item-inner {
    padding: 16px 16px 0;
}

.afp-item-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 12px -16px 14px;
}

.afp-comparison-item .afp-product-image {
    margin: 0 !important;
    width: 100% !important;
    height: 190px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-radius: 0 !important;
}

.afp-comparison-item .afp-product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    padding: 16px;
}

.afp-comparison-item .afp-product-title {
    font-size: 16px !important;
    margin: 0 0 10px 0 !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    text-align: center !important;
    line-height: 1.3;
}

.afp-comparison-item .afp-description {
    font-size: 13px !important;
    margin: 0 0 12px 0 !important;
    color: #6b7280 !important;
    text-align: center !important;
    line-height: 1.6;
}

.afp-comparison-item .afp-pros,
.afp-comparison-item .afp-cons {
    font-size: 13px;
    text-align: left;
    margin: 8px 0;
}

.afp-comparison-item .afp-pros strong,
.afp-comparison-item .afp-cons strong {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
    margin-bottom: 8px;
}

.afp-comparison-item .afp-buttons {
    margin-top: auto;
    padding: 16px 16px 20px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .afp-columns-4 .afp-comparison-item-wrap { flex: 0 1 calc(50% - 10px); }
}

@media (max-width: 768px) {
    .afp-columns-2 .afp-comparison-item-wrap,
    .afp-columns-3 .afp-comparison-item-wrap,
    .afp-columns-4 .afp-comparison-item-wrap { flex: 0 1 100%; }

    .afp-comparison-item-wrap .afp-category { border-radius: 8px 8px 0 0; }

    .afp-product-content {
        grid-template-columns: 1fr !important;
    }

    .afp-product-content-left {
        padding: 20px;
        border-right: none;
        border-top: 1px solid #e8ecf1;
        order: 2;
    }

    .afp-single-box .afp-product-image {
        min-height: 220px;
        order: 1;
    }

    .afp-single-box .afp-product-image img {
        height: 220px !important;
    }

    .afp-single-box .afp-pros-cons-wrapper {
        flex-direction: column !important;
    }

    .afp-product-title { font-size: 19px !important; }
    .afp-button { padding: 12px 20px; }
}

/* ── Print ───────────────────────────────────────────────── */
@media print { .afp-button { display: none; } }

/* ── Table Comparison ────────────────────────────────────── */
.afp-table-wrapper { margin: 40px 0; }

.afp-table-title {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin: 0 0 28px 0;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.afp-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 2px solid #d1d5db;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.afp-comparison-table-style {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.afp-comparison-table-style thead {
    background: #f1f5f9;
    color: #374151;
}

.afp-comparison-table-style th {
    padding: 18px 16px;
    text-align: center;
    font-weight: 700;
    color: #374151;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.afp-comparison-table-style th.afp-table-feature-col {
    background: #f1f5f9;
    color: #374151;
    text-align: left;
    min-width: 150px;
    font-size: 11px;
}

.afp-table-thumb {
    display: block !important;
    width: 120px !important;
    height: 120px !important;
    margin: 0 auto 8px !important;
    border-radius: 0 !important;
    object-fit: contain !important;
    background: none !important;
    padding: 0 !important;
}

.afp-table-badge {
    display: inline-block;
    background: #e2e8f0;
    color: #374151;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 6px;
}

.afp-comparison-table-style td {
    padding: 14px 16px;
    text-align: center;
    border: 1px solid #e8ecf1;
    vertical-align: middle;
    font-size: 14px;
    color: #1e293b;
}

.afp-comparison-table-style td.afp-table-feature-col {
    background: #f8fafc;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    border-right: 2px solid #e8ecf1;
}

.afp-comparison-table-style tbody tr:nth-child(even) td:not(.afp-table-feature-col) {
    background: #fafbfc;
}

.afp-comparison-table-style tbody tr:hover td:not(.afp-table-feature-col) {
    background: #fef9ec;
}

.afp-table-action-row td {
    background: #f8fafc !important;
    padding: 16px;
    border-top: 2px solid #e8ecf1;
}

.afp-button-small {
    padding: 9px 18px;
    font-size: 12px;
    margin: 4px 0;
    display: inline-flex;
    width: auto;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .afp-comparison-table-style { font-size: 13px; }
    .afp-comparison-table-style th,
    .afp-comparison-table-style td { padding: 10px 8px; }
    .afp-table-thumb { width: 60px !important; height: 60px !important; }
    .afp-button-small { font-size: 11px; padding: 7px 12px; }
}

/* ============================================================
   Star Ratings
   ============================================================ */
.afp-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px 0;
}

.afp-stars { display: inline-flex; gap: 2px; line-height: 1; }

.afp-star {
    width: 20px;
    height: 20px;
    position: relative;
    display: inline-block;
}

.afp-star svg { width: 20px; height: 20px; }
.afp-star-full svg  { color: #EAB308; }
.afp-star-half svg  { color: #EAB308; }
.afp-star-empty svg { color: #d1d5db; }

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

.afp-comparison-item .afp-rating { justify-content: center; margin: 0 0 8px 0; }
.afp-comparison-item .afp-star { width: 15px; height: 15px; }
.afp-comparison-item .afp-star svg { width: 15px; height: 15px; }

/* ============================================================
   Price Styles
   ============================================================ */
.afp-price-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px 0;
    flex-wrap: wrap;
}

.afp-price-sale {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.afp-price-original {
    font-size: 15px;
    color: #9ca3af;
    text-decoration: line-through;
}

.afp-price-single {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.afp-comparison-item .afp-price-wrapper { justify-content: center; }
.afp-comparison-item .afp-price-sale   { font-size: 17px; }
.afp-comparison-item .afp-price-single { font-size: 15px; }

/* ============================================================
   Product Badge (Best Seller, Editor's Choice, etc.)
   ============================================================ */
.afp-badge-wrap { position: relative; }

.afp-product-badge {
    display: inline-block;
    background: #e2e8f0;
    color: #374151;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 12px;
    border-radius: 4px;
    margin: 0 0 12px 0;
}

.afp-product-badge.afp-badge-gold  { background: #e2e8f0; color: #374151; }
.afp-product-badge.afp-badge-blue  { background: #e2e8f0; color: #374151; }
.afp-product-badge.afp-badge-green { background: #e2e8f0; color: #374151; }

.afp-comparison-item .afp-product-badge {
    display: block;
    text-align: center;
    margin: 0 0 8px 0;
}

/* ============================================================
   Schema / hidden SEO elements
   ============================================================ */
.afp-schema { display: none; }
