/* Extended Styles - Loaded asynchronously */

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
}

thead {
    background: var(--primary);
    color: white;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

tbody tr:hover {
    background: var(--bg-light);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
}

.comparison-table th {
    font-weight: 600;
    white-space: nowrap;
}

.pros {
    color: var(--success);
}

.cons {
    color: var(--danger);
}

/* Step-by-step Guide */
.steps {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
}

.steps li {
    counter-increment: step-counter;
    position: relative;
    padding: 1.5rem 1.5rem 1.5rem 4rem;
    margin-bottom: 1.5rem;
    background: var(--bg-light);
    border-left: 4px solid var(--primary);
    border-radius: 4px;
}

.steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1rem;
    top: 1.5rem;
    background: var(--primary);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.steps h3 {
    margin-top: 0;
}

/* Warning/Alert Boxes */
.alert {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    border-left: 4px solid;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--warning);
    color: #856404;
}

.alert-danger {
    background: #f8d7da;
    border-color: var(--danger);
    color: #721c24;
}

.alert-success {
    background: #d4edda;
    border-color: var(--success);
    color: #155724;
}

.alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Product Cards */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: var(--bg-light);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.stars {
    color: #ffa500;
    font-size: 1.1rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.product-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.product-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.buy-button {
    margin-top: auto;
    width: 100%;
    padding: 0.75rem;
    background: var(--secondary);
    color: white;
    text-align: center;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
}

.buy-button:hover {
    background: #e55a2b;
    text-decoration: none;
}

/* FAQ Section */
.faq-item {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.faq-question {
    background: var(--bg-light);
    padding: 1rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg);
}

.faq-answer {
    padding: 1rem 1.5rem;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--text-light);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--text-light);
}

/* Article Meta */
.article-meta {
    display: flex;
    gap: 2rem;
    margin: 1rem 0 2rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Table of Contents */
.toc {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.toc h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.toc ul {
    list-style: none;
    padding-left: 1rem;
}

.toc li {
    margin: 0.5rem 0;
}

.toc a {
    color: var(--text);
}

.toc a:hover {
    color: var(--primary);
}

/* Footer */
footer {
    background: var(--bg-dark);
    color: var(--bg);
    padding: 3rem 1rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--bg);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin: 0.5rem 0;
}

.footer-section a {
    color: #b0b0b0;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #3d3d3d;
    color: #888;
    font-size: 0.9rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Responsive Utilities */
@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }

    .comparison-table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    .steps li {
        padding-left: 3.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    header, footer, .cta-button, .buy-button {
        display: none;
    }

    body {
        color: black;
        background: white;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
