/* ==========================================================================
   PHARCO OPCION A - ESTILOS HERO, CATEGORIAS & PRODUCTOS (TIPOGRAFIA ORIGINAL)
   ========================================================================== */

:root {
    --v2-navy: #0b1e3f;
    --v2-blue: #0056b3;
    --v2-blue-hover: #004494;
    --v2-blue-light: #e6f0fa;
    --v2-card-bg: #ffffff;
    --v2-border: #e2e8f0;
    --v2-border-light: #edf2f7;
    --v2-text-dark: #0f172a;
    --v2-text-muted: #64748b;
    --v2-gold: #f59e0b;
}

/* ==========================================================================
   1. SECCION «DESCUBRE PHARCO» (4 CATEGORIAS)
   ========================================================================== */
.v2-categories-grid {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.v2-cat-card {
    position: relative;
    height: 310px;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    box-sizing: border-box;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
    background-size: cover;
    background-position: center;
}
.v2-cat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 30, 63, 0.15) 0%, rgba(11, 30, 63, 0.4) 40%, rgba(11, 30, 63, 0.9) 100%);
    transition: opacity 0.3s ease;
    z-index: 1;
}
.v2-cat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(11, 30, 63, 0.22);
}
.v2-cat-card:hover::before {
    background: linear-gradient(180deg, rgba(11, 30, 63, 0.05) 0%, rgba(11, 30, 63, 0.35) 40%, rgba(11, 30, 63, 0.94) 100%);
}
.v2-cat-icon-badge {
    position: relative;
    z-index: 2;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--v2-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}
