/* CSS Reset & Variables */
:root {
    --primary: #bd1e24; /* Deep Red */
    --primary-hover: #9a181d; /* Darker Red */
    --primary-light: #fef2f2; /* Light red for backgrounds */
    --primary-soft: #fecaca; /* Soft red accent */
    --accent-gold: #eab308; /* Gold accent */
    
    --background: #f8fafc;
    --white: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    
    --shadow-sm: 0 1px 3px rgba(189, 30, 36, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(189, 30, 36, 0.08), 0 2px 4px -2px rgba(189, 30, 36, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(189, 30, 36, 0.08), 0 4px 6px -4px rgba(189, 30, 36, 0.04);
    --shadow-premium: 0 20px 25px -5px rgba(189, 30, 36, 0.1), 0 8px 10px -6px rgba(189, 30, 36, 0.05);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html.dark {
    --background: #0f172a;
    --white: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-light: #94a3b8;
    --border: #334155;
    
    /* FIX: Use transparent reds for subtle active states, not solid harsh reds */
    --primary-light: rgba(189, 30, 36, 0.15); 
    --primary-soft: rgba(189, 30, 36, 0.3);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: var(--font);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Header Styling */
.app-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: var(--transition);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.5px;
    color: var(--text-main);
    transition: var(--transition);
}

.logo-dot {
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: var(--radius-full);
}

.nav-links {
    display: flex;
    gap: 16px; /* Reduced from 24px */
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px; /* Slightly reduced for better fit */
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap; /* CRITICAL: Prevents text wrapping */
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px; /* Reduced from 16px */
}

.user-profile, #lang-toggle-btn {
    white-space: nowrap; /* Prevents wrapping */
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background-color: var(--primary-light);
    border: 1px solid var(--primary-soft);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

.cart-btn {
    position: relative;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.cart-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--primary);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

.logout-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.logout-btn:hover {
    color: #ef4444;
    border-color: #fca5a5;
    background-color: #fef2f2;
}

/* Layout Container */
.app-container {
    max-width: 1280px;
    margin: 110px auto 40px;
    padding: 0 24px;
    min-height: calc(100vh - 150px);
}

/* SPA Sections showing/hiding */
.view-section {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.view-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Icons styling */
.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-left {
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
}

.icon-right {
    margin-left: 6px;
    display: inline-block;
    vertical-align: middle;
}

/* Common Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(189, 30, 36, 0.25);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
}

.btn-text:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.divider {
    border: 0;
    height: 1px;
    background-color: var(--border);
    margin: 20px 0;
}

/* 1. Login & Register View */
#login-view,
#register-view {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

#login-view.active,
#register-view.active {
    display: flex;
}

.login-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-premium);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    transition: var(--transition);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.login-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    width: 18px;
    height: 18px;
}

.input-wrapper input,
.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font);
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    color: var(--text-main);
    transition: var(--transition);
}

.input-wrapper input {
    padding-left: 44px;
}

.input-wrapper input:focus,
.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(189, 30, 36, 0.08);
}

/* 2. Products Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 15px;
    color: var(--text-muted);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-soft);
}

.product-image-container {
    width: 100%;
    height: 210px;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.product-image-bg {
    display: none;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-icon {
    width: 80px;
    height: 80px;
    color: var(--primary);
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.product-card:hover .product-icon {
    transform: scale(1.1) rotate(4deg);
}

.product-details {
    padding: 16px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.product-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.add-to-cart-btn {
    background-color: var(--white);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(189, 30, 36, 0.2);
}

/* 3. Cart View & Summary Layout */
.cart-layout,
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
    align-items: start;
}

.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item-card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.cart-item-card:hover {
    border-color: var(--primary-soft);
    box-shadow: var(--shadow-sm);
}

