/* ============================================================
   TMV Global Design System & Stylesheet (Tùng Mũ Vàng)
   ============================================================ */

:root {
    --primary-blue: #2563eb;
    --primary-indigo: #4f46e5;
    --primary-amber: #d97706;
    --primary-rose: #e11d48;
    --primary-purple: #7c3aed;
    --primary-emerald: #059669;
    
    --bg-main: #f8fafc;
    --surface-card: #ffffff;
    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --border-subtle: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Toast Notifications */
#toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#toast.toast-show {
    opacity: 1;
    transform: translateY(0);
}

#toast.toast-error {
    background: #dc2626;
}

/* Modal Core Styles */
.tmv-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.tmv-modal-overlay.active {
    display: flex;
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 490px;
    border-radius: 24px;
    padding: 20px 22px;
    position: relative;
    box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.25), 0 10px 15px -5px rgba(0, 0, 0, 0.05);
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 94vh;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .modal-card {
        padding: 16px 14px;
        border-radius: 20px;
        width: 95%;
    }
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Prevent button text wrapping across all cards */
.product-card button,
.product-card a,
.buy-now-btn {
    white-space: nowrap !important;
    word-break: keep-all !important;
    flex-shrink: 0 !important;
}
