/* ========================================
   DigiMall Purple 9 - Main Stylesheet
   Based on Figma Design Specifications
   ======================================== */

/* CSS Variables - Design System */
:root {
    /* Primary Colors */
    --dm9-primary: #6A37D4;
    --dm9-primary-light: #AE8DFF;
    --dm9-primary-dark: #5B2EB8;
    --dm9-primary-gradient: linear-gradient(135deg, #6A37D4 0%, #AE8DFF 100%);
    --dm9-btn-gradient: linear-gradient(90deg, #6A37D4 0%, #AE8DFF 100%);
    
    /* Background Colors */
    --dm9-bg-main: #F7F6FE;
    --dm9-bg-white: #FFFFFF;
    --dm9-bg-card: #FFFFFF;
    --dm9-bg-image: #F0F0F9;
    --dm9-bg-filter: #F0F0F9;
    
    /* Text Colors */
    --dm9-text-primary: #2D2E34;
    --dm9-text-secondary: #5A5B62;
    --dm9-text-muted: #ACACB4;
    --dm9-text-white: #F8F0FF;
    
    /* Accent Colors */
    --dm9-accent-red: #B41340;
    --dm9-accent-red-light: #FFEFEF;
    --dm9-accent-purple: #7443A8;
    --dm9-border-purple: #DDD6FE;
    
    /* Shadows */
    --dm9-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --dm9-shadow-md: 0 4px 6px -4px rgba(0, 0, 0, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --dm9-shadow-lg: 0 10px 15px -3px rgba(106, 55, 212, 0.2), 0 4px 6px -4px rgba(106, 55, 212, 0.2);
    --dm9-shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --dm9-radius-sm: 12px;
    --dm9-radius-md: 16px;
    --dm9-radius-lg: 24px;
    --dm9-radius-xl: 32px;
    --dm9-radius-full: 9999px;
    
    /* Typography */
    --dm9-font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --dm9-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --dm9-container-max: 1600px;
    --dm9-container-padding: 32px;
    
    /* Transitions */
    --dm9-transition-fast: 0.15s ease;
    --dm9-transition-normal: 0.3s ease;
    --dm9-transition-slow: 0.5s ease;
}

/* ========================================
   Base Styles & Reset
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--dm9-font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--dm9-text-primary);
    background-color: var(--dm9-bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.dm9-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dm9-container {
    width: 100%;
    max-width: var(--dm9-container-max);
    margin: 0 auto;
    padding: 0 var(--dm9-container-padding);
}

/* ========================================
   Navbar Styles
   ======================================== */
.dm9-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--dm9-transition-normal);
}

.dm9-navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--dm9-shadow-sm);
}

.dm9-navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--dm9-container-max);
    margin: 0 auto;
    padding: 0 var(--dm9-container-padding);
}

/* Brand */
.dm9-navbar-brand {
    display: flex;
    align-items: center;
}

.dm9-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dm9-primary);
}

.dm9-brand-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.dm9-brand-text {
    font-family: var(--dm9-font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1.2px;
    color: var(--dm9-primary);
}

/* Navbar Menu */
.dm9-navbar-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.dm9-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--dm9-font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--dm9-text-secondary);
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all var(--dm9-transition-fast);
}

.dm9-nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.dm9-nav-link:hover,
.dm9-nav-link.active {
    color: var(--dm9-primary);
    border-bottom-color: var(--dm9-primary);
}

/* Navbar Actions */
.dm9-navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Desktop nav link in navbar-actions (matches language selector) */
.dm9-navbar-actions > .dm9-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    font-family: var(--dm9-font-body);
    font-size: 16px;
    font-weight: 500;
    color: var(--dm9-text-secondary);
    text-decoration: none;
    border-radius: var(--dm9-radius-full);
    transition: all var(--dm9-transition-fast);
}

.dm9-navbar-actions > .dm9-nav-link:hover {
    background: rgba(106, 55, 212, 0.1);
    color: var(--dm9-primary);
}

.dm9-navbar-actions > .dm9-nav-link .dm9-nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Language Dropdown */
.dm9-language-dropdown {
    position: relative;
}

.dm9-lang-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    font-family: var(--dm9-font-body);
    font-size: 16px;
    font-weight: 500;
    color: var(--dm9-text-secondary);
    cursor: pointer;
    border-radius: var(--dm9-radius-full);
    transition: all var(--dm9-transition-fast);
}

.dm9-lang-trigger:hover {
    background: rgba(106, 55, 212, 0.1);
    color: var(--dm9-primary);
}

.dm9-lang-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.dm9-lang-arrow {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform var(--dm9-transition-fast);
}

.dm9-language-dropdown:has(.dm9-lang-menu.active) .dm9-lang-arrow {
    transform: rotate(180deg);
}

.dm9-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--dm9-bg-white);
    border-radius: var(--dm9-radius-md);
    box-shadow: var(--dm9-shadow-md);
    min-width: 140px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--dm9-transition-fast);
}

.dm9-lang-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dm9-lang-option {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--dm9-text-primary);
    text-decoration: none;
    transition: background var(--dm9-transition-fast);
}

.dm9-lang-option:hover {
    background: rgba(106, 55, 212, 0.05);
    color: var(--dm9-primary);
}

/* User Dropdown */
.dm9-user-dropdown {
    position: relative;
}

.dm9-user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    background: rgba(106, 55, 212, 0.05);
    border: 1px solid rgba(106, 55, 212, 0.1);
    border-radius: var(--dm9-radius-full);
    font-family: var(--dm9-font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--dm9-text-primary);
    cursor: pointer;
    transition: all var(--dm9-transition-fast);
}

.dm9-user-trigger:hover {
    background: rgba(106, 55, 212, 0.1);
}

.dm9-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.dm9-user-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--dm9-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.dm9-user-avatar-only {
    display: flex;
    align-items: center;
}

.dm9-user-arrow {
    transition: transform var(--dm9-transition-fast);
}

.dm9-user-dropdown:has(.dm9-user-menu.active) .dm9-user-arrow {
    transform: rotate(180deg);
}

.dm9-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--dm9-bg-white);
    border-radius: var(--dm9-radius-md);
    box-shadow: var(--dm9-shadow-md);
    min-width: 160px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--dm9-transition-fast);
}

.dm9-user-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dm9-user-option {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--dm9-text-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--dm9-transition-fast);
}

.dm9-user-option:last-child {
    border-bottom: none;
}

.dm9-user-option:hover {
    background: rgba(106, 55, 212, 0.05);
    color: var(--dm9-primary);
}

/* Login Button */
.dm9-btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: var(--dm9-primary);
    color: var(--dm9-text-white);
    font-family: var(--dm9-font-heading);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--dm9-radius-full);
    transition: all var(--dm9-transition-fast);
    position: relative;
    overflow: hidden;
}

.dm9-btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.dm9-btn-login:hover {
    background: var(--dm9-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--dm9-shadow-lg);
}

.dm9-btn-login:hover::before {
    left: 100%;
}

/* Mobile Toggle */
.dm9-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.dm9-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dm9-text-primary);
    border-radius: 2px;
    transition: all var(--dm9-transition-fast);
}

/* ========================================
   Hero Section
   ======================================== */
.dm9-hero {
    position: relative;
    padding: 160px 32px 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 436px;
    overflow: hidden;
    background: radial-gradient(141.42% 141.42% at 0% 0%, rgba(101, 36, 221, 0.29) 0%, rgba(109, 54, 211, 0) 67.79%), var(--dm9-bg-main);
}

/* Login Page Hero Override - absolute positioning, no space */
body:has(.dm9-login-main) .dm9-hero {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    min-height: 800px;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Buy Page Hero Override - absolute positioning, no space */
body:has(.dm9-buy-main) .dm9-hero {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    min-height: 800px;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Error Page Hero Override - absolute positioning, no space */
body:has(.dm9-error-main) .dm9-hero {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    min-height: 800px;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

body:has(.dm9-login-main) .dm9-hero .dm9-hero-bg {
    height: 100%;
    opacity: 0.5;
}

body:has(.dm9-buy-main) .dm9-hero .dm9-hero-bg {
    height: 100%;
    opacity: 0.5;
}

body:has(.dm9-error-main) .dm9-hero .dm9-hero-bg {
    height: 100%;
    opacity: 0.5;
}

.dm9-hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Animated Grid Background */
.dm9-hero-grid {
    position: absolute;
    inset: -50%;
    background-image:
        linear-gradient(rgba(106, 55, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(106, 55, 212, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: dm9GridMove 12s linear infinite;
}

@keyframes dm9GridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(60px, 60px);
    }
}

/* Particles */
.dm9-hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.dm9-particle {
    position: absolute;
    border-radius: 50%;
    animation: dm9ParticleFloat linear infinite;
    box-shadow: 0 0 10px currentColor;
}

/* Particle variants for more visibility */
.dm9-particle.type-1 {
    background: radial-gradient(circle, rgba(174, 141, 255, 1) 0%, rgba(106, 55, 212, 0.8) 40%, transparent 70%);
    color: rgba(174, 141, 255, 0.8);
}

.dm9-particle.type-2 {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(174, 141, 255, 0.6) 50%, transparent 70%);
    color: rgba(255, 255, 255, 0.6);
}

.dm9-particle.type-3 {
    background: radial-gradient(circle, rgba(106, 55, 212, 1) 0%, rgba(106, 55, 212, 0.5) 40%, transparent 70%);
    color: rgba(106, 55, 212, 0.6);
}

@keyframes dm9ParticleFloat {
    0% {
        transform: translateY(110vh) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-20vh) scale(1);
        opacity: 0;
    }
}

/* Glow Effect */
.dm9-hero-glow {
    position: absolute;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(106, 55, 212, 0.25) 0%, rgba(174, 141, 255, 0.15) 40%, transparent 75%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: dm9GlowPulse 4s ease-in-out infinite;
    filter: blur(30px);
}

@keyframes dm9GlowPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.15;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.25);
        opacity: 0.9;
    }
}

