@media (min-width: 1280px) {
    .virtual-cart-panel {
        width: 50vw;
    }
}

.virtual-cart-shell {
    position: fixed;
    right: 1rem;
    bottom: 1.25rem;
    z-index: 60;
}

.virtual-cart-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-weight: 600;
    border: none;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.virtual-cart-toggle:hover {
    background: #1f2937;
}

.virtual-cart-toggle-text {
    font-size: 0.95rem;
}

.virtual-cart-badge {
    min-width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: #c1ff72;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0 0.35rem;
}

.virtual-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.virtual-cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(60vw, 720px);
    background: #fff;
    box-shadow: -10px 0 30px rgba(15, 23, 42, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 70;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .virtual-cart-panel {
        width: 100vw;
        left: 0;
        right: 0;
    }
}

.virtual-cart-panel.is-open {
    transform: translateX(0);
}

.cart-simple-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-simple-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.cart-header-actions {
    display: inline-flex;
    gap: 0.5rem;
}

.cart-action-btn {
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: #fff;
    color: #0f172a;
    transition: background 0.2s ease, color 0.2s ease;
}

.cart-action-btn:hover {
    background: #f1f5f9;
}

.cart-two-column {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem;
    overflow-y: auto;
}

.cart-products-panel,
.cart-stores-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
    overflow-y: auto;
}

.cart-products-panel {
    flex: 1 1 60%;
    min-width: 0;
}

.cart-stores-panel {
    flex: 0 0 38%;
    min-width: 0;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.panel-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #94a3b8;
    margin: 0;
}

.cart-selection-hint {
    font-size: 0.85rem;
    font-weight: 500;
    color: #0f172a;
    margin: 0;
    text-align: right;
}

.cart-empty-state {
    border: 1px dashed rgba(148, 163, 184, 0.6);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    background: #f8fafc;
}

