/* =====================================================
   FRONT-PAGE — ESTILOS ESPECÍFICOS DE LA HOME
   Se importan mediante style.css en WordPress.
   ===================================================== */

/* ---- HERO ---- */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--bg-light);
    padding: var(--space-4xl) 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-image { display: none; }
}

.hero-badge {
    margin-bottom: var(--space-md);
    font-size: var(--fs-sm);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: var(--fw-black);
    line-height: 1.1;
    color: var(--text-dark);
    margin-bottom: var(--space-lg);
}

.hero-title__cat {
    display: inline-block;
    animation: float 2s ease-in-out infinite;
}

.hero-title span:not(.hero-title__cat) {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--fs-lg);
    color: var(--text-medium);
    max-width: 500px;
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

@media (max-width: 900px) {
    .hero-subtitle { margin-left: auto; margin-right: auto; }
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-2xl);
}

@media (max-width: 900px) {
    .hero-actions { justify-content: center; }
}

/* Stats del hero */
.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .hero-stats { justify-content: center; }
}

.hero-stat__number {
    display: block;
    font-size: var(--fs-2xl);
    font-weight: var(--fw-black);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat__label {
    display: block;
    font-size: var(--fs-xs);
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--fw-medium);
}

.hero-stat__divider {
    width: 1px;
    height: 40px;
    background: rgba(123, 45, 139, 0.2);
}

/* Imagen del hero */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image__circle {
    position: relative;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 30px 80px rgba(255, 107, 53, 0.25);
}

.hero-image__img {
    width: 85%;
    height: 85%;
    border-radius: 50%;
    object-fit: cover;
}

.hero-emoji {
    font-size: 10rem;
    line-height: 1;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.2));
}

.hero-float-badge {
    position: absolute;
    background: white;
    border-radius: var(--radius-md);
    padding: 0.5rem 0.875rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    box-shadow: var(--shadow-md);
    animation: float 3s ease-in-out infinite;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ---- CATEGORÍAS ---- */
.section--categories {
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

@media (max-width: 1024px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .categories-grid { grid-template-columns: 1fr; }
}

.category-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    background: white;
    border: 2px solid rgba(0,0,0,0.06);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--cat-color, #FF6B35), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--cat-color, var(--color-primary));
    box-shadow: 0 12px 36px rgba(0,0,0,0.1);
}

.category-card:hover::before { opacity: 0.06; }

.category-card__icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--cat-color, #FF6B35), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--cat-color, #FF6B35) 30%, transparent);
}

.category-card__content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.category-card__name {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: var(--text-dark);
    margin-bottom: 0.2rem;
}

.category-card__desc {
    font-size: var(--fs-xs);
    color: var(--text-light);
    margin-bottom: 0;
}

.category-card__count {
    font-size: var(--fs-xs);
    color: var(--cat-color, var(--color-primary));
    font-weight: var(--fw-bold);
    margin-top: 0.25rem;
    display: block;
}

.category-card__arrow {
    font-size: var(--fs-lg);
    color: var(--cat-color, var(--color-primary));
    transition: transform var(--transition-base);
    position: relative;
    z-index: 1;
}

.category-card:hover .category-card__arrow { transform: translateX(4px); }

/* ---- PRODUCTOS GRID ---- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .products-grid { grid-template-columns: 1fr; }
}

/* ---- PRODUCT CARD ---- */
.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.04);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-card__image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #FFF8F0, #FFE4D0);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card__image-placeholder {
    font-size: 5rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

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

.product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    box-shadow: var(--shadow-primary);
}

.product-card__category {
    position: absolute;
    top: 12px;
    right: 12px;
}

.product-card__body {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.product-card__title {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: var(--text-dark);
    line-height: 1.3;
    margin: 0;
}

.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(0,0,0,0.06);
}

.product-card__price {
    font-size: var(--fs-xl);
    font-weight: var(--fw-black);
    color: var(--color-primary);
}

