/**
 * Calma&Té Promotions - Modal Styles
 * Matches brand aesthetic: Quicksand font, forest/cream/wine palette.
 */

.calmate-promo-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.calmate-promo-modal--open {
    opacity: 1;
    visibility: visible;
}

.calmate-promo-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(44, 53, 48, 0.6);
    backdrop-filter: blur(4px);
}

.calmate-promo-modal__content {
    position: relative;
    background: #f4f1ea;
    border-radius: 0;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.calmate-promo-modal--open .calmate-promo-modal__content {
    transform: translateY(0);
}

.calmate-promo-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #2C3530;
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.calmate-promo-modal__close:hover {
    background: rgba(44, 53, 48, 0.1);
}

.calmate-promo-modal__header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.calmate-promo-modal__title {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C3530;
    margin: 0 0 0.5rem;
}

.calmate-promo-modal__message {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    color: rgba(44, 53, 48, 0.75);
    margin: 0;
    line-height: 1.5;
}

.calmate-promo-modal__loading {
    text-align: center;
    color: rgba(44, 53, 48, 0.6);
    padding: 2rem 0;
}

/* Product grid */
.calmate-promo-modal__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.calmate-promo-modal__card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(74, 93, 78, 0.08);
    transition: box-shadow 0.3s;
    position: relative;
}

.calmate-promo-modal__card:hover {
    box-shadow: 0 8px 24px rgba(74, 93, 78, 0.1);
}

.calmate-promo-modal__card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.calmate-promo-modal__card-body {
    padding: 0.75rem;
}

.calmate-promo-modal__card-name {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2C3530;
    margin: 0 0 0.4rem;
    line-height: 1.3;
}

.calmate-promo-modal__card-prices {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.calmate-promo-modal__card-original {
    font-size: 0.8rem;
    color: rgba(44, 53, 48, 0.4);
    text-decoration: line-through;
}

.calmate-promo-modal__card-promo {
    font-size: 0.95rem;
    font-weight: 700;
    color: #6B2D3B;
}

.calmate-promo-modal__card-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #6B2D3B;
    color: #f4f1ea;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
}

.calmate-promo-modal__card-btn {
    display: block;
    width: 100%;
    background: #4A5D4E;
    color: #f4f1ea;
    border: none;
    border-radius: 0;
    padding: 0.5rem;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 0.5rem;
}

.calmate-promo-modal__card-btn:hover {
    background: #8FA68E;
}

.calmate-promo-modal__card-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.calmate-promo-modal__card-btn--added {
    background: #4A5D4E !important;
}

.calmate-promo-modal__dismiss {
    display: block;
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid rgba(74, 93, 78, 0.2);
    border-radius: 0;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(44, 53, 48, 0.6);
    cursor: pointer;
    transition: all 0.2s;
}

.calmate-promo-modal__dismiss:hover {
    border-color: rgba(44, 53, 48, 0.4);
    color: #2C3530;
}

/* Promo badge in cart */
.calmate-promo-badge {
    display: inline-block;
    background: #6B2D3B;
    color: #f4f1ea;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    margin-right: 0.4rem;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 480px) {
    .calmate-promo-modal__content {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .calmate-promo-modal__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .calmate-promo-modal__card-img {
        height: 100px;
    }

    .calmate-promo-modal__title {
        font-size: 1.25rem;
    }
}
