﻿/* Tailwind-compatible cart styles */
    .cart-item {
        border: 1px solid var(--theme-border-subtle, #dee2e6);
        background: var(--theme-bg-surface, white);
    }

    .cart-item-price-accent {
        color: var(--theme-primary, #0d6efd);
    }

    /* Modal helper functions */
    .modal-open {
        @apply block;
    }

    .modal-closed {
        @apply hidden;
    }

    .item-actions {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100%;
        padding-top: 4px;
        min-height: 80px;
    }

    .item-total-section {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        padding-top: 4px;
        min-height: 80px;
    }

    .total-label {
        font-size: 1rem;
        font-weight: 500;
        margin-bottom: 8px;
        display: block;
        line-height: 1.3;
    }

    .item-total {
        font-weight: bold;
        font-size: 1.1rem;
        color: var(--theme-success, #198754);
        margin-bottom: 8px;
        line-height: 1.3;
    }

    .remove-btn {
        color: var(--theme-error, #dc3545);
        font-size: 0.9rem;
        padding: 6px 12px;
        border-radius: 4px;
        transition: all 0.2s;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--theme-error, #dc3545);
        background: transparent;
    }

    .remove-btn:hover {
        background-color: var(--theme-error, #dc3545);
        color: var(--theme-text-inverse, white);
        text-decoration: none;
    }

    .remove-section {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        padding-top: 4px;
        min-height: 80px;
    }

    .mobile-remove-btn {
        position: absolute;
        top: 8px;
        right: 8px;
        z-index: 10;
    }

    .remove-btn-mobile {
        color: var(--theme-error, #dc3545);
        font-size: 1rem;
        padding: 6px;
        border-radius: 50%;
        transition: all 0.2s;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--theme-error, #dc3545);
        background: var(--theme-bg-surface, white);
        width: 32px;
        height: 32px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .remove-btn-mobile:hover {
        background-color: var(--theme-error, #dc3545);
        color: var(--theme-text-inverse, white);
        text-decoration: none;
        transform: scale(1.1);
    }

    .cart-summary {
        background: var(--theme-bg-subtle, #f8f9fa);
        border: 1px solid var(--theme-border-subtle, #dee2e6);
        border-radius: 8px;
        padding: 20px;
        margin-top: 20px;
    }

    .cart-total {
        font-size: 1.5rem;
        font-weight: bold;
        color: var(--theme-success, #198754);
    }

    .cart-note {
        text-align: center;
        padding: 0.5rem;
        background-color: var(--theme-bg-subtle, #f8f9fa);
        border-radius: 6px;
        border: 1px solid var(--theme-border-subtle, #e9ecef);
    }

    .cart-note small {
        font-size: 0.75rem;
    }

    .shipping-info {
        border-top: 1px solid var(--theme-border-subtle, #e9ecef);
        padding-top: 0.75rem;
    }

    .free-shipping-notice {
        text-align: center;
        padding: 0.5rem;
        background-color: var(--theme-info-bg, #d1edff);
        border-radius: 4px;
        border: 1px solid var(--theme-info-border, #0dcaf0);
        color: var(--theme-info-text, #0c5460);
    }

    .shipping-cost {
        display: flex;
        justify-content: space-between;
        margin-bottom: 0.5rem;
    }

    .free-shipping-progress {
        text-align: center;
        padding: 0.25rem;
        background-color: var(--theme-warning-bg, #fff3cd);
        border-radius: 4px;
        border: 1px solid var(--theme-warning-border, #ffecb5);
        color: var(--theme-warning-text, #856404);
    }

    .checkout-security small {
        font-size: 0.75rem;
    }

    .checkout-section {
        text-align: center;
    }

    .checkout-security {
        text-align: center;
    }

    .empty-cart {
        text-align: center;
        padding: 60px 20px;
        color: var(--theme-text-secondary, #6c757d);
    }

    .empty-cart i {
        font-size: 4rem;
        margin-bottom: 20px;
        color: var(--theme-border, #dee2e6);
    }

    /* Mobile optimizations */
    @media (max-width: 768px) {
        .cart-container {
            padding: 10px;
        }

        .cart-item {
            padding: 12px;
            position: relative;
        }

        .cart-item .row {
            min-height: 80px;
            /* Ensure consistent height for proper alignment */
        }

        /* Mobile-specific image styling */
        .cart-item-image {
            width: 60px;
            height: 60px;
        }

        /* Mobile-specific text styling */
        .mobile-product-name {
            font-size: 0.9rem;
            margin-bottom: 4px;
            line-height: 1.2;
        }

        .mobile-product-name a {
            color: inherit;
            text-decoration: none;
            transition: color 0.2s;
        }

        .mobile-product-name a:hover {
            color: #0d6efd;
            text-decoration: underline;
        }

        .mobile-product-price {
            font-weight: bold;
            color: #0d6efd;
            font-size: 0.85rem;
            margin-bottom: 8px;
        }

        .mobile-quantity-label {
            font-size: 0.8rem;
            font-weight: 500;
            margin-bottom: 4px;
        }

        .mobile-quantity-input {
            width: 60px;
            padding: 4px;
            text-align: center;
            border: 1px solid #ced4da;
            border-radius: 4px;
            font-size: 0.85rem;
        }

        .mobile-total-label {
            font-size: 0.8rem;
            font-weight: 500;
            margin-bottom: 4px;
            display: block;
        }

        .mobile-total-amount {
            font-weight: bold;
            font-size: 1rem;
            color: #198754;
            display: block;
        }

        /* Mobile remove button styling */
        .remove-btn-mobile {
            color: #dc3545;
            font-size: 1rem;
            padding: 6px;
            border-radius: 50%;
            transition: all 0.2s;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #dc3545;
            background: white;
            width: 32px;
            height: 32px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .remove-btn-mobile:hover {
            background-color: #dc3545;
            color: white;
            text-decoration: none;
            transform: scale(1.1);
        }

        .cart-summary {
            padding: 15px;
        }

        .cart-total {
            font-size: 1.3rem;
        }

        .btn {
            font-size: 0.9rem;
            padding: 8px 12px;
        }
    }

    @media (max-width: 576px) {
        .cart-item-details h5 {
            font-size: 0.95rem;
        }

        .cart-item-price,
        .item-total {
            font-size: 1rem;
        }

        .quantity-label,
        .total-label {
            font-size: 0.85rem;
        }

        .quantity-input {
            width: 60px;
            font-size: 0.9rem;
        }

        .remove-btn-mobile {
            width: 28px;
            height: 28px;
            font-size: 0.9rem;
        }
    }

    /* Hide mobile remove button on desktop */
    @media (min-width: 769px) {
        .mobile-remove-btn {
            display: none !important;
        }
    }

    /* Promo Code Styles */
    .promo-code-section {
        background: var(--theme-bg-subtle, #f8f9fa);
        border: 1px solid var(--theme-border-subtle, #dee2e6);
        border-radius: 8px;
        padding: 20px;
    }

    .promo-code-section h5 {
        color: var(--theme-text-secondary, #495057);
        font-weight: 600;
        margin-bottom: 15px;
    }

    .promo-code-form .input-group {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        border-radius: 6px;
        overflow: hidden;
    }

    .promo-code-form .form-control {
        border: 1px solid var(--theme-border, #ced4da);
        border-right: none;
        font-weight: 500;
        background-color: var(--theme-bg-surface, white);
        color: var(--theme-text-primary, #212529);
    }

    .promo-code-form .form-control:focus {
        border-color: var(--theme-primary-light, #80bdff);
        box-shadow: 0 0 0 0.2rem var(--theme-primary-soft, rgba(0, 123, 255, 0.25));
    }

    .promo-code-form .btn {
        border-left: none;
        font-weight: 500;
        min-width: 100px;
    }

    .promo-code-form .btn-outline-success:hover {
        background-color: var(--theme-success, #198754);
        border-color: var(--theme-success, #198754);
    }

    .promo-code-form .btn-outline-danger:hover {
        background-color: var(--theme-error, #dc3545);
        border-color: var(--theme-error, #dc3545);
    }

    #promo-code-message {
        min-height: 20px;
    }

    .promo-code-applied .alert {
        border: none;
        background-color: var(--theme-success-bg, rgba(25, 135, 84, 0.1));
        color: var(--theme-success, #198754);
        padding: 12px 16px;
        margin-bottom: 0;
    }

    .promo-code-applied .alert i {
        color: var(--theme-success, #198754);
    }

    /* Discount Display Styles */
    .discount-line {
        background-color: var(--theme-success-bg-subtle, rgba(25, 135, 84, 0.05));
        padding: 8px 0;
        margin: 8px 0;
        border-radius: 4px;
    }

    .savings-summary {
        border: 1px solid var(--theme-success-border, #d4edda);
        background-color: var(--theme-success-bg, #d4edda);
    }

    .savings-summary small {
        color: var(--theme-success-text, #155724);
    }

    /* Enhanced total display */
    .total-line {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
    }

    .total-label {
        font-weight: 500;
        color: var(--theme-text-secondary, #495057);
    }

    .total-amount {
        font-weight: 600;
        color: var(--theme-success, #198754);
    }

    .total-line .total-label {
        flex: 1;
    }

    .total-line .total-amount {
        text-align: right;
    }

    /* Mobile responsiveness for promo code */
    @media (max-width: 768px) {
        .promo-code-section {
            padding: 15px;
        }

        .promo-code-form .input-group {
            flex-direction: column;
        }

        .promo-code-form .form-control {
            border-right: 1px solid var(--theme-border, #ced4da);
            border-bottom: none;
            border-radius: 6px 6px 0 0;
        }

        .promo-code-form .btn {
            border-top: none;
            border-left: 1px solid var(--theme-border, #ced4da);
            border-radius: 0 0 6px 6px;
            width: 100%;
        }
    }
