/* ═══════════════════════════════════════════════════════════
   Pick Wisely — Affiliate Components
   Product cards, pros/cons, ratings, badges, CTAs, etc.
   ═══════════════════════════════════════════════════════════ */

/* ═══ PRODUCT CARD ═════════════════════════════════════════ */
.pw-product-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--pw-white);
    border: 1px solid var(--pw-gray-200);
    border-radius: var(--pw-radius-lg);
    overflow: hidden;
    margin: 2rem 0;
    transition: box-shadow 0.3s var(--pw-ease);
}

.pw-product-card:hover {
    box-shadow: var(--pw-shadow-lg);
}

.pw-product-card__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    padding: 0.375rem 1rem;
    font-size: var(--pw-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
    color: var(--pw-white);
}

.pw-badge--top-pick {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.pw-badge--editors-choice {
    background: linear-gradient(135deg, var(--pw-accent), #7c3aed);
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
    color: var(--pw-white);
    margin-bottom: 0.375rem;
}

.pw-badge--best-for {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: var(--pw-text-xs);
    font-weight: 600;
    background: var(--pw-accent-light);
    color: var(--pw-accent);
    border-radius: 100px;
}

.pw-product-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--pw-gray-50);
    min-height: 200px;
}

.pw-product-card__image img {
    max-height: 200px;
    object-fit: contain;
}

.pw-product-card__placeholder {
    color: var(--pw-gray-300);
}

.pw-product-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pw-product-card__title {
    font-family: var(--pw-font-heading);
    font-size: var(--pw-text-xl);
    font-weight: 700;
    color: var(--pw-gray-900);
}

.pw-product-card__desc {
    color: var(--pw-gray-500);
    font-size: var(--pw-text-sm);
    line-height: 1.6;
}

.pw-product-card__rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pw-product-card__cta {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* ═══ STAR RATINGS ═════════════════════════════════════════ */
.pw-stars {
    color: #f59e0b;
    font-size: var(--pw-text-lg);
    letter-spacing: 1px;
}

.pw-rating-text {
    font-size: var(--pw-text-sm);
    font-weight: 600;
    color: var(--pw-gray-700);
}

/* ═══ PROS & CONS ══════════════════════════════════════════ */
.pw-pros-cons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 2rem 0;
    border-radius: var(--pw-radius-lg);
    overflow: hidden;
    border: 1px solid var(--pw-gray-200);
}

.pw-pros-cons__col {
    padding: 1.5rem;
}

.pw-pros-cons__col--pros {
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
}

.pw-pros-cons__col--cons {
    background: #fef2f2;
}

.pw-pros-cons__heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--pw-font-heading);
    font-size: var(--pw-text-base);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.pw-pros-cons__col--pros .pw-pros-cons__heading {
    color: #15803d;
}

.pw-pros-cons__col--cons .pw-pros-cons__heading {
    color: #b91c1c;
}

.pw-pros-cons__list {
    list-style: none;
    padding: 0;
}

.pw-pros-cons__list li {
    position: relative;
    padding: 0.375rem 0 0.375rem 1.5rem;
    font-size: var(--pw-text-sm);
    color: var(--pw-gray-700);
}

.pw-pros-cons__col--pros .pw-pros-cons__list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #15803d;
    font-weight: 700;
}

.pw-pros-cons__col--cons .pw-pros-cons__list li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: #b91c1c;
    font-weight: 700;
}

/* ═══ COMPARISON TABLE ═════════════════════════════════════ */
.pw-comparison-table-wrap {
    margin: 2rem 0;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--pw-radius);
    border: 1px solid var(--pw-gray-200);
    background: #fff;
}

.pw-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--pw-text-sm);
    min-width: 640px;
    table-layout: auto;
}

.pw-comparison-table thead {
    background: var(--pw-gray-50);
}

.pw-comparison-table th {
    padding: 1rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid var(--pw-gray-200);
    font-size: var(--pw-text-sm);
    color: var(--pw-gray-900);
}

.pw-comparison-table th:first-child {
    text-align: left;
}

.pw-comparison-table td {
    padding: 0.875rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--pw-gray-100);
    color: var(--pw-gray-700);
}

.pw-comparison-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--pw-gray-800);
}

.pw-comparison-table tbody tr:hover {
    background: var(--pw-gray-50);
}

.pw-comparison-table tfoot td {
    padding: 1rem;
    border-bottom: none;
}

.pw-comparison-table tfoot .pw-btn {
    min-width: 8.5rem;
    min-height: 2.75rem;
    padding: 0.625rem 0.875rem;
    font-size: var(--pw-text-sm);
    font-weight: 700;
    line-height: 1.2;
    color: var(--pw-white) !important;
    text-align: center;
}

.pw-comparison-table tfoot .pw-btn:hover,
.pw-comparison-table tfoot .pw-btn:focus {
    color: var(--pw-white) !important;
}


.pw-comparison-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    padding: 1rem;
    border-top: 1px solid var(--pw-gray-100);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.45) 0%, rgba(255,255,255,0.95) 100%);
}

