/* ============================================================
   SHOPPING CART STYLES
   ============================================================ */

.m-shopping-cart {
    background: #F9FAFB;
    min-height: 100vh;
    padding-bottom: 80px; /* Space for fixed bottom bar */
}

/* TOP BAR */
.m-cart-top-bar {
    height: 52px;
    background: white;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 16px;
    justify-content: space-between;
    border-bottom: 1px solid #F3F4F6;
}
.m-cart-top-bar .back-btn {
    color: #111827;
    display: flex;
    align-items: center;
    text-decoration: none;
}
.m-cart-top-bar .back-btn svg {
    width: 22px;
    height: 22px;
}
.m-cart-top-bar .title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
}
.m-cart-top-bar .edit-btn {
    border: 1px solid var(--m-primary-purple);
    color: var(--m-primary-purple);
    background: transparent;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* BODY */
.m-cart-body {
    padding-top: 52px;
}

/* CART ITEMS */
.m-cart-items-list {
    background: white;
}
.m-cart-item {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    border-bottom: 1px solid #F9FAFB;
    gap: 12px;
    transition: opacity 0.3s ease;
    flex-wrap: wrap; /* Allow actions row to wrap below */
}
.m-cart-item .img-wrap {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    border: 1px solid #F3F4F6;
    background: #F9FAFB;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.m-cart-item .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.m-cart-item .info-wrap {
    flex: 1;
    min-width: 0;
}
.m-cart-item .info-wrap .name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.m-cart-item .info-wrap .price {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-top: 4px;
}
.m-cart-item .controls-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.m-cart-item .qty-row {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 32px;
}
.m-cart-item .qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: white;
    font-size: 18px;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}
.m-cart-item .qty-count {
    width: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}
.m-cart-item .trash-icon {
    cursor: pointer;
    display: flex;
}
.m-cart-item .trash-icon svg {
    width: 18px;
    height: 18px;
}
.m-cart-item .actions-row {
    width: 100%;
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 4px;
    padding-left: 84px; /* Align with info column (72px img + 12px gap) */
}
.m-cart-item .actions-row .remove {
    color: #EF4444;
    text-decoration: underline;
    cursor: pointer;
}
.m-cart-item .actions-row .save-later {
    color: var(--m-primary-purple);
    text-decoration: underline;
    cursor: pointer;
}

/* FREE SHIPPING BANNER */
.m-shipping-banner {
    margin: 12px 16px;
    border-radius: 10px;
    overflow: hidden;
}
.m-shipping-banner.qualified {
    background: #10B981;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 14px;
    font-weight: 700;
}
.m-shipping-banner.qualified svg {
    width: 20px;
    height: 20px;
}
.m-shipping-banner.not-qualified {
    background: #F5F3FF;
    padding: 12px 16px;
}
.m-shipping-banner.not-qualified .text {
    font-size: 13px;
    color: var(--m-primary-purple);
    margin-bottom: 6px;
}
.m-shipping-banner.not-qualified .progress-bg {
    height: 4px;
    border-radius: 4px;
    background: #EDE9FE;
    width: 100%;
}
.m-shipping-banner.not-qualified .progress-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--m-primary-purple);
    transition: width 0.3s ease;
}

/* APPLY COUPON */
.m-coupon-section {
    margin: 0 16px 12px;
}
.m-coupon-section .label {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}
.m-coupon-section .coupon-row {
    display: flex;
    gap: 0;
}
.m-coupon-section .coupon-row input {
    flex: 1;
    height: 48px;
    border: 1.5px solid #E5E7EB;
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
    min-width: 0;
}
.m-coupon-section .coupon-row button {
    height: 48px;
    padding: 0 22px;
    background: var(--m-primary-purple);
    color: white;
    border: none;
    border-radius: 0 12px 12px 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.m-coupon-section .coupon-result {
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

/* ORDER SUMMARY */
.m-order-summary {
    margin: 0 16px;
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.m-order-summary .heading {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 12px 0;
}
.m-order-summary .summary-line {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
    color: #374151;
}
.m-order-summary .m-divider {
    height: 1px;
    background: #F3F4F6;
    margin: 8px 0;
}
.m-order-summary .total-line {
    font-size: 17px;
    font-weight: 800;
    color: #111827;
}

/* TRUST LINE */
.m-trust-line {
    text-align: center;
    margin: 12px 0;
    font-size: 12px;
    color: #9CA3AF;
}

/* BOTTOM BAR */
.m-cart-bottom-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: white;
    padding: 12px 16px;
    border-top: 1px solid #F3F4F6;
    z-index: 100;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.m-cart-bottom-bar .btn-checkout {
    width: 100%;
    height: 54px;
    background: #F97316; /* Fallback orange based on Image 5 */
    color: white;
    border-radius: 14px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