.cart-item-image {
    width: 70px;
    height: 70px;
    background-color: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2px;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.cart-qty-ctrl {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.qty-btn:hover {
    background-color: var(--background);
    color: var(--primary);
}

.qty-val {
    width: 36px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--text-light);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.remove-item-btn:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

.empty-cart-state {
    text-align: center;
    padding: 60px 40px;
    background-color: var(--white);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
}

.empty-cart-state i {
    width: 60px;
    height: 60px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.empty-cart-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

/* Order Summary Cards */
.summary-card,
.checkout-summary-card,
.checkout-form-card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.summary-card h3,
.checkout-summary-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.text-free {
    color: #10b981;
    font-weight: 600;
}

.total-row {
    font-size: 16px;
    color: var(--text-main);
    font-weight: 600;
    margin: 16px 0 24px;
}

.price-total {
    font-size: 22px;
    color: var(--primary);
    font-weight: 700;
}

/* 4. Checkout Section */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.col-span-2 {
    grid-column: span 2;
}

.payment-methods {
    margin-bottom: 30px;
}

.payment-methods h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
}

.payment-option-card {
    border: 1px solid var(--primary-soft);
    background-color: var(--primary-light);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-full);
    display: inline-block;
    position: relative;
}

.custom-radio::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: var(--radius-full);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    transition: var(--transition);
}

.payment-option-card input[type="radio"] {
    display: none;
}

.option-info {
    flex-grow: 1;
}

.option-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.option-desc {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.option-icon {
    color: var(--primary);
    width: 24px;
    height: 24px;
}

.checkout-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.checkout-item-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.checkout-item-summary-line .title {
    color: var(--text-muted);
    font-weight: 500;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-item-summary-line .qty-price {
    font-weight: 600;
    color: var(--text-main);
}

/* 5. Success Section */
#success-view {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

#success-view.active {
    display: flex;
}

.success-card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    width: 100%;
    max-width: 500px;
    padding: 50px 40px;
    text-align: center;
}

.success-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon {
    width: 48px;
    height: 48px;
    color: var(--white);
    background-color: #10b981;
    border-radius: var(--radius-full);
    padding: 10px;
    position: relative;
    z-index: 2;
}

.success-icon-pulse {
    position: absolute;
    width: 80px;
    height: 80px;
    background-color: rgba(16, 185, 129, 0.12);
    border-radius: var(--radius-full);
    z-index: 1;
    animation: pulseIcon 2s infinite;
}

.success-card h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}