/* Glow animation duration - 5s for slower breathing */
.dm9-hero-glow {
    animation-duration: 5s;
}

/* Hero Content */
.dm9-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
}

.dm9-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    background: rgba(106, 55, 212, 0.1);
    border-radius: var(--dm9-radius-full);
    margin-bottom: 24px;
}

.dm9-hero-badge span {
    font-family: var(--dm9-font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--dm9-primary);
}

.dm9-hero-title {
    font-family: var(--dm9-font-heading);
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    color: var(--dm9-text-primary);
    margin-bottom: 16px;
}

.dm9-hero-subtitle {
    font-family: var(--dm9-font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--dm9-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.dm9-hero-subtitle p {
    margin: 0;
}

.dm9-hero-notice {
    font-family: var(--dm9-font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--dm9-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.dm9-hero-notice p {
    margin: 0;
}

/* ========================================
   Main Content Section
   ======================================== */
.dm9-main {
    flex: 1;
    padding: 80px 0;
}

/* Overlap style - main covers hero for gradient continuity */
.dm9-main-overlap {
    position: relative;
    z-index: 10;
    margin-top: -60px;
    padding-top: 40px;
    background: linear-gradient(to bottom, transparent 0%, var(--dm9-bg-main) 60px);
}

.dm9-main-overlap .dm9-container {
    position: relative;
    z-index: 11;
}

/* Section Header */
.dm9-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 24px;
}

.dm9-section-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dm9-section-title {
    font-family: var(--dm9-font-heading);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: var(--dm9-text-primary);
    margin: 0;
}

.dm9-section-subtitle {
    font-family: var(--dm9-font-body);
    font-size: 16px;
    font-weight: 500;
    color: var(--dm9-text-secondary);
    margin: 0;
}

/* Category Filter */
.dm9-filter {
    display: flex;
}

.dm9-filter-bg {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--dm9-bg-filter);
    border-radius: var(--dm9-radius-full);
}

.dm9-filter-btn {
    padding: 10px 20px;
    font-family: var(--dm9-font-body);
    font-size: 18px;
    font-weight: 600;
    color: var(--dm9-text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--dm9-radius-full);
    cursor: pointer;
    transition: all var(--dm9-transition-fast);
    white-space: nowrap;
}

.dm9-filter-btn:hover {
    color: var(--dm9-primary);
}

.dm9-filter-btn.active {
    background: var(--dm9-bg-white);
    color: var(--dm9-text-primary);
    box-shadow: var(--dm9-shadow-sm);
}

/* ========================================
   Login Page
   ======================================== */
.dm9-login-main {
    position: relative;
    z-index: 10;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 40px;
}

.dm9-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
    width: 100%;
}

.dm9-login-card {
    background: var(--dm9-bg-card);
    border-radius: var(--dm9-radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 520px;
    box-shadow:
        0 25px 30px -8px rgba(0, 0, 0, 0.12),
        0 10px 15px -5px rgba(0, 0, 0, 0.1),
        0 0 0 2px rgba(106, 55, 212, 0.1),
        inset 0 3px 6px rgba(106, 55, 212, 0.06);
}

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

.dm9-login-title {
    font-family: var(--dm9-font-heading);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--dm9-text-primary);
    margin: 0 0 8px 0;
}

.dm9-login-subtitle {
    font-family: var(--dm9-font-body);
    font-size: 16px;
    color: var(--dm9-text-secondary);
    margin: 0;
}

.dm9-login-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dm9-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    border-radius: var(--dm9-radius-full);
    text-decoration: none;
    font-family: var(--dm9-font-heading);
    font-size: 16px;
    font-weight: 700;
    transition: all var(--dm9-transition-fast);
    position: relative;
    overflow: hidden;
}

.dm9-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.dm9-login-btn:hover::before {
    left: 100%;
}

.dm9-login-btn-google {
    background: var(--dm9-bg-white);
    color: var(--dm9-text-primary);
    border: 2px solid rgba(106, 55, 212, 0.1);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dm9-login-btn-google:hover {
    background: #f8f9fa;
    border-color: rgba(106, 55, 212, 0.2);
    transform: translateY(-2px);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dm9-login-btn-facebook {
    background: #1877F2;
    color: var(--dm9-text-white);
    border: 2px solid transparent;
}

.dm9-login-btn-facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.dm9-login-btn-twitter {
    background: #1DA1F2;
    color: var(--dm9-text-white);
    border: 2px solid transparent;
}

.dm9-login-btn-twitter:hover {
    background: #1a91da;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.3);
}

.dm9-login-icon {
    flex-shrink: 0;
}

.dm9-login-btn-text {
    text-align: center;
}

.dm9-login-footer {
    margin-top: 32px;
    text-align: center;
}

.dm9-login-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: var(--dm9-text-secondary);
    font-family: var(--dm9-font-body);
    font-size: 14px;
    text-decoration: none;
    border-radius: var(--dm9-radius-full);
    transition: all var(--dm9-transition-fast);
}

.dm9-login-home-link:hover {
    background: rgba(106, 55, 212, 0.05);
    color: var(--dm9-primary);
}

.dm9-home-icon {
    transition: transform var(--dm9-transition-fast);
}

.dm9-login-home-link:hover .dm9-home-icon {
    transform: translateY(-2px);
}

/* ========================================
   Buy Page
   ======================================== */
.dm9-buy-main {
    position: relative;
    z-index: 10;
    padding-top: 80px;
    padding-bottom: 40px;
}

/* Buy Page Notice */
.dm9-buy-notice {
    animation: dm9FadeInUp 0.5s ease;
}

.dm9-notice-content {
    margin-top: 20px;
}

.dm9-notice-content p,
.dm9-notice-content div {
    font-family: var(--dm9-font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--dm9-text-secondary);
    margin: 0;
}

.dm9-buy-card {
    position: relative;
    z-index: 10;
    background: var(--dm9-bg-card);
    border-radius: var(--dm9-radius-xl);
    padding: 32px;
    margin-top: 24px;
    box-shadow:
        0 25px 30px -8px rgba(0, 0, 0, 0.12),
        0 10px 15px -5px rgba(0, 0, 0, 0.1),
        0 0 0 2px rgba(106, 55, 212, 0.1),
        inset 0 3px 6px rgba(106, 55, 212, 0.06);
    overflow: hidden;
    box-sizing: border-box;
}

.dm9-buy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    min-width: 0;
}

.dm9-buy-title-row {
    display: flex;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.dm9-buy-thumb {
    width: 280px;
    height: 280px;
    flex-shrink: 0;
    padding: 0;
}

.dm9-buy-image-wrapper {
    position: relative;
    width: 280px;
    flex-shrink: 0;
}

.dm9-buy-title-text {
    flex: 1;
    min-width: 0;
}

.dm9-buy-title {
    font-family: var(--dm9-font-heading);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--dm9-text-primary);
    margin: 0 0 12px 0;
}

.dm9-buy-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.dm9-buy-meta .dm9-badge-delivery,
.dm9-buy-meta .dm9-badge-discount {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--dm9-radius-full);
    font-family: var(--dm9-font-body);
    font-size: 12px;
    font-weight: 700;
}

.dm9-buy-meta .dm9-badge-delivery {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
}

.dm9-buy-meta .dm9-badge-delivery.auto {
    color: #10B981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dm9-buy-meta .dm9-badge-delivery.manual {
    color: #3B82F6;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.dm9-buy-meta .dm9-badge-discount {
    background: var(--dm9-accent-red);
    color: var(--dm9-accent-red-light);
}

.dm9-buy-meta .dm9-badge-icon {
    flex-shrink: 0;
}