.v2-cat-card:hover .v2-cat-icon-badge {
    transform: scale(1.12);
}
.v2-cat-info {
    position: relative;
    z-index: 2;
}
.v2-cat-name {
    font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.v2-cat-desc {
    font-size: 0.84rem;
    line-height: 1.45;
    color: #f1f5f9;
    opacity: 0.95;
    margin: 0 0 14px 0;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.v2-cat-cta {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    transition: gap 0.2s ease, color 0.2s ease;
}
.v2-cat-card:hover .v2-cat-cta {
    gap: 10px;
    color: #38bdf8;
}

/* ==========================================================================
   2. SECCION «SELECCIONADOS PARA TI» (PRODUCTOS)
   ========================================================================== */
.v2-products-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}
.v2-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.v2-product-card {
    background: #ffffff;
    border: 1px solid var(--v2-border);
    border-radius: 18px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}
.v2-product-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(11, 30, 63, 0.08);
}
.v2-fav-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.15rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    z-index: 2;
}
.v2-fav-btn:hover {
    color: #ef4444;
    transform: scale(1.15);
}
.v2-prod-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    cursor: pointer;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    box-sizing: border-box;
}
.v2-prod-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.4s ease;
}
.v2-product-card:hover .v2-prod-img {
    transform: scale(1.06);
}
.v2-prod-name {
    font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dark, #0b1e3f);
    margin: 0 0 4px 0;
    text-decoration: none;
    display: block;
}
.v2-prod-name:hover {
    color: var(--primary-color, #0056b3);
}
.v2-prod-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    margin: 0 0 10px 0;
    line-height: 1.35;
}
.v2-prod-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--v2-gold);
    margin-bottom: 14px;
}
.v2-prod-rating-count {
    color: var(--text-muted, #64748b);
    font-size: 0.75rem;
    margin-left: 3px;
}
.v2-prod-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.v2-prod-price {
    font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-dark, #0b1e3f);
}
.v2-prod-cart-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--primary-color, #0056b3);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.25);
    transition: all 0.25s ease;
}
.v2-prod-cart-btn:hover {
    background-color: #004494;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 86, 179, 0.35);
}
.v2-view-all-wrap {
    text-align: center;
    margin-top: 40px;
}
.v2-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 30px;
    border: 1.5px solid var(--primary-color, #0056b3);
    color: var(--primary-color, #0056b3) !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.25s ease;
}
.v2-btn-outline:hover {
    background-color: var(--primary-color, #0056b3);
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* ==========================================================================
   3. MOBILE RULES (2x2 CATEGORIAS + SLIDER PRODUCTOS + COMPARATIVA CARDS)
   ========================================================================== */
.v2-compare-cards {
    display: none;
}

@media (max-width: 768px) {
    /* 1. SECCION CATEGORIAS: CUADRICULA COMPACTA 2x2 */
    .v2-categories-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 16px;
        margin: 0 auto;
    }
    .v2-cat-card {
        height: 165px;
        border-radius: 14px;
        padding: 14px;
    }
    .v2-cat-icon-badge {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    .v2-cat-name {
        font-size: 0.92rem;
        margin: 0 0 2px 0;
        letter-spacing: 0.5px;
    }
    .v2-cat-desc {
        display: none;
    }
    .v2-cat-cta {
        font-size: 0.7rem;
        font-weight: 700;
        gap: 4px;
    }

    /* 2. SECCION PRODUCTOS: SLIDER COMPACTO */
    .v2-products-container {
        padding: 0;
    }
    .v2-products-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding: 4px 16px 20px 16px;
        margin: 0;
        scrollbar-width: none;
    }
    .v2-products-grid::-webkit-scrollbar {
        display: none;
    }
    .v2-product-card {
        flex: 0 0 54vw;
        max-width: 200px;
        scroll-snap-align: start;
        border-radius: 15px;
        padding: 12px;
    }
    .v2-fav-btn {
        top: 10px;
        right: 10px;
        font-size: 1rem;
    }
    .v2-prod-img-wrap {
        padding: 6px;
        margin-bottom: 8px;
        border-radius: 10px;
    }
    .v2-prod-img {
        max-width: 95%;
        max-height: 95%;
    }
    .v2-prod-name {
        font-size: 0.82rem;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .v2-prod-subtitle {
        font-size: 0.72rem;
        margin-bottom: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .v2-prod-rating {
        font-size: 0.68rem;
        margin-bottom: 8px;
        gap: 2px;
    }
    .v2-prod-rating-count {
        font-size: 0.65rem;
    }
    .v2-prod-bottom-row {
        padding-top: 8px;
    }
    .v2-prod-price {
        font-size: 1rem;
    }
    .v2-prod-cart-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    .v2-view-all-wrap {
        margin-top: 15px;
        padding: 0 16px;
    }
    .v2-btn-outline {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        padding: 10px 16px;
        font-size: 0.78rem;
    }

    /* 3. COMPARATIVA MOVIL */
    .comparison-container.desktop-only {
        display: none !important;
    }
    .v2-compare-cards.mobile-only {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        margin-top: 15px;
    }
    .v2-compare-card {
        background: #ffffff;
        border: 1px solid var(--v2-border);
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 4px 15px rgba(11, 30, 63, 0.04);
    }
    .v2-compare-feature {
        display: flex;
        align-items: center;
        gap: 10px;
        font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
        font-size: 0.9rem;
        font-weight: 800;
        color: var(--v2-navy);
        padding-bottom: 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid #f1f5f9;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .v2-compare-feature i {
        color: var(--v2-blue);
        font-size: 1.1rem;
    }
    .v2-compare-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 12px;
        border-radius: 10px;
        margin-bottom: 6px;
        font-size: 0.82rem;
    }
    .v2-row-pharco {
        background: rgba(0, 86, 179, 0.07);
        border: 1px solid rgba(0, 86, 179, 0.2);
        color: var(--v2-navy);
    }
    .v2-row-pharco .v2-brand-tag {
        font-weight: 800;
        color: var(--v2-blue);
    }
    .v2-row-pharco .v2-val {
        font-weight: 800;
        display: flex;
        align-items: center;
        gap: 6px;
        color: var(--v2-navy);
    }
    .v2-row-pharco .fa-circle-check {
        color: #10b981;
        font-size: 0.95rem;
    }
    .v2-row-others {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        color: #64748b;
    }
    .v2-row-others .v2-brand-tag {
        font-weight: 600;
        color: #64748b;
    }
    .v2-row-others .v2-val {
        display: flex;
        align-items: center;
        gap: 6px;
        font-weight: 500;
    }
    .v2-row-others .fa-circle-xmark {
        color: #ef4444;
        opacity: 0.8;
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   TABLA «EL ESTÁNDAR PHARCO» (EDITORIAL DE LUJO CON TIPOGRAFÍA ORIGINAL)
   ========================================================================== */
.v2-compare-wrapper {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 20px;
}
.v2-luxury-table-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--v2-border);
    box-shadow: 0 12px 35px rgba(11, 30, 63, 0.06);
    overflow: hidden;
}
.v2-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.v2-table thead th {
    font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
    padding: 22px 24px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--v2-border);
}
.v2-table thead th.th-feature {
    background: #f8fafc;
    color: var(--v2-navy, #0b1e3f);
    width: 38%;
}
.v2-table thead th.th-pharco {
    background: var(--v2-navy, #0b1e3f);
    color: #ffffff;
    width: 32%;
    position: relative;
}
.v2-table thead th.th-pharco span.pharco-pill {
    background: #38bdf8;
    color: #0b1e3f;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}
.v2-table thead th.th-others {
    background: #f8fafc;
    color: #64748b;
    width: 30%;
}
.v2-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}
.v2-table tbody tr:hover {
    background: #fafcff;
}
.v2-table tbody tr:last-child {
    border-bottom: none;
}
.v2-table tbody td {
    padding: 18px 24px;
    font-size: 0.92rem;
    color: #334155;
}
.v2-table tbody td.td-feature {
    font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
    font-weight: 700;
    color: var(--v2-navy, #0b1e3f);
}
.v2-table tbody td.td-pharco {
    background: rgba(0, 86, 179, 0.05);
    font-family: var(--font-heading, "Plus Jakarta Sans", sans-serif);
    font-weight: 800;
    color: var(--primary-color, #0056b3);
    border-left: 1px solid rgba(0, 86, 179, 0.1);
    border-right: 1px solid rgba(0, 86, 179, 0.1);
}
.v2-table tbody td.td-pharco i {
    color: #10b981;
    margin-left: 6px;
}
.v2-table tbody td.td-others {
    color: #64748b;
    font-weight: 500;
}

/* ==========================================================================
   VISIBILIDAD DESKTOP / MOVIL PARA TABLA COMPARATIVA
   ========================================================================== */
.desktop-only {
    display: block !important;
}
.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .desktop-only,
    .v2-compare-wrapper,
    .v2-compare-wrapper.desktop-only,
    .comparison-container,
    .comparison-container.desktop-only {
        display: none !important;
    }
    .mobile-only,
    .v2-compare-cards,
    .v2-compare-cards.mobile-only {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        margin-top: 15px;
    }
}
