/* tienda.css adaptado con estilo tipo Grav (Opción B) */

/* =============================== */
/* GRID DE CARDS                   */
/* =============================== */

.item-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* =============================== */
/* CARD BASE STYLE (tipo Grav)    */
/* =============================== */

.item-card.card {
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.item-card.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* =============================== */
/* HEADER / THUMB                  */
/* =============================== */

.card__thumb {
    position: relative;
    height: 200px;
    padding: 0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card__thumb.blue {
    background: linear-gradient(140deg, #4e73df, #3751b5);
}

.card__thumb.green {
    background: linear-gradient(140deg, #28a745, #20c997);
}

.card__thumb.purple {
    background: linear-gradient(140deg, #764ba2, #667eea);
}

/* Imagen a pantalla completa dentro del thumb */
.card__thumb img.image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fallback cuando no hay imagen */
.card__header {
    font-size: 2.6rem;
    text-align: center;
    opacity: 0.9;
}

/* =============================== */
/* TAGS (Badges flotantes arriba-derecha) */
/* =============================== */

.card__tags {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.card__tags span {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    padding: .4em .8em;
    font-size: .8em;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.card__tags .gratis { 
    background: #6da5a7;  
}
.card__tags .success { 
    background: linear-gradient(135deg, #51cf66, #40c057); 
}
.card__tags .premium { 
    background: #a76b3b; 
}
.card__tags .version { 
    /*background: rgba(255,255,255,0.2); */
    background: #3b7779;
    border: 1px solid rgba(255,255,255,0.3);
}

/* =============================== */
/* BODY                            */
/* =============================== */

.card__body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card__content {
    flex: 1;
}
.card__title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card__title a {
    color: inherit;
    text-decoration: none;
    border-bottom: none;
}

.card__title a:hover {
    color: #3751b5;
    text-decoration: underline;
}

/* Descripción limitada a 3 líneas */
.card__description p {
    font-size: .95rem;
    color: #555;
    margin-bottom: 1.2rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.2em; /* 3 líneas * 1.4 line-height */
}

/* =============================== */
/* PRECIO                          */
/* =============================== */

.card__price {
    margin: 1rem 0;
    padding: .5rem 0;
}

.card__price .price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
}

/* =============================== */
/* LINKS (usando botones del tema) */
/* =============================== */

.card__links {
    margin-top: auto;
    display: flex;
    gap: .5rem;
    align-items: center;
    justify-content: space-between;
    padding-top: .75rem;
}

/* Contenedor para botones alineados a la derecha */
.card__links .button-group {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Botón pequeño específico para cards */
.card__links .button-small {
    font-size: 0.8em !important;
    height: 2.5em !important;
    line-height: 2.5em !important;
    padding: 0 1.2em !important;
}

/* =============================== */
/* TITULOS DE SECCION              */
/* =============================== */

.category-title {
    margin: 3em 0 1.5em 0;
    padding-bottom: .5em;
    border-bottom: 2px solid rgba(144,144,144,0.25);
    font-size: 1.8rem;
    color: #333;
}

.section-spacing {
    margin-bottom: 3rem;
}

/* =============================== */
/* INFO BOXES (al final)           */
/* =============================== */

.info-boxes .box {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    height: 100%;
}

.info-boxes .box h3 {
    margin-bottom: .8rem;
    color: #3751b5;
}

.info-boxes .box p {
    color: #666;
    font-size: .9rem;
}

/* =============================== */
/* MEDIA QUERIES                   */
/* =============================== */

@media screen and (max-width: 768px) {
    .item-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card__body {
        padding: 1.2rem;
    }

    @media screen and (max-width: 768px) {
    .card__links {
        flex-direction: column;
        align-items: stretch;
        gap: .8rem;
        }
    }
    
    .card__links .button-group {
        justify-content: stretch;
        width: 100%;
    }
    
    .card__links .button-small {
        flex: 1;
        text-align: center;
    }

    .card__tags {
        top: .8rem;
        right: .8rem;
    }

    .card__tags span {
        font-size: .75em;
        padding: .3em .6em;
    }

    .card__price .price {
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    .card__links .button-small {
        font-size: 0.75em !important;
        padding: 0 1em !important;
    }
    
    .card__description p {
        -webkit-line-clamp: 2;
        min-height: 2.8em;
    }
}