/**
 * Theme Name: VitalsWP
 * Description: Product site and store for VitalsWP WordPress Performance Advisor.
 * Version: 1.0.0
 * Requires at least: 5.8
 * Requires PHP: 7.4
 * Text Domain: vitalswp
 */

/* ── Reset & Base ────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --vswp-dark: #1e1e1e;
    --vswp-green: #00a32a;
    --vswp-green-hover: #008a20;
    --vswp-light: #f9fafb;
    --vswp-border: #e2e4e7;
    --vswp-text: #1e1e1e;
    --vswp-text-secondary: #636366;
    --vswp-white: #ffffff;
    --vswp-red: #d63638;
    --vswp-yellow: #dba617;
    --vswp-radius: 6px;
    --vswp-max-width: 1200px;
    --vswp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --vswp-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--vswp-font);
    color: var(--vswp-text);
    background: var(--vswp-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--vswp-green);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--vswp-green-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

code {
    font-family: var(--vswp-mono);
    font-size: 0.9em;
    background: var(--vswp-light);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--vswp-border);
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.vswp-container {
    max-width: var(--vswp-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.vswp-section {
    padding: 80px 0;
}

.vswp-section--alt {
    background: var(--vswp-light);
}

.vswp-section__title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.vswp-section__subtitle {
    font-size: 1.125rem;
    color: var(--vswp-text-secondary);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.vswp-header {
    background: var(--vswp-dark);
    color: var(--vswp-white);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.vswp-header .vswp-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.vswp-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--vswp-white);
    letter-spacing: -0.5px;
}

.vswp-logo span {
    color: var(--vswp-green);
}

.vswp-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.vswp-nav a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s;
}

.vswp-nav a:hover {
    color: var(--vswp-white);
}

.vswp-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--vswp-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.vswp-hero {
    background: var(--vswp-dark);
    color: var(--vswp-white);
    padding: 100px 0 120px;
    text-align: center;
}

.vswp-hero__title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.vswp-hero__title span {
    color: var(--vswp-green);
}

.vswp-hero__subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.vswp-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--vswp-radius);
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.vswp-btn--primary {
    background: var(--vswp-green);
    color: var(--vswp-white);
}

.vswp-btn--primary:hover {
    background: var(--vswp-green-hover);
    color: var(--vswp-white);
}

.vswp-btn--outline {
    background: transparent;
    color: var(--vswp-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.vswp-btn--outline:hover {
    border-color: var(--vswp-white);
    color: var(--vswp-white);
}

.vswp-btn--dark {
    background: var(--vswp-dark);
    color: var(--vswp-white);
}

.vswp-btn--dark:hover {
    background: #333;
    color: var(--vswp-white);
}

/* ── Features Grid ───────────────────────────────────────────────────────── */
.vswp-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
}

.vswp-feature-card {
    background: var(--vswp-white);
    border: 1px solid var(--vswp-border);
    border-radius: var(--vswp-radius);
    padding: 32px;
    transition: box-shadow 0.2s;
}

.vswp-feature-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.vswp-feature-card__icon {
    width: 48px;
    height: 48px;
    background: var(--vswp-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--vswp-green);
}

.vswp-feature-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.vswp-feature-card__desc {
    color: var(--vswp-text-secondary);
    font-size: 0.95rem;
}

/* ── How It Works ────────────────────────────────────────────────────────── */
.vswp-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    counter-reset: step;
}

.vswp-step {
    text-align: center;
    counter-increment: step;
}

.vswp-step__number {
    width: 56px;
    height: 56px;
    background: var(--vswp-green);
    color: var(--vswp-white);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.vswp-step__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.vswp-step__desc {
    color: var(--vswp-text-secondary);
    font-size: 0.95rem;
}

/* ── Pricing ─────────────────────────────────────────────────────────────── */
.vswp-pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.vswp-price-card {
    background: var(--vswp-white);
    border: 2px solid var(--vswp-border);
    border-radius: 12px;
    padding: 40px 32px;
    text-align: center;
    position: relative;
    transition: border-color 0.2s;
}

.vswp-price-card:hover {
    border-color: var(--vswp-green);
}

.vswp-price-card--featured {
    border-color: var(--vswp-green);
    transform: scale(1.03);
}

.vswp-price-card__badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--vswp-green);
    color: var(--vswp-white);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vswp-price-card__name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.vswp-price-card__price {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.vswp-price-card__price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--vswp-text-secondary);
}

