/* === Overlay === */
.qb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* === Modal Container === */
.qb-modal {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    position: relative;
    transform: translateY(100%);
    opacity: 0;
    animation: qb-slide-up 0.3s ease forwards;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Closing animation */
.qb-modal.closing {
    animation: qb-slide-down 0.3s ease forwards;
}

/* === Animations === */
@keyframes qb-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

@keyframes qb-slide-down {
    from { transform: translateY(0); opacity: 1; }
    to   { transform: translateY(100%); opacity: 0; }
}

/* === Close Button === */
.qb-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    color: #555;
}
.qb-close:hover { color: #000; }

/* === Variations Container === */
.qb-variations {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.qb-variation {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}

/* Variation Image */
.qb-variation img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* Price + Stock */
.qb-price {
    font-weight: bold;
    margin: 6px 0;
    color: #222;
}

.qb-stock {
    font-size: 0.9em;
    color: #666;
}

/* Add to Cart Button */
.qb-variation .button {
    margin-top: 10px;
}

/* === Structured Attributes === */
.qb-variation-attrs {
    margin: 5px 0;
}

.qb-attr {
    font-size: 0.95em;
    margin: 2px 0;
}

.variation-attr-label {
    font-weight: 600;
    color: #333;
    margin-right: 5px;
}

.variation-attr-value {
    color: #555;
}

/* === Skeleton Loading === */
.qb-skeleton {
    background: #eee;
    border-radius: 6px;
    margin: 6px 0;
    position: relative;
    overflow: hidden;
}

.qb-skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150px;
    height: 100%;
    width: 150px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: qb-shimmer 1.2s infinite;
}

@keyframes qb-shimmer {
    100% { transform: translateX(300%); }
}

.qb-skeleton-thumb {
    width: 90px;
    height: 90px;
    border-radius: 6px;
    margin-right: 15px;
}

.qb-skeleton-line {
    height: 14px;
    width: 60%;
}

.qb-skeleton-price {
    height: 16px;
    width: 40%;
}