.cart-empty-title {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.cart-empty-text {
    font-size: 0.9rem;
    color: #475569;
    margin: 0;
}

.cart-error {
    font-size: 0.85rem;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
}

.cart-store-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-store-button {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cart-store-button.is-selected {
    border-color: #0f172a;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.store-button-info {
    min-width: 0;
}

.store-name {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-height: 2.6em;
}

/* Store logo container and image */
.store-logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 2.5rem;
}

.store-logo {
    max-width: 100%;
    max-height: 3rem;
    height: auto;
    object-fit: contain;
    object-position: left center;
}

.store-platform {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.store-button-totals {
    text-align: right;
}

.store-total {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.store-coverage {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Cart items container - proper spacing between items */
#virtual-cart-items {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.virtual-cart-card {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
    display: flex;
    gap: 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.virtual-cart-card:hover {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

/* Availability Status Borders */
/* Green border: Product available at selected store */
.virtual-cart-card.cart-item-available {
    border: 2px solid #22c55e;
    border-left-width: 4px;
}

.virtual-cart-card.cart-item-available:hover {
    border-color: #16a34a;
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.15);
}

/* Red border: Product NOT available at selected store */
.virtual-cart-card.cart-item-unavailable {
    border: 2px solid #ef4444;
    border-left-width: 4px;
}

.virtual-cart-card.cart-item-unavailable:hover {
    border-color: #dc2626;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.15);
}

/* Yellow border: Product changed with alternative (future feature) */
.virtual-cart-card.cart-item-alternative {
    border: 2px solid #eab308;
    border-left-width: 4px;
}

.virtual-cart-card.cart-item-alternative:hover {
    border-color: #ca8a04;
    box-shadow: 0 6px 18px rgba(234, 179, 8, 0.15);
}

/* Default (no store selected) - keep original styling */
.virtual-cart-card.cart-item-unknown:hover {
    border-color: rgba(15, 118, 110, 0.5);
}

/* Cart item image */
.virtual-cart-card .flex-shrink-0 {
    flex-shrink: 0;
}

.virtual-cart-card .flex-shrink-0 img {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

/* Cart item content area */
.virtual-cart-card .flex-1 {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.virtual-cart-card .space-y-2 {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Cart item top row */
.virtual-cart-card .flex.items-start {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.virtual-cart-card .justify-between {
    justify-content: space-between;
}

/* Cart item info */
.virtual-cart-card .min-w-0 {
    min-width: 0;
    flex: 1;
}

.virtual-cart-card .text-sm {
    font-size: 0.875rem;
}

.virtual-cart-card .text-xs {
    font-size: 0.75rem;
}

.virtual-cart-card .font-semibold {
    font-weight: 600;
}

.virtual-cart-card .text-slate-900 {
    color: #0f172a;
}

.virtual-cart-card .text-slate-500 {
    color: #64748b;
}

.virtual-cart-card .text-slate-600 {
    color: #475569;
}

.virtual-cart-card .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.virtual-cart-card .mt-0\.5 {
    margin-top: 0.125rem;
}

/* Brand badge */
.virtual-cart-card .inline-flex {
    display: inline-flex;
}

.virtual-cart-card .items-center {
    align-items: center;
}

.virtual-cart-card .px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.virtual-cart-card .py-0\.5 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

.virtual-cart-card .rounded-full {
    border-radius: 9999px;
}

.virtual-cart-card .bg-slate-100 {
    background-color: #f1f5f9;
}

/* Right column with price and remove button */
.virtual-cart-card .flex-col {
    display: flex;
    flex-direction: column;
}

.virtual-cart-card .items-end {
    align-items: flex-end;
}

.virtual-cart-card .gap-1 {
    gap: 0.25rem;
}

.virtual-cart-card .gap-2 {
    gap: 0.5rem;
}

.virtual-cart-card .gap-3 {
    gap: 0.75rem;
}

.cart-item-price {
    text-align: right;
    margin-bottom: 0.25rem;
}

.cart-item-price .price-strong {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.cart-item-price .price-sub {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Remove button */
.virtual-cart-card button[data-action="remove"] {
    padding: 0.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.virtual-cart-card .text-slate-400 {
    color: #94a3b8;
}

.virtual-cart-card .hover\:text-red-500:hover {
    color: #ef4444;
}

.virtual-cart-card .transition {
    transition: all 0.2s ease;
}

.virtual-cart-card .w-4 {
    width: 1rem;
}

.virtual-cart-card .h-4 {
    height: 1rem;
}

/* Quantity controls */
.virtual-cart-card .border {
    border-width: 1px;
}

.virtual-cart-card .border-slate-200 {
    border-color: #e2e8f0;
}

.virtual-cart-card .rounded-lg {
    border-radius: 0.5rem;
}

.virtual-cart-card .overflow-hidden {
    overflow: hidden;
}

/* Quantity input and buttons container */
.virtual-cart-card .inline-flex.items-center.border {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
}

/* Quantity buttons - improved design */
.virtual-cart-card .qty-btn {
    min-width: 2rem;
    height: 2rem;
    padding: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    background: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.virtual-cart-card .qty-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.virtual-cart-card .qty-btn:active {
    background: #e2e8f0;
    transform: scale(0.95);
}

.virtual-cart-card .qty-display {
    min-width: 2.5rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
}

/* Quantity input styling */
.virtual-cart-card .qty-input {
    min-width: 2.5rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
    background: #fff;
    border: none;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    outline: none;
}

.virtual-cart-card .qty-input:focus {
    background: #f8fafc;
}

/* Mobile improvements */
@media (max-width: 640px) {
    .virtual-cart-card .qty-btn {
        min-width: 2.5rem;
        height: 2.5rem;
        font-size: 1.125rem;
    }

    .virtual-cart-card .qty-display,
    .virtual-cart-card .qty-input {
        min-width: 3rem;
        height: 2.5rem;
        font-size: 0.9375rem;
    }
}

/* Quantity display number styling handled by inline utility classes */


/* Utility classes used in the card */
.virtual-cart-card .w-14 {
    width: 3.5rem;
}

.virtual-cart-card .h-14 {
    height: 3.5rem;
}

.virtual-cart-card .rounded-xl {
    border-radius: 0.75rem;
}

.virtual-cart-card .object-contain {
    object-fit: contain;
}

.virtual-cart-card .bg-slate-50 {
    background-color: #f8fafc;
}

.virtual-cart-card .text-\[11px\] {
    font-size: 11px;
}

@media (max-width: 1024px) {
    .virtual-cart-shell {
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .virtual-cart-toggle {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .virtual-cart-toggle-text {
        font-size: 0.875rem;
    }

    .virtual-cart-panel {
        width: 100%;
        left: 0;
        right: 0;
    }

    .cart-simple-header {
        padding: 1rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .cart-simple-title {
        font-size: 1.125rem;
        flex: 1;
        min-width: 0;
    }

    .cart-header-actions {
        gap: 0.375rem;
    }

    .cart-action-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
        min-height: 2.25rem;
    }

    .cart-two-column {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        padding-bottom: 2rem;
    }

    .cart-products-panel,
    .cart-stores-panel {
        flex: 1 1 auto;
        width: 100%;
        gap: 0.75rem;
    }

    .panel-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .panel-label {
        font-size: 0.75rem;
    }

    .cart-selection-hint {
        font-size: 0.75rem;
        text-align: left;
        width: 100%;
    }

    .virtual-cart-card {
        padding: 0.75rem;
        gap: 0.5rem;
        border-radius: 0.75rem;
    }

    #virtual-cart-items {
        gap: 0.625rem;
    }

    .cart-store-button {
        padding: 0.75rem;
        border-radius: 0.75rem;
    }

    .store-name {
        font-size: 0.75rem;
        line-height: 1.3;
        max-height: 2.6em;
    }

    .store-total {
        font-size: 0.9rem;
    }

    .cart-empty-state {
        padding: 1.25rem 1rem;
        border-radius: 0.75rem;
    }

    .cart-empty-title {
        font-size: 0.95rem;
    }

    .cart-empty-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {
    .virtual-cart-shell {
        right: 0.5rem;
        bottom: 0.5rem;
    }

    .virtual-cart-toggle {
        padding: 0.5rem 0.875rem;
        gap: 0.25rem;
    }

    .virtual-cart-toggle-text {
        display: none;
    }

    .virtual-cart-badge {
        min-width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
    }

    .cart-simple-header {
        padding: 0.875rem;
    }

    .cart-simple-title {
        font-size: 1rem;
    }

    .cart-action-btn {
        padding: 0.4375rem 0.75rem;
        font-size: 0.75rem;
        min-height: 2rem;
    }

    .cart-two-column {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .virtual-cart-card {
        padding: 0.625rem;
        gap: 0.5rem;
    }

    #virtual-cart-items {
        gap: 0.5rem;
    }
}