/* ---- TABLA COMPARATIVA ---- */
.comparison-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: var(--fs-sm);
}

.comparison-table thead {
    background: var(--gradient-primary);
    color: white;
}

.comparison-table thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: var(--fw-bold);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    color: white;
}

.comparison-table tbody tr {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background var(--transition-fast);
}

.comparison-table tbody tr:hover { background: rgba(255,107,53,0.03); }
.comparison-table tbody tr:last-child { border-bottom: none; }

.comparison-table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
}

.comparison-table__row--winner {
    background: linear-gradient(90deg, rgba(255,215,0,0.07), transparent) !important;
    font-weight: var(--fw-medium);
}

.comparison-table__row--winner td:first-child {
    border-left: 4px solid var(--color-accent);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    font-weight: var(--fw-black);
    text-align: center;
    white-space: nowrap;
}

.rank-badge--1 { background: linear-gradient(135deg,#FFD700,#FFA500); color: #5a3000; }
.rank-badge--2 { background: linear-gradient(135deg,#C0C0C0,#A0A0A0); color: #333; }
.rank-badge--3 { background: linear-gradient(135deg,#CD7F32,#A0522D); color: white; }
.rank-badge--4,
.rank-badge--5 { background: #f0f0f0; color: var(--text-medium); }

.price-tag { color: var(--color-primary); font-size: var(--fs-md); }

/* ---- POST CARDS ---- */
.post-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.04);
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.post-card__image {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, rgba(255,107,53,0.1), rgba(123,45,139,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-card__image-placeholder {
    font-size: 4rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

.post-card__category {
    position: absolute;
    top: 12px;
    left: 12px;
}

.post-card__body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex: 1;
}

.post-card__title {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    line-height: 1.3;
    margin: 0;
}

.post-card__title a {
    color: var(--text-dark);
    transition: color var(--transition-fast);
}

.post-card__title a:hover { color: var(--color-primary); }

.post-card__excerpt {
    font-size: var(--fs-sm);
    color: var(--text-medium);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: var(--space-sm);
}

/* ---- NEWSLETTER ---- */
.section--newsletter {
    background: var(--bg-light);
    padding-bottom: var(--space-4xl);
}

.newsletter-card {
    background: var(--gradient-hero);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-2xl);
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 24px 64px rgba(123, 45, 139, 0.25);
}

.newsletter-card__content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-card__title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: var(--fw-black);
    color: white;
    margin-bottom: var(--space-md);
}

.newsletter-card__desc {
    color: rgba(255,255,255,0.85);
    font-size: var(--fs-md);
    margin-bottom: var(--space-xl);
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 500px;
    margin: 0 auto var(--space-md);
}

@media (max-width: 560px) {
    .newsletter-form { flex-direction: column; }
}

.newsletter-form__input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-full);
    border: none;
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    outline: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.newsletter-form__note {
    color: rgba(255,255,255,0.6);
    font-size: var(--fs-xs);
    margin: 0;
}

/* Grilla compacta de 5 columnas para productos */
.products-grid--small {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: var(--space-md) !important;
}

.products-grid--small .product-card {
    border-radius: 8px !important;
}

.products-grid--small .product-card__body {
    padding: 0.75rem !important;
    gap: 0.35rem !important;
}

.products-grid--small .product-card__title {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}

.products-grid--small .product-card__price {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
}

.products-grid--small .product-card__footer {
    padding-top: 0.5rem !important;
    gap: 0.5rem !important;
}

.products-grid--small .btn--amazon {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.75rem !important;
    border-radius: 6px !important;
}

.products-grid--small .product-card__image-placeholder {
    font-size: 2.5rem !important;
}

@media (max-width: 1200px) {
    .products-grid--small {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .products-grid--small {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .products-grid--small {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
}

@media (max-width: 400px) {
    .products-grid--small {
        grid-template-columns: 1fr !important;
    }
}
