/* ==== Wrapper ==== */
.misk-bogo-wrapper {
    padding: 10px;
    margin: 10px 0;
    background: #fff;
    border: 1px solid #d26e4b;
    border-radius: 12px;
}

.misk-bogo-wrapper h3 {
    font-size: 18px;
    margin-bottom: 10px;
    text-align: center;
    color: var(--ast-global-color-0);
}

/* ==== Container ==== */
.misk-bogo-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* ==== Groups ==== */
.misk-group {
    min-width: 150px;
    background: #f8fafc;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
}

.misk-label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    text-align: right;
}

/* Items Grid */
.misk-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* ==== Item Card ==== */
.misk-item {
    width: 180px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    position: relative;
    text-align: center;
}

.misk-img-wrap {
    width: 150px; 
    height: 150px;
    margin: 0 auto 10px;
}
.misk-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.misk-title {
    margin: 8px;
    font-size: 13px;
    font-weight: bold;
    color: var(--ast-global-color-0);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Prices */
.misk-item-price {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 5px;
}
.misk-item-price del { color: #999; font-size: 13px; }
.misk-item-price ins { color: var(--ast-global-color-1); font-weight: bold; }

/* Badge */
.misk-badge {
    position: absolute;
    top: 8px; left: 8px;
    background: #e91e63;
    color: #fff;
    padding: 3px 6px;
    font-size: 11px;
    border-radius: 4px;
}

/* Quantity */
.misk-qty {
    position: absolute;
    bottom: 6px; right: 6px;
    background: #0007;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Operators */
.misk-operator {
    font-size: 20px;
    color: #aaa;
    align-self: center;
}

/* ==== Summary ==== */
.misk-group-summary {
    background: #fffbf8;
    border-color: #f5e0d6;
    width: 180px;
}

.misk-summary-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.misk-final-prices {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.misk-old-price { color: #999; text-decoration: line-through; }
.misk-new-price { color: #3e9983; font-weight: bold; font-size: 20px; }

.misk-saved-badge {
    background: #d1fae5;
    color: #065f46;
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 15px;
}

/* ==== Astra Button ==== */
/* ملاحظة: نترك Astra يتكفّل بالألوان والتنسيق */
#misk-bogo-add-btn {
    width: 100%;
    margin-top: 10px;
}

#misk-bogo-add-btn.button,
#misk-bogo-add-btn.ast-button {
    width: 100%;
    border-radius: 6px;
}

/* ==== Mobile ==== */
@media (max-width: 768px){
    .misk-bogo-container { flex-direction: column; }
    .misk-items { flex-direction: column; }

    .misk-item {
        width: 100%;
        display: flex;
        gap: 10px;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: right;
    }

    .misk-img-wrap { width: 100px; height: 100px; margin: 0; }

    .misk-title { margin: 5px 0; -webkit-line-clamp: 3; }

    .misk-group-summary { width: 100%; }

    .misk-final-prices { flex-direction: row; gap: 10px; }

    .misk-badge { top: 4px; left: 4px; }
}