.vswp-price-card__desc {
    color: var(--vswp-text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.vswp-price-card__features {
    list-style: none;
    text-align: left;
    margin-bottom: 32px;
}

.vswp-price-card__features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--vswp-light);
    font-size: 0.95rem;
}

.vswp-price-card__features li::before {
    content: "\2713";
    color: var(--vswp-green);
    font-weight: 700;
    margin-right: 8px;
}

.vswp-price-card .vswp-btn {
    width: 100%;
}

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.vswp-faq {
    max-width: 720px;
    margin: 0 auto;
}

.vswp-faq__item {
    border-bottom: 1px solid var(--vswp-border);
}

.vswp-faq__question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 0;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--vswp-text);
    font-family: var(--vswp-font);
}

.vswp-faq__question::after {
    content: "+";
    font-size: 1.25rem;
    color: var(--vswp-text-secondary);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 16px;
}

.vswp-faq__item.is-open .vswp-faq__question::after {
    content: "\2212";
}

.vswp-faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.vswp-faq__answer-inner {
    padding-bottom: 20px;
    color: var(--vswp-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.vswp-faq__item.is-open .vswp-faq__answer {
    max-height: 400px;
}

/* ── CTA Section ─────────────────────────────────────────────────────────── */
.vswp-cta {
    background: var(--vswp-dark);
    color: var(--vswp-white);
    text-align: center;
    padding: 80px 0;
}

.vswp-cta__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.vswp-cta__subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    font-size: 1.125rem;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.vswp-footer {
    background: var(--vswp-dark);
    color: rgba(255, 255, 255, 0.6);
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vswp-footer .vswp-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.vswp-footer__nav {
    display: flex;
    gap: 24px;
    list-style: none;
}

.vswp-footer__nav a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.vswp-footer__nav a:hover {
    color: var(--vswp-white);
}

/* ── Feature Comparison Table ────────────────────────────────────────────── */
.vswp-comparison {
    width: 100%;
    border-collapse: collapse;
    margin-top: 48px;
}

.vswp-comparison th,
.vswp-comparison td {
    padding: 14px 20px;
    text-align: center;
    border-bottom: 1px solid var(--vswp-border);
    font-size: 0.95rem;
}

.vswp-comparison th {
    background: var(--vswp-dark);
    color: var(--vswp-white);
    font-weight: 600;
}

.vswp-comparison th:first-child,
.vswp-comparison td:first-child {
    text-align: left;
}

.vswp-comparison tbody tr:hover {
    background: var(--vswp-light);
}

/* ── WooCommerce Overrides ───────────────────────────────────────────────── */
.woocommerce .vswp-container {
    max-width: var(--vswp-max-width);
}

.woocommerce-cart .vswp-section,
.woocommerce-checkout .vswp-section,
.woocommerce-account .vswp-section {
    padding: 40px 0 80px;
}

.woocommerce table.shop_table {
    border-radius: var(--vswp-radius);
    border: 1px solid var(--vswp-border);
}

.woocommerce .button,
.woocommerce button.button {
    background: var(--vswp-green);
    color: var(--vswp-white);
    border: none;
    border-radius: var(--vswp-radius);
    font-weight: 600;
    padding: 12px 24px;
    transition: background 0.15s;
}

.woocommerce .button:hover,
.woocommerce button.button:hover {
    background: var(--vswp-green-hover);
    color: var(--vswp-white);
}

.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--vswp-green);
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--vswp-green);
}

.woocommerce-error {
    border-top-color: var(--vswp-red);
}

/* ── My Account License Table ────────────────────────────────────────────── */
.woocommerce-account .shop_table code {
    font-size: 0.85rem;
    user-select: all;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .vswp-hero__title {
        font-size: 2rem;
    }

    .vswp-hero {
        padding: 60px 0 80px;
    }

    .vswp-section {
        padding: 48px 0;
    }

    .vswp-section__title {
        font-size: 1.5rem;
    }

    .vswp-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--vswp-dark);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .vswp-nav.is-open {
        display: flex;
    }

    .vswp-mobile-toggle {
        display: block;
    }

    .vswp-price-card--featured {
        transform: none;
    }

    .vswp-pricing {
        grid-template-columns: 1fr;
    }

    .vswp-footer .vswp-container {
        flex-direction: column;
        text-align: center;
    }
}
