/* ══════════════════════════════════════════════
   DXT SIDE CART — Drawer lateral derecho
   ══════════════════════════════════════════════ */

/* ── Overlay ── */
.dxt-sc-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
    transition: opacity 0.3s ease;
}
.dxt-sc-overlay.dxt-sc-hidden {
    opacity: 0;
    pointer-events: none;
}

/* ── Drawer ── */
.dxt-sc-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    width: 400px;
    max-width: 92vw;
    background: #f8f9fc;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}
.dxt-sc-drawer.dxt-sc-hidden {
    transform: translateX(100%);
    pointer-events: none;
}

/* ── Header ── */
.dxt-sc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    color: #fff;
    flex-shrink: 0;
}
.dxt-sc-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dxt-sc-header-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.dxt-sc-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.dxt-sc-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s;
}
.dxt-sc-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ── Body ── */
.dxt-sc-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    -webkit-overflow-scrolling: touch;
}
.dxt-sc-body::-webkit-scrollbar {
    width: 5px;
}
.dxt-sc-body::-webkit-scrollbar-track {
    background: transparent;
}
.dxt-sc-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* ── Loading ── */
.dxt-sc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 0;
    color: #94a3b8;
    font-size: 14px;
}
.dxt-sc-loading.dxt-sc-hidden {
    display: none !important;
}

/* ── Empty state ── */
.dxt-sc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 50px 20px;
    text-align: center;
}
.dxt-sc-empty.dxt-sc-hidden {
    display: none !important;
}
.dxt-sc-empty p {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    margin: 8px 0 0;
}
.dxt-sc-empty span {
    font-size: 13px;
    color: #94a3b8;
}

/* ── Items container ── */
.dxt-sc-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Single item card ── */
.dxt-sc-item {
    display: flex;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    position: relative;
    transition: box-shadow 0.2s;
}
.dxt-sc-item:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

/* Thumbnail */
.dxt-sc-item-img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
}
.dxt-sc-item-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Info */
.dxt-sc-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}
.dxt-sc-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none !important;
    margin: 0;
    padding: 0;
}
.dxt-sc-item-name a {
    color: inherit !important;
    text-decoration: none !important;
}
.dxt-sc-item-name a:hover {
    color: #003580 !important;
}

.dxt-sc-item-price {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* Qty + subtotal row */
.dxt-sc-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

/* Qty controls */
.dxt-sc-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.dxt-sc-qty-btn {
    background: #f8fafc;
    border: none;
    width: 30px;
    height: 30px;
    font-size: 16px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    line-height: 1;
}
.dxt-sc-qty-btn:hover {
    background: #e2e8f0;
    color: #001840;
}
.dxt-sc-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.dxt-sc-qty-val {
    width: 34px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    border: none;
    background: transparent;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    padding: 0;
    margin: 0;
    outline: none;
}
.dxt-sc-qty-val::-webkit-outer-spin-button,
.dxt-sc-qty-val::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* Subtotal */
.dxt-sc-item-subtotal {
    font-size: 14px;
    font-weight: 800;
    color: #001840;
}

/* Remove button */
.dxt-sc-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    transition: color 0.2s;
}
.dxt-sc-remove:hover {
    color: #ef4444;
}

/* Item updating state */
.dxt-sc-item.dxt-sc-updating {
    opacity: 0.5;
    pointer-events: none;
}

/* ── Footer ── */
.dxt-sc-footer {
    flex-shrink: 0;
    padding: 16px 18px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}
.dxt-sc-footer.dxt-sc-hidden {
    display: none !important;
}
.dxt-sc-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.dxt-sc-total-label {
    font-size: 15px;
    font-weight: 600;
    color: #475569;
}
.dxt-sc-total-value {
    font-size: 20px;
    font-weight: 800;
    color: #001840;
}
.dxt-sc-footer-btns {
    display: flex;
    gap: 10px;
}
.dxt-sc-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    border: none;
    text-align: center;
}
.dxt-sc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.dxt-sc-btn:active {
    transform: scale(0.97);
}
.dxt-sc-btn-cart {
    background: #f0f4ff;
    color: #001840 !important;
    border: 2px solid #c8d6f5;
}
.dxt-sc-btn-checkout {
    background: linear-gradient(135deg, #001840 0%, #003580 100%);
    color: #fff !important;
}

/* ── Notification toast ── */
.dxt-sc-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000000;
    background: #0a6630;
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.dxt-sc-toast.dxt-sc-toast-show {
    transform: translateY(0);
    opacity: 1;
}

/* ── Item remove animation ── */
.dxt-sc-item-removing {
    animation: dxt-sc-remove-anim 0.3s ease forwards;
}
@keyframes dxt-sc-remove-anim {
    to {
        opacity: 0;
        transform: translateX(60px);
        height: 0;
        padding: 0;
        margin: 0;
        overflow: hidden;
    }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .dxt-sc-drawer {
        width: 360px;
        max-width: 94vw;
    }
}
@media (max-width: 480px) {
    .dxt-sc-drawer {
        width: 100vw;
        max-width: 100vw;
    }
    .dxt-sc-footer-btns {
        flex-direction: column;
    }
    .dxt-sc-item-img {
        width: 60px;
        height: 60px;
    }
}