.pw-comparison-table-action {
    display: flex;
}

.pw-comparison-table-action .pw-btn {
    min-width: 8.5rem;
    min-height: 2.75rem;
    padding: 0.625rem 0.875rem;
    font-size: var(--pw-text-sm);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.pw-comparison-table-action .pw-btn,
.pw-comparison-table-action .pw-btn:hover,
.pw-comparison-table-action .pw-btn:focus {
    text-decoration: none;
}

.pw-technique-table {
    min-width: 0;
}

.pw-technique-table th,
.pw-technique-table td {
    text-align: left;
}

.pw-technique-table th:first-child,
.pw-technique-table td:first-child {
    width: 34%;
}

/* ═══ CALLOUT BOXES ════════════════════════════════════════ */
.pw-callout {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: var(--pw-radius);
    border-left: 4px solid;
    font-size: var(--pw-text-sm);
}

.pw-callout--info {
    background: #f0f9ff;
    border-color: #0ea5e9;
    color: #0c4a6e;
}

.pw-callout--warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #78350f;
}

.pw-callout--success {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #14532d;
}

.pw-callout--danger {
    background: #fef2f2;
    border-color: #ef4444;
    color: #7f1d1d;
}

.pw-callout__title {
    font-weight: 700;
    margin-bottom: 0.375rem;
}

/* ═══ DISCLAIMER / NOTICE BOX ══════════════════════════════ */
.pw-disclaimer {
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    background: var(--pw-gray-50);
    border: 1px dashed var(--pw-gray-300);
    border-radius: var(--pw-radius);
    font-size: var(--pw-text-xs);
    color: var(--pw-gray-500);
    font-style: italic;
}

/* ═══ FAQ SECTION ══════════════════════════════════════════ */
.pw-faq {
    margin: 2rem 0;
}

.pw-faq__item {
    border: 1px solid var(--pw-gray-200);
    border-radius: var(--pw-radius-sm);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.pw-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: var(--pw-text-base);
    font-weight: 600;
    color: var(--pw-gray-800);
    background: var(--pw-gray-50);
    cursor: pointer;
    border: none;
    text-align: left;
    transition: background var(--pw-transition);
}

.pw-faq__question:hover {
    background: var(--pw-gray-100);
}

.pw-faq__question svg {
    flex-shrink: 0;
    transition: transform 0.2s var(--pw-ease);
}

.pw-faq__item.is-open .pw-faq__question svg {
    transform: rotate(180deg);
}

.pw-faq__answer {
    padding: 0 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s var(--pw-ease);
}

.pw-faq__item.is-open .pw-faq__answer {
    padding: 1rem 1.25rem;
    max-height: 500px;
}

.pw-faq__answer p {
    color: var(--pw-gray-600);
    font-size: var(--pw-text-sm);
    margin: 0;
}

/* ═══ TABLE OF CONTENTS ════════════════════════════════════ */
.pw-toc {
    margin: 1.5rem 0 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--pw-gray-50);
    border: 1px solid var(--pw-gray-200);
    border-radius: var(--pw-radius);
}

.pw-toc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pw-toc__title {
    font-family: var(--pw-font-heading);
    font-size: var(--pw-text-base);
    font-weight: 700;
    color: var(--pw-gray-900);
    margin: 0;
    border: none;
    padding: 0;
}

.pw-toc__toggle {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--pw-radius-sm);
    color: var(--pw-gray-500);
    transition: all var(--pw-transition);
}

.pw-toc__toggle:hover {
    background: var(--pw-gray-200);
}

.pw-toc__toggle[aria-expanded="false"] svg {
    transform: rotate(-90deg);
}

.pw-toc__list {
    margin-top: 0.75rem;
    padding-left: 1.25rem;
    list-style: decimal;
    transition: max-height 0.3s var(--pw-ease);
    overflow: hidden;
}

.pw-toc__list.is-collapsed {
    max-height: 0 !important;
    margin-top: 0;
}

.pw-toc__list li {
    padding: 0.25rem 0;
    font-size: var(--pw-text-sm);
}

.pw-toc__list li a {
    color: var(--pw-gray-600);
    text-decoration: none;
}

.pw-toc__list li a:hover {
    color: var(--pw-accent);
}

.pw-toc__list ol {
    padding-left: 1.25rem;
    margin-top: 0.25rem;
    list-style: lower-alpha;
}

/* ═══ CTA BUTTONS IN CONTENT ══════════════════════════════ */
.pw-cta-wrap {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

/* ═══ ENTRY CONTENT COMPONENT STYLING ═════════════════════ */
/* When affiliate components show inside .entry-content,
   override any general entry-content margins. */
.entry-content .pw-product-card,
.entry-content .pw-pros-cons,
.entry-content .pw-comparison-table-wrap,
.entry-content .pw-callout,
.entry-content .pw-disclaimer,
.entry-content .pw-faq {
    margin-left: 0;
    margin-right: 0;
}