.dm9-buy-brief {
    font-family: var(--dm9-font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dm9-text-secondary);
    padding: 20px 0;
}

.dm9-buy-field-section {
    width: 100%;
    max-width: 400px;
    margin-top: 16px;
}

.dm9-buy-field-section .dm9-form-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.dm9-buy-field-section .dm9-form-label {
    flex-shrink: 0;
    margin-bottom: 0;
}

.dm9-buy-field-section .dm9-form-input {
    flex: 1;
    width: auto;
}

.dm9-buy-field-section .dm9-verify-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.dm9-buy-field-section .dm9-verify-group .dm9-form-input {
    flex: 1;
}

.dm9-buy-field-section .dm9-payment-list,
.dm9-buy-payment-section .dm9-payment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dm9-buy-field-section .dm9-payment-item,
.dm9-buy-payment-section .dm9-payment-item {
    flex: 0 0 auto;
    white-space: nowrap;
}

.dm9-buy-payment-section {
    width: 100%;
    margin-top: 16px;
}

.dm9-buy-payment-section .dm9-form-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.dm9-buy-payment-section .dm9-form-label {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .dm9-buy-field-section {
        max-width: 100%;
    }
    
    .dm9-buy-field-section .dm9-payment-list {
        flex-wrap: wrap;
    }
    
    .dm9-buy-field-section .dm9-payment-item {
        flex: 1 1 auto;
    }
}

.dm9-buy-price {
    text-align: right;
    flex-shrink: 0;
}

.dm9-price-now {
    font-family: var(--dm9-font-heading);
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--dm9-primary);
}

.dm9-price-now small {
    font-size: 20px;
    font-weight: 600;
}

.dm9-price-retail {
    display: block;
    font-family: var(--dm9-font-body);
    font-size: 16px;
    color: var(--dm9-text-tertiary);
    margin-top: 4px;
}

/* Mobile price - below title (hidden on desktop by default) */
.dm9-buy-mobile-price {
    display: none;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.dm9-mobile-price-now {
    font-family: var(--dm9-font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.6px;
    color: var(--dm9-primary);
}

.dm9-mobile-price-now small {
    font-size: 16px;
    font-weight: 700;
}

.dm9-mobile-price-retail {
    font-family: var(--dm9-font-body);
    font-size: 14px;
    color: var(--dm9-text-secondary);
    text-decoration: line-through;
}

/* Desktop only utility class */
.dm9-desktop-only {
    display: block;
}

/* Mobile only utility class (for future use) */
.dm9-mobile-only {
    display: none;
}

.dm9-buy-wholesale {
    background: rgba(106, 55, 212, 0.05);
    border-radius: var(--dm9-radius-lg);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.dm9-buy-label {
    font-family: var(--dm9-font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--dm9-text-primary);
    margin: 0 0 8px 0;
}

.dm9-wholesale-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dm9-wholesale-item {
    font-family: var(--dm9-font-body);
    font-size: 13px;
    color: var(--dm9-text-secondary);
    background: var(--dm9-bg-white);
    padding: 6px 12px;
    border-radius: var(--dm9-radius-full);
    border: 1px solid rgba(106, 55, 212, 0.1);
}

.dm9-buy-form {
    padding-top: 24px;
}

.dm9-form-group {
    margin-bottom: 20px;
}

.dm9-form-label {
    display: block;
    font-family: var(--dm9-font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--dm9-text-primary);
    margin-bottom: 8px;
}

.dm9-form-label .dm9-required {
    color: #EF4444;
    margin-left: 4px;
}

.dm9-form-input::placeholder {
    color: #9CA3AF;
    opacity: 1;
}

.dm9-form-input::-webkit-input-placeholder {
    color: #9CA3AF;
}

.dm9-form-input::-moz-placeholder {
    color: #9CA3AF;
}

.dm9-form-input:-ms-input-placeholder {
    color: #9CA3AF;
}

.dm9-form-input {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--dm9-font-body);
    font-size: 15px;
    color: var(--dm9-text-primary);
    background: var(--dm9-bg-white);
    border: 2px solid rgba(106, 55, 212, 0.1);
    border-radius: var(--dm9-radius-lg);
    transition: all var(--dm9-transition-fast);
}

.dm9-form-input:focus {
    outline: none;
    border-color: rgba(106, 55, 212, 0.3);
    box-shadow: 0 0 0 3px rgba(106, 55, 212, 0.05);
}

.dm9-verify-group {
    display: flex;
    gap: 12px;
}

.dm9-verify-group .dm9-form-input {
    flex: 1;
}

.dm9-verify-img {
    height: 48px;
    border-radius: var(--dm9-radius-lg);
    cursor: pointer;
    border: 2px solid rgba(106, 55, 212, 0.1);
}

.dm9-payment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dm9-payment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 16px;
    background: var(--dm9-bg-white);
    border: 2px solid rgba(106, 55, 212, 0.1);
    border-radius: var(--dm9-radius-lg);
    cursor: pointer;
    transition: all var(--dm9-transition-fast);
}

.dm9-payment-item:hover {
    border-color: rgba(106, 55, 212, 0.2);
    background: rgba(106, 55, 212, 0.02);
}

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

.dm9-payment-item input[type="radio"]:checked + .dm9-payment-icon + .dm9-payment-name {
    color: var(--dm9-primary);
    font-weight: 600;
}

.dm9-payment-item input[type="radio"]:checked ~ * {
    color: var(--dm9-primary);
}

.dm9-payment-item:has(input[type="radio"]:checked) {
    border-color: var(--dm9-primary);
    background: rgba(106, 55, 212, 0.05);
}

.dm9-payment-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.dm9-payment-icon img,
.dm9-payment-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.dm9-payment-name {
    font-family: var(--dm9-font-body);
    font-size: 16px;
    color: var(--dm9-text-primary);
}

.dm9-form-actions {
    display: flex;
    justify-content: center;
    padding-top: 24px;
}

.dm9-form-separator {
    width: 100%;
    height: 1px;
    background: rgba(106, 55, 212, 0.15);
    margin: 0;
}

.dm9-buy-submit {
    width: auto;
    min-width: 400px;
    justify-content: center;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .dm9-buy-submit {
        width: 100%;
    }
    
    .dm9-prompt-title,
    .dm9-desc-title {
        font-size: 20px;
    }
    
    .dm9-prompt-content,
    .dm9-desc-content {
        font-size: 15px;
    }
}

.dm9-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dm9-loading-spinner {
    width: 20px;
    height: 20px;
    animation: dm9Spin 1s linear infinite;
}

.dm9-loading-circle {
    opacity: 0.25;
}

.dm9-loading-path {
    opacity: 0.75;
}

@keyframes dm9Spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.dm9-buy-prompt-card,
.dm9-buy-desc {
    background: var(--dm9-bg-card);
    border-radius: var(--dm9-radius-xl);
    padding: 32px;
    margin-top: 24px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(106, 55, 212, 0.05);
}

.dm9-prompt-title,
.dm9-desc-title {
    font-family: var(--dm9-font-heading);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--dm9-text-primary);
    margin: 0 0 16px 0;
}

.dm9-prompt-content,
.dm9-desc-content {
    font-family: var(--dm9-font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--dm9-text-secondary);
}

.dm9-prompt-content img,
.dm9-desc-content img {
    max-width: 100%;
    height: auto;
}

.dm9-prompt-content p,
.dm9-desc-content p {
    margin: 0 0 12px 0;
}

.dm9-prompt-content p:last-child,
.dm9-desc-content p:last-child {
    margin-bottom: 0;
}

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

/* Product Card */
.dm9-product-card {
    display: flex;
    flex-direction: column;
    background: var(--dm9-bg-card);
    border-radius: var(--dm9-radius-xl);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    box-shadow:
        0 25px 30px -8px rgba(0, 0, 0, 0.12),
        0 10px 15px -5px rgba(0, 0, 0, 0.1),
        0 0 0 2px rgba(106, 55, 212, 0.1),
        inset 0 3px 6px rgba(106, 55, 212, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.dm9-product-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 30px 60px -12px rgba(106, 55, 212, 0.3),
        0 15px 30px -8px rgba(0, 0, 0, 0.15),
        0 0 0 3px rgba(106, 55, 212, 0.2),
        inset 0 3px 6px rgba(106, 55, 212, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

/* Card Image */
.dm9-card-image-wrapper {
    position: relative;
    padding: 24px 24px 0;
}

.dm9-card-image-bg {
    position: relative;
    width: 100%;
    height: 192px;
    background: transparent;
    border-radius: var(--dm9-radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.dm9-card-image-bg::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background-image: var(--bg-image-url, transparent);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(30px);
    transform: scale(1.2);
    opacity: 0.6;
    z-index: -1;
}

.dm9-card-image {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.3));
}

/* Badges */
.dm9-badge-discount {
    position: absolute;
    top: 40px;
    right: 40px;
    padding: 4px 12px;
    background: var(--dm9-accent-red);
    color: var(--dm9-accent-red-light);
    font-family: var(--dm9-font-body);
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--dm9-radius-full);
    z-index: 10;
}

.dm9-badge-delivery {
    position: absolute;
    top: 40px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    border-radius: var(--dm9-radius-full);
    font-family: var(--dm9-font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--dm9-accent-purple);
    z-index: 10;
    transition: all var(--dm9-transition-fast);
}

.dm9-badge-delivery.auto {
    color: #10B981;
}

.dm9-badge-delivery.manual {
    color: #3B82F6;
}

.dm9-badge-icon {
    flex-shrink: 0;
}

/* Card Content */
.dm9-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.dm9-card-title {
    font-family: var(--dm9-font-heading);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--dm9-text-primary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    background: linear-gradient(
        90deg,
        var(--dm9-text-primary) 0%,
        var(--dm9-text-primary) 40%,
        #FF6B6B 45%,
        #FFD93D 48%,
        #6BCB77 50%,
        #4D96FF 52%,
        #9B59B6 55%,
        var(--dm9-text-primary) 60%,
        var(--dm9-text-primary) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: dm9TitleShimmer 8s linear infinite;
}

@keyframes dm9TitleShimmer {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}

/* Price */
.dm9-card-price-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dm9-card-price {
    font-family: var(--dm9-font-body);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.6px;
    color: var(--dm9-primary);
}

.dm9-price-currency {
    font-size: 18px;
    font-weight: 700;
}

.dm9-card-price-old {
    font-family: var(--dm9-font-body);
    font-size: 16px;
    font-weight: 400;
    color: var(--dm9-text-secondary);
    text-decoration: line-through;
}

/* Features */
.dm9-card-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dm9-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: var(--dm9-font-body);
    font-size: 14px;
    color: var(--dm9-text-secondary);
}

.dm9-feature-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--dm9-primary);
}

.dm9-feature-brief {
    position: relative;
}

.dm9-brief-content {
    max-height: 80px;
    overflow: hidden;
    transition: max-height var(--dm9-transition-normal);
}

.dm9-brief-content.dm9-brief-collapsed {
    max-height: 80px;
}

.dm9-brief-content:not(.dm9-brief-collapsed) {
    max-height: 500px;
}

.dm9-brief-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: transparent;
    border: none;
    color: var(--dm9-text-muted);
    cursor: pointer;
    margin-top: 4px;
    transition: all var(--dm9-transition-fast);
}

.dm9-brief-toggle:hover {
    color: var(--dm9-primary);
}

.dm9-brief-arrow {
    transition: transform var(--dm9-transition-fast);
}

.dm9-brief-toggle.expanded .dm9-brief-arrow {
    transform: rotate(180deg);
}

/* Buy Button */
.dm9-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: var(--dm9-btn-gradient);
    color: white;
    font-family: var(--dm9-font-body);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.35px;
    text-decoration: none;
    border-radius: var(--dm9-radius-md);
    position: relative;
    overflow: hidden;
    transition: all var(--dm9-transition-fast);
    margin-top: auto;
}

.dm9-card-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.002);
    box-shadow: var(--dm9-shadow-lg);
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--dm9-transition-fast);
}

.dm9-card-btn:hover::before {
    opacity: 1;
}

.dm9-card-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--dm9-shadow-lg);
}

/* Shimmer Effect - Auto loop + Hover interaction */
.dm9-btn-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
}

/* Sync all buttons with same animation - always running */
.dm9-card-btn .dm9-btn-shimmer {
    animation: dm9ShimmerLoop 3s linear infinite;
}

@keyframes dm9ShimmerLoop {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Hover: pause loop and do fast forward sweep */
.dm9-card-btn:hover .dm9-btn-shimmer {
    animation: dm9ShimmerHover 0.5s ease forwards;
}

@keyframes dm9ShimmerHover {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Mouse leave: reverse sweep back then resume loop */
.dm9-card-btn:not(:hover) .dm9-btn-shimmer {
    animation: dm9ShimmerLeave 0.4s ease forwards, dm9ShimmerLoop 3s linear 0.4s infinite;
}

@keyframes dm9ShimmerLeave {
    0% {
        left: 100%;
    }
    100% {
        left: -100%;
    }
}

.dm9-btn-text {
    position: relative;
    z-index: 1;
}

/* Disabled Button */
.dm9-btn-disabled {
    background: var(--dm9-text-muted);
    cursor: not-allowed;
    pointer-events: none;
}

.dm9-btn-disabled .dm9-btn-shimmer {
    display: none;
}

/* Empty State */
.dm9-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--dm9-text-muted);
}

.dm9-empty-icon {
    margin-bottom: 16px;
    opacity: 0.5;
}

.dm9-empty-state p {
    font-size: 16px;
    margin: 0;
}

/* ========================================
   Footer
   ======================================== */
.dm9-footer {
    padding: 48px 0 32px;
    background: radial-gradient(99.69% 99.69% at 110.74% 118.29%, rgba(109, 54, 211, 0.2) 0%, rgba(109, 54, 211, 0) 100%);
    border-top: 1px solid rgba(106, 55, 212, 0.15) !important;
    position: relative;
    z-index: 20;
}

.dm9-footer-content {
    padding: 48px 0 32px;
    background: radial-gradient(99.69% 99.69% at 110.74% 118.29%, rgba(109, 54, 211, 0.2) 0%, rgba(109, 54, 211, 0) 100%);
    border-top: 1px solid rgba(106, 55, 212, 0.15);
    position: relative;
    z-index: 20;
}

.dm9-footer-content-inner {
    max-width: var(--dm9-container-max);
    margin: 0 auto;
    padding: 0 32px;
    text-align: center;
}

.dm9-footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--dm9-container-max);
    margin: 0 auto;
    padding: 0 32px;
    gap: 24px;
}

.dm9-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dm9-footer-logo {
    font-family: var(--dm9-font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--dm9-text-primary);
}

.dm9-footer-copyright {
    font-family: var(--dm9-font-body);
    font-size: 14px;
    color: var(--dm9-text-secondary);
    margin: 0;
}

.dm9-footer-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.dm9-footer-link {
    font-family: var(--dm9-font-body);
    font-size: 14px;
    color: var(--dm9-text-secondary);
    text-decoration: underline;
    transition: color var(--dm9-transition-fast);
}

