/* ─── Overlay ──────────────────────────────────────────── */
.scs-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}
.scs-overlay--visible {
    opacity: 1;
}

/* ─── Modal (centrado) ─────────────────────────────────── */
.scs-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 520px;
    max-width: 94vw;
    max-height: 85vh;
    background: #fff;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
}
.scs-panel--open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* ─── Header ───────────────────────────────────────────── */
.scs-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px 16px;
    border-bottom: 1px solid #eee;
}
.scs-panel__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111;
}
.scs-panel__close {
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    color: #666;
    padding: 0;
    transition: all 0.2s;
}
.scs-panel__close:hover {
    background: #e0e0e0;
    color: #000;
}

/* ─── Body ─────────────────────────────────────────────── */
.scs-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 28px;
}

/* ─── Product Card ─────────────────────────────────────── */
.scs-product {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
}
.scs-product:last-child {
    border-bottom: none;
}
.scs-product__image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f5f5f5;
}
.scs-product__info {
    flex: 1;
    min-width: 0;
}
.scs-product__name {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin: 0 0 4px;
    line-height: 1.3;
}
.scs-product__name a {
    color: inherit;
    text-decoration: none;
}
.scs-product__name a:hover {
    text-decoration: underline;
}
.scs-product__price {
    font-size: 15px;
    color: #555;
    margin: 0 0 10px;
}
.scs-product__price del {
    color: #999;
    margin-right: 6px;
}
.scs-product__price ins {
    text-decoration: none;
    font-weight: 600;
    color: #e53935;
}

/* ─── Variation Selects ────────────────────────────────── */
.scs-variation-row {
    margin-bottom: 8px;
}
.scs-variation-row label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.scs-variation-row select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    background: #fafafa;
    appearance: auto;
}

/* ─── Add Button ───────────────────────────────────────── */
.scs-product__add {
    display: inline-block;
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.scs-product__add:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}
.scs-product__add:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}
.scs-product__add--added {
    pointer-events: none;
    background-color: #4CAF50 !important;
}

/* ─── Footer ───────────────────────────────────────────── */
.scs-panel__footer {
    padding: 16px 28px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}
.scs-panel__dismiss {
    background: none;
    border: 1px solid #ddd;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.scs-panel__dismiss:hover {
    background: #f5f5f5;
    color: #333;
    border-color: #bbb;
}

/* ─── Loading ──────────────────────────────────────────── */
.scs-loading {
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 14px;
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 560px) {
    .scs-panel {
        width: 96vw;
        max-height: 90vh;
        border-radius: 12px;
    }
    .scs-panel__header {
        padding: 18px 20px 14px;
    }
    .scs-panel__body {
        padding: 12px 20px;
    }
    .scs-panel__footer {
        padding: 14px 20px 16px;
    }
    .scs-product__image {
        width: 80px;
        height: 80px;
    }
}
