/**
 * Component Library
 * Product Cards, Comparison Tables, Pros/Cons Blocks, FAQ Accordions
 */

/* ==========================================
   PRODUCT CARD COMPONENT
   ========================================== */
.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-6px);
}

.product-card__image {
    position: relative;
    margin-bottom: var(--space-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--color-cream);
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
}

.product-card__rating {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.product-card__stars {
    color: var(--color-warning);
    font-size: var(--font-size-lg);
}

.product-card__rating-count {
    font-size: var(--font-size-sm);
    color: var(--color-text-light);
}

.product-card__title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
    color: var(--color-green-dark);
}

.product-card__subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-medium);
    margin-bottom: var(--space-md);
}

.product-card__quick-facts {
    background: var(--color-cream-light);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.product-card__fact {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    font-size: var(--font-size-sm);
}

.product-card__fact-label {
    color: var(--color-text-medium);
}

.product-card__fact-value {
    font-weight: 600;
    color: var(--color-text-dark);
}

.product-card__price {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-green);
    margin-bottom: var(--space-md);
}

.product-card__cta {
    margin-top: auto;
}

/* ==========================================
   COMPARISON TABLE
   ========================================== */
.comparison-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: var(--space-xl);
}

.comparison-table table {
    min-width: 600px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison-table th {
    background: var(--color-green);
    color: var(--color-white);
    font-weight: 600;
    padding: var(--space-md);
    text-align: center;
}

.comparison-table td {
    padding: var(--space-md);
    text-align: center;
    vertical-align: middle;
}

.comparison-table tr:nth-child(even) {
    background: var(--color-cream-light);
}

.comparison-table__score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-weight: 700;
    font-size: var(--font-size-xl);
    color: var(--color-white);
}

.comparison-table__score--high {
    background: var(--color-success);
}

.comparison-table__score--medium {
    background: var(--color-warning);
    color: var(--color-text-dark);
}

.comparison-table__score--low {
    background: var(--color-error);
}

.comparison-table__checkmark {
    color: var(--color-success);
    font-size: var(--font-size-2xl);
}

.comparison-table__cross {
    color: var(--color-error);
    font-size: var(--font-size-2xl);
}

/* Mobile Responsive Table */
@media (max-width: 768px) {
    .comparison-table {
        margin: 0 0 var(--space-md) 0;
    }

    .comparison-table th,
    .comparison-table td {
        padding: var(--space-xs);
    }
}

/* ==========================================
   PROS & CONS BLOCK
   ========================================== */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

@media (max-width: 768px) {
    .pros-cons {
        grid-template-columns: 1fr;
    }
}

.pros-cons__section {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.pros-cons__section--pros {
    border-top: 4px solid var(--color-success);
}

.pros-cons__section--cons {
    border-top: 4px solid var(--color-error);
}

.pros-cons__title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.pros-cons__title--pros {
    color: var(--color-success);
}

.pros-cons__title--cons {
    color: var(--color-error);
}

.pros-cons__list {
    list-style: none;
}

.pros-cons__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.pros-cons__item:hover {
    background: var(--color-cream-light);
}

.pros-cons__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-size-lg);
    margin-top: 2px;
}

.pros-cons__icon--pro {
    color: var(--color-success);
}

.pros-cons__icon--con {
    color: var(--color-error);
}

.pros-cons__text {
    flex: 1;
    color: var(--color-text-dark);
    line-height: var(--line-height-normal);
}

/* ==========================================
   FAQ ACCORDION
   ========================================== */
.faq-accordion {
    margin: var(--space-xl) 0;
}

.faq-accordion__title {
    font-size: var(--font-size-3xl);
    text-align: center;
    margin-bottom: var(--space-xl);
    color: var(--color-green-dark);
}

.faq-accordion__item {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-accordion__question {
    width: 100%;
    padding: var(--space-lg);
    background: transparent;
    border: none;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-green-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-base);
}

.faq-accordion__question:hover {
    background: var(--color-cream-light);
}

.faq-accordion__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-base);
    color: var(--color-coral);
    font-weight: 700;
}

.faq-accordion__icon::before {
    content: "\25BC";
}

.faq-accordion__item.active .faq-accordion__icon {
    transform: rotate(180deg);
}

.faq-accordion__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.faq-accordion__item.active .faq-accordion__answer {
    max-height: 500px;
}

.faq-accordion__answer-content {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--color-text-medium);
    line-height: var(--line-height-relaxed);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-dark) 100%);
    color: var(--color-white);
    padding: var(--space-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: 100px;
    opacity: 0.5;
}

.hero__content {
    position: relative;
    z-index: 1;
}

.hero__title {
    font-size: var(--font-size-5xl);
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.hero__subtitle {
    font-size: var(--font-size-xl);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .hero {
        padding: var(--space-xl) 0;
    }

    .hero__title {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }

    .hero__subtitle {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }
}

/* ==========================================
   BREADCRUMB NAVIGATION
   ========================================== */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md) 0;
    font-size: var(--font-size-sm);
}

.breadcrumb__item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.breadcrumb__link {
    color: var(--color-text-medium);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb__link:hover {
    color: var(--color-green);
    text-decoration: underline;
}

.breadcrumb__separator {
    color: var(--color-text-light);
}

.breadcrumb__current {
    color: var(--color-text-dark);
    font-weight: 600;
}

/* ==========================================
   SOCIAL PROOF BADGES
   ========================================== */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-md);
    background: var(--color-cream-light);
    border-radius: var(--radius-lg);
    margin: var(--space-md) 0;
}

.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
}

.trust-badge__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    font-size: var(--font-size-2xl);
}

.trust-badge__text {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-green-dark);
}

/* ==========================================
   GRADING CHART
   ========================================== */
.grading-chart {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    margin: var(--space-xl) 0;
}

.grading-chart__title {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.grading-chart__row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.grading-chart__label {
    flex: 0 0 200px;
    font-weight: 600;
    color: var(--color-text-dark);
}

.grading-chart__bar-container {
    flex: 1;
    height: 32px;
    background: var(--color-cream);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.grading-chart__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-coral), var(--color-coral-dark));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: var(--space-sm);
    transition: width var(--transition-slow);
}

.grading-chart__score {
    flex: 0 0 48px;
    text-align: center;
    font-weight: 700;
    font-size: var(--font-size-xl);
    color: var(--color-green);
}

@media (max-width: 768px) {
    .grading-chart__row {
        flex-direction: column;
        align-items: stretch;
    }

    .grading-chart__label {
        flex: 1;
    }
}

/* ==========================================
   STOCK STATUS INDICATOR
   ========================================== */
.stock-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.stock-status--in-stock {
    background: rgba(76, 175, 80, 0.1);
    color: var(--color-success);
}

.stock-status--low-stock {
    background: rgba(255, 193, 7, 0.1);
    color: var(--color-warning);
}

.stock-status--out-of-stock {
    background: rgba(244, 67, 54, 0.1);
    color: var(--color-error);
}

.stock-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}