/**
 * Free Gifts Frontend Styles - Optimized & Responsive
 */

.wcpe-free-gifts {
    display: block;
    box-sizing: border-box;
    margin: 40px 0 25px 0 !important; /* Espacio para el título flotante */
    padding: 30px 20px 20px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background-color: #ffffff;
    position: relative;
    text-align: center;
}

.wcpe-free-gifts * {
    box-sizing: border-box;
}

/* Título tipo "Pill" flotando en el borde superior */
.wcpe-fg-title {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 8px 25px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

/* Items Container */
.wcpe-fg-items {
    margin: 10px 0;
}

.wcpe-fg-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* Grid Item */
.wcpe-fg-grid-item {
    flex: 0 1 120px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Item Image Container */
.wcpe-fg-item-image {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.wcpe-fg-grid-item:hover .wcpe-fg-item-image {
    transform: translateY(-3px);
}

.wcpe-fg-item-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Item Text */
.wcpe-fg-item-text {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    margin: 0;
}

/* CTA Section */
.wcpe-fg-cta {
    display: inline-block;
    margin-top: 15px;
    padding: 6px 15px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* Responsive */
@media screen and (max-width: 480px) {
    .wcpe-free-gifts {
        padding: 25px 15px 15px 15px;
    }
    .wcpe-fg-grid {
        gap: 15px;
    }
    .wcpe-fg-grid-item {
        flex: 0 1 90px;
    }
    .wcpe-fg-item-image {
        width: 60px;
        height: 60px;
    }
    .wcpe-fg-title {
        font-size: 13px;
        width: 85%;
    }
}