.dm9-footer-link:hover {
    color: var(--dm9-primary);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1200px) {
    .dm9-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    :root {
        --dm9-container-padding: 24px;
    }
    
    .dm9-hero {
        padding: 140px 24px 60px;
    }
    
    .dm9-hero-title {
        font-size: 42px;
    }
    
    .dm9-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .dm9-filter {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .dm9-filter::-webkit-scrollbar {
        display: none;
    }
    
    .dm9-filter-bg {
        flex-wrap: nowrap;
    }
    
    .dm9-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
    
    .dm9-footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .dm9-footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* Footer - tablet optimization */
    .dm9-footer-content {
        padding: 40px 0 24px;
    }
    
    .dm9-footer-content-inner {
        padding: 0 24px;
    }
    
    .dm9-footer-content-inner p,
    .dm9-footer-content-inner div,
    .dm9-footer-content-inner span {
        font-size: 14px !important;
        text-align: center;
    }
    
    .dm9-navbar-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--dm9-transition-normal);
        box-shadow: var(--dm9-shadow-md);
    }
    
    .dm9-navbar-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .dm9-mobile-toggle {
        display: flex;
    }
    
    .dm9-navbar.mobile-open .dm9-mobile-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .dm9-navbar.mobile-open .dm9-mobile-toggle span:nth-child(2) {
        opacity: 0;
    }
    
    .dm9-navbar.mobile-open .dm9-mobile-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .dm9-hero {
        padding: 120px 20px 50px;
        min-height: auto;
    }
    
    .dm9-hero-title {
        font-size: 32px;
        letter-spacing: -1px;
    }
    
    .dm9-hero-subtitle {
        font-size: 16px;
    }
    
    .dm9-main {
        padding: 40px 0;
    }
    
    /* Login page - tablet optimization */
    .dm9-login-main {
        padding-top: 80px;
        padding-bottom: 32px;
    }
    
    /* Error page - tablet optimization */
    .dm9-error-main {
        padding-top: 80px;
        padding-bottom: 32px;
    }
    
    /* Buy page - tablet optimization */
    .dm9-buy-main {
        padding-top: 80px;
        padding-bottom: 32px;
    }
    
    .dm9-section-title {
        font-size: 24px;
    }
    
    .dm9-products-grid {
        grid-template-columns: 1fr;
    }
    
    .dm9-card-image-bg {
        height: 160px;
    }
    
    .dm9-footer {
        padding: 32px 20px;
    }
    
    .dm9-footer-links {
        gap: 16px;
    }
    
    .dm9-footer-link {
        font-size: 13px;
    }
    
    /* Buy page - tablet responsive */
    .dm9-buy-thumb {
        width: 200px;
        height: 200px;
    }
    
    .dm9-buy-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .dm9-buy-title-row {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .dm9-buy-price {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .dm9-buy-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        text-align: left;
    }
    
    .dm9-buy-title-row {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 12px;
    }
    
    .dm9-buy-price {
        text-align: left;
        width: 100%;
    }
    
    .dm9-buy-thumb {
        width: 240px;
        height: 240px;
    }
    
    .dm9-buy-title {
        font-size: 24px;
    }
    
    .dm9-buy-field-section,
    .dm9-buy-payment-section {
        max-width: 100%;
        margin: 6px 0 0 0;
    }
    
    .dm9-buy-field-section .dm9-form-group {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .dm9-buy-field-section .dm9-form-label {
        width: 100%;
        font-size: 14px;
        font-weight: 600;
        text-align: left;
        margin-bottom: 0;
    }
    
    .dm9-buy-field-section .dm9-form-input {
        width: 100%;
        font-size: 15px;
        padding: 11px 13px;
        height: auto;
    }
    
    .dm9-buy-field-section .dm9-verify-group {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .dm9-buy-field-section .dm9-verify-group .dm9-form-input {
        width: 100%;
    }
    
    .dm9-buy-field-section .dm9-verify-group .dm9-verify-img {
        width: 100%;
        max-width: 240px;
        height: auto;
    }
    
    .dm9-buy-payment-section .dm9-form-group {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .dm9-buy-payment-section .dm9-form-label {
        font-size: 14px;
        font-weight: 600;
        text-align: left;
        margin-bottom: 0;
    }
    
    .dm9-buy-payment-section .dm9-payment-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
    
    .dm9-buy-payment-section .dm9-payment-item {
        flex: 0 0 auto;
        padding: 8px 13px;
        font-size: 15px;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 10px;
        line-height: 1;
    }
    
    .dm9-buy-payment-section .dm9-payment-icon {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        flex-shrink: 0;
        display: block;
        line-height: 1;
    }
    
    .dm9-buy-payment-section .dm9-payment-icon img,
    .dm9-buy-payment-section .dm9-payment-icon svg {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain;
        display: block;
    }
    
    .dm9-buy-payment-section .dm9-payment-name {
        font-size: 15px;
        line-height: 1.4;
        white-space: nowrap;
    }
    
    .dm9-buy-submit {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        font-size: 17px;
        padding: 15px 22px;
    }
    
    /* Footer - mobile optimization */
    .dm9-footer-content {
        padding: 32px 0 20px;
    }
    
    .dm9-footer-content-inner {
        padding: 0 20px;
    }
    
    .dm9-footer-content-inner p,
    .dm9-footer-content-inner div,
    .dm9-footer-content-inner span {
        font-size: 13px !important;
        text-align: center;
    }
    
    .dm9-buy-meta {
        flex-wrap: wrap;
        order: 2;
        gap: 8px;
        margin: 0 0 12px 0;
    }
    
    .dm9-buy-brief {
        order: 3;
        margin: 0;
        font-size: 15px;
    }
    
    .dm9-buy-mobile-price {
        display: flex;
        order: 1;
        margin: 0 0 8px 0;
    }
    
    .dm9-mobile-price-now {
        font-size: 26px;
    }
    
    .dm9-mobile-price-now small {
        font-size: 16px;
    }
    
    .dm9-buy-title-text {
        display: flex;
        flex-direction: column;
    }
    
    .dm9-buy-title {
        order: 0;
        margin: 0 0 8px 0;
    }
    
    /* Form sections - after brief */
    .dm9-buy-field-section,
    .dm9-buy-payment-section {
        order: 4;
    }
    
    /* Hide desktop price on tablet */
    .dm9-desktop-only {
        display: none !important;
    }
    
    .dm9-mobile-only {
        display: block !important;
    }
    
    /* Navbar actions container for mobile */
    .dm9-navbar-actions {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: center;
        position: relative;
    }
    
    /* Nav center group for mobile - contains home, customer service, language */
    .dm9-nav-center-group {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    /* User avatar only - position to the right */
    .dm9-user-avatar-only {
        position: absolute;
        right: 0;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .dm9-lang-label {
        display: none !important;
    }
    
    .dm9-language-dropdown {
        margin-right: 4px;
    }
    
    .dm9-nav-icon-link {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px;
        color: var(--dm9-text-secondary);
        border-radius: var(--dm9-radius-full);
        transition: all var(--dm9-transition-fast);
    }
    
    .dm9-nav-icon-link:hover {
        background: rgba(106, 55, 212, 0.1);
        color: var(--dm9-primary);
    }
    
    .dm9-nav-icon-link .dm9-nav-icon {
        width: 20px;
        height: 20px;
    }
    
    /* Ensure nav links in menu remain flex even with mobile-only class */
    .dm9-navbar-menu .dm9-nav-link {
        display: flex !important;
        align-items: center;
        gap: 8px;
        font-family: var(--dm9-font-heading) !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        padding: 10px 0;
    }
    
    .dm9-navbar-menu .dm9-nav-icon {
        width: 16px !important;
        height: 16px !important;
    }
}

@media (max-width: 480px) {
    :root {
        --dm9-container-padding: 16px;
    }
    
    /* Navbar - small mobile optimization */
    .dm9-navbar {
        height: 50px;
    }
    
    .dm9-navbar-container {
        padding: 0 12px;
    }
    
    .dm9-navbar-menu {
        top: 50px;
    }
    
    /* Login page - small mobile optimization */
    .dm9-login-main {
        padding-top: 50px;
        padding-bottom: 24px;
    }
    
    /* Error page - small mobile optimization */
    .dm9-error-main {
        padding-top: 50px;
        padding-bottom: 24px;
    }
    
    /* Buy page - small mobile optimization */
    .dm9-buy-main {
        padding-top: 50px;
        padding-bottom: 24px;
    }
    
    /* Navbar menu links - smaller spacing on mobile */
    .dm9-navbar-menu .dm9-nav-link {
        padding: 8px 0 !important;
    }
    
    .dm9-navbar-menu .dm9-nav-icon {
        width: 16px !important;
        height: 16px !important;
    }
    
    .dm9-navbar-menu {
        gap: 4px !important;
    }
    
    .dm9-brand-logo {
        height: 24px;
    }
    
    .dm9-brand-text {
        font-size: 18px;
    }
    
    .dm9-lang-trigger {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .dm9-lang-menu {
        top: calc(100% + 4px);
        min-width: 120px;
    }
    
    .dm9-lang-option {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .dm9-user-trigger {
        padding: 4px 8px 4px 4px;
        font-size: 12px;
    }
    
    .dm9-user-avatar {
        width: 24px;
        height: 24px;
    }
    
    .dm9-user-avatar-placeholder {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .dm9-user-menu {
        top: calc(100% + 4px);
        min-width: 140px;
    }
    
    .dm9-navbar-actions {
        gap: 6px;
    }
    
    .dm9-btn-login {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .dm9-user-name {
        font-size: 12px;
    }
    
    /* Hero section - small mobile optimization */
    .dm9-hero {
        padding: 70px 16px 40px;
    }
    
    .dm9-hero-title {
        font-size: 26px;
    }
    
    .dm9-hero-badge {
        padding: 4px 12px;
    }
    
    .dm9-hero-badge span {
        font-size: 10px;
    }
    
    /* Section title - small mobile optimization */
    .dm9-section-title {
        font-size: 20px;
        letter-spacing: -0.5px;
    }
    
    /* Login page - small mobile optimization */
    .dm9-login-card {
        padding: 32px 24px;
    }
    
    .dm9-login-title {
        font-size: 22px;
    }
    
    .dm9-login-subtitle {
        font-size: 14px;
    }
    
    .dm9-login-btn {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .dm9-login-icon {
        width: 18px;
        height: 18px;
    }
    
    /* Buy page - small mobile optimization */
    .dm9-buy-card {
        padding: 24px;
    }
    
    .dm9-buy-prompt-card,
    .dm9-buy-desc {
        padding: 24px;
    }
    
    .dm9-buy-notice {
        margin-bottom: 16px;
    }
    
    .dm9-notice-content {
        margin-top: 20px;
        border-radius: var(--dm9-radius-md);
    }
    
    .dm9-notice-content p,
    .dm9-notice-content div {
        font-size: 14px;
    }
    
    .dm9-buy-header {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }
    
    .dm9-buy-title-row {
        width: 100%;
        flex-direction: column;
        gap: 0;
    }
    
    .dm9-buy-image-wrapper {
        width: 100%;
        padding: 0;
    }
    
    .dm9-buy-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1/1;
    }
    
    .dm9-buy-title-text {
        width: 100%;
        padding: 16px 0 0;
        display: flex;
        flex-direction: column;
    }
    
    .dm9-buy-title {
        order: 0;
        margin: 0 0 8px 0;
    }
    
    /* Mobile price - always show on mobile */
    .dm9-buy-mobile-price {
        display: flex !important;
        width: 100%;
        text-align: left;
        margin: 0 0 8px 0;
        order: 1; /* After title */
    }
    
    .dm9-mobile-price-now {
        font-size: 28px;
    }
    
    .dm9-mobile-price-now small {
        font-size: 16px;
    }
    
    /* Hide desktop price on mobile */
    .dm9-desktop-only {
        display: none !important;
    }
    
    .dm9-buy-title {
        font-size: 20px;
        text-align: left;
    }
    
    .dm9-buy-meta {
        order: 2; /* After price */
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        display: flex;
        justify-content: flex-start;
        flex-direction: row;
        gap: 6px;
        z-index: 10;
        margin: 0 0 12px 0;
    }
    
    .dm9-buy-meta .dm9-badge-delivery,
    .dm9-buy-meta .dm9-badge-discount {
        position: static;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 12px;
        border-radius: var(--dm9-radius-full);
        font-family: var(--dm9-font-body);
        font-size: 12px;
        font-weight: 700;
    }
    
    .dm9-buy-meta .dm9-badge-delivery {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(6px);
    }
    
    .dm9-buy-meta .dm9-badge-delivery.auto {
        color: #10B981;
        background: rgba(16, 185, 129, 0.1);
        border: 1px solid rgba(16, 185, 129, 0.3);
    }
    
    .dm9-buy-meta .dm9-badge-delivery.manual {
        color: #3B82F6;
        background: rgba(59, 130, 246, 0.1);
        border: 1px solid rgba(59, 130, 246, 0.3);
    }
    
    .dm9-buy-meta .dm9-badge-discount {
        background: var(--dm9-accent-red);
        color: var(--dm9-accent-red-light);
    }
    
    .dm9-buy-brief {
        order: 3;
        text-align: left;
        font-size: 14px;
        margin: 0;
        padding: 8px 0;
    }
    
    /* Form sections - after brief */
    .dm9-buy-field-section,
    .dm9-buy-payment-section {
        order: 4;
        width: 100%;
        max-width: 100%;
        margin: 6px 0 0 0;
    }
    
    .dm9-buy-field-section .dm9-form-group {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .dm9-buy-field-section .dm9-form-label {
        width: 100%;
        font-size: 13px;
        font-weight: 600;
        text-align: left;
        margin-bottom: 0;
    }
    
    .dm9-buy-field-section .dm9-form-input {
        width: 100%;
        font-size: 14px;
        padding: 10px 12px;
        height: auto;
    }
    
    .dm9-buy-field-section .dm9-verify-group {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .dm9-buy-field-section .dm9-verify-group .dm9-form-input {
        width: 100%;
    }
    
    .dm9-buy-field-section .dm9-verify-group .dm9-verify-img {
        width: 100%;
        max-width: 200px;
        height: auto;
    }
    
    .dm9-buy-payment-section .dm9-form-group {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .dm9-buy-payment-section .dm9-form-label {
        font-size: 15px;
        font-weight: 600;
        text-align: left;
        margin-bottom: 0;
    }
    
    .dm9-buy-payment-section .dm9-payment-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
    
    .dm9-buy-payment-section .dm9-payment-item {
        flex: 0 0 auto;
        padding: 6px 12px;
        font-size: 14px;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        line-height: 1;
    }
    
    .dm9-buy-payment-section .dm9-payment-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    flex-shrink: 0;
    display: block;
    line-height: 1;
}

.dm9-buy-payment-section .dm9-payment-icon img,
.dm9-buy-payment-section .dm9-payment-icon svg {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
    display: block;
}
    
    .dm9-buy-payment-section .dm9-payment-name {
        font-size: 14px;
        line-height: 1.4;
        white-space: nowrap;
    }
    
    .dm9-buy-submit {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        font-size: 16px;
        padding: 14px 20px;
    }
    
    .dm9-prompt-title,
    .dm9-desc-title {
        font-size: 18px;
    }
    
    .dm9-prompt-content,
    .dm9-desc-content {
        font-size: 14px;
    }
    
    /* Footer - small mobile optimization */
.dm9-footer {
    padding: 32px 16px !important;
}

.dm9-footer-logo {
    font-size: 16px !important;
}

.dm9-footer-copyright {
    font-size: 11px !important;
}

.dm9-footer-links {
    gap: 10px !important;
    flex-direction: column !important;
}

.dm9-footer-link {
        font-size: 11px !important;
    }
    
    /* Buy page - small mobile responsive */
    .dm9-buy-thumb {
        width: 160px;
        height: 160px;
    }
    
    .dm9-buy-title {
        font-size: 20px;
    }
    
    .dm9-price-now {
        font-size: 28px;
    }
    
    .dm9-price-now small {
        font-size: 16px;
    }
    
    /* Navbar actions - small mobile optimization */
    .dm9-brand-logo {
        height: 24px;
    }
    
    .dm9-brand-text {
        font-size: 18px;
    }
    
    .dm9-lang-trigger {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .dm9-btn-login {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .dm9-user-name {
        font-size: 12px;
    }
    
    .dm9-user-avatar-placeholder {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .dm9-navbar-actions {
        gap: 6px;
    }
    
    .dm9-card-content {
        padding: 20px;
    }
    
    .dm9-card-price {
        font-size: 20px;
    }
    
    .dm9-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ========================================
   RTL Support
   ======================================== */
[dir="rtl"] .dm9-badge-discount {
    right: auto;
    left: 40px;
}

[dir="rtl"] .dm9-badge-delivery {
    left: auto;
    right: 40px;
}

[dir="rtl"] .dm9-lang-menu,
[dir="rtl"] .dm9-user-menu {
    right: auto;
    left: 0;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .dm9-navbar,
    .dm9-hero-bg,
    .dm9-card-btn,
    .dm9-footer {
        display: none;
    }
    
    .dm9-product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========================================
   Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .dm9-hero-grid,
    .dm9-particle,
    .dm9-hero-glow,
    .dm9-btn-shimmer {
        animation: none !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--dm9-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --dm9-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --dm9-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
        --dm9-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    }
}

/* ========================================
   Error Page Styles
   ======================================== */
.dm9-error-main {
    position: relative;
    z-index: 10;
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 40px;
}

.dm9-error-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 48px 32px;
    background: var(--dm9-bg-white);
    border-radius: var(--dm9-radius-lg);
    box-shadow: var(--dm9-shadow-card);
    text-align: center;
}

.dm9-error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    margin-bottom: 32px;
    color: var(--dm9-accent-red);
    animation: dm9-error-shake 0.6s ease-in-out;
}

@keyframes dm9-error-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.dm9-error-icon svg {
    width: 64px;
    height: 64px;
}

.dm9-error-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dm9-text-primary);
    margin-bottom: 12px;
    font-family: var(--dm9-font-heading);
}

.dm9-error-subtitle {
    font-size: 16px;
    color: var(--dm9-text-secondary);
    margin-bottom: 24px;
}

.dm9-error-message {
    font-size: 16px;
    color: var(--dm9-text-primary);
    padding: 24px;
    background: var(--dm9-bg-main);
    border-radius: var(--dm9-radius-md);
    margin-bottom: 32px;
    line-height: 1.6;
}

.dm9-error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.dm9-error-actions .dm9-btn-primary {
    min-width: 140px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--dm9-radius-md);
    background: var(--dm9-primary-gradient);
    color: var(--dm9-text-white);
    border: none;
    cursor: pointer;
    transition: all var(--dm9-transition-normal);
    text-decoration: none;
    display: inline-block;
}

.dm9-error-actions .dm9-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--dm9-shadow-lg);
}

/* Error page - responsive */
@media (max-width: 768px) {
    .dm9-error-card {
        margin: 0 16px;
        padding: 32px 24px;
    }
    
    .dm9-error-title {
        font-size: 24px;
    }
    
    .dm9-error-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 24px;
    }
    
    .dm9-error-icon svg {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .dm9-error-card {
        margin: 0 12px;
        padding: 24px 16px;
    }
    
    .dm9-error-title {
        font-size: 20px;
    }
    
    .dm9-error-message {
        font-size: 14px;
        padding: 16px;
    }
    
    .dm9-error-actions .dm9-btn-primary {
        width: 100%;
        padding: 12px 24px;
    }
}

/* ========================================
   Toast Notification Styles
   ======================================== */
.dm9-toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    max-width: 450px;
    width: calc(100% - 32px);
}

.dm9-toast {
    background: var(--dm9-bg-white);
    border-radius: var(--dm9-radius-lg);
    padding: 18px 24px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(106, 55, 212, 0.15),
        0 0 30px rgba(106, 55, 212, 0.1);
    display: flex;
    align-items: center;
    gap: 14px;
    animation: dm9ToastSlideDown 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.dm9-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(106, 55, 212, 0.1),
        transparent
    );
    animation: dm9ToastShimmer 2s ease-in-out infinite;
}

@keyframes dm9ToastShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes dm9ToastSlideDown {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dm9-toast-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    color: var(--dm9-accent-red);
    animation: dm9ToastIconPulse 2s ease-in-out infinite;
}

@keyframes dm9ToastIconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.dm9-toast-message {
    flex: 1;
    font-size: 16px;
    line-height: 1.5;
    color: var(--dm9-text-primary);
    font-family: var(--dm9-font-body);
    font-weight: 500;
}

.dm9-toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--dm9-bg-main);
    cursor: pointer;
    color: var(--dm9-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--dm9-radius-sm);
    transition: all var(--dm9-transition-fast);
}

.dm9-toast-close:hover {
    background: var(--dm9-primary);
    color: var(--dm9-text-white);
    transform: rotate(90deg);
}

/* Toast variants */
.dm9-toast.dm9-toast-error {
    border-left: 5px solid var(--dm9-accent-red);
    background: linear-gradient(135deg, rgba(255, 245, 245, 0.8) 0%, var(--dm9-bg-white) 100%);
}

.dm9-toast.dm9-toast-error .dm9-toast-icon {
    color: var(--dm9-accent-red);
    animation: dm9ToastIconShake 0.6s ease-in-out;
}

@keyframes dm9ToastIconShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.dm9-toast.dm9-toast-success {
    border-left: 4px solid #10B981;
}

.dm9-toast.dm9-toast-success .dm9-toast-icon {
    color: #10B981;
}

.dm9-toast.dm9-toast-warning {
    border-left: 4px solid #F59E0B;
}

.dm9-toast.dm9-toast-warning .dm9-toast-icon {
    color: #F59E0B;
}

.dm9-toast.dm9-toast-info {
    border-left: 4px solid var(--dm9-primary);
}

.dm9-toast.dm9-toast-info .dm9-toast-icon {
    color: var(--dm9-primary);
}

/* Toast exit animation */
.dm9-toast.dm9-toast-exit {
    animation: dm9ToastSlideUp 0.3s ease forwards;
}

@keyframes dm9ToastSlideUp {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .dm9-toast-container {
        top: 50%;
        max-width: calc(100% - 24px);
    }
    
    .dm9-toast {
        padding: 14px 16px;
    }
    
    .dm9-toast-message {
        font-size: 14px;
    }
}

/* ========================================
   Payment Page (qpay) Styles
   ======================================== */
.dm9-pay-main {
    position: relative;
    z-index: 10;
    padding-top: 80px;
    padding-bottom: 40px;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

.dm9-pay-card {
    background: var(--dm9-bg-card);
    border-radius: var(--dm9-radius-xl);
    padding: 40px;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    box-shadow:
        0 25px 30px -8px rgba(0, 0, 0, 0.12),
        0 10px 15px -5px rgba(0, 0, 0, 0.1),
        0 0 0 2px rgba(106, 55, 212, 0.1),
        inset 0 3px 6px rgba(106, 55, 212, 0.06);
}

.dm9-pay-header {
    text-align: center;
    margin-bottom: 32px;
}

.dm9-pay-amount-label {
    font-family: var(--dm9-font-body);
    font-size: 14px;
    color: var(--dm9-text-muted);
    margin-bottom: 8px;
}

.dm9-pay-amount {
    font-family: var(--dm9-font-heading);
    font-size: 36px;
    font-weight: 800;
    color: var(--dm9-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.dm9-pay-currency {
    font-size: 24px;
    font-weight: 600;
}

.dm9-pay-meta {
    font-family: var(--dm9-font-body);
    font-size: 13px;
    color: var(--dm9-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dm9-divider {
    color: var(--dm9-text-muted);
}

/* QR Code */
.dm9-pay-qr-wrapper {
    display: flex;
    justify-content: center;
    margin: 32px 0;
}

.dm9-pay-qr-card {
    padding: 20px;
    background: var(--dm9-bg-white);
    border-radius: var(--dm9-radius-lg);
    border: 2px solid rgba(106, 55, 212, 0.1);
    box-shadow: var(--dm9-shadow-md);
}

.dm9-pay-qr {
    display: block;
    width: 220px;
    height: 220px;
}

/* Payment Channels (Mobile) */
.dm9-pay-channels {
    margin: 24px 0;
}

.dm9-pay-channels-prompt {
    font-family: var(--dm9-font-body);
    font-size: 13px;
    color: var(--dm9-text-secondary);
    text-align: center;
    margin-bottom: 16px;
}

.dm9-channel-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dm9-channel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 52px;
    background: var(--dm9-bg-white);
    border-radius: var(--dm9-radius-lg);
    border: 2px solid rgba(106, 55, 212, 0.1);
    padding: 0 16px;
    color: var(--dm9-text-primary);
    text-decoration: none;
    font-family: var(--dm9-font-body);
    font-size: 15px;
    font-weight: 600;
    transition: all var(--dm9-transition-fast);
    cursor: pointer;
}

.dm9-channel-item:hover {
    border-color: rgba(106, 55, 212, 0.2);
    background: rgba(106, 55, 212, 0.02);
}

.dm9-channel-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dm9-channel-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.dm9-channel-name {
    font-weight: 600;
}

.dm9-channel-arrow {
    color: var(--dm9-text-muted);
    font-size: 18px;
    transition: transform var(--dm9-transition-fast);
}

.dm9-channel-item:hover .dm9-channel-arrow {
    transform: translateX(4px);
    color: var(--dm9-primary);
}

/* Payment Actions */
.dm9-pay-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.dm9-pay-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: var(--dm9-radius-lg);
    font-family: var(--dm9-font-body);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--dm9-transition-fast);
    cursor: pointer;
}

.dm9-pay-btn-cancel {
    background: var(--dm9-bg-white);
    color: var(--dm9-text-primary);
    border: 2px solid rgba(106, 55, 212, 0.1);
}

.dm9-pay-btn-cancel:hover {
    border-color: rgba(106, 55, 212, 0.2);
    background: rgba(106, 55, 212, 0.02);
    transform: translateY(-2px);
}

.dm9-pay-btn-confirm {
    background: var(--dm9-primary-gradient);
    color: var(--dm9-text-white);
    border: none;
    box-shadow: var(--dm9-shadow-md);
}

.dm9-pay-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: var(--dm9-shadow-lg);
}

/* Payment Page Responsive */
@media (max-width: 768px) {
    .dm9-pay-main {
        padding-top: 60px;
        padding-bottom: 24px;
    }
    
    .dm9-pay-card {
        padding: 32px 24px;
    }
    
    .dm9-pay-amount {
        font-size: 28px;
    }
    
    .dm9-pay-currency {
        font-size: 20px;
    }
    
    .dm9-pay-actions {
        flex-direction: column;
    }
}

/* ========================================
   Payment Result Page Styles
   ======================================== */
.dm9-result-main {
    position: relative;
    z-index: 10;
    padding-top: 80px;
    padding-bottom: 40px;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

.dm9-result-card {
    background: var(--dm9-bg-card);
    border-radius: var(--dm9-radius-xl);
    padding: 48px 40px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    box-shadow:
        0 25px 30px -8px rgba(0, 0, 0, 0.12),
        0 10px 15px -5px rgba(0, 0, 0, 0.1),
        0 0 0 2px rgba(106, 55, 212, 0.1),
        inset 0 3px 6px rgba(106, 55, 212, 0.06);
    text-align: center;
}

.dm9-result-card.dm9-result-success {
    border-top: 4px solid #10B981;
}

.dm9-result-card.dm9-result-fail {
    border-top: 4px solid var(--dm9-accent-red);
}

.dm9-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    border-radius: 50%;
}

.dm9-result-icon-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.dm9-result-icon-fail {
    background: rgba(180, 23, 64, 0.1);
    color: var(--dm9-accent-red);
}

.dm9-result-icon svg {
    width: 48px;
    height: 48px;
}

.dm9-result-title {
    font-family: var(--dm9-font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--dm9-text-primary);
    margin-bottom: 12px;
}

.dm9-result-message {
    font-family: var(--dm9-font-body);
    font-size: 15px;
    color: var(--dm9-text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.dm9-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

.dm9-result-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--dm9-radius-lg);
    font-family: var(--dm9-font-body);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--dm9-transition-fast);
    cursor: pointer;
}

.dm9-result-btn-primary {
    background: var(--dm9-primary-gradient);
    color: var(--dm9-text-white);
    border: none;
    box-shadow: var(--dm9-shadow-md);
}

.dm9-result-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--dm9-shadow-lg);
}

.dm9-result-btn-secondary {
    background: var(--dm9-bg-white);
    color: var(--dm9-text-primary);
    border: 2px solid rgba(106, 55, 212, 0.1);
}

.dm9-result-btn-secondary:hover {
    border-color: rgba(106, 55, 212, 0.2);
    background: rgba(106, 55, 212, 0.02);
    transform: translateY(-2px);
}

.dm9-result-btn-ghost {
    background: transparent;
    color: var(--dm9-text-secondary);
    border: 2px solid var(--dm9-text-muted);
}

.dm9-result-btn-ghost:hover {
    border-color: var(--dm9-primary);
    color: var(--dm9-primary);
    background: rgba(106, 55, 212, 0.02);
    transform: translateY(-2px);
}

.dm9-btn-icon {
    flex-shrink: 0;
}

/* Order Card in Result */
.dm9-order-card {
    background: var(--dm9-bg-main);
    border-radius: var(--dm9-radius-lg);
    padding: 24px;
    margin: 24px 0;
    text-align: left;
    border: 2px solid rgba(106, 55, 212, 0.1);
}

.dm9-order-header {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.dm9-order-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--dm9-radius-md);
    overflow: hidden;
    background: var(--dm9-bg-white);
    border: 2px solid rgba(106, 55, 212, 0.1);
}

.dm9-order-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dm9-order-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dm9-primary-gradient);
    color: var(--dm9-text-white);
    font-size: 28px;
    font-weight: 700;
}

