/* Affiliate Products Styles */

/* Single Product Box */
.afp-single-box {
    background: #fff;
    border: 2px solid #6366f1;
    border-radius: 8px;
    padding: 30px;
    margin: 30px auto;
    max-width: 1200px !important;
    width: 100% !important;
}

.afp-category {
    background: #6366f1;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    padding: 12px 20px;
    text-align: center;
    margin: -30px -30px 25px -30px;
    border-radius: 6px 6px 0 0;
}

/* Header Color Variations */
.afp-header-indigo { background: #6366f1; color: #fff; }
.afp-header-blue { background: #3b82f6; color: #fff; }
.afp-header-purple { background: #a855f7; color: #fff; }
.afp-header-teal { background: #14b8a6; color: #fff; }
.afp-header-green { background: #22c55e; color: #fff; }
.afp-header-red { background: #ef4444; color: #fff; }
.afp-header-orange { background: #f97316; color: #fff; }
.afp-header-pink { background: #ec4899; color: #fff; }
.afp-header-gray { background: #6b7280; color: #fff; }

/* Border Colors */
.afp-color-indigo { border-color: #6366f1; }
.afp-color-blue { border-color: #3b82f6; }
.afp-color-purple { border-color: #a855f7; }
.afp-color-teal { border-color: #14b8a6; }
.afp-color-green { border-color: #22c55e; }
.afp-color-red { border-color: #ef4444; }
.afp-color-orange { border-color: #f97316; }
.afp-color-pink { border-color: #ec4899; }
.afp-color-gray { border-color: #6b7280; }

.afp-product-content {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    align-items: start !important;
    text-align: left !important;
}

.afp-product-content-left {
    text-align: left !important;
}

/* Single Product Image - BIGGER with Fixed Size */
.afp-single-box .afp-product-image {
    text-align: center !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.afp-single-box .afp-product-image img {
    width: 100% !important;
    height: 400px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    background: #f9f9f9 !important;
    border-radius: 8px;
    padding: 20px !important;
}

.afp-product-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    margin: 0 0 15px 0 !important;
    text-align: left !important;
    text-decoration: none !important;
}

.afp-description {
    font-size: 16px !important;
    line-height: 1.6 !important;
    margin: 0 0 25px 0 !important;
    color: #333 !important;
    text-align: left !important;
}

/* Pros and Cons Container - SINGLE PRODUCT ONLY */
.afp-single-box .afp-pros-cons-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    margin: 20px 0 !important;
}

/* Pros and Cons - Single Product */
.afp-single-box .afp-pros,
.afp-single-box .afp-cons {
    text-align: left !important;
    margin: 0 !important;
}

.afp-single-box .afp-pros strong,
.afp-single-box .afp-cons strong {
    display: block !important;
    font-size: 18px !important;
    margin-bottom: 10px !important;
    font-weight: 700 !important;
}

/* Grid/Table Pros and Cons - Keep original stacked layout */
.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: 20px 0;
}

.afp-pro-item,
.afp-con-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.5;
    color: #1a1a1a; /* Dark black text for readability */
}

.afp-pro-item svg {
    color: #22c55e;
    flex-shrink: 0;
    margin-top: 3px;
}

.afp-con-item svg {
    color: #ef4444;
    flex-shrink: 0;
    margin-top: 3px;
}

/* Buttons */
.afp-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.afp-button {
    display: inline-block;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.afp-button-yellow {
    background: #fef08a;
    color: #000;
}

.afp-button-yellow:hover {
    background: #fde047;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 240, 138, 0.5);
}

.afp-button-orange {
    background: #fdba74;
    color: #000;
}

.afp-button-orange:hover {
    background: #fb923c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(253, 186, 116, 0.5);
}

.afp-button-blue {
    background: #60a5fa;
    color: #fff;
}

.afp-button-blue:hover {
    background: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.5);
}

.afp-button-green {
    background: #86efac;
    color: #000;
}

.afp-button-green:hover {
    background: #4ade80;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(134, 239, 172, 0.5);
}

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

.afp-comparison-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 30px 0;
}

.afp-comparison-grid {
    display: grid;
    gap: 20px;
    margin: 0 auto;
}

.afp-columns-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1000px;
}

.afp-columns-3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1400px;
}

.afp-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.afp-comparison-item {
    background: #fff;
    border: 2px solid #6366f1;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.afp-comparison-item .afp-category {
    margin: -30px -20px 20px -20px;
}

.afp-comparison-item .afp-product-image {
    margin: 0 auto 15px !important;
    width: 100% !important;
    height: 250px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    background: #f9f9f9 !important;
    border-radius: 4px !important;
}

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

.afp-comparison-item .afp-product-title {
    font-size: 20px;
    margin: 0 0 15px 0;
}

.afp-comparison-item .afp-description {
    font-size: 14px;
    margin: 0 0 20px 0;
}

.afp-comparison-item .afp-pros,
.afp-comparison-item .afp-cons {
    font-size: 14px;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .afp-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .afp-columns-2,
    .afp-columns-3,
    .afp-columns-4 {
        grid-template-columns: 1fr;
    }

    .afp-single-box {
        padding: 20px;
    }

    .afp-category {
        margin: -20px -20px 20px -20px;
        font-size: 16px;
        padding: 10px 15px;
    }

    .afp-product-title {
        font-size: 20px;
    }

    .afp-comparison-item {
        padding: 20px 15px;
    }

    .afp-comparison-item .afp-category {
        margin: -20px -15px 15px -15px;
    }
}

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

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

.afp-table-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 30px 0;
}

.afp-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.afp-comparison-table-style {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.afp-comparison-table-style thead {
    background: #6366f1;
    color: #fff;
}

.afp-comparison-table-style th {
    padding: 20px 15px;
    text-align: center;
    font-weight: 700;
    color: #fff;
    border: 1px solid #e5e7eb;
    vertical-align: middle;
}

.afp-comparison-table-style th.afp-table-feature-col {
    background: #4f46e5;
    color: #fff;
    text-align: left;
    min-width: 150px;
}

.afp-table-thumb {
    display: block !important;
    width: 150px !important;
    height: 150px !important;
    margin: 0 auto 10px !important;
    border-radius: 4px !important;
    object-fit: contain !important;
    background: #f9f9f9 !important;
    padding: 10px !important;
}

.afp-table-badge {
    display: inline-block;
    background: #fef08a;
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.afp-comparison-table-style td {
    padding: 15px;
    text-align: center;
    border: 1px solid #e5e7eb;
    vertical-align: middle;
}

.afp-comparison-table-style td.afp-table-feature-col {
    background: #f9fafb;
    text-align: left;
    font-weight: 600;
}

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

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

.afp-table-action-row td {
    background: #fff !important;
    padding: 20px 15px;
}

.afp-button-small {
    padding: 10px 20px;
    font-size: 14px;
    margin: 5px 0;
    display: inline-block;
    width: auto;
}

@media (max-width: 768px) {
    .afp-comparison-table-style {
        font-size: 14px;
    }

    .afp-comparison-table-style th,
    .afp-comparison-table-style td {
        padding: 10px 8px;
    }

    .afp-table-thumb {
        max-width: 60px;
    }
    
    /* Single product ONLY: stack on mobile */
    .afp-single-box .afp-product-content {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .afp-single-box .afp-product-image {
        order: -1 !important; /* Image on top */
    }
    
    .afp-single-box {
        max-width: 100% !important;
    }
    
    /* Stack pros/cons on mobile - SINGLE PRODUCT ONLY */
    .afp-single-box .afp-pros-cons-wrapper {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .afp-button-small {
        font-size: 12px;
        padding: 8px 15px;
    }
}

/* ============================================================
   Star Ratings
   ============================================================ */
.afp-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px 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: #f59e0b; }
.afp-star-half svg { color: #f59e0b; }
.afp-star-empty svg { color: #d1d5db; }

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

.afp-comparison-item .afp-rating {
    justify-content: center;
    margin: 0 0 10px 0;
}

.afp-comparison-item .afp-star {
    width: 16px;
    height: 16px;
}

.afp-comparison-item .afp-star svg {
    width: 16px;
    height: 16px;
}

/* ============================================================
   Price Styles (original + sale)
   ============================================================ */
.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: #16a34a;
}

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

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

.afp-comparison-item .afp-price-wrapper {
    justify-content: center;
}

.afp-comparison-item .afp-price-sale {
    font-size: 18px;
}

.afp-comparison-item .afp-price-single {
    font-size: 16px;
}

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

.afp-product-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 20px;
    margin: 0 0 12px 0;
}

.afp-product-badge.afp-badge-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.afp-product-badge.afp-badge-blue {
    background: #3b82f6;
}

.afp-product-badge.afp-badge-green {
    background: #22c55e;
    color: #fff;
}

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

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