/* Styling for the My List drawer and quantity controls */

/* Quantity Selector on Product Cards */
.product-card-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-bg);
    width: 100%;
}

.qty-selector-btn {
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-selector-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--color-primary);
}

.qty-selector-btn:active {
    background-color: rgba(0, 0, 0, 0.1);
}

.qty-selector-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    width: 40px;
    outline: none;
    -moz-appearance: textfield;
}

.qty-selector-input::-webkit-outer-spin-button,
.qty-selector-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Button override to style correctly */
.btn-add-to-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--color-accent);
    background-color: var(--color-accent);
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-add-to-list:hover {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

/* Drawer CSS */
.my-list-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #f8fafc;
    z-index: 10000;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.my-list-drawer.open {
    transform: translateX(0);
}

/* Backdrop */
.my-list-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.my-list-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* Drawer Header */
.drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-drawer-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.btn-drawer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg);
}

/* Drawer Body (List of items) */
.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Empty list state */
.drawer-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60%;
    color: #64748b;
    text-align: center;
}

.drawer-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.drawer-empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
}

/* Cart Item card */
.cart-item {
    display: flex;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 12px;
    align-items: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.cart-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.cart-item-img-container {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.cart-item-placeholder {
    font-size: 1.5rem;
}

.cart-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    line-height: 1.3;
}

.cart-item-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #f59e0b;
    font-weight: 700;
}

.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

/* Compact quantity controls in cart */
.cart-item-qty {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.2);
}

.cart-qty-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
}

.cart-qty-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.cart-qty-input {
    width: 32px;
    border: none;
    background: transparent;
    color: white;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    outline: none;
    -moz-appearance: textfield;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Remove button */
.btn-cart-remove {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-cart-remove:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Drawer Footer */
.drawer-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(10, 18, 36, 0.5);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawer-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.drawer-total-label {
    font-size: 1rem;
    font-weight: 500;
    color: #94a3b8;
}

.drawer-total-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f59e0b;
}

.btn-send-whatsapp-quote {
    background-color: #10b981; /* Emerald 500 for WhatsApp */
    border: 1px solid #10b981;
    color: white;
    border-radius: 12px;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-send-whatsapp-quote:hover {
    background-color: #059669;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-send-whatsapp-quote:disabled {
    background-color: #334155;
    border-color: #334155;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Topbar bag button with badge */
.btn-topbar-list {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-base);
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-topbar-list:hover {
    background-color: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

.topbar-list-badge {
    background-color: var(--color-accent);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 2px 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Toast Message Creation support */
.toast-success {
    border-left: 4px solid #10b981;
}

/* Badge and Button Animations */
@keyframes badge-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.animate-pop {
    animation: badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

/* Button Success/Added State */
.btn-add-to-list.added {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
}

