/**
 * AI Product Review Generator - Frontend Styles
 * Beautiful product review cards inspired by modern review sites
 */

/* ========================================
   Global Styles
   ======================================== */

.aprg-product-review {
    max-width: 1200px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

/* ========================================
   Product Card Container
   ======================================== */

.aprg-product-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 0;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    overflow: hidden;
}

.aprg-product-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #cbd5e1;
}

/* ========================================
   Product Header Section
   ======================================== */

.aprg-product-header {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    padding: 40px;
    background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
}

.aprg-product-image {
    position: relative;
}

.aprg-product-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.aprg-product-image img:hover {
    transform: scale(1.05);
}

.aprg-product-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========================================
   Product Title
   ======================================== */

.aprg-product-title {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.aprg-product-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
}

.aprg-product-title a:hover {
    color: #2563eb;
}

/* ========================================
   Rating Badge
   ======================================== */

.aprg-rating-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    letter-spacing: -0.01em;
    min-width: 80px;
}

.aprg-rating-badge .star {
    font-size: 22px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* ========================================
   Product Meta Information
   ======================================== */

.aprg-product-meta {
    display: flex;
    gap: 24px;
    margin: 0;
    flex-wrap: wrap;
    align-items: center;
}

.aprg-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
    padding: 8px 14px;
    background: #f3f4f6;
    border-radius: 8px;
    transition: all 0.2s;
}

.aprg-meta-item:hover {
    background: #e5e7eb;
    color: #374151;
}

.aprg-meta-item .icon {
    font-size: 18px;
}

/* Star Rating Display */
.aprg-star-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.aprg-star-rating .stars {
    color: #f59e0b;
    font-size: 18px;
    letter-spacing: 2px;
}

.aprg-star-rating .rating-value {
    font-weight: 700;
    color: #111827;
    font-size: 16px;
}

/* ========================================
   Product Price
   ======================================== */

.aprg-product-price {
    font-size: 36px;
    font-weight: 800;
    color: #059669;
    margin: 15px 0;
    letter-spacing: -0.02em;
    line-height: 1;
}

.aprg-price-old {
    font-size: 20px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 12px;
    font-weight: 600;
}

/* ========================================
   Buy Buttons / CTA
   ======================================== */

.aprg-buy-buttons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.aprg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.aprg-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.aprg-btn:hover::before {
    left: 100%;
}

.aprg-btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.aprg-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
}

.aprg-btn-primary:active {
    transform: translateY(-1px);
}

.aprg-btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.aprg-btn-secondary:hover {
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2);
}

/* Pros & Cons */
.aprg-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.aprg-pros,
.aprg-cons {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
}

.aprg-pros {
    border-left: 4px solid #10b981;
}

.aprg-cons {
    border-left: 4px solid #ef4444;
}

.aprg-pros h3,
.aprg-cons h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aprg-pros h3 {
    color: #10b981;
}

.aprg-cons h3 {
    color: #ef4444;
}

.aprg-pros ul,
.aprg-cons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aprg-pros li,
.aprg-cons li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    line-height: 1.6;
    color: #374151;
}

.aprg-pros li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
    font-size: 18px;
}

.aprg-cons li:before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: 700;
    font-size: 18px;
}

/* Specifications Table */
.aprg-specs {
    margin: 30px 0;
}

.aprg-specs h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px 0;
}

.aprg-specs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.aprg-specs-table tr {
    border-bottom: 1px solid #e5e7eb;
}

.aprg-specs-table tr:last-child {
    border-bottom: none;
}

.aprg-specs-table th,
.aprg-specs-table td {
    padding: 12px 16px;
    text-align: left;
}

.aprg-specs-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    width: 30%;
}

.aprg-specs-table td {
    color: #111827;
}

/* Review Content */
.aprg-review-content {
    margin: 30px 0;
    line-height: 1.8;
    color: #374151;
    font-size: 16px;
}

.aprg-review-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.aprg-review-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 30px 0 15px 0;
}

.aprg-review-content p {
    margin: 15px 0;
}

.aprg-review-content ul,
.aprg-review-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.aprg-review-content li {
    margin: 8px 0;
}

/* Comparison Table */
.aprg-comparison {
    margin: 40px 0;
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.aprg-comparison-table,
.entry-content table:not([class]),
.post-content table:not([class]) {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    font-size: 15px;
}

.aprg-comparison-table thead,
.entry-content table:not([class]) thead,
.post-content table:not([class]) thead,
/* Fallback for AI tables without thead */
.aprg-comparison-table tr:first-child,
.entry-content table:not([class]) tr:first-child,
.post-content table:not([class]) tr:first-child {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
}

.aprg-comparison-table th,
.entry-content table:not([class]) th,
.post-content table:not([class]) th,
.entry-content table:not([class]) tr:first-child td,
.post-content table:not([class]) tr:first-child td {
    padding: 16px;
    font-weight: 600;
    text-align: left;
    color: white !important;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #374151;
}

.aprg-comparison-table td,
.entry-content table:not([class]) td,
.post-content table:not([class]) td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
    line-height: 1.5;
}

.aprg-comparison-table tr:last-child td,
.entry-content table:not([class]) tr:last-child td,
.post-content table:not([class]) tr:last-child td {
    border-bottom: none;
}

.aprg-comparison-table tr:nth-child(even),
.entry-content table:not([class]) tr:nth-child(even),
.post-content table:not([class]) tr:nth-child(even) {
    background: #f9fafb;
}

.aprg-comparison-table tr:hover,
.entry-content table:not([class]) tr:hover,
.post-content table:not([class]) tr:hover {
    background: #f3f4f6;
    transition: background 0.15s ease;
}

/* FAQ Section */
.aprg-faq {
    margin: 40px 0;
}

.aprg-faq h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 30px 0;
}

.aprg-faq-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.aprg-faq-question {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    padding: 20px;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.aprg-faq-question:hover {
    background: #f9fafb;
}

.aprg-faq-answer {
    padding: 0 20px 20px 20px;
    color: #374151;
    line-height: 1.7;
}

/* Verdict Box */
.aprg-verdict {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
}

.aprg-verdict h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.aprg-verdict p {
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
    opacity: 0.95;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 968px) {
    .aprg-product-header {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }

    .aprg-product-image {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .aprg-product-review {
        margin: 20px auto;
        padding: 0 15px;
    }

    .aprg-product-card {
        border-radius: 12px;
        margin-bottom: 30px;
    }

    .aprg-product-header {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px;
    }

    .aprg-product-image {
        width: 100%;
        max-width: 100%;
    }

    .aprg-product-image img {
        padding: 10px;
    }

    .aprg-product-title {
        font-size: 22px;
    }

    .aprg-rating-badge {
        font-size: 18px;
        padding: 8px 14px;
    }

    .aprg-product-meta {
        gap: 12px;
    }

    .aprg-meta-item {
        font-size: 14px;
        padding: 6px 10px;
    }

    .aprg-product-price {
        font-size: 28px;
    }

    .aprg-price-old {
        font-size: 18px;
    }

    .aprg-pros-cons {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .aprg-buy-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .aprg-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 16px;
    }
}

/* Print Styles */
@media print {

    .aprg-buy-buttons,
    .aprg-btn {
        display: none;
    }

    .aprg-product-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}