/**
 * Tienda - Fungiverse Crecienta
 *
 * @package Fungiverse
 */

.fv-shop {
    background: var(--fv-bg);
    padding: 0 0 var(--fv-space-3xl);
}

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

.fv-shop__header {
    margin-bottom: var(--fv-space-xl);
}

.fv-shop__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fv-space-sm);
    font-size: var(--fv-text-sm);
    color: var(--fv-text-muted);
    margin-bottom: var(--fv-space-lg);
}

.fv-shop__breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.fv-shop__intro {
    /* Full-width: se extiende de borde a borde sin container */
    width: 100%;
    min-height: 28vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--fv-space-4xl) 0 var(--fv-space-2xl);
    background: var(--fv-gradient-warm);
    color: var(--fv-text-light);
    /* Sin border-radius: punta a punta */
    border-radius: 0;
    margin-bottom: var(--fv-space-xl);
}

/* Inner del intro: centra el contenido igual que el resto de la página */
.fv-shop__intro-inner {
    width: min(100% - (var(--fv-gutter) * 2), var(--fv-container-wide));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--fv-space-lg);
}

.fv-shop__eyebrow {
    margin: 0 0 var(--fv-space-sm);
    font-size: var(--fv-text-xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fv-kraft-dark);
}

.fv-shop__title {
    margin: 0;
    font-family: var(--fv-font-heading);
    font-size: var(--fv-text-4xl);
    color: var(--fv-text-light);
}

.fv-shop__meta {
    display: flex;
    flex-direction: column;
    gap: var(--fv-space-md);
    color: var(--fv-text-muted);
}

.fv-shop__ordering select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--fv-border);
    border-radius: var(--fv-radius-full);
    padding: 0 var(--fv-space-lg);
    background: #fff;
    color: var(--fv-text);
    font: inherit;
}

/* ============================================================
   BUSCADOR & FILTROS — Diseño premium estilo app
   ============================================================ */

.fv-shop__search {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: var(--fv-space-2xl);
    padding: 1.5rem 1.75rem;
    border: 1px solid rgba(90, 122, 58, 0.18);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,252,0.97) 0%, rgba(245,248,240,0.97) 100%);
    box-shadow: 0 4px 24px rgba(61, 85, 40, 0.07), 0 1px 4px rgba(0,0,0,0.04);
    backdrop-filter: blur(8px);
}

/* Wrapper con ícono de lupa */
.fv-shop__search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.fv-shop__search-wrap::before {
    content: '';
    position: absolute;
    left: 1.1rem;
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235a7a3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat center;
    pointer-events: none;
}

.fv-shop__search-input {
    width: 100%;
    min-height: 52px;
    padding: 0 1.2rem 0 3rem;
    border: 1.5px solid rgba(90, 122, 58, 0.25);
    border-radius: 14px;
    background: #fff;
    color: var(--fv-text);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.fv-shop__search-input:focus {
    border-color: #5a7a3a;
    box-shadow: 0 0 0 3px rgba(90, 122, 58, 0.12);
}

.fv-shop__search-input::placeholder {
    color: #a0a89a;
    font-size: 0.9rem;
}

/* Separador entre formato y beneficio */
.fv-shop__filters-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(90,122,58,0.15), transparent);
    margin: 0.25rem 0;
}

/* Fila de tags */
.fv-shop__search-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/* Label tipo "Formato:" y "Beneficio:" */
.fv-shop__tag-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a9e7a;
    padding: 0.3rem 0.2rem 0.3rem 0;
    white-space: nowrap;
    flex-shrink: 0;
}

/* BASE de todas las pills */
.fv-shop__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.9rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    /* Beneficio: estilo neutro */
    border: 1.5px solid rgba(0,0,0,0.1);
    background: #f5f5f0;
    color: #555;
}

.fv-shop__tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.fv-shop__tag.is-active {
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

/* Beneficio activo → ocre/kraft de la marca */
.fv-shop__search-tags--beneficio .fv-shop__tag.is-active {
    background: var(--fv-kraft, #b8860b);
    border-color: var(--fv-kraft, #b8860b);
    color: #1a2010;
    font-weight: 600;
}

.fv-shop__search-tags--beneficio .fv-shop__tag:hover {
    border-color: var(--fv-kraft, #b8860b);
    background: rgba(184, 134, 11, 0.08);
    color: #5a400a;
}

/* FORMATO pills — verde musgo marca */
.fv-shop__tag--formato {
    border-color: rgba(90, 122, 58, 0.4);
    background: rgba(90, 122, 58, 0.07);
    color: #3d5528;
    font-weight: 600;
    font-size: 0.82rem;
}

.fv-shop__tag--formato:hover {
    border-color: #5a7a3a;
    background: rgba(90, 122, 58, 0.14);
    color: #2d4018;
}

.fv-shop__tag--formato.is-active {
    background: #5a7a3a;
    border-color: #5a7a3a;
    color: #fff;
    font-weight: 700;
}

/* Mensaje sin resultados */
.fv-shop__empty-msg {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--fv-text-subtle);
    font-size: 0.95rem;
    font-style: italic;
}


.fv-shop__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--fv-space-lg);
}

.fv-product-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid var(--fv-border-light);
    border-radius: var(--fv-radius-xl);
    background: #fff;
    overflow: hidden;
    box-shadow: var(--fv-shadow-sm);
    transition: transform var(--fv-transition-base), box-shadow var(--fv-transition-base), border-color var(--fv-transition-base);
}

.fv-product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--fv-shadow-lg);
    border-color: var(--fv-border);
}

.fv-product-card--hidden {
    display: none;
}

.fv-product-card__image-link {
    display: block;
    text-decoration: none;
}

.fv-product-card__image {
    position: relative;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--fv-beige) 0%, var(--fv-bg) 100%);
    overflow: hidden;
}

.fv-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.fv-product-card:hover .fv-product-card__image img {
    transform: scale(1.03);
    transition: transform 400ms ease;
}

.fv-product-card__body {
    display: grid;
    gap: var(--fv-space-sm);
    padding: var(--fv-space-xl);
}

.fv-product-card__title {
    margin: 0;
    font-family: var(--fv-font-heading);
    font-size: var(--fv-text-sm);
    font-weight: 700;
    line-height: 1.25;
    color: var(--fv-text);
    /* Truncar en 2 líneas para uniformidad con 5 cols */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fv-product-card__format {
    margin: 0;
    color: var(--fv-text-muted);
    font-size: var(--fv-text-sm);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.fv-product-card__price {
    margin-bottom: var(--fv-space-sm);
    color: var(--fv-red);
    font-size: var(--fv-text-lg);
    font-weight: 700;
}

.fv-product-card__price .price,
.fv-product-card__price .woocommerce-Price-amount {
    color: inherit;
}

.fv-product-card__transfer-price {
    display: block;
    font-size: var(--fv-text-xs);
    color: var(--fv-green, #66ae4c);
    font-weight: 600;
    margin-top: 0.25rem;
    letter-spacing: 0.01em;
}

.fv-shop__pagination {
    display: flex;
    flex-wrap: wrap;
    gap: var(--fv-space-sm);
    justify-content: center;
    margin-top: var(--fv-space-2xl);
}

.fv-shop__page,
.fv-shop__pagination button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--fv-border);
    background: #fff;
    color: var(--fv-text);
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    font-size: var(--fv-text-sm);
}

.fv-shop__page--current {
    background: var(--fv-red);
    border-color: var(--fv-red);
    color: var(--fv-text-light);
}

.fv-shop__empty {
    padding: var(--fv-space-2xl);
    border: 1px dashed var(--fv-border);
    border-radius: var(--fv-radius-xl);
    text-align: center;
    color: var(--fv-text-muted);
}

@media (min-width: 768px) {
    .fv-shop__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .fv-shop__intro-inner {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

    .fv-shop__meta {
        align-items: flex-end;
        text-align: right;
    }

    .fv-shop__grid {
        /* 5 columnas en desktop */
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: var(--fv-space-md);
    }
}
