/**
 * ABM Cursos Avulsos - Shortcode [abm_cursos_avulsos]
 * Paleta academica: #1B2A4A + #8B6914
 */

.abm-avulsos-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1B2A4A;
}

/* ---- Header ---- */
.abm-avulsos-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #DDD6CB;
}

.abm-avulsos-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #1B2A4A;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.abm-avulsos-subtitle {
    font-size: 1.05rem;
    color: #5A6577;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---- Grid ---- */
.abm-avulsos-grid {
    display: grid;
    gap: 2rem;
}

.abm-avulsos-cols-2 { grid-template-columns: repeat(2, 1fr); }
.abm-avulsos-cols-3 { grid-template-columns: repeat(3, 1fr); }
.abm-avulsos-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Card ---- */
.abm-avulso-card {
    background: #fff;
    border: 1px solid #DDD6CB;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 250ms ease;
    box-shadow: 0 2px 8px rgba(27, 42, 74, 0.04);
}

.abm-avulso-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(27, 42, 74, 0.10);
    border-color: #8B6914;
}

.abm-avulso-card__image-link {
    display: block;
    text-decoration: none;
}

.abm-avulso-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
    background-color: #F5F2ED;
    border-bottom: 1px solid #DDD6CB;
}

.abm-avulso-card__sale-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #8B6914;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.abm-avulso-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.abm-avulso-card__title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.75rem;
    color: #1B2A4A;
}

.abm-avulso-card__title a {
    color: inherit;
    text-decoration: none;
}

.abm-avulso-card__title a:hover {
    color: #8B6914;
}

.abm-avulso-card__excerpt {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #5A6577;
    margin: 0 0 1.25rem;
    flex-grow: 1;
}

.abm-avulso-card__footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #F5F2ED;
}

.abm-avulso-card__price {
    margin-bottom: 1rem;
}

.abm-avulso-card__price-from {
    display: block;
    font-size: 0.75rem;
    color: #8E99A8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
    font-weight: 600;
}

.abm-avulso-card__price .woocommerce-Price-amount,
.abm-avulso-card__price .amount {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #8B6914;
}

.abm-avulso-card__price del {
    color: #8E99A8;
    font-size: 0.9rem;
    margin-right: 6px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.abm-avulso-card__price del .woocommerce-Price-amount,
.abm-avulso-card__price del .amount {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: #8E99A8;
}

.abm-avulso-card__btn {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    background: #1B2A4A;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 200ms ease;
    font-family: inherit;
}

.abm-avulso-card__btn:hover:not(:disabled) {
    background: #0F1D36;
}

.abm-avulso-card__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   MODAL DE VARIACOES
   ========================================================================== */

.abm-avulso-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.abm-avulso-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 29, 54, 0.6);
    backdrop-filter: blur(4px);
    animation: abmFadeIn 200ms ease-out;
}

.abm-avulso-modal__dialog {
    position: relative;
    background: #FDFCFA;
    border-radius: 12px;
    max-width: 760px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: abmSlideUp 300ms ease-out;
}

.abm-avulso-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(27, 42, 74, 0.08);
    border: none;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: #1B2A4A;
    cursor: pointer;
    z-index: 2;
    transition: background 200ms ease;
}

.abm-avulso-modal__close:hover {
    background: rgba(27, 42, 74, 0.15);
}

.abm-avulso-modal__body {
    padding: 2rem;
}

/* ---- Conteudo do modal ---- */
.abm-avulso-vm__title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1B2A4A;
    margin: 0 0 0.5rem;
    padding-right: 2rem;
    line-height: 1.3;
}

.abm-avulso-vm__subtitle {
    font-size: 0.95rem;
    color: #5A6577;
    margin: 0 0 1.75rem;
}

.abm-avulso-vm__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.abm-avulso-vm__card {
    position: relative;
    background: #fff;
    border: 2px solid #DDD6CB;
    border-radius: 10px;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
}

.abm-avulso-vm__card.is-recommended {
    border-color: #8B6914;
    background: #FFFBF4;
}

.abm-avulso-vm__ribbon {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #8B6914;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.abm-avulso-vm__plan-name {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1B2A4A;
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #EBE6DE;
}

.abm-avulso-vm__price-box {
    text-align: center;
    margin-bottom: 1.25rem;
}

.abm-avulso-vm__price-old {
    display: block;
    font-size: 0.85rem;
    color: #8E99A8;
    text-decoration: line-through;
    margin-bottom: 2px;
}

.abm-avulso-vm__price-old .woocommerce-Price-amount,
.abm-avulso-vm__price-old .amount {
    color: #8E99A8;
    font-size: 0.85rem;
}

.abm-avulso-vm__price {
    display: block;
    font-family: 'Lora', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #8B6914;
}

.abm-avulso-vm__price .woocommerce-Price-amount,
.abm-avulso-vm__price .amount {
    color: #8B6914;
}

.abm-avulso-vm__features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    flex-grow: 1;
}

.abm-avulso-vm__features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #3D4C63;
    line-height: 1.5;
}

.abm-avulso-vm__features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: #2D8A56;
    font-weight: 700;
}

.abm-avulso-vm__btn {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    background: #1B2A4A;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 200ms ease;
    font-family: inherit;
}

.abm-avulso-vm__btn:hover:not(:disabled) {
    background: #0F1D36;
}

.abm-avulso-vm__btn.is-recommended {
    background: #8B6914;
}

.abm-avulso-vm__btn.is-recommended:hover:not(:disabled) {
    background: #725610;
}

.abm-avulso-vm__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- Animacoes ---- */
@keyframes abmFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes abmSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */

@media (max-width: 1024px) {
    .abm-avulsos-cols-3,
    .abm-avulsos-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .abm-avulsos-wrapper {
        padding: 1.5rem 1rem;
    }

    .abm-avulsos-title {
        font-size: 1.75rem;
    }

    .abm-avulsos-subtitle {
        font-size: 0.95rem;
    }

    .abm-avulsos-cols-2,
    .abm-avulsos-cols-3,
    .abm-avulsos-cols-4 {
        grid-template-columns: 1fr;
    }

    .abm-avulsos-grid {
        gap: 1.5rem;
    }

    .abm-avulso-modal__body {
        padding: 1.5rem 1.25rem;
    }

    .abm-avulso-vm__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .abm-avulso-vm__title {
        font-size: 1.25rem;
    }
}
