/* ==========================================================================
   Lojas +10 - Cart Drawer & Cart Page Styles (Mobile Responsive Otimizado)
   ========================================================================== */

/* Overlay */
.lm10-cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lm10-cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Drawer Window */
.lm10-cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #FFFFFF;
    z-index: 9999;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lm10-cart-drawer.active {
    right: 0;
}

/* Header */
.lm10-cart-drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--lm10-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--lm10-bg-secondary);
}

.lm10-cart-drawer-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.lm10-cart-close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--lm10-gray-mid);
    line-height: 1;
}

/* Body Items List */
.lm10-cart-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.lm10-cart-item {
    display: flex;
    gap: 15px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--lm10-border-color);
    position: relative;
}

.lm10-cart-item-img {
    width: 70px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--lm10-radius-sm);
    background: var(--lm10-bg-accent);
    flex-shrink: 0;
}

.lm10-cart-item-info {
    flex-grow: 1;
}

.lm10-cart-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.lm10-cart-item-meta {
    font-size: 0.78rem;
    color: var(--lm10-gray-mid);
    margin-bottom: 8px;
}

.lm10-cart-item-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.lm10-cart-item-price {
    font-weight: 700;
    color: var(--lm10-charcoal);
    white-space: nowrap !important;
}

.lm10-cart-qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--lm10-border-color);
    border-radius: 4px;
}

.lm10-cart-qty-controls button {
    padding: 2px 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.lm10-cart-qty-controls span {
    padding: 0 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.lm10-cart-item-remove {
    background: none;
    border: none;
    color: #e53935;
    font-size: 0.78rem;
    cursor: pointer;
    margin-top: 4px;
}

/* Footer */
.lm10-cart-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--lm10-border-color);
    background: var(--lm10-bg-secondary);
}

.lm10-cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
}

.lm10-cart-total-target {
    white-space: nowrap !important;
}

.lm10-cart-installment-target {
    white-space: normal;
    word-break: break-word;
}

/* Empty State */
.lm10-cart-empty-state {
    text-align: center;
    padding: 40px 0;
    color: var(--lm10-gray-mid);
}

/* --- Mobile Responsive Enhancements --- */
@media (max-width: 768px) {
    .lm10-cart-item {
        gap: 10px;
        padding-bottom: 14px;
        margin-bottom: 14px;
    }

    .lm10-cart-item-img {
        width: 60px;
        height: 75px;
    }

    .lm10-cart-item-title {
        font-size: 0.88rem;
        line-height: 1.3;
    }

    .lm10-cart-item-meta {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }

    .lm10-cart-item-price-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .lm10-cart-item-price {
        font-size: 0.95rem !important;
        white-space: nowrap !important;
    }

    .lm10-cart-installment-target {
        text-align: left !important;
        font-size: 0.82rem !important;
    }

    .lm10-cart-summary-box {
        padding: 18px !important;
        margin-bottom: 30px;
    }
}
