/* Frontend Styles for Product Comparison Plugin */
.pcp-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Products Grid */
.pcp-products-grid {
    display: grid;
    gap: 20px;
    margin: 40px 0;
}

/* Product Card - Full Width Design */
.pcp-product-card {
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 20px;
    border: 1px solid #e5e7eb;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.pcp-product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    border-color: #d1d5db;
}

.pcp-product-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pcp-badge-orange { background: #ff6b35; }
.pcp-badge-green { background: #10b981; }
.pcp-badge-blue { background: #3b82f6; }
.pcp-badge-red { background: #ef4444; }
.pcp-badge-purple { background: #8b5cf6; }

.pcp-product-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.pcp-product-left {
    flex-shrink: 0;
}

/* FORCE OVERRIDE: Remove all borders and shadows from images */
.pcp-product-image {
    width: 240px;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    border: none;
    box-shadow: none;
    outline: none;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
}

.pcp-product-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-start;
}

/* FORCE OVERRIDE: Remove margins and make title bold */
.pcp-product-title {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1.3;
}

.pcp-product-description {
    color: #6b7280;
    line-height: 1.6;
    margin: 16px 0 20px 0;
    font-size: 15px;
    flex-grow: 1;
}

/* PERFECT ALIGNMENT: Rating container with flexbox */
.pcp-product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    line-height: 1;
}

/* FORCE OVERRIDE: Rating score styling with perfect alignment */
.pcp-rating-score {
    font-size: 20px;
    font-weight: 800;
    color: #4c4c4c;
    line-height: 1;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* PERFECT ALIGNMENT: Stars container */
.pcp-product-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    line-height: 1;
}

.pcp-star {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.pcp-star-filled {
    color: #fbbf24;
}

.pcp-star-empty {
    color: #d1d5db;
}

.pcp-star-half {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
}

.pcp-star-half-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    overflow: hidden;
}

/* Button Styles Following Screenshot Design */
.pcp-product-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.pcp-product-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
    gap: 8px;
    flex: 1;
    min-width: 140px;
    color: white;
}

.pcp-button-orange {
    background: #ff8c00;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.2);
}

.pcp-button-orange:hover {
    background: #e67e00;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
    color: white;
    text-decoration: none;
}

.pcp-button-blue {
    background: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.pcp-button-blue:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: white;
    text-decoration: none;
}

.pcp-product-button:active {
    transform: translateY(0);
}

.pcp-product-button svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.pcp-product-button:hover svg {
    transform: translateX(2px);
}

/* UPDATED: Full Width Pros and Cons Styles with Cross-Browser Support */
.pcp-pros-cons-container {
    width: 100%;
    margin-top: 24px;
    border-top: 1px solid #e5e7eb;
    padding-top: 24px;
}

/* DESKTOP: Cross-Browser Compatible Grid Layout - Side by Side */
.pcp-pros-cons-grid {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

/* DESKTOP: Modern browsers - Grid Layout */
@supports (display: grid) {
    .pcp-pros-cons-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
}

/* DESKTOP: Fallback for older browsers - Flexbox */
@supports not (display: grid) {
    .pcp-pros-cons-grid {
        display: flex;
        flex-direction: row;
    }
}

/* DESKTOP: Column Layout */
.pcp-pros-column,
.pcp-cons-column {
    padding: 20px;
    background: #ffffff;
    min-height: 120px;
    flex: 1;
}

/* DESKTOP: Vertical separator between columns */
.pcp-pros-column {
    border-right: 1px solid #e5e7eb;
}

/* Pros and Cons Titles */
.pcp-pros-title,
.pcp-cons-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    padding: 8px 16px;
    margin: -20px -20px 16px -20px;
}

.pcp-pros-title {
    background: #16a34a;
}

.pcp-cons-title {
    background: #dc2626;
}

/* Lists */
.pcp-pros-list,
.pcp-cons-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* List Items */
.pcp-pros-item,
.pcp-cons-item {
    margin: 0 0 12px 0;
    padding: 0 0 0 20px;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

/* Bullet Points */
.pcp-pros-item:before {
    content: "✓";
    color: #16a34a;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 16px;
}

.pcp-cons-item:before {
    content: "✗";
    color: #dc2626;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 16px;
}

.pcp-pros-item:last-child,
.pcp-cons-item:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .pcp-product-image {
        width: 200px;
        height: 200px;
        border: none;
        box-shadow: none;
    }
    
    .pcp-product-title {
        font-size: 22px;
        font-weight: bold;
        margin: 0;
    }
    
    .pcp-rating-score {
        font-size: 20px;
        font-weight: 800;
        color: #4c4c4c;
        line-height: 1;
        display: flex;
        align-items: center;
    }
    
    .pcp-product-rating {
        display: flex;
        align-items: center;
        gap: 12px;
        line-height: 1;
    }
    
    .pcp-pros-column,
    .pcp-cons-column {
        padding: 16px;
    }
    
    .pcp-pros-title,
    .pcp-cons-title {
        margin: -16px -16px 16px -16px;
    }
}

/* MOBILE: Stack Pros and Cons Vertically */
@media (max-width: 768px) {
    .pcp-container {
        padding: 0 15px;
    }
    
    .pcp-product-card {
        padding: 16px;
    }
    
    .pcp-product-content {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }
    
    .pcp-product-image {
        width: 220px;
        height: 220px;
        border: none;
        box-shadow: none;
        outline: none;
    }
    
    .pcp-product-title {
        font-size: 20px;
        font-weight: bold;
        margin: 0;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    .pcp-product-rating {
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 12px;
        line-height: 1;
    }
    
    .pcp-rating-score {
        font-size: 20px;
        font-weight: 800;
        color: #4c4c4c;
        line-height: 1;
        display: flex;
        align-items: center;
    }
    
    .pcp-product-stars {
        display: flex;
        align-items: center;
        gap: 2px;
        line-height: 1;
    }
    
    .pcp-product-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .pcp-product-button {
        flex: none;
        width: 100%;
    }
    
    /* MOBILE: Force vertical stacking - Pros on top, Cons below */
    .pcp-pros-cons-grid {
        display: flex;
        flex-direction: column;
        border-radius: 8px;
        overflow: hidden;
    }
    
    /* Override CSS Grid for mobile */
    @supports (display: grid) {
        .pcp-pros-cons-grid {
            display: flex;
            flex-direction: column;
            grid-template-columns: none;
        }
    }
    
    /* Ensure flexbox stacking for mobile */
    @supports not (display: grid) {
        .pcp-pros-cons-grid {
            display: flex;
            flex-direction: column;
        }
    }
    
    /* MOBILE: Pros section (full width, on top) */
    .pcp-pros-column {
        width: 100%;
        flex: none;
        border-right: none;
        border-bottom: none;
        padding: 16px;
        order: 1;
    }
    
    /* MOBILE: Cons section (full width, below pros) */
    .pcp-cons-column {
        width: 100%;
        flex: none;
        padding: 16px;
        order: 2;
    }
    
    /* MOBILE: Title adjustments */
    .pcp-pros-title,
    .pcp-cons-title {
        margin: -16px -16px 16px -16px;
        font-size: 16px;
    }
}

/* MOBILE SMALL: Extra small screens */
@media (max-width: 480px) {
    .pcp-product-card {
        padding: 14px;
    }
    
    .pcp-product-content {
        gap: 16px;
    }
    
    .pcp-product-image {
        width: 200px;
        height: 200px;
        border: none;
        box-shadow: none;
        outline: none;
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
    }
    
    .pcp-product-title {
        font-size: 18px;
        font-weight: bold;
        margin: 0;
        margin-top: 0;
        margin-bottom: 0;
        padding: 0;
    }
    
    .pcp-product-description {
        font-size: 14px;
        margin: 12px 0 16px 0;
    }
    
    .pcp-product-button {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .pcp-rating-score {
        font-size: 20px;
        font-weight: 800;
        color: #4c4c4c;
        line-height: 1;
        display: flex;
        align-items: center;
    }
    
    .pcp-product-rating {
        display: flex;
        align-items: center;
        gap: 12px;
        line-height: 1;
    }
    
    .pcp-product-stars {
        display: flex;
        align-items: center;
        gap: 2px;
        line-height: 1;
    }
    
    .pcp-pros-cons-container {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    /* MOBILE SMALL: Force vertical stacking */
    .pcp-pros-cons-grid {
        display: flex;
        flex-direction: column;
    }
    
    .pcp-pros-column,
    .pcp-cons-column {
        padding: 12px;
    }
    
    .pcp-pros-title,
    .pcp-cons-title {
        font-size: 16px;
        margin: 0 0 12px 0;
    }
    
    .pcp-pros-item,
    .pcp-cons-item {
        font-size: 13px;
        margin-bottom: 10px;
    }
}