.dm9-order-title-text {
    flex: 1;
    min-width: 0;
}

.dm9-order-title {
    font-family: var(--dm9-font-body);
    font-size: 16px;
    font-weight: 600;
    color: var(--dm9-text-primary);
    margin: 0;
    line-height: 1.5;
}

.dm9-order-price {
    font-family: var(--dm9-font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--dm9-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dm9-order-price-now {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dm9-order-price-now small {
    font-size: 16px;
    font-weight: 600;
}

.dm9-order-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.dm9-order-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--dm9-font-body);
    font-size: 13px;
    color: var(--dm9-text-secondary);
}

.dm9-meta-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dm9-primary);
    flex-shrink: 0;
}

.dm9-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--dm9-radius-full);
    font-size: 12px;
    font-weight: 700;
}

.dm9-status-expired {
    background: rgba(107, 114, 128, 0.1);
    color: #6B7280;
}

.dm9-status-wait-pay {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.dm9-status-pending {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.dm9-status-processing {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.dm9-status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.dm9-status-failure,
.dm9-status-abnormal {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.dm9-badge-text {
    font-weight: 600;
}

.dm9-badge-auto {
    color: #10B981;
}

.dm9-badge-manual {
    color: #3B82F6;
}

.dm9-order-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid rgba(106, 55, 212, 0.1);
}

.dm9-order-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--dm9-font-body);
    font-size: 13px;
    font-weight: 700;
    color: var(--dm9-text-primary);
    margin-bottom: 8px;
}

.dm9-order-textarea {
    width: 100%;
    padding: 12px;
    font-family: monospace;
    font-size: 12px;
    color: var(--dm9-text-primary);
    background: var(--dm9-bg-white);
    border: 2px solid rgba(106, 55, 212, 0.1);
    border-radius: var(--dm9-radius-md);
    resize: none;
    line-height: 1.6;
}

.dm9-order-delivery {
    position: relative;
}

.dm9-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    margin-top: 10px;
    background: var(--dm9-bg-white);
    color: var(--dm9-text-secondary);
    border: 2px solid rgba(106, 55, 212, 0.1);
    border-radius: var(--dm9-radius-md);
    font-family: var(--dm9-font-body);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--dm9-transition-fast);
}

