/**
 * Product detail page styles
 * Extracted from inline <style> blocks in reviews/detail.php
 */

/* Preview banner (admin preview mode) */
.preview-banner {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 0.75rem 0;
    font-weight: 500;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.preview-banner svg {
    margin-right: 0.5rem;
}
.preview-edit-link {
    color: white;
    margin-left: 1rem;
    text-decoration: underline;
    opacity: 0.9;
}
.preview-edit-link:hover {
    opacity: 1;
}

/* Review meta (date, author) */
.review-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.review-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.review-meta-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Product headline */
.product-headline {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin: 0 0 1rem;
    font-style: italic;
    line-height: 1.4;
}

/* Pros & Cons */
.pros-cons-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid var(--color-border, #eee);
}
.pros-section, .cons-section {
    min-width: 0;
}
.pros-title, .cons-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}
.pros-title {
    color: #16a34a;
}
.cons-title {
    color: #dc2626;
}
.pros-list, .cons-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pros-list li, .cons-list li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.pros-list li:last-child, .cons-list li:last-child {
    border-bottom: none;
}
.pros-list li::before {
    content: "+";
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #16a34a;
}
.cons-list li::before {
    content: "\2212";
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #dc2626;
}
@media (max-width: 640px) {
    .pros-cons-overview {
        grid-template-columns: 1fr;
    }
}

/* FAQ */
.faq-item {
    padding: 0;
}
.faq-item-border {
    border-top: 1px solid var(--color-border, #eee);
    padding-top: 1rem;
    margin-top: 1rem;
}
.faq-question {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--color-text);
}
.faq-answer {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.6;
}
.section-inline {
    margin-top: 2rem;
}

/* Breadcrumb override */
.breadcrumb-nav {
    margin-bottom: 0;
    padding: 0;
}

/* Product Hero Card */
.product-hero-container {
    position: sticky;
    top: 1.4rem;
    z-index: 80;
    background: var(--color-bg-secondary);
    padding: 1rem 0.5rem 2rem;
}
.product-hero-card {
    display: flex;
    gap: 1.5rem;
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    min-height: 182px;
    position: sticky;
    top: 80px;
    z-index: 90;
}
.product-hero-image {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-hero-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.product-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.product-hero-info h1 {
    font-size: 1.5rem;
    margin: 0.25rem 0 0.5rem;
    line-height: 1.3;
}
.product-amazon-title {
    font-size: 0.9rem;
    font-weight: 400;
    color: #6b7280;
    margin: 0 0 0.75rem;
    line-height: 1.4;
}
@media (max-width: 640px) {
    .product-hero-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .product-hero-image {
        width: 160px;
        height: 160px;
    }
    .product-hero-info h1 {
        font-size: 1.25rem;
    }
    .review-meta {
        justify-content: center;
    }
}

/* Product layout */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    align-items: start;
    padding-bottom: 2.5rem;
}
.product-main {
    min-width: 0;
}
.product-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    z-index: 90;
    align-self: start;
}
.product-image-placeholder {
    aspect-ratio: 1;
    background: var(--color-bg-secondary);
    border-radius: 8px;
}

/* Sidebar Rating */
.sidebar-rating-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    padding: 1.25rem;
    height: 182px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 0.75rem;
}
.sidebar-rating-img {
    height: 100px;
    width: auto;
    flex-shrink: 0;
}
.sidebar-rating-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.sidebar-rating-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
}
.sidebar-rating-source {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}
.sidebar-logo {
    height: 16px;
    width: auto;
}

/* Buy box */
.product-buy-box {
    background: #fff;
    border-radius: 10px;
    padding: 0.875rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.product-price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border, #eee);
}
.price-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}
.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}
.btn-amazon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: #ff9900;
    color: #111;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.15s;
    position: relative;
    overflow: hidden;
}
.btn-amazon:hover {
    color: #111;
    transform: translateY(1px);
}
.btn-amazon:active {
    transform: translateY(2px);
}
.btn-amazon .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: btn-ripple 0.9s ease-out forwards;
    pointer-events: none;
}
@keyframes btn-ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}
.affiliate-note {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    text-align: center;
    margin: 0.5rem 0 0;
}
/* Bottom sidebar: hidden on desktop, shown on mobile */
.product-sidebar-bottom {
    display: none;
}

@media (max-width: 900px) {
    .product-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .product-main {
        display: contents;
    }
    .product-hero-card {
        order: 1;
        position: static;
    }
    .product-sidebar {
        position: static;
        order: 2;
        width: 100%;
    }
    .sidebar-rating-box {
        height: auto;
    }
    .product-buy-box {
        margin-bottom: 1rem;
    }
    .review-meta { order: 3; }
    .product-headline { order: 4; }
    .pros-cons-overview { order: 5; }
    .card.mb-3 { order: 6; }
    .section-inline { order: 7; }
    .product-sidebar-bottom {
        display: block;
        order: 8;
        width: 100%;
    }
    .product-hero-container {
        position: static;
        padding: 0;
        margin: 0;
        background: none;
    }
}

/* Related products */
.related-products-section {
    background: var(--color-bg-secondary);
    padding: 2rem 0;
}
.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.related-product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.related-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.related-product-image {
    display: block;
    aspect-ratio: 1;
    background: #fff;
    overflow: hidden;
}
.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.75rem;
}
.related-product-placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-bg-secondary);
}
.related-product-content {
    padding: 1rem;
}
.related-product-brand {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-secondary);
}
.related-product-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.25rem 0 0.75rem;
    line-height: 1.3;
}
.related-product-title a {
    color: var(--color-text);
    text-decoration: none;
}
.related-product-title a:hover {
    color: #007bff;
}
.related-product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.related-product-rating-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--color-text-secondary);
}
.related-rating-logo {
    height: 14px;
    width: auto;
}
.related-rating-img {
    height: 36px;
    width: auto;
    flex-shrink: 0;
}
.related-rating-label-text {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}
@media (max-width: 992px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .related-products-grid {
        grid-template-columns: 1fr;
    }
}

/* Product keywords */
.product-keywords-section {
    background: #fff;
    padding: 2rem 0;
}
.product-keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.product-keyword-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-bg-secondary);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.product-keyword-tag:hover {
    background: #007bff;
    color: #fff;
}

/* Store Price Comparison */
.store-section {
    padding: 0.75rem 0;
}
.store-section:first-child {
    padding-top: 0;
}
.store-divider {
    height: 1px;
    background: var(--color-border, #eee);
}
.store-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.store-row-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}
.store-row-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
}
.store-link-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.15s;
}
.store-link-row:hover {
    background: var(--color-bg-secondary, #f5f5f5);
    color: var(--color-text);
}
.store-link-row .store-row-name {
    font-size: 0.85rem;
}
.store-link-row .store-row-price {
    font-size: 0.95rem;
}
.store-best-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #16a34a;
    background: rgba(34, 197, 94, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.btn-store {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: transform 0.15s, opacity 0.15s;
    background: #e5e7eb;
    color: #111;
}
.btn-store:hover {
    opacity: 0.9;
    transform: translateY(1px);
    color: #111;
}
.btn-store.btn-amazon {
    background: #ff9900;
}
