/* ============================================================
   WC Category Navigator — wcn-style.css
   ============================================================ */

:root {
    --wcn-primary:       #5b21d4;
    --wcn-primary-text:  #ffffff;
    --wcn-border:        #e0e0e0;
    --wcn-hover:         #5b21d4;
    --wcn-font-body:     15px;
    --wcn-font-heading:  28px;
    --wcn-font-card:     14px;
    --wcn-btn-radius:    50px;
    --wcn-card-radius:   10px;
    --wcn-cols:          3;
}

/* ── Wizard wrapper ─────────────────────────────────────── */
.wcn-wrap {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    font-size: var(--wcn-font-body);
    font-family: inherit;
    color: #111;
    background: #f4f4f4;
    border-radius: 12px;
}

/* ── Start-over button (inside wizard) ──────────────────── */
.wcn-restart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--wcn-primary);
    color: var(--wcn-primary-text);
    border: none;
    border-radius: var(--wcn-btn-radius);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    transition: opacity 0.2s;
}
.wcn-restart:hover { opacity: 0.85; }

/* ── Progress bar ───────────────────────────────────────── */
.wcn-progress {
    margin-bottom: 28px;
    user-select: none;
}

/* Track */
.wcn-progress__track {
    position: relative;
    height: 10px;
    background: #e0e0e0;
    border-radius: 99px;
    overflow: visible;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.10);
}

/* Fill */
.wcn-progress__fill {
    position: absolute;
    inset: 0;
    width: 0%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--wcn-bar-start, var(--wcn-primary)) 0%, var(--wcn-bar-end, #a855f7) 100%);
    transition: width 0.55s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 2px 8px rgba(91,33,212,.35);
}

/* Animated shimmer on the fill */
.wcn-progress__fill::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 99px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,.35) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: wcn-shimmer 1.8s linear infinite;
}
@keyframes wcn-shimmer {
    from { background-position: -200% 0; }
    to   { background-position:  200% 0; }
}

/* Glowing dot at the leading edge */
.wcn-progress__glow {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--wcn-bar-start, var(--wcn-primary));
    box-shadow: 0 0 0 4px rgba(91,33,212,.18), 0 2px 8px rgba(91,33,212,.4);
    transition: left 0.55s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
    z-index: 2;
    left: 0%;
}

/* Meta row: step label + percentage */
.wcn-progress__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}
.wcn-progress__label {
    font-size: 12px;
    font-weight: 600;
    color: #777;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.wcn-progress__current {
    color: var(--wcn-primary);
}
.wcn-progress__pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--wcn-bar-start, var(--wcn-primary));
    min-width: 38px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    transition: color 0.4s;
}

/* Complete state — shift to green */
.wcn-progress--complete .wcn-progress__fill {
    background: linear-gradient(90deg, #16a34a 0%, #4ade80 100%);
    box-shadow: 0 2px 8px rgba(22,163,74,.35);
}
.wcn-progress--complete .wcn-progress__glow {
    border-color: #16a34a;
    box-shadow: 0 0 0 4px rgba(22,163,74,.18), 0 2px 8px rgba(22,163,74,.4);
}
.wcn-progress--complete .wcn-progress__pct,
.wcn-progress--complete .wcn-progress__current {
    color: #16a34a;
}

/* ── Step animation ─────────────────────────────────────── */
.wcn-step { display: none; }
.wcn-step--active {
    display: block;
    animation: wcn-fadein 0.25s ease;
}
@keyframes wcn-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Heading / question ─────────────────────────────────── */
.wcn-question {
    font-size: var(--wcn-font-heading);
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.2;
    color: #111;
}
.wcn-subtext {
    font-size: var(--wcn-font-body);
    color: #555;
    margin: 0 0 24px;
}

/* ── Category grid ──────────────────────────────────────── */
.wcn-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(var(--wcn-cols, 3), 1fr);
}
@media (max-width: 768px) { .wcn-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .wcn-grid { grid-template-columns: 1fr; } }

/* ── Card ───────────────────────────────────────────────── */
.wcn-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 2px solid var(--wcn-border);
    border-radius: var(--wcn-card-radius);
    padding: 20px 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.wcn-card:hover,
.wcn-card:focus {
    border-color: var(--wcn-hover);
    box-shadow: 0 4px 18px rgba(0,0,0,0.10);
    outline: none;
    transform: translateY(-2px);
}
.wcn-card--selected {
    border-color: var(--wcn-hover);
    background: #faf8ff;
    box-shadow: 0 0 0 3px rgba(91,33,212,0.15);
}
.wcn-card__image {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f4f4f4;
}
.wcn-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.wcn-card__title {
    font-size: var(--wcn-font-card);
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}

