/**
 * CART MOBILE ULTRA-COMPACT REDESIGN
 * ===================================
 * Super compact, modern mobile cart design
 * MOBILE ONLY (max-width: 768px) - No desktop changes
 */

@media (max-width: 768px) {

    /* ============================================
       CART ROOT - Minimal Padding
       ============================================ */

    #cart-root {
        padding: 12px 10px !important;
        margin-top: 16px !important;
    }

    /* ============================================
       CART CONTAINER - Sleek Card
       ============================================ */

    .cart-container {
        border-radius: 14px !important;
        box-shadow: 0 2px 12px rgba(124, 58, 237, 0.12) !important;
        overflow: hidden !important;
        background: #ffffff !important;
    }

    /* ============================================
       CART HEADER - Compact & Stylish
       ============================================ */

    .cart-header {
        padding: 14px 12px !important;
        background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
        border-bottom: none !important;
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
    }

    .cart-header h2 {
        font-size: 18px !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        margin: 0 !important;
        text-align: center !important;
        background: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: unset !important;
        background-clip: unset !important;
        letter-spacing: 0.5px !important;
    }

    /* ============================================
       CLEAR CART BUTTON - Compact Design
       ============================================ */

    .cart-clear {
        width: 100% !important;
        padding: 10px 16px !important;
        background: rgba(255, 255, 255, 0.2) !important;
        color: white !important;
        border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
        border-radius: 10px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        box-shadow: none !important;
        transition: all 0.3s ease !important;
    }

    .cart-clear:active {
        background: rgba(255, 255, 255, 0.3) !important;
        transform: scale(0.97) !important;
    }

    .cart-clear i {
        font-size: 14px !important;
    }

    /* ============================================
       CART ITEMS - Tight Spacing
       ============================================ */

    .cart-items {
        padding: 10px !important;
        background: #fafafa !important;
    }

    /* ============================================
       CART ITEM - Ultra Compact Card
       ============================================ */

    .cart-item {
        background: white !important;
        border-radius: 10px !important;
        padding: 10px !important;
        margin-bottom: 8px !important;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06) !important;
        border: 1px solid #f0f0f0 !important;
        position: relative !important;
        grid-template-columns: 50px 1fr !important;
        gap: 8px !important;
        transition: all 0.3s ease !important;
    }

    .cart-item:hover {
        box-shadow: 0 2px 12px rgba(124, 58, 237, 0.15) !important;
        transform: translateY(-1px) !important;
    }

    .cart-item:last-child {
        margin-bottom: 0 !important;
    }

    /* ============================================
       CART ITEM IMAGE - Smaller Size
       ============================================ */

    .cart-item-image {
        width: 50px !important;
        height: 50px !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        background: linear-gradient(135deg, #f3f4f6, #e5e7eb) !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    }

    .cart-item-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .cart-item-placeholder {
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #9ca3af !important;
        font-size: 24px !important;
    }

    /* ============================================
       CART ITEM INFO - Compact Typography
       ============================================ */

    .cart-item-info {
        grid-column: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    .cart-item-title {
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #111827 !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        letter-spacing: -0.2px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .cart-item-meta {
        font-size: 11px !important;
        color: #7c3aed !important;
        font-weight: 600 !important;
        margin: 0 !important;
        background: #f3e8ff !important;
        padding: 3px 8px !important;
        border-radius: 6px !important;
        display: inline-block !important;
        width: fit-content !important;
    }

    /* ============================================
       QUANTITY CONTROLS - Compact Design
       ============================================ */

    .cart-item-qty {
        grid-column: 1 / -1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        background: linear-gradient(135deg, #f9fafb, #f3f4f6) !important;
        padding: 8px !important;
        border-radius: 10px !important;
        margin-top: 6px !important;
        border: 1px solid #e5e7eb !important;
    }

    .qty-btn {
        width: 30px !important;
        height: 30px !important;
        border: none !important;
        background: linear-gradient(135deg, #ffffff, #f9fafb) !important;
        color: #374151 !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        border-radius: 6px !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
        border: 1px solid #e5e7eb !important;
    }

    .qty-btn:active {
        transform: scale(0.92) !important;
        background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
        color: white !important;
        border-color: #7c3aed !important;
        box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3) !important;
    }

    .qty-input {
        width: 50px !important;
        height: 34px !important;
        text-align: center !important;
        border: 1.5px solid #e5e7eb !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #111827 !important;
        background: white !important;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    }

    .qty-input:focus {
        outline: none !important;
        border-color: #7c3aed !important;
        box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15),
            inset 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    }

    /* ============================================
       PRICE SECTION - Compact Layout
       ============================================ */

    .cart-item-price {
        grid-column: 1 / -1 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        margin-top: 6px !important;
        padding: 10px !important;
        background: linear-gradient(135deg, #f3e8ff, #faf5ff) !important;
        border-radius: 10px !important;
        border: 1px solid #e9d5ff !important;
    }

    .item-unit-price {
        font-size: 17px !important;
        font-weight: 800 !important;
        background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
        letter-spacing: -0.5px !important;
    }

    .item-subtotal {
        font-size: 12px !important;
        color: #6b21a8 !important;
        font-weight: 700 !important;
        background: white !important;
        padding: 5px 10px !important;
        border-radius: 6px !important;
        border: 1px solid #e9d5ff !important;
    }

    .item-subtotal::before {
        content: 'Subtotal: ' !important;
        font-weight: 600 !important;
        color: #9333ea !important;
    }

    /* ============================================
       REMOVE BUTTON - Compact Design
       ============================================ */

    .cart-item-remove {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        width: 32px !important;
        height: 32px !important;
        border: none !important;
        background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
        color: #dc2626 !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 1px 4px rgba(220, 38, 38, 0.15) !important;
        border: 1px solid #fecaca !important;
    }

    .cart-item-remove:active {
        transform: scale(0.92) !important;
        background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
        color: white !important;
        border-color: #dc2626 !important;
        box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3) !important;
    }

    .cart-item-remove i {
        font-size: 13px !important;
    }

    /* ============================================
       CART FOOTER - Compact Summary
       ============================================ */

    .cart-footer {
        padding: 10px !important;
        border-top: 1px solid #e5e7eb !important;
        background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%) !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* ============================================
       TOTAL SECTION - Compact Display
       ============================================ */

    .cart-total {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 10px !important;
        background: linear-gradient(135deg, #f3e8ff, #faf5ff) !important;
        border-radius: 8px !important;
        border: 1px solid #e9d5ff !important;
        box-shadow: 0 1px 4px rgba(124, 58, 237, 0.1) !important;
    }

    .total-label {
        font-size: 12px !important;
        color: #6b21a8 !important;
        font-weight: 700 !important;
        letter-spacing: 0.3px !important;
        text-transform: uppercase !important;
    }

    .total-amount {
        font-size: 20px !important;
        font-weight: 900 !important;
        background: linear-gradient(135deg, #7c3aed, #a855f7, #c084fc) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
        line-height: 1 !important;
        letter-spacing: -0.5px !important;
    }

    /* ============================================
       CHECKOUT BUTTON - Compact Premium Design
       ============================================ */

    .btn-checkout {
        width: 100% !important;
        padding: 10px 14px !important;
        background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%) !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        cursor: pointer !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        box-shadow: 0 3px 12px rgba(124, 58, 237, 0.4),
            0 1px 4px rgba(124, 58, 237, 0.2) !important;
        position: relative !important;
        overflow: hidden !important;
        letter-spacing: 0.3px !important;
        text-transform: uppercase !important;
    }

    .btn-checkout::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: -100% !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
        transition: left 0.5s !important;
    }

    .btn-checkout:active::before {
        left: 100% !important;
    }

    .btn-checkout:active {
        transform: scale(0.97) !important;
        box-shadow: 0 3px 12px rgba(124, 58, 237, 0.5) !important;
    }

    .btn-checkout i {
        font-size: 16px !important;
        transition: transform 0.3s ease !important;
    }

    .btn-checkout:active i {
        transform: translateX(4px) !important;
    }

    /* ============================================
       EMPTY CART STATE - Compact Design
       ============================================ */

    .cart-empty {
        text-align: center !important;
        padding: 50px 20px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        background: linear-gradient(135deg, #f9fafb, #ffffff) !important;
        border-radius: 14px !important;
        margin: 10px !important;
    }

    .cart-empty i {
        font-size: 70px !important;
        color: #d1d5db !important;
        margin-bottom: 16px !important;
        opacity: 0.7 !important;
    }

    .cart-empty h2 {
        color: #374151 !important;
        font-size: 20px !important;
        font-weight: 800 !important;
        margin-bottom: 10px !important;
    }

    .cart-empty p {
        color: #6b7280 !important;
        font-size: 14px !important;
        margin-bottom: 24px !important;
    }

    .cart-empty .btn-primary {
        padding: 12px 28px !important;
        background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
        color: white !important;
        text-decoration: none !important;
        border-radius: 10px !important;
        font-weight: 700 !important;
        font-size: 14px !important;
        box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3) !important;
        transition: all 0.3s ease !important;
    }

    .cart-empty .btn-primary:active {
        transform: scale(0.97) !important;
    }
}