/**
 * AI Shopee Review - Frontend Stylesheet
 * Optimized for Conversion, SEO/AEO/GEO, Fast Loading & Mobile Responsiveness
 */

/* ==========================================================================
   TL;DR Summary Box
   ========================================================================== */
.aisr-tldr {
    background: #fff4e6;
    border-left: 4px solid #f76707;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0 28px 0;
    font-size: 0.98em;
    line-height: 1.65;
    color: #212529;
}

/* ==========================================================================
   Shopee Product Conversion Box (Review Post)
   ========================================================================== */
.aisr-shopee-box {
    background: #ffffff;
    border: 2px solid #ee4d2d;
    border-radius: 14px;
    padding: 24px;
    margin: 34px 0;
    box-shadow: 0 4px 18px rgba(238, 77, 45, 0.12);
    position: relative;
}

.aisr-shopee-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ee4d2d 0%, #ff5722 100%);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 0.4px;
}

.aisr-shopee-title {
    margin: 0 0 12px 0 !important;
    font-size: 1.25em !important;
    color: #212529;
}

.aisr-shopee-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    background: #f8f9fa;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.92em;
}

.aisr-price-tag strong {
    color: #ee4d2d;
    font-size: 1.1em;
}

.aisr-pros-cons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
    font-size: 0.9em;
}

.aisr-pros {
    background: #e6fcf5;
    padding: 12px 16px;
    border-radius: 8px;
    color: #087f5b;
}

.aisr-cons {
    background: #fff5f5;
    padding: 12px 16px;
    border-radius: 8px;
    color: #c92a2a;
}

.aisr-pros ul,
.aisr-cons ul {
    margin: 6px 0 0 0;
    padding-left: 18px;
}

.aisr-shopee-cta-wrap {
    text-align: center;
    margin-top: 14px;
}

/* ==========================================================================
   Modern Pill-Shape Shopee CTA Buttons (High Converting & Authentic)
   ========================================================================== */
.aisr-cta-container {
    margin: 32px auto 26px auto;
    text-align: center;
    padding: 4px 0;
    clear: both;
}

.aisr-shopee-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 28px;
    background: linear-gradient(135deg, #ee4d2d 0%, #ff5722 50%, #f03e1b 100%);
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 16px rgba(238, 77, 45, 0.38), 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    letter-spacing: 0.2px;
}

.aisr-shopee-pill-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.32), transparent);
    transition: all 0.65s ease;
}

.aisr-shopee-pill-btn:hover {
    background: linear-gradient(135deg, #f03e1b 0%, #ee4d2d 50%, #d83a1a 100%);
    color: #ffffff !important;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(238, 77, 45, 0.48), 0 4px 8px rgba(0, 0, 0, 0.12);
}

.aisr-shopee-pill-btn:hover::before {
    left: 100%;
}

.aisr-shopee-pill-btn:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 3px 10px rgba(238, 77, 45, 0.35);
}

.aisr-shopee-pill-btn-lg {
    padding: 15px 36px;
    font-size: 17px;
}

.aisr-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.aisr-shopee-pill-btn:hover .aisr-pill-icon {
    transform: scale(1.2) rotate(-5deg);
}

.aisr-flat-svg {
    display: block;
    vertical-align: middle;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.aisr-pill-text {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.aisr-pill-arrow {
    font-size: 16px;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.aisr-shopee-pill-btn:hover .aisr-pill-arrow {
    transform: translateX(3px);
}

/* ==========================================================================
   Evergreen Cluster Interlinking Box
   ========================================================================== */
.aisr-cluster-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 18px 22px;
    margin: 28px 0;
}

.aisr-cluster-box h4 {
    margin: 0 0 10px 0;
    font-size: 1.05em;
    color: #343a40;
}

/* ==========================================================================
   Product Hero Image & Shopee CDN Gallery
   ========================================================================== */
.aisr-product-hero-wrap {
    margin: 24px auto 30px auto;
    text-align: center;
    max-width: 650px;
}

.aisr-product-hero-img {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.aisr-img-caption {
    font-size: 12.5px;
    color: #868e96;
    margin-top: 8px;
}

.aisr-shopee-gallery-wrap {
    background: #fdfdfd;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin: 32px 0;
}

.aisr-shopee-gallery-wrap h4 {
    margin: 0 0 14px 0;
    font-size: 16px;
    color: #212529;
}

.aisr-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.aisr-gallery-item {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    aspect-ratio: 1 / 1;
    background: #ffffff;
}

.aisr-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.aisr-gallery-item:hover img {
    transform: scale(1.05);
}

.aisr-gallery-cta {
    text-align: center;
    margin-top: 14px;
}

.aisr-gallery-cta-link {
    color: #ee4d2d;
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: underline;
}

/* ==========================================================================
   FAQ Accordion (<details> / <summary>)
   ========================================================================== */
.aisr-faq-accordion-wrap {
    margin: 36px 0;
    padding: 24px;
    background: #fdfefe;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.aisr-faq-header {
    margin-bottom: 20px;
    text-align: left;
}

.aisr-faq-badge {
    display: inline-block;
    background: #e7f5ff;
    color: #1971c2;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.aisr-faq-title {
    margin: 4px 0 6px 0 !important;
    font-size: 1.3em !important;
    color: #212529 !important;
    font-weight: 700;
}

.aisr-faq-subtitle {
    margin: 0;
    font-size: 13.5px;
    color: #868e96;
}

.aisr-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aisr-faq-item {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.aisr-faq-item[open] {
    border-color: #ee4d2d;
    box-shadow: 0 4px 14px rgba(238, 77, 45, 0.1);
}

.aisr-faq-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15.5px;
    color: #343a40;
    list-style: none;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.aisr-faq-summary::-webkit-details-marker {
    display: none;
}

.aisr-faq-summary:hover {
    background: #fff9f6;
    color: #ee4d2d;
}

.aisr-faq-summary:focus-visible {
    outline: 2px solid #ee4d2d;
    outline-offset: -2px;
    background: #fff9f6;
}

.aisr-faq-item[open] .aisr-faq-summary {
    color: #ee4d2d;
    border-bottom: 1px solid #ffe8cc;
    background: #fff9f6;
}

.aisr-faq-question-text {
    flex: 1;
    padding-right: 14px;
    line-height: 1.4;
}

.aisr-faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f1f3f5;
    color: #495057;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, color 0.2s ease;
}

.aisr-faq-item[open] .aisr-faq-icon {
    transform: rotate(180deg);
    background: #ee4d2d;
    color: #ffffff;
}

.aisr-faq-answer {
    padding: 14px 18px 16px 18px;
    color: #495057;
    font-size: 14.5px;
    line-height: 1.65;
    background: #ffffff;
    animation: aisrFadeIn 0.25s ease-out;
}

.aisr-faq-answer p {
    margin: 0;
}

@keyframes aisrFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Mobile Responsive Adjustments
   ========================================================================== */
@media (max-width: 640px) {
    .aisr-shopee-pill-btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 14.5px;
        border-radius: 30px;
        box-sizing: border-box;
    }
    .aisr-flat-svg {
        width: 19px;
        height: 19px;
    }
    .aisr-shopee-meta {
        flex-direction: column;
        gap: 8px;
    }
}
