/* ==========================================================================
   WooCommerce Gift Finder v2 — Black Giraffe Style
   ========================================================================== */

:root {
    --wgf-accent: #000000;
    --wgf-bg: #ffffff;
    --wgf-text: #1a1a1a;
    --wgf-muted: #999999;
    --wgf-border: #e0e0e0;
    --wgf-cols-desktop: 4;
    --wgf-cols-mobile: 2;
    --wgf-radius: 10px;
    --wgf-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Container ---- */
.wgf-finder {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px 0 40px;
    font-family: inherit;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.wgf-progress {
    margin-bottom: 32px;
}

.wgf-progress-bar {
    height: 3px;
    background: var(--wgf-border);
    border-radius: 3px;
    overflow: hidden;
}

.wgf-progress-fill {
    height: 100%;
    background: var(--wgf-accent);
    transition: width 0.4s var(--wgf-ease);
    border-radius: 3px;
}

.wgf-progress-tabs {
    display: flex;
    gap: 4px;
    margin-top: 12px;
}

.wgf-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--wgf-muted);
    font-family: inherit;
    transition: all 0.2s;
    border-radius: 100px;
}

.wgf-tab:hover {
    color: var(--wgf-text);
}

.wgf-tab.active {
    background: var(--wgf-accent);
    color: #fff;
    font-weight: 700;
}

.wgf-tab.done {
    background: var(--wgf-accent);
    color: rgba(255,255,255,0.7);
    font-weight: 600;
}

.wgf-tab-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--wgf-border);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s var(--wgf-ease);
}

.wgf-tab.active .wgf-tab-num {
    background: #fff;
    border-color: #fff;
    color: var(--wgf-accent);
}

.wgf-tab.done .wgf-tab-num {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}

.wgf-tab-label {
    display: none;
}

@media (min-width: 600px) {
    .wgf-tab-label {
        display: inline;
    }
}

/* ==========================================================================
   Panels (Steps)
   ========================================================================== */

.wgf-panel {
    display: none;
    animation: wgfSlide 0.3s var(--wgf-ease);
}

.wgf-panel.active {
    display: block;
}

@keyframes wgfSlide {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wgf-panel-title {
    font-size: 26px;
    font-weight: 800;
    text-align: center;
    margin: 0 0 4px;
    color: var(--wgf-text);
    letter-spacing: -0.02em;
}

.wgf-panel-sub {
    text-align: center;
    color: var(--wgf-muted);
    font-size: 14px;
    margin: 0 0 28px;
}

/* ==========================================================================
   Cards — Figma style (photo + label overlay)
   ========================================================================== */

.wgf-cards {
    display: grid;
    grid-template-columns: repeat(var(--wgf-cols-mobile), 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .wgf-cards {
        grid-template-columns: repeat(var(--wgf-cols-desktop), 1fr);
        gap: 16px;
    }
}

.wgf-card {
    position: relative;
    display: block;
    border: none !important;
    padding: 0 !important;
    margin: 0;
    background: #f2f2f2 !important;
    border-radius: 0 !important;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
    transform: none !important;
    transition: none !important;
    opacity: 1 !important;
}

.wgf-card:hover,
.wgf-card:focus,
.wgf-card:active,
.wgf-card:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    background: #f2f2f2 !important;
    transform: none !important;
    opacity: 1 !important;
    border: none !important;
}

.wgf-card.selected {
    outline: 3px solid var(--wgf-accent) !important;
    outline-offset: -3px;
}

.wgf-card-img {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.wgf-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wgf-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wgf-text);
    text-align: center;
}

@media (min-width: 640px) {
    .wgf-card-label {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* ==========================================================================
   Pills (Tags) — Step 3
   ========================================================================== */

.wgf-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    min-height: 60px;
}

.wgf-pill {
    padding: 9px 18px;
    border: 2px solid var(--wgf-border);
    border-radius: 100px;
    background: var(--wgf-bg);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wgf-text);
    cursor: pointer;
    transition: all 0.15s var(--wgf-ease);
    font-family: inherit;
}

.wgf-pill:hover {
    border-color: var(--wgf-accent);
}

.wgf-pill.selected {
    background: var(--wgf-accent);
    border-color: var(--wgf-accent);
    color: #fff;
}

.wgf-pill.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.wgf-pill.wgf-shake {
    animation: wgfShake 0.3s ease;
}

@keyframes wgfShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ==========================================================================
   Navigation / Buttons
   ========================================================================== */

.wgf-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}

.wgf-nav-btn {
    padding: 8px 18px;
    border: none;
    background: none;
    font-size: 14px;
    color: var(--wgf-muted);
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s;
    border-radius: 6px;
}

.wgf-nav-btn:hover {
    color: var(--wgf-text);
    background: rgba(0,0,0,0.04);
}

.wgf-btn-search {
    padding: 14px 40px;
    background: var(--wgf-accent);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s, transform 0.2s;
}

.wgf-btn-search:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* ==========================================================================
   Results
   ========================================================================== */

.wgf-results-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.wgf-results-head .wgf-panel-title {
    text-align: left;
    margin: 0;
}

.wgf-results-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wgf-count {
    font-size: 14px;
    color: var(--wgf-muted);
}

.wgf-restart {
    font-size: 13px;
}

/* Active filter chips */
.wgf-filters-active {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.wgf-filters-active:empty {
    display: none;
}

.wgf-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #f0f0f0;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wgf-text);
}

.wgf-filter-x {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--wgf-muted);
    padding: 0;
    line-height: 1;
    font-family: inherit;
}

.wgf-filter-x:hover {
    color: var(--wgf-text);
}

/* Products grid */
.wgf-products {
    display: grid;
    grid-template-columns: repeat(var(--wgf-cols-mobile), 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .wgf-products {
        grid-template-columns: repeat(var(--wgf-cols-desktop), 1fr);
        gap: 16px;
    }
}

.wgf-product {
    display: block;
    text-decoration: none;
    color: var(--wgf-text);
    border-radius: 0;
    overflow: hidden;
    background: var(--wgf-bg);
    border: 1px solid var(--wgf-border);
}

.wgf-product:hover {
    text-decoration: none;
    color: var(--wgf-text);
}

.wgf-product-img {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
}

.wgf-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wgf-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--wgf-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.wgf-product-info {
    padding: 12px;
}

.wgf-product-info h3 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wgf-price {
    font-size: 14px;
    font-weight: 700;
}

.wgf-price del {
    color: var(--wgf-muted);
    font-weight: 400;
}

.wgf-price ins {
    text-decoration: none;
}

/* ==========================================================================
   Loading / Empty
   ========================================================================== */

.wgf-loading {
    display: flex;
    justify-content: center;
    padding: 40px;
    grid-column: 1 / -1;
}

.wgf-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--wgf-border);
    border-top-color: var(--wgf-accent);
    border-radius: 50%;
    animation: wgfSpin 0.6s linear infinite;
}

@keyframes wgfSpin {
    to { transform: rotate(360deg); }
}

.wgf-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--wgf-muted);
    font-size: 15px;
    grid-column: 1 / -1;
}

/* ==========================================================================
   Load More
   ========================================================================== */

.wgf-more {
    text-align: center;
    margin-top: 28px;
}