.success-message {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.success-details-box {
    background-color: var(--background);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 32px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

.detail-row span:first-child {
    font-weight: 500;
}

.detail-row .text-right {
    max-width: 250px;
    text-align: right;
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background-color: var(--text-main);
    color: var(--white);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Keyframes */
@keyframes toastIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulseIcon {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }

    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

/* Dashboard 2-Column System & Seller Centre Styling */
.dashboard-2col-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    align-items: start;
}

/* Left Sidebar (~250px) */
.dashboard-sidebar {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 90px;
}

.sidebar-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: var(--background);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background-color: #dbeafe;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-circle i {
    width: 22px;
    height: 22px;
}

.profile-info {
    overflow: hidden;
}

.sidebar-username {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Vertical Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    width: 100%;
}

.sidebar-nav-item i {
    width: 18px;
    height: 18px;
}

.sidebar-nav-item:hover {
    background-color: var(--background);
    color: var(--primary);
}

/* Active State: light blue background #e8f0fe, blue text, rounded corner */
.sidebar-nav-item.active {
    background-color: #e8f0fe;
    color: #1a73e8;
    font-weight: 600;
}

.sidebar-badge {
    margin-left: auto;
    background-color: #ef4444;
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Main Content Area */
.dashboard-main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-header-banner {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.title-with-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
}

.shop-tag-badge {
    background-color: #f1f5f9;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

.dashboard-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* Quick Action Tab Buttons */
.quick-action-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}

.action-tab-btn {
    background-color: var(--white);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 9px 20px;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.action-tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-light);
}

.action-tab-btn.active {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Sub-views Container */
.seller-sub-view {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.seller-sub-view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 2 Metric Summary Cards Grid with rounded-2xl */
.metrics-grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.metric-card-styled {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    /* rounded-2xl */
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.metric-card-styled:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-soft);
}

.metric-icon-box {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-icon-box i {
    width: 26px;
    height: 26px;
}

.sales-box {
    background-color: #d1fae5;
    color: #10b981;
}

.orders-box {
    background-color: #dbeafe;
    color: #3b82f6;
}

.metric-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.metric-val-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

/* My Products Tab View */
.my-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.my-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Reports Tab View */
.reports-container {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 28px;
}

.reports-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.report-box {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-box-title {
    font-size: 13px;
    color: var(--text-muted);
}

.report-box-value {
    font-size: 22px;
    font-weight: 700;
}

.text-green {
    color: #10b981;
}

.text-amber {
    color: #f59e0b;
}

.text-blue {
    color: #3b82f6;
}

/* Floating Action / Chat Button */
.floating-chat-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background-color: var(--primary);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
    cursor: pointer;
    z-index: 99;
    transition: var(--transition);
}

.floating-chat-btn i {
    width: 26px;
    height: 26px;
}

.floating-chat-btn:hover {
    background-color: var(--primary-hover);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.45);
}

/* Form & Orders Container Styling */
.form-container-card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.form-container-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.mb-20 {
    margin-bottom: 20px;
}

.input-hint {
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.4;
    margin-top: 4px;
}

.orders-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-manage-card {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition);
}

.order-manage-card:hover {
    border-color: var(--primary-soft);
    box-shadow: var(--shadow-md);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.order-id-txt {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.status-badge.pending {
    background-color: #fef3c7;
    color: #d97706;
}

.status-badge.shipped {
    background-color: #d1fae5;
    color: #059669;
}

.order-details-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

.order-customer-box,
.order-items-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.order-customer-box h4,
.order-items-box h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.customer-detail-line {
    font-size: 14px;
    color: var(--text-main);
}

.seller-order-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-main);
    border-bottom: 1px dashed var(--border);
    padding: 4px 0;
}

.seller-order-item-row:last-child {
    border-bottom: none;
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
}

.shipment-action-box {
    background-color: var(--background);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 10px;
}

.tracking-info-display {
    font-size: 14px;
    color: var(--text-muted);
}

.tracking-number-text {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-main);
    background-color: var(--white);
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-left: 4px;
}

.tracking-input-group {
    display: flex;
    gap: 10px;
}

.tracking-input-group input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
}

.tracking-input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.product-image-container img.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

/* Left Sidebar Flex Column & Button Cleanup */
.buyer-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* flex flex-col gap-4 */
}

.buyer-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.buyer-nav-group {
    display: flex;
    flex-direction: column;
}

/* Remove default borders and backgrounds completely */
.buyer-nav-item, .buyer-subnav-item {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    text-align: left;
    cursor: pointer;
    font-family: var(--font);
    transition: color 0.2s ease, background-color 0.2s ease;
}

.buyer-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
}

.buyer-subnav-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* flex flex-col gap-3 */
    padding-left: 2rem; /* pl-8 */
    margin-top: 0.5rem; /* mt-2 */
}

.buyer-subnav-item {
    font-size: 14px;
    color: #475569;
    padding: 4px 0;
    line-height: 1.5;
}

.buyer-nav-item:hover, .buyer-subnav-item:hover {
    color: #ee4d2d !important; /* hover:text-[#ee4d2d] */
}

.buyer-nav-item.active, .buyer-subnav-item.active {
    color: #ee4d2d !important;
    font-weight: 600;
}

