/**
 * Category Archive — Fungiverse Premium
 * Hero + Grid con glassmorphism y estética de marca.
 * 100% tokens oficiales. Cero colores hardcodeados.
 *
 * @package Fungiverse
 */

/* ═══════════════════════════════════════════════
   PAGE WRAPPER
   ═══════════════════════════════════════════════ */
.fv-category-page {
    background: var(--fv-bg);
}

/* ═══════════════════════════════════════════════
   HERO — Gradiente con color accent por categoría
   Usa --hero-accent (inline CSS por PHP) para
   coherencia con "Encontrá tu equilibrio".
   ═══════════════════════════════════════════════ */
.fv-category-hero {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 4rem);
    overflow: hidden;
    background: #000;
}

.fv-category-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    /* Esferas de luz difuminada — impacto visual tipo Seed */
    background:
        radial-gradient(ellipse 70% 60% at 15% 80%, var(--hero-accent, #e84d44) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 85% 20%, color-mix(in srgb, var(--hero-accent, #e84d44) 60%, #000) 0%, transparent 65%),
        radial-gradient(ellipse 40% 80% at 50% 100%, color-mix(in srgb, var(--hero-accent, #e84d44) 30%, #000) 0%, transparent 60%);
    opacity: 0.55;
    filter: blur(40px) saturate(1.4);
}

.fv-category-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.25) 0%,
        rgba(0, 0, 0, 0.55) 100%
    );
    z-index: 1;
}

.fv-category-hero__content {
    position: relative;
    z-index: 2;
    width: min(100% - 2rem, var(--fv-container-wide));
    margin: 0 auto;
}

/* ─── Breadcrumb dentro del hero ─── */
.fv-category-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: var(--fv-text-sm);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.625rem 1.25rem;
    border-radius: var(--fv-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    width: fit-content;
}

.fv-category-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--fv-transition-fast);
}

.fv-category-breadcrumb a:hover {
    color: #fff;
}

.fv-category-breadcrumb__sep {
    color: rgba(255, 255, 255, 0.35);
}

.fv-category-breadcrumb__current {
    color: #fff;
}

/* ─── Title ─── */
.fv-category-hero__title {
    font-family: var(--fv-font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: #fff;
    line-height: 1;
    text-transform: uppercase;
    margin: 0 0 0.75rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fv-category-hero__desc {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    max-width: 600px;
    margin: 0;
}

/* ═══════════════════════════════════════════════
   GRID SECTION
   ═══════════════════════════════════════════════ */
.fv-category-grid-section {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.fv-category-container {
    width: min(100% - (var(--fv-gutter) * 2), var(--fv-container-wide));
    margin: 0 auto;
}

/* ─── Toolbar ─── */
.fv-category-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--fv-border-light);
    flex-wrap: wrap;
    gap: 1rem;
}

.fv-category-toolbar .woocommerce-ordering select {
    font-family: var(--fv-font-body);
    font-size: 0.85rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 2px solid var(--fv-border);
    border-radius: var(--fv-radius-md);
    background: var(--fv-surface);
    color: var(--fv-text);
    cursor: pointer;
    transition: border-color var(--fv-transition-fast);
    -webkit-appearance: none;
    appearance: none;
}

.fv-category-toolbar .woocommerce-ordering select:focus {
    border-color: var(--fv-primary);
    outline: none;
}

.fv-category-toolbar .woocommerce-result-count {
    font-size: 0.85rem;
    color: var(--fv-text-muted);
    margin: 0;
}

/* ─── Product Grid ─── */
.fv-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(1.25rem, 2.5vw, 2rem);
}

/* ─── Product Card ─── */
.fv-category-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--fv-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.04),
        0 1px 4px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.fv-category-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.06);
}

.fv-category-card--out {
    opacity: 0.6;
}

.fv-category-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ─── Card Image ─── */
.fv-category-card__image-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--fv-bg-alt);
}

.fv-category-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fv-category-card:hover .fv-category-card__img {
    transform: scale(1.06);
}

/* ─── Badges ─── */
.fv-category-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.375rem 0.75rem;
    border-radius: 100px;
    z-index: 2;
}

.fv-category-card__badge--sale {
    background: var(--fv-primary);
    color: #fff;
}

.fv-category-card__badge--out {
    background: var(--fv-text-muted);
    color: #fff;
}

/* ─── Card Body ─── */
.fv-category-card__body {
    padding: 1rem 1.25rem;
}

.fv-category-card__title {
    font-family: var(--fv-font-heading);
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: var(--fv-text);
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fv-category-card__price {
    font-family: var(--fv-font-heading);
    font-size: 1.15rem;
    color: var(--fv-primary);
    margin: 0;
}

.fv-category-card__price del {
    color: var(--fv-text-muted);
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.fv-category-card__price ins {
    text-decoration: none;
}

/* ─── Quick Add to Cart ─── */
.fv-category-card__cart-form {
    padding: 0 1.25rem 1.25rem;
}

.fv-category-card__cart-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--fv-text);
    color: #fff;
    border: none;
    border-radius: var(--fv-radius-md);
    font-family: var(--fv-font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all var(--fv-transition-fast);
}

.fv-category-card__cart-btn:hover {
    background: var(--fv-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 77, 68, 0.3);
}

.fv-category-card__cart-btn svg {
    flex-shrink: 0;
}

/* ─── Pagination ─── */
.fv-category-pagination {
    margin-top: clamp(2rem, 4vw, 3rem);
    display: flex;
    justify-content: center;
}

.fv-category-pagination .woocommerce-pagination {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.fv-category-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--fv-radius-md);
    font-family: var(--fv-font-heading);
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--fv-text-muted);
    background: var(--fv-surface);
    border: 1px solid var(--fv-border-light);
    transition: all var(--fv-transition-fast);
}

.fv-category-pagination .page-numbers:hover {
    color: var(--fv-primary);
    border-color: var(--fv-primary);
}

.fv-category-pagination .page-numbers.current {
    background: var(--fv-primary);
    color: #fff;
    border-color: var(--fv-primary);
    box-shadow: 0 4px 12px rgba(232, 77, 68, 0.25);
}

/* ─── Empty State ─── */
.fv-category-empty {
    text-align: center;
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.fv-category-empty h2 {
    font-family: var(--fv-font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--fv-text);
    margin: 0 0 0.75rem;
    text-transform: uppercase;
}

.fv-category-empty p {
    color: var(--fv-text-muted);
    margin: 0 0 1.5rem;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .fv-category-hero {
        min-height: 280px;
        padding: 2rem 1.25rem;
    }

    .fv-category-hero__title {
        font-size: 2.5rem;
    }

    .fv-category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .fv-category-card__body {
        padding: 0.75rem;
    }

    .fv-category-card__title {
        font-size: 0.8rem;
    }

    .fv-category-card__price {
        font-size: 0.95rem;
    }

    .fv-category-card__cart-form {
        padding: 0 0.75rem 0.75rem;
    }

    .fv-category-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .fv-category-hero__title {
        font-size: 2rem;
    }

    .fv-category-grid {
        grid-template-columns: 1fr;
    }
}