.dm9-copy-btn:hover {
    border-color: var(--dm9-primary);
    color: var(--dm9-primary);
    background: rgba(106, 55, 212, 0.02);
    transform: translateY(-2px);
}

.dm9-order-pay-again {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(106, 55, 212, 0.1);
    text-align: center;
}

/* ========================================
   QR Pay Page Styles
   ======================================== */
.dm9-qrpay-main {
    position: relative;
    z-index: 10;
    padding-top: 80px;
    padding-bottom: 40px;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

.dm9-qrpay-card {
    background: var(--dm9-bg-card);
    border-radius: var(--dm9-radius-xl);
    padding: 40px;
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    box-shadow:
        0 25px 30px -8px rgba(0, 0, 0, 0.12),
        0 10px 15px -5px rgba(0, 0, 0, 0.1),
        0 0 0 2px rgba(106, 55, 212, 0.1),
        inset 0 3px 6px rgba(106, 55, 212, 0.06);
    text-align: center;
}

.dm9-qrpay-header {
    margin-bottom: 24px;
}

.dm9-qrpay-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    background: rgba(106, 55, 212, 0.1);
    border-radius: 50%;
    color: var(--dm9-primary);
}

.dm9-qrpay-title {
    font-family: var(--dm9-font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--dm9-text-primary);
    margin: 0;
}