.nav-item-icon-box {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item-icon-box.text-blue { color: #3b82f6; }
.nav-item-icon-box.text-orange { color: #ee4d2d; }
.nav-item-icon-box.text-yellow { color: #eab308; }

/* Order Status Tab Bar Fix */
.order-status-tab-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid #e5e7eb; /* border-b border-gray-200 */
    margin-bottom: 1rem; /* mb-4 */
    background-color: var(--white);
    overflow-x: auto;
}

.order-tab-btn {
    border: none !important;
    border-bottom: 2px solid transparent !important; /* Dynamic bottom border ONLY */
    background: transparent !important;
    outline: none !important;
    padding: 0.75rem 1rem; /* px-4 py-3 */
    font-family: var(--font);
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    color: #4b5563; /* text-gray-600 */
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
    text-align: center;
}

.order-tab-btn:hover {
    color: #ee4d2d !important; /* hover:text-[#ee4d2d] */
}

.order-tab-btn.active {
    color: #ee4d2d !important; /* text-[#ee4d2d] */
    font-weight: 600;
    border-bottom-color: #ee4d2d !important; /* border-b-2 border-[#ee4d2d] */
}

/* Responsiveness for 2-column dashboard */
@media (max-width: 868px) {
    .dashboard-2col-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .col-span-2 {
        grid-column: span 1;
    }

    .order-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Custom Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #ee4d2d;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* ==========================================================================
   Home Enhancements, Wishlist, Promo Code, and Modals Styling
   ========================================================================== */

/* Wishlist Navbar Button & Badge */
.wishlist-btn {
    position: relative;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.wishlist-btn:hover {
    color: #ef4444;
    border-color: #fca5a5;
    background-color: #fef2f2;
    transform: translateY(-2px);
}

.wishlist-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #ef4444;
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

/* Like / Wishlist Heart Toggle Button on Product Card */
.wishlist-toggle-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background-color: var(--white);
    border: 1px solid var(--border);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.wishlist-toggle-btn:hover {
    transform: scale(1.1);
    color: #ef4444;
    border-color: #fca5a5;
    background-color: var(--white);
}

.wishlist-toggle-btn.liked {
    color: #ef4444;
    background-color: #fef2f2;
    border-color: #fca5a5;
}

html.dark .wishlist-toggle-btn.liked {
    background-color: #450a0a;
    border-color: #991b1b;
}

.wishlist-toggle-btn.liked i {
    fill: #ef4444;
}

/* Promo Banner Card */
.promo-banner-card {
    background: linear-gradient(135deg, #bd1e24 0%, #9a181d 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: var(--shadow-premium);
    margin-bottom: 24px;
}

.promo-banner-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.promo-banner-content p {
    font-size: 14px;
    opacity: 0.9;
}

.promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.btn-voucher {
    background-color: #ffffff;
    color: #1d4ed8;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-voucher:hover {
    background-color: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Home Search & Category Filter Toolbar */
.home-toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.search-bar-wrapper {
    position: relative;
    display: flex;
    gap: 10px;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.search-bar-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    font-family: var(--font);
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--white);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.search-bar-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.btn-search {
    padding: 0 24px;
    white-space: nowrap;
}

/* Category Tabs Filter */
.category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-behavior: smooth;
}

.category-tab {
    background-color: var(--white);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.category-tab:hover,
.category-tab.active {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Payment Method Selection Upgrades */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option-card {
    border: 1px solid var(--border);
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.payment-option-card:hover {
    border-color: var(--primary-soft);
    background-color: var(--primary-light);
}

.payment-option-card.active {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

/* Promo Code Input on Checkout */
.promo-code-section {
    margin-top: 16px;
    margin-bottom: 12px;
}

.promo-code-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.promo-code-input-group {
    display: flex;
    gap: 8px;
}

.promo-code-input-group input {
    flex: 1;
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.promo-code-msg {
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

.promo-code-msg.success {
    color: #10b981;
}

.promo-code-msg.error {
    color: #ef4444;
}

/* Modal Overlay & Modal Card */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
    transform: translateY(20px) scale(0.96);
    transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.icon-red {
    color: #ef4444;
}

.icon-orange {
    color: #f97316;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--text-main);
    background-color: var(--background);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.modal-select {
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    color: var(--text-main);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.btn-danger {
    background-color: #ef4444;
    color: var(--white);
    border: none;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Wishlist Item Card inside Wishlist Modal */
.wishlist-item-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--white);
}

.wishlist-item-row img,
.wishlist-item-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.wishlist-item-info {
    flex: 1;
}

.wishlist-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.wishlist-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

/* Product Detail Modal & Quick View Styles */
.product-detail-modal-card {
    max-width: 680px;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 640px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
}

.product-detail-media {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-media i {
    width: 80px;
    height: 80px;
    color: var(--primary);
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-detail-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background-color: var(--primary-light);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    width: fit-content;
}

.product-detail-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.product-detail-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.product-detail-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    white-space: pre-line;
    background-color: var(--background);
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.product-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.clickable-product-img {
    cursor: pointer;
}

.btn-detail-quickview {
    background-color: var(--background);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-detail-quickview:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-soft);
}

/* Dynamic Payment Interface Panel Styling */
.payment-details-panel {
    display: none;
    margin-top: 16px;
    padding: 20px;
    background-color: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    animation: fadeInSlide 0.3s ease forwards;
}

.payment-details-panel.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PromptPay QR Code Box */
.qr-payment-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.qr-code-wrapper {
    background-color: var(--white);
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.qr-instruction-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

/* Credit Card Form Grid */
.card-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.card-form-grid .col-span-2 {
    grid-column: span 2;
}

/* Mobile Banking Bank Selector */
.bank-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.bank-select-btn {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.bank-select-btn:hover {
    border-color: var(--primary-soft);
    background-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
}

.bank-select-btn.selected {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.bank-icon-box {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    color: var(--white);
}

.bank-kbank { background-color: #138f2d; }
.bank-scb { background-color: #4e2583; }
.bank-ktb { background-color: #00a5e3; }
.bank-bbl { background-color: #1e3a8a; }

/* Theme Toggle Button Styling */
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

html.dark .app-header {
    background-color: rgba(30, 41, 59, 0.85);
}

html.dark select,
html.dark input,
html.dark textarea {
    background-color: #0f172a;
    color: #f8fafc;
}

/* ==========================================================================
   Comprehensive Mobile Responsiveness & Breakpoints (sm, md, lg)
   ========================================================================== */

/* Default Mobile Icons for Navbar Links */
.nav-icon-mobile {
    display: none;
    width: 18px;
    height: 18px;
}

/* Fluid Product Grid: Default Mobile 2 Columns */
@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .product-image-container {
        height: 150px !important;
    }

    .product-details {
        padding: 12px !important;
    }

    .product-title {
        font-size: 14px !important;
    }

    .product-desc {
        font-size: 12px !important;
        height: 34px !important;
        margin-bottom: 10px !important;
    }

    .product-price {
        font-size: 15px !important;
    }

    .add-to-cart-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .header-container {
        padding: 0 12px !important;
    }

    .logo-text {
        font-size: 18px !important;
    }

    .user-text-label {
        display: none !important;
    }

    .nav-text-label {
        display: none !important;
    }

    .nav-icon-mobile {
        display: inline-block !important;
    }

    .nav-links {
        display: flex !important;
        gap: 8px !important;
    }

    .nav-link {
        padding: 8px !important;
    }

    .header-actions {
        gap: 6px !important;
    }

    /* Stack Sidebar Layouts vertically on mobile */
    .dashboard-2col-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .dashboard-sidebar {
        width: 100% !important;
    }

    .sidebar-nav-menu {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding-bottom: 6px !important;
        gap: 8px !important;
    }

    .sidebar-nav-item {
        flex: 0 0 auto !important;
        padding: 8px 14px !important;
        font-size: 13px !important;
    }

    /* Modal responsiveness */
    .modal-card {
        width: 95% !important;
        max-height: 90vh !important;
    }

    .modal-body {
        overflow-y: auto !important;
    }

    .search-bar-wrapper {
        flex-direction: column !important;
    }

    .btn-search {
        width: 100% !important;
        padding: 12px !important;
    }
}

/* Tablet / Desktop Grid Breakpoints */
@media (min-width: 641px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
}

@media (min-width: 1025px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 24px !important;
    }
}

/* Table and Order Card Horizontal Scroll Container Wrapper */
.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}