/*
 * Fungiverse — Pack Builder CSS
 * =====================================================
 * 1. CTA premium en Home (fondo claro)
 * 2. UI interactivo del Pack Builder (página /arma-tu-pack/)
 */

/* ═══════════════════════════════════════════════
   1. PACK CTA — Home (Fondo Claro Premium)
   Contrasta con la sección Ecosistema (dark).
   ═══════════════════════════════════════════════ */
.fv-pack-cta {
    padding-block: clamp(4rem, 7vw, 6rem);
    background: var(--fv-bg-alt);
}

/* ─── Header ─── */
.fv-pack-cta__header {
    text-align: center;
    margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}

.fv-pack-cta__eyebrow {
    display: inline-block;
    font-size: var(--fv-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--fv-primary);
    margin-bottom: var(--fv-space-md);
}

.fv-pack-cta__titulo {
    font-family: var(--fv-font-heading);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--fv-text);
    margin: 0 0 var(--fv-space-md);
    line-height: 1.05;
    text-transform: uppercase;
}

.fv-pack-cta__subtitulo {
    font-size: var(--fv-text-lg);
    color: var(--fv-text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ─── Grid ─── */
.fv-pack-cta__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.25rem, 2.5vw, 2rem);
}

@media (max-width: 767px) {
    .fv-pack-cta__grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Card ─── */
.fv-pack-card {
    position: relative;
    display: block;
    padding: clamp(2rem, 3.5vw, 3rem);
    padding-top: clamp(3rem, 4.5vw, 4rem);
    border-radius: var(--fv-radius-xl);
    background: var(--fv-surface);
    border: 1px solid var(--fv-border-light);
    text-decoration: none;
    color: var(--fv-text);
    overflow: hidden;
    transition:
        transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.fv-pack-card:hover {
    transform: translateY(-6px);
    border-color: var(--pack-accent);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px var(--pack-accent);
}

/* ─── Badge descuento flotante ─── */
.fv-pack-card__badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--pack-accent);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--pack-accent) 40%, transparent);
    transition: transform 0.3s ease;
}

.fv-pack-card:hover .fv-pack-card__badge {
    transform: scale(1.1) rotate(-5deg);
}

.fv-pack-card__badge-num {
    font-family: var(--fv-font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1;
}

.fv-pack-card__badge-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1px;
}

/* ─── Icon ─── */
.fv-pack-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--pack-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--pack-accent) 20%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pack-accent);
    margin-bottom: var(--fv-space-lg);
    transition: background 0.3s ease, transform 0.3s ease;
}

.fv-pack-card:hover .fv-pack-card__icon {
    background: color-mix(in srgb, var(--pack-accent) 18%, transparent);
    transform: scale(1.05);
}

/* ─── Content ─── */
.fv-pack-card__tag {
    display: inline-block;
    font-size: var(--fv-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--pack-accent);
    margin-bottom: var(--fv-space-sm);
}

.fv-pack-card__title {
    font-family: var(--fv-font-heading);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 800;
    color: var(--fv-text);
    line-height: 1.1;
    margin: 0 0 var(--fv-space-md);
    text-transform: uppercase;
}

.fv-pack-card__desc {
    font-size: var(--fv-text-base);
    line-height: 1.7;
    color: var(--fv-text-muted);
    margin: 0 0 var(--fv-space-lg);
}

.fv-pack-card__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--fv-space-sm);
    font-size: var(--fv-text-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pack-accent);
    transition: gap 0.3s ease;
}

.fv-pack-card:hover .fv-pack-card__cta {
    gap: var(--fv-space-md);
}



/* ═══════════════════════════════════════════════
   2. PACK BUILDER UI APP (Página /arma-tu-pack/)
   Variables actualizadas al sistema --fv-*
   ═══════════════════════════════════════════════ */
.fv-pack-builder {
    padding: clamp(2rem, 4vw, 4rem) 0;
}

.fv-pack-builder__header {
    text-align: center;
    margin-bottom: clamp(2rem, 3vw, 3rem);
}

.fv-pack-builder__header h2 {
    font-family: var(--fv-font-heading);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--fv-text);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.fv-pack-builder__header p {
    font-size: var(--fv-text-base);
    color: var(--fv-text-muted);
    max-width: 560px;
    margin: 0 auto;
}