.dm9-qrpay-meta {
    margin-bottom: 24px;
}

.dm9-qrpay-info {
    font-family: var(--dm9-font-body);
    font-size: 14px;
    color: var(--dm9-text-secondary);
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dm9-qrpay-info strong {
    color: var(--dm9-text-primary);
    font-weight: 700;
}

.dm9-qrpay-expire {
    color: var(--dm9-text-muted);
    font-size: 13px;
}

.dm9-qrpay-code-wrapper {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.dm9-qrpay-code-card {
    padding: 16px;
    background: var(--dm9-bg-white);
    border-radius: var(--dm9-radius-lg);
    border: 2px solid rgba(106, 55, 212, 0.1);
    box-shadow: var(--dm9-shadow-md);
}

.dm9-qrpay-code {
    display: block;
    width: 240px;
    height: 240px;
}

.dm9-qrpay-amount {
    margin: 24px 0;
    padding: 16px;
    background: rgba(106, 55, 212, 0.05);
    border-radius: var(--dm9-radius-lg);
    border: 2px solid rgba(106, 55, 212, 0.1);
}

.dm9-qrpay-amount-label {
    font-family: var(--dm9-font-body);
    font-size: 14px;
    color: var(--dm9-text-secondary);
    margin-right: 8px;
}

.dm9-qrpay-amount-value {
    font-family: var(--dm9-font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--dm9-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dm9-qrpay-amount-value small {
    font-size: 18px;
    font-weight: 600;
}

.dm9-qrpay-mobile {
    margin: 20px 0;
}

.dm9-qrpay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--dm9-radius-lg);
    font-family: var(--dm9-font-body);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--dm9-transition-fast);
}

.dm9-qrpay-btn-primary {
    background: var(--dm9-primary-gradient);
    color: var(--dm9-text-white);
    border: none;
    box-shadow: var(--dm9-shadow-md);
}

.dm9-qrpay-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--dm9-shadow-lg);
}

.dm9-qrpay-tips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: var(--dm9-radius-md);
    border: 1px solid rgba(245, 158, 11, 0.1);
    font-family: var(--dm9-font-body);
    font-size: 13px;
    color: var(--dm9-text-secondary);
}

/* QR Pay Page Responsive */
@media (max-width: 768px) {
    .dm9-qrpay-main {
        padding-top: 60px;
        padding-bottom: 24px;
    }
    
    .dm9-qrpay-card {
        padding: 32px 24px;
    }
    
    .dm9-qrpay-title {
        font-size: 20px;
    }
    
    .dm9-qrpay-code {
        width: 200px;
        height: 200px;
    }
    
    .dm9-qrpay-amount-value {
        font-size: 24px;
    }
    
    .dm9-qrpay-btn {
        width: 100%;
        padding: 12px 24px;
    }
}

/* Result Page Responsive */
@media (max-width: 768px) {
    .dm9-result-main {
        padding-top: 60px;
        padding-bottom: 24px;
    }
    
    .dm9-result-card {
        padding: 32px 24px;
    }
    
    .dm9-result-icon {
        width: 64px;
        height: 64px;
    }
    
    .dm9-result-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .dm9-result-title {
        font-size: 22px;
    }
    
    .dm9-result-message {
        font-size: 14px;
    }
    
    .dm9-result-actions {
        flex-direction: column;
    }
    
    .dm9-result-btn {
        width: 100%;
    }
    
    .dm9-order-card {
        padding: 20px;
    }
    
    .dm9-order-header {
        flex-direction: column;
        text-align: center;
    }
    
    .dm9-order-thumb {
        width: 100%;
        height: 160px;
    }
    
    .dm9-order-title {
        font-size: 15px;
    }
    
    .dm9-order-price {
        font-size: 20px;
    }
    
    .dm9-order-meta-item {
        font-size: 12px;
    }
}