/* ── Wizard nav buttons ─────────────────────────────────── */
.wcn-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}
.wcn-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--wcn-btn-radius);
    font-size: var(--wcn-font-body);
    font-weight: 600;
    padding: 12px 28px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
    text-decoration: none;
}
.wcn-btn--primary {
    background: var(--wcn-primary);
    color: var(--wcn-primary-text);
    border-color: var(--wcn-primary);
}
.wcn-btn--primary:hover { opacity: 0.85; }
.wcn-btn--primary:disabled { opacity: 0.4; cursor: not-allowed; }
.wcn-btn--outline {
    background: transparent;
    color: #333;
    border-color: #aaa;
}
.wcn-btn--outline:hover { border-color: #555; background: #f0f0f0; }

/* ── Loading overlay ────────────────────────────────────── */
.wcn-loading {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.75);
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 12px;
}
.wcn-loading--active { display: flex; }
.wcn-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #ddd;
    border-top-color: var(--wcn-primary);
    border-radius: 50%;
    animation: wcn-spin 0.7s linear infinite;
}
@keyframes wcn-spin { to { transform: rotate(360deg); } }

/* ── Empty ──────────────────────────────────────────────── */
.wcn-empty {
    text-align: center;
    color: #777;
    padding: 40px 0;
    font-size: var(--wcn-font-body);
}

/* ================================================================
   RESULTS PAGE — full-width, outside wizard box
   ================================================================ */

/* Results top bar: Back | pills | Restart */
.wcn-results-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 0 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

/* Back button */
.wcn-results-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: #333;
    border: 2px solid #aaa;
    border-radius: var(--wcn-btn-radius);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, background 0.2s;
}
.wcn-results-back:hover { border-color: #555; background: #f0f0f0; }

/* Filter pills row */
.wcn-results-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}
.wcn-pill {
    display: inline-block;
    background: transparent;
    border: 1.5px solid #bbb;
    border-radius: var(--wcn-btn-radius);
    padding: 5px 14px;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

/* Restart button */
.wcn-results-restart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: #333;
    border: 2px solid #aaa;
    border-radius: var(--wcn-btn-radius);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, background 0.2s;
    margin-left: auto;
}
.wcn-results-restart:hover { border-color: #555; background: #f0f0f0; }

/* Results body */
.wcn-results-body {
    font-size: var(--wcn-font-body);
    font-family: inherit;
}

/* ── Featured product ───────────────────────────────────── */
.wcn-featured-heading {
    font-size: 22px;
    font-weight: 800;
    color: #111;
    margin: 0 0 20px;
    font-style: italic;
}
.wcn-featured-product {
    display: flex;
    gap: 36px;
    align-items: flex-start;
    margin-bottom: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e5e5e5;
}
.wcn-featured-image {
    flex: 0 0 320px;
    max-width: 320px;
    background: #f4f4f4;
    border-radius: 8px;
    overflow: hidden;
}
.wcn-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
.wcn-featured-info {
    flex: 1;
    min-width: 0;
}
.wcn-featured-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #111;
    line-height: 1.35;
}
.wcn-featured-title a {
    color: inherit;
    text-decoration: none;
}
.wcn-featured-title a:hover {
    color: var(--wcn-primary);
}
.wcn-featured-specs-label {
    font-size: 13px;
    color: #666;
    margin: 0 0 6px;
}
.wcn-featured-specs {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.wcn-featured-specs li {
    font-size: 14px;
    color: var(--wcn-primary);
    font-weight: 500;
}
.wcn-spec-plus {
    font-weight: 700;
    margin-right: 3px;
}
.wcn-featured-price {
    font-size: 28px;
    font-weight: 800;
    color: #111;
    margin-bottom: 20px;
}
.wcn-featured-price .woocommerce-Price-amount { font-size: inherit; }
.wcn-featured-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--wcn-primary);
    color: var(--wcn-primary-text);
    border: none;
    border-radius: var(--wcn-btn-radius);
    padding: 13px 32px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}
.wcn-featured-btn:hover {
    opacity: 0.85;
    color: var(--wcn-primary-text);
}

/* ── Other products heading ─────────────────────────────── */
.wcn-other-heading {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0 0 20px;
}

/* ── WooCommerce product list — default shop loop styling ── */
/* Let WooCommerce's own .products ul + theme handle the grid;
   we just make sure it fills the available width. */
.wcn-results-body ul.products {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 680px) {
    .wcn-featured-product { flex-direction: column; gap: 16px; }
    .wcn-featured-image { flex: none; max-width: 100%; }
    .wcn-results-bar { flex-wrap: wrap; }
    .wcn-results-restart { margin-left: 0; }
}

/* ── v1.1: Text-only cards (show_images = off) ─────────────────────── */
.wcn-card--no-image {
    justify-content: center;
    padding: 28px 16px;
    min-height: 80px;
}
.wcn-card--no-image .wcn-card__title {
    font-size: calc( var(--wcn-font-card, 14px) + 2px );
    font-weight: 600;
    text-align: center;
    padding: 0;
}