.fv-pack-builder__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 992px) {
    .fv-pack-builder__layout {
        grid-template-columns: 2fr 1fr;
        gap: clamp(2rem, 3vw, 4rem);
    }
}

/* ─── Filtros ─── */
.fv-pack-builder__filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.fv-pack-filter {
    background: transparent;
    border: 1px solid var(--fv-border);
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    cursor: pointer;
    white-space: nowrap;
    font-size: var(--fv-text-sm);
    font-weight: 600;
    color: var(--fv-text-muted);
    transition: all 0.3s ease;
}

.fv-pack-filter.active,
.fv-pack-filter:hover {
    background: var(--fv-text);
    color: #fff;
    border-color: var(--fv-text);
}

/* ─── Grilla Productos ─── */
.fv-pack-builder__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.fv-pack-item {
    background: var(--fv-surface);
    border: 1px solid var(--fv-border-light);
    border-radius: var(--fv-radius-xl);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.fv-pack-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    border-color: var(--fv-primary);
}

.fv-pack-item__img img {
    max-width: 100%;
    height: auto;
    border-radius: var(--fv-radius-lg);
    margin-bottom: 1rem;
    aspect-ratio: 1;
    object-fit: cover;
}

.fv-pack-item__title {
    font-family: var(--fv-font-heading);
    font-size: var(--fv-text-sm);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--fv-text);
    line-height: 1.2;
}

.fv-pack-item__price {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--fv-primary);
    font-size: var(--fv-text-base);
}

.fv-pack-item button {
    margin-top: auto;
    width: 100%;
}

.fv-pack-add-btn {
    background: transparent;
    border: 1.5px solid var(--fv-text);
    color: var(--fv-text);
    padding: 0.6rem 1rem;
    border-radius: var(--fv-radius-lg);
    font-size: var(--fv-text-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fv-pack-add-btn:hover {
    background: var(--fv-text);
    color: #fff;
}

/* ─── Caja Activa (Cart Sidebar) ─── */
.fv-pack-builder__box {
    background: var(--fv-surface);
    border: 1px solid var(--fv-border-light);
    border-radius: var(--fv-radius-xl);
    padding: clamp(1.5rem, 2vw, 2rem);
    position: sticky;
    top: 100px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.fv-pack-box__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--fv-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.fv-pack-box__header h3 {
    font-family: var(--fv-font-heading);
    font-size: var(--fv-text-xl);
    font-weight: 800;
    text-transform: uppercase;
    color: var(--fv-text);
    margin: 0;
}

.fv-pack-box__count {
    font-size: var(--fv-text-sm);
    color: var(--fv-text-muted);
    font-weight: 600;
}

.fv-pack-box__items {
    min-height: 120px;
    max-height: 40vh;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.pb-empty-state {
    color: var(--fv-text-subtle);
    text-align: center;
    padding: 2rem 0;
    font-size: var(--fv-text-sm);
}

.pb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--fv-border-light);
}

.pb-item__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pb-item__title {
    font-size: var(--fv-text-sm);
    font-weight: 600;
    color: var(--fv-text);
}

.pb-item__price {
    font-size: 0.8rem;
    color: var(--fv-text-subtle);
}

.pb-item__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pb-btn {
    background: var(--fv-bg-alt);
    border: 1px solid var(--fv-border);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--fv-text);
    transition: all 0.2s ease;
}

.pb-btn:hover {
    background: var(--fv-text);
    color: #fff;
    border-color: var(--fv-text);
}

/* ─── Resumen ─── */
.fv-pack-box__summary {
    border-top: 1px solid var(--fv-border);
    padding-top: 1.5rem;
}

.pb-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: var(--fv-text-sm);
    color: var(--fv-text);
}

.pb-discount {
    color: var(--fv-primary);
    font-weight: 700;
}

.pb-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--fv-border);
    font-size: var(--fv-text-lg);
}

#pb-checkout-btn {
    width: 100%;
    margin-top: 1.5rem;
    background: var(--fv-primary);
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: var(--fv-radius-lg);
    font-family: var(--fv-font-heading);
    font-size: var(--fv-text-base);
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

#pb-checkout-btn:hover:not(:disabled) {
    background: var(--fv-primary-dark);
    transform: translateY(-2px);
}

#pb-checkout-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#pb-loading {
    text-align: center;
    font-size: var(--fv-text-xs);
    color: var(--fv-text-subtle);
    margin-top: 0.5rem;
}
