/* Fonts */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Inter-300.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Inter-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Inter-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Inter-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Inter-700.ttf') format('truetype');
}
@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/Sarabun-300.ttf') format('truetype');
}
@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Sarabun-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Sarabun-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Sarabun-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Sarabun-700.ttf') format('truetype');
}

/* Variables */
:root {
    --line-green: #06C755;
    --line-green-dark: #05B34C;
    --line-green-light: #E6F9EE;
    --primary: #0F172A;
    --secondary: #64748B;
    --bg-primary: #F8FAFC;
    --bg-secondary: #F1F5F9;
    --bg-card: #FFFFFF;
    --border: #E2E8F0;
    --accent: #3B82F6;
    --accent-light: #EFF6FF;
    --danger: #EF4444;
    --danger-light: #FEF2F2;
    --warning: #F59E0B;
    --success: #10B981;
    --radius-full: 9999px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 30px -5px rgba(15, 23, 42, 0.1);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.hidden {
    display: none !important;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    scrollbar-width: none !important; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none !important;  /* Hide scrollbar for IE/Edge */
}

*::-webkit-scrollbar {
    display: none !important; /* Hide scrollbar for Chrome, Safari, Opera */
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Mobile-first Container Frame (simulating LINE Webview) */
.app-container {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    min-height: 100vh;
    background-color: var(--bg-primary);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.app-header {
    background-color: var(--bg-card);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--bg-secondary);
    z-index: 10;
    box-shadow: var(--shadow-sm);
    gap: 6px;
}

.simulation-banner {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-bottom: 1px solid #FCD34D;
    color: #92400E;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 9;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.simulation-banner:hover {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.banner-icon {
    font-size: 14px;
}

.banner-text {
    flex: 1;
    text-decoration: underline;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.brand-logo {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--line-green) 0%, var(--line-green-dark) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(6, 199, 85, 0.3);
}

.brand-name {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, var(--primary) 30%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-sync {
    background-color: var(--bg-secondary);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-sync:hover {
    background-color: #E2E8F0;
    color: var(--primary);
    transform: rotate(30deg);
}

.btn-sync.spinning svg {
    animation: spin 1s linear infinite;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.header-user-img {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    border: 2px solid var(--line-green);
    object-fit: cover;
    flex-shrink: 0;
}

/* Splash/Login Screen */
.screen {
    flex: 1;
    overflow-y: auto;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); /* Space for bottom nav with Safe Area support */
    display: flex;
    flex-direction: column;
    animation: screenFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.screen-login {
    justify-content: center;
    align-items: center;
    padding: 40px 30px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-card) 50%, var(--bg-primary) 100%);
}

.login-illustration {
    width: 140px;
    height: 140px;
    background: var(--line-green-light);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    animation: float 4s ease-in-out infinite;
}

.login-illustration svg {
    width: 70px;
    height: 70px;
    fill: var(--line-green);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
}

.login-desc {
    font-size: 14px;
    color: var(--secondary);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 300px;
}

.btn-liff-login {
    width: 100%;
    max-width: 280px;
    padding: 14px 24px;
    background-color: var(--line-green);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 20px rgba(6, 199, 85, 0.25);
    transition: var(--transition);
}

.btn-liff-login:hover {
    background-color: var(--line-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(6, 199, 85, 0.3);
}

.btn-demo-login {
    width: 100%;
    max-width: 280px;
    padding: 12px 24px;
    background-color: transparent;
    color: var(--secondary);
    border: 2px dashed var(--secondary);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 16px;
    transition: var(--transition);
}

.btn-demo-login:hover {
    background-color: var(--bg-secondary);
    color: var(--primary);
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px calc(4px + env(safe-area-inset-bottom, 0px)) 4px;
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    flex: 1;
    height: 100%;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    padding: 4px 0;
    border-radius: var(--radius-md);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    margin-bottom: 2px;
    transition: var(--transition);
}

.nav-item.active {
    color: var(--line-green);
    font-weight: 700;
    background: linear-gradient(180deg, rgba(6, 199, 85, 0.08) 0%, rgba(6, 199, 85, 0.02) 100%);
    border-radius: var(--radius-md);
}

.nav-item.active svg {
    animation: bounce 0.4s ease;
    stroke: var(--line-green);
    fill: var(--line-green-light);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--line-green) 0%, var(--line-green-dark) 100%);
    border-radius: 0 0 4px 4px;
    animation: scaleIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: 12px;
    background-color: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    transition: var(--transition);
}

.nav-badge.pulse {
    animation: badgePulse 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.product-qty-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--line-green);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(6, 199, 85, 0.3);
    border: 2px solid white;
    z-index: 2;
    animation: badgePulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-event .product-qty-badge {
    background-color: var(--line-green);
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
}

@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Shop Screen Components */
.hero-banner {
    flex-shrink: 0;
    padding: 20px;
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    color: white;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(6, 199, 85, 0.15);
    filter: blur(20px);
}

.hero-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.hero-subtitle {
    font-size: 12px;
    color: #94A3B8;
    margin-bottom: 15px;
}

.search-section {
    padding: 0 16px;
    margin: 8px 0 12px 0;
    width: 100%;
    box-sizing: border-box;
}

.search-bar {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: var(--bg-card);
    border: 1.5px solid var(--bg-secondary);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-input::placeholder {
    color: var(--secondary);
    opacity: 0.65;
}

.search-input:focus {
    background: var(--bg-card);
    border-color: var(--line-green);
    box-shadow: 0 0 14px rgba(6, 199, 85, 0.15);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94A3B8;
}

.quick-search-tags {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 2px 0;
}

.quick-search-tags::-webkit-scrollbar {
    display: none;
}

.search-tag {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #E2E8F0;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.search-tag:hover, .search-tag:active {
    background: rgba(6, 199, 85, 0.2);
    border-color: var(--line-green);
    color: white;
    transform: translateY(-1px);
}

/* Categories Section */
.categories-container {
    padding: 0 20px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-link {
    font-size: 12px;
    color: var(--line-green);
    cursor: pointer;
}

.category-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 5px 0;
    margin-top: -4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    user-select: none;
}

.category-list.expanded {
    flex-wrap: wrap;
    overflow-x: visible;
    cursor: default;
    padding-bottom: 10px;
}

.btn-toggle-categories:hover {
    background-color: var(--line-green-light) !important;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-pill {
    padding: 8px 16px;
    background-color: var(--bg-card);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--secondary);
    white-space: nowrap;
    border: 1px solid var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.category-pill.active {
    background: linear-gradient(135deg, var(--line-green-light) 0%, rgba(6, 199, 85, 0.15) 100%);
    color: var(--line-green-dark);
    border-color: var(--line-green);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(6, 199, 85, 0.1);
}

.category-pill:not(.active):hover {
    background-color: var(--bg-secondary);
    color: var(--primary);
    border-color: #CBD5E1;
    transform: translateY(-1px);
}

/* Products Grid */
.products-container {
    padding: 0 16px;
    margin-bottom: 8px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

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

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    z-index: 2;
}

.product-img-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background-color: #F8FAFC;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.product-img-wrapper svg {
    transition: var(--transition);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
}

.product-card:hover .product-img-wrapper svg {
    transform: scale(1.12) rotate(3deg);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
}

.product-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 10px;
    color: var(--secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
    line-height: 1.35;
    height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    height: 28px;
    box-sizing: border-box;
}

.product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--line-green-dark);
}

.product-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

.product-price-original {
    font-size: 10px;
    color: var(--secondary);
    text-decoration: line-through;
    opacity: 0.65;
}

.product-price-discount {
    color: var(--danger) !important;
}

.btn-add-cart-mini {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background-color: var(--line-green-light);
    color: var(--line-green-dark);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-cart-mini:hover {
    background-color: var(--line-green);
    color: white;
}

.btn-add-cart-mini svg {
    width: 14px;
    height: 14px;
}

/* Cart Screen */
.cart-items-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.cart-item {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    gap: 12px;
    border: 1px solid var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-secondary);
    object-fit: contain;
    padding: 4px;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--line-green-dark);
}

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

.quantity-controller {
    display: flex;
    align-items: center;
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.btn-qty {
    width: 24px;
    height: 24px;
    background-color: var(--bg-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

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

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

.btn-delete-item {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-item svg {
    width: 18px;
    height: 18px;
}

#screen-cart {
    display: flex;
    flex-direction: column;
    height: calc(100% - 64px);
    max-height: calc(100% - 64px);
    overflow: hidden;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}

#cart-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-summary {
    background-color: var(--bg-card);
    border-top: 1px solid var(--bg-secondary);
    padding: 16px 20px;
    margin-top: auto;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
}

.promo-container {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.promo-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    outline: none;
    font-size: 13px;
    transition: var(--transition);
}

.promo-input:focus {
    border-color: var(--line-green);
}

.btn-promo-apply {
    padding: 10px 16px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--secondary);
    margin-bottom: 8px;
}

.summary-row.total {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    border-top: 1px solid var(--bg-secondary);
    padding-top: 10px;
    margin-top: 10px;
    margin-bottom: 18px;
}

.summary-row.total .total-price {
    color: var(--line-green-dark);
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    background-color: var(--line-green);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.2);
    transition: var(--transition);
}

.btn-checkout:hover {
    background-color: var(--line-green-dark);
}

.empty-cart-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.empty-cart-icon {
    width: 80px;
    height: 80px;
    color: var(--secondary);
    opacity: 0.3;
    margin-bottom: 20px;
}

/* Product Detail Modal */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: flex-end;
}

.modal-content {
    width: 100%;
    background-color: var(--bg-card);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-content.full-screen-modal {
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    animation: slideUpFull 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.modal-content.full-screen-modal::before {
    display: none !important;
}

@keyframes slideUpFull {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-content::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background-color: #CBD5E1;
    border-radius: var(--radius-full);
    margin: 12px auto 4px auto;
    flex-shrink: 0;
}

.theme-event .modal-content::before {
    background-color: var(--accent);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

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

.modal-title {
    font-size: 16px;
    font-weight: 700;
}

.btn-close-modal {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--secondary);
}

.modal-body {
    overflow-y: auto;
    padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px)) 20px;
}

.detail-img-container {
    width: 100%;
    height: 200px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.detail-img {
    height: 85%;
    object-fit: contain;
}

.detail-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.detail-tag {
    display: inline-block;
    padding: 4px 8px;
    background-color: var(--accent-light);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.detail-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--line-green-dark);
    margin-bottom: 16px;
}

.detail-desc-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.detail-desc {
    font-size: 13px;
    color: var(--secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.detail-action-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    border-top: 1px solid var(--bg-secondary);
    padding-top: 16px;
}

.btn-add-cart-large {
    flex: 1;
    padding: 14px;
    background-color: var(--line-green);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(6, 199, 85, 0.15);
}

/* Profile Screen Components */
.profile-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 20px;
    border: 1px solid var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(90deg, var(--line-green) 0%, var(--line-green-dark) 100%);
    z-index: 0;
}

.profile-avatar-wrapper {
    position: relative;
    width: 86px;
    height: 86px;
    margin: 10px auto 14px auto;
    z-index: 1;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.profile-badge-vip {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--warning);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    border: 2px solid white;
}

.profile-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.profile-id {
    font-size: 11px;
    color: var(--secondary);
    margin-bottom: 12px;
}

.profile-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    border-top: 1px solid var(--bg-secondary);
    padding-top: 14px;
}

.profile-meta-item {
    text-align: center;
}

.profile-meta-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.profile-meta-label {
    font-size: 11px;
    color: var(--secondary);
}

/* Membership Progress */
/* Membership progress card styling removed */

/* Developer Console inside LIFF */
.dev-console-card {
    background-color: #1E293B;
    color: #38BDF8;
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 0 20px 20px 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
}

.dev-console-title {
    color: white;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dev-console-logs {
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-entry {
    line-height: 1.4;
}

.log-time {
    color: #64748B;
    margin-right: 6px;
}

.log-api {
    color: #F472B6;
}

.log-success {
    color: #4ADE80;
}

.log-info {
    color: #E2E8F0;
}

.btn-simulation-panel {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin: 0 20px 20px 20px;
    border: 1px solid var(--bg-secondary);
}

.btn-simulation-panel h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.sim-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.sim-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.btn-sim-action {
    padding: 8px 14px;
    background-color: var(--line-green);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-sim-logout {
    width: 100%;
    padding: 12px;
    background-color: var(--danger-light);
    color: var(--danger);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    transition: var(--transition);
}

.btn-sim-logout:hover {
    background-color: var(--danger);
    color: white;
}

/* Orders Screen Components */
.orders-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.order-header {
    background-color: var(--bg-secondary);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.order-id-label {
    font-weight: 600;
    color: var(--primary);
}

.order-date-label {
    color: var(--secondary);
}

.order-body {
    padding: 14px 16px;
}

.order-product-preview-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.order-item-mini-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-secondary);
    object-fit: contain;
    padding: 2px;
}

.order-item-summary-text {
    font-size: 12px;
    color: var(--secondary);
    flex: 1;
}

.order-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.status-preparing {
    background-color: var(--accent-light);
    color: var(--accent);
}

.status-success {
    background-color: var(--line-green-light);
    color: var(--line-green-dark);
}

.status-cancelled {
    background-color: var(--danger-light);
    color: var(--danger);
}

.status-payment-rejected {
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

/* Toast Notification */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translate(-50%, -100px);
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 9999;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    max-width: 85%;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-sizing: border-box;
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.toast-success-icon {
    width: 16px;
    height: 16px;
    color: var(--line-green);
    flex-shrink: 0;
}

/* Checkout Modal Styling */
.checkout-modal-body {
    padding: 20px 20px calc(36px + env(safe-area-inset-bottom, 0px)) 20px;
}

.form-group {
    margin-bottom: 14px;
    position: relative;
}

.form-group:focus-within {
    z-index: 1020;
}

.form-row {
    position: relative;
    z-index: 1;
}

.form-row:focus-within {
    z-index: 1010;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--primary);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    outline: none;
    font-size: 13px;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--line-green);
}

.payment-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.payment-option-card {
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

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

.payment-option-card svg {
    width: 24px;
    height: 24px;
    margin-bottom: 6px;
}

.payment-option-name {
    font-size: 10px;
    font-weight: 600;
}

/* Success View Animation */
.success-checkout-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.success-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--line-green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.success-check-svg {
    width: 40px;
    height: 40px;
    fill: none;
    stroke: var(--line-green-dark);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-back-to-shop {
    margin-top: 24px;
    padding: 10px 24px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

/* Spinner Loader */
.loader-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(6, 199, 85, 0.1);
    border-top: 3px solid var(--line-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Slip Upload Styling */
.btn-upload-slip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: var(--line-green);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
}

.btn-upload-slip:hover {
    background-color: var(--line-green-dark);
}

.slip-uploaded-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background-color: var(--line-green-light);
    color: var(--line-green-dark);
    border: 1px solid var(--line-green);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
    cursor: pointer;
}

.order-slip-section {
    margin-top: 8px;
}

/* Premium Subscription Card & Elements */
/* Premium cards styling removed */;

/* Order Status Badges Colors */
.status-pending-payment {
    background-color: #FEF3C7 !important;
    color: #D97706 !important;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.status-verifying-payment {
    background-color: #EFF6FF !important;
    color: #1D4ED8 !important;
    border: 1px solid rgba(29, 78, 216, 0.2);
}

.status-preparing-items {
    background-color: #F5F3FF !important;
    color: #6D28D9 !important;
    border: 1px solid rgba(109, 40, 217, 0.2);
}

.status-scheduling {
    background-color: #ECFDF5 !important;
    color: #047857 !important;
    border: 1px solid rgba(4, 120, 87, 0.2);
}

/* Cute Status Animations & SVGs */
.cute-status-anim {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.anim-bob {
    animation: cute-bob 2.5s ease-in-out infinite;
}
@keyframes cute-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.anim-blink {
    animation: cute-blink 3.5s infinite;
    transform-origin: center;
}
@keyframes cute-blink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

.anim-coin {
    animation: cute-coin 1.8s ease-in infinite;
    transform-origin: center;
}
@keyframes cute-coin {
    0% { transform: translateY(-25px) scale(0.6); opacity: 0; }
    20% { opacity: 1; }
    70% { transform: translateY(12px) scale(1); opacity: 1; }
    80%, 100% { transform: translateY(15px) scale(0.8); opacity: 0; }
}

.anim-sway {
    animation: cute-sway 3s ease-in-out infinite;
    transform-origin: bottom center;
}
@keyframes cute-sway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(3deg); }
}

.anim-scan {
    animation: cute-scan 2s ease-in-out infinite;
    transform-origin: center;
}
@keyframes cute-scan {
    0%, 100% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
}

.anim-magnify {
    animation: cute-magnify 4s ease-in-out infinite;
    transform-origin: 65px 65px;
}
@keyframes cute-magnify {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-5px, -5px); }
    50% { transform: translate(3px, -5px); }
    75% { transform: translate(-3px, 4px); }
}

.anim-bounce {
    animation: cute-bounce 1.6s ease-in-out infinite;
}
@keyframes cute-bounce {
    0%, 100% { transform: translateY(0) scaleY(1); }
    50% { transform: translateY(-6px) scaleY(0.95); }
}

.anim-wiggle-carrot {
    animation: cute-wiggle 1.2s ease-in-out infinite;
    transform-origin: 36px 42px;
}
.anim-wiggle-apple {
    animation: cute-wiggle 1.4s ease-in-out infinite alternate;
    transform-origin: 62px 36px;
}
@keyframes cute-wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.anim-drive {
    animation: cute-drive 0.6s linear infinite;
}
@keyframes cute-drive {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.anim-wheel {
    /* Rotation animation removed to prevent solid wheels from orbiting the whole SVG due to transform-origin issues */
    transform-origin: center;
}
@keyframes cute-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.anim-exhaust {
    animation: cute-exhaust 1s ease-out infinite;
    transform-origin: center;
}
@keyframes cute-exhaust {
    0% { transform: translate(0, 0) scale(0.6); opacity: 1; }
    100% { transform: translate(-10px, -6px) scale(1.4); opacity: 0; }
}

.anim-pop {
    animation: cute-pop 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite;
    transform-origin: center bottom;
}
@keyframes cute-pop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.anim-heart {
    animation: cute-heart 1.5s ease-out infinite;
    transform-origin: center;
}
@keyframes cute-heart {
    0% { transform: translateY(5px) scale(0.4); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(-15px) scale(1.1); opacity: 0; }
}

.anim-sparkle {
    animation: cute-sparkle 2s ease-in-out infinite;
    transform-origin: 50px 20px;
}
@keyframes cute-sparkle {
    0%, 100% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2) rotate(45deg); opacity: 1; }
}

.anim-shake {
    animation: cute-shake 0.5s ease-in-out infinite;
}
@keyframes cute-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

.anim-tear {
    animation: cute-tear 1.5s ease-in infinite;
    transform-origin: center;
}
@keyframes cute-tear {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    30% { opacity: 1; }
    80% { transform: translateY(12px) scale(1); opacity: 1; }
    100% { transform: translateY(15px) scale(0.5); opacity: 0; }
}

/* Stepper/Tracker Styles */
.order-tracker-container {
    background-color: var(--bg-primary);
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.order-stepper {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    padding-left: 10px;
    margin-top: 10px;
}
.order-stepper::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background-color: var(--bg-secondary);
    z-index: 1;
}
.stepper-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 20px;
}
.stepper-step:last-child {
    padding-bottom: 0;
}
.step-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #CBD5E1;
    border: 3px solid var(--bg-primary);
    position: relative;
    left: 0px;
    z-index: 2;
    transition: var(--transition);
}
.stepper-step.completed .step-circle {
    background-color: var(--line-green);
    border-color: var(--bg-primary);
}
.stepper-step.active .step-circle {
    background-color: var(--warning);
    border-color: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}
.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.step-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
    line-height: 1.2;
}
.stepper-step.completed .step-title {
    color: var(--line-green-dark);
}
.stepper-step.active .step-title {
    color: var(--primary);
    font-weight: 700;
}
.step-desc {
    font-size: 11px;
    color: var(--secondary);
    line-height: 1.2;
}
.stepper-step.active .step-desc {
    color: var(--warning);
    font-weight: 500;
}

/* Event Cyberpunk Theme variables override */
.app-container.theme-event {
    --primary: #FFFFFF;
    --secondary: #A5B4FC;
    --bg-primary: #0F091F; /* Dark violet background */
    --bg-secondary: #2E1065; /* Dark purple container background */
    --bg-card: #1E1B4B; /* Deep purple card */
    --line-green: #F43F5E; /* Cyber Pink theme color */
    --line-green-dark: #E11D48;
    --line-green-light: #4C0519; /* Deep magenta accent background */
    --accent: #A855F7; /* Neon Violet */
    --accent-light: #3B0764; /* Deep purple borders */
    --warning: #FBBF24;
    --success: #10B981;
    border-color: #F43F5E !important;
    box-shadow: 0 0 50px rgba(244, 63, 94, 0.35);
}

/* Event specific styles */
.theme-event .brand-logo {
    background: linear-gradient(135deg, #F43F5E 0%, #A855F7 100%) !important;
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.6);
}
.theme-event .brand-name {
    background: linear-gradient(135deg, #F43F5E 0%, #FBBF24 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
.theme-event .category-pill.active {
    background-color: var(--line-green) !important;
    color: white !important;
    border-color: var(--line-green) !important;
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.5);
}
.theme-event .product-card {
    border-color: rgba(168, 85, 247, 0.2) !important;
}
.theme-event .product-card:hover {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3) !important;
    border-color: var(--accent) !important;
}
.theme-event .product-price {
    color: #F43F5E !important;
}
.theme-event .btn-add-cart-mini {
    background-color: rgba(244, 63, 94, 0.15) !important;
    color: #F43F5E !important;
    border: 1px solid rgba(244, 63, 94, 0.3) !important;
}
.theme-event .btn-add-cart-mini:hover {
    background-color: #F43F5E !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.6);
}
.theme-event .hero-banner {
    background: linear-gradient(135deg, #311042 0%, #0F091F 100%) !important;
    border-bottom: 2px solid #F43F5E !important;
}
.theme-event .hero-banner::after {
    background: rgba(244, 63, 94, 0.2) !important;
}
.theme-event .bottom-nav {
    background-color: rgba(30, 27, 75, 0.9) !important;
    border-top-color: rgba(168, 85, 247, 0.2) !important;
}
.theme-event .nav-item.active {
    color: #F43F5E !important;
}
.theme-event .nav-item.active svg {
    stroke: #F43F5E !important;
    fill: rgba(244, 63, 94, 0.2) !important;
}
.theme-event .btn-checkout {
    background-color: #F43F5E !important;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}
.theme-event .btn-checkout:hover {
    background-color: #E11D48 !important;
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.6);
}
.theme-event .search-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(168, 85, 247, 0.3) !important;
}
.theme-event .search-input:focus {
    border-color: #F43F5E !important;
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
}
.theme-event .product-card-mini-img {
    background-color: #110E3D !important;
}

/* --- QOL Improvements Styling --- */

/* Search Clear Button */
.search-clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: var(--transition);
}
.search-clear-btn:hover {
    color: white;
}

/* Product Card Quantity Controller */
.product-qty-controller {
    display: flex;
    align-items: center;
    background-color: var(--line-green-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(6, 199, 85, 0.2);
    height: 28px;
    box-sizing: border-box;
}
.btn-qty-mini {
    width: 28px;
    height: 100%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--line-green-dark);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-qty-mini:hover {
    background-color: var(--line-green);
    color: white;
}
.qty-val-mini {
    min-width: 20px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--line-green-dark);
}

/* Available Coupons in Cart */
.available-coupons {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    text-align: left;
}
.coupons-title {
    font-size: 11px;
    color: var(--secondary);
    font-weight: 600;
}
.coupons-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.coupon-tag {
    background-color: var(--bg-secondary);
    border: 1px dashed #CBD5E1;
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.coupon-tag:hover {
    border-color: var(--line-green);
    background-color: var(--line-green-light);
    color: var(--line-green-dark);
    transform: translateY(-1px);
}

/* Delivery Tabs in Checkout Modal */
.delivery-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}
.delivery-tab {
    flex: 1;
    padding: 10px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
    cursor: pointer;
    transition: var(--transition);
}
.delivery-tab.active {
    background-color: var(--line-green-light);
    border-color: var(--line-green);
    color: var(--line-green-dark);
}

/* Event specific styles overrides for QOL elements */
.theme-event .product-qty-controller {
    background-color: rgba(244, 63, 94, 0.1) !important;
    border-color: rgba(244, 63, 94, 0.3) !important;
}
.theme-event .btn-qty-mini {
    color: #F43F5E !important;
}
.theme-event .btn-qty-mini:hover {
    background-color: #F43F5E !important;
    color: white !important;
}
.theme-event .qty-val-mini {
    color: #F43F5E !important;
}
.theme-event .search-clear-btn:hover {
    color: #F43F5E;
}

/* Spin Wheel CSS Styles */
.wheel-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: white;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    border: 2px solid #4F46E5;
}

.wheel-title {
    font-size: 18px;
    font-weight: 700;
    color: #FBBF24;
    margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.wheel-subtitle {
    font-size: 11px;
    color: #C7D2FE;
    margin-bottom: 20px;
    text-align: center;
}

.wheel-outer {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 8px solid #FBBF24;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4), inset 0 0 15px rgba(0,0,0,0.5);
    overflow: hidden;
    transition: transform 4s cubic-bezier(0.1, 0.8, 0.1, 1);
}

.wheel-inner {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: bottom right;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: white;
}

/* Center pin */
.wheel-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #1E1B4B;
    font-size: 10px;
    border: 3px solid #FBBF24;
}

/* Pointer arrow */
.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 20px solid #FBBF24;
    z-index: 6;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.btn-spin {
    margin-top: 20px;
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
    color: #1E1B4B;
    border: none;
    border-radius: var(--radius-full);
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transition: var(--transition);
}

.btn-spin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
}

.btn-spin:disabled {
    background: #475569;
    color: #94A3B8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Flash Sale CSS Styles */
.product-card-flash {
    border: 2px solid #EF4444 !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.25), var(--shadow-sm);
    animation: flashBorderGlow 2s infinite alternate;
}

@keyframes flashBorderGlow {
    0% {
        border-color: #EF4444;
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.2), var(--shadow-sm);
    }
    100% {
        border-color: #F59E0B;
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.45), var(--shadow-sm);
    }
}

.product-card-flash .product-badge {
    background: linear-gradient(135deg, #EF4444 0%, #F59E0B 100%) !important;
    color: white !important;
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
    animation: badgePulse 1s infinite alternate;
}

.product-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.product-price-original {
    font-size: 11px;
    text-decoration: line-through;
    color: var(--secondary);
    font-weight: 500;
    line-height: 1;
}

.product-price-discount {
    font-size: 16px;
    font-weight: 800;
    color: #EF4444 !important;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.1);
}

/* Flash Sale Red Theme overrides */
.theme-flashsale .brand-logo {
    background: linear-gradient(135deg, #EF4444 0%, #F59E0B 100%) !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4) !important;
}

.theme-flashsale .hero-banner {
    background: linear-gradient(135deg, #7F1D1D 0%, #450A0A 100%) !important;
}

.theme-flashsale .hero-banner::after {
    background: rgba(239, 68, 68, 0.2) !important;
}

.theme-flashsale .category-pill.active {
    background: linear-gradient(135deg, #FEE2E2 0%, rgba(239, 68, 68, 0.15) 100%) !important;
    color: #B91C1C !important;
    border-color: #EF4444 !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.1) !important;
}

.theme-flashsale .btn-add-cart-mini {
    background-color: #FEE2E2 !important;
    color: #B91C1C !important;
}

.theme-flashsale .btn-add-cart-mini:hover {
    background-color: #EF4444 !important;
    color: white !important;
}

.theme-flashsale .product-qty-badge {
    background-color: #EF4444 !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3) !important;
}

.theme-flashsale .product-qty-controller {
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.theme-flashsale .btn-qty-mini {
    color: #B91C1C !important;
}

.theme-flashsale .btn-qty-mini:hover {
    background-color: #EF4444 !important;
    color: white !important;
}

.theme-flashsale .qty-val-mini {
    color: #B91C1C !important;
}

/* Anchored Premium Assistant Badge Styling */
.walking-mascot-container {
    position: absolute;
    bottom: 84px; /* Just above bottom nav */
    right: 20px;
    width: auto;
    height: auto;
    pointer-events: none; /* Let clicks pass through to empty space */
    z-index: 100;
    overflow: visible; /* Allow speech bubble to render outside */
}

.walking-mascot {
    position: relative;
    width: 48px;
    height: 48px;
    cursor: pointer;
    pointer-events: auto; /* Allow clicks on the button itself */
    transform-origin: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 50%;
}

.walking-mascot:hover {
    transform: translateY(-2px) scale(1.05);
}

.mascot-visual {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mascot-visual svg {
    display: block;
    width: 48px;
    height: 48px;
    animation: assistantFloat 3s ease-in-out infinite alternate;
}

/* Floating animation */
@keyframes assistantFloat {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-4px);
    }
}

/* Click feedback pulse */
.walking-mascot.interacting .mascot-visual svg {
    animation: assistantClickJump 0.4s ease-in-out;
}

@keyframes assistantClickJump {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.15) translateY(-5px); }
    70% { transform: scale(0.9) translateY(0); }
}

/* Online Status Indicator */
.assistant-status-dot {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 11px;
    height: 11px;
    background-color: #22C55E; /* Vibrant Green */
    border: 2px solid white;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: statusDotPulse 2s infinite;
}

@keyframes statusDotPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
    }
}

/* Mascot Speech Bubble (Aligned to Left) */
.mascot-bubble {
    position: absolute;
    bottom: 8px;
    right: 58px; /* Appears to the left of the button */
    background: rgba(255, 255, 255, 0.98);
    border: 1.5px solid rgba(226, 232, 240, 0.8);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: min(220px, calc(100vw - 100px));
    width: max-content;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    pointer-events: auto;
    cursor: pointer;
    z-index: 101;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s, border-color 0.2s;
    font-family: 'Inter', 'Outfit', sans-serif;
    transform: translateX(10px);
}
.mascot-bubble:hover {
    background-color: #F8FAFC;
    border-color: var(--line-green);
    color: var(--line-green-dark);
}

.mascot-bubble::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.98);
    display: block;
    width: 0;
}

/* Gacha Wheel Styles */
.gacha-card {
    background: linear-gradient(135deg, #1E1B4B 0%, #311042 100%);
    border-radius: var(--radius-md);
    padding: 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(49, 16, 66, 0.4);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(192, 132, 252, 0.2);
}

.gacha-wheel-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 20px auto;
}

.gacha-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid #FCD34D;
    background: conic-gradient(
        #EF4444 0deg 60deg,
        #3B82F6 60deg 120deg,
        #10B981 120deg 180deg,
        #F59E0B 180deg 240deg,
        #8B5CF6 240deg 300deg,
        #EC4899 300deg 360deg
    );
    box-shadow: inset 0 0 20px rgba(0,0,0,0.4), 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 3s cubic-bezier(0.1, 0.8, 0.2, 1.0);
    position: relative;
}

.gacha-wheel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 4px solid #FCD34D;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.gacha-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 24px solid #FCD34D;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    z-index: 10;
}

.gacha-label {
    position: absolute;
    font-size: 9px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    width: 60px;
    text-align: center;
}

.label-1 { top: 30px; left: 100px; transform: rotate(30deg); }
.label-2 { top: 70px; left: 135px; transform: rotate(90deg); }
.label-3 { top: 125px; left: 105px; transform: rotate(150deg); }
.label-4 { top: 125px; left: 35px; transform: rotate(210deg); }
.label-5 { top: 70px; left: 5px; transform: rotate(270deg); }
.label-6 { top: 30px; left: 40px; transform: rotate(330deg); }

.btn-gacha-spin {
    background: linear-gradient(135deg, #FCD34D 0%, #F59E0B 100%);
    color: #1E1B4B;
    border: none;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
    transition: var(--transition);
}

.btn-gacha-spin:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(245, 158, 11, 0.5);
}

.btn-gacha-spin:disabled {
    background: #475569;
    color: #94A3B8;
    box-shadow: none;
    cursor: not-allowed;
}

/* ==========================================
   E-commerce Experience Upgrade Styles
   ========================================== */

/* 1. Cart Progress Bar */
.cart-progress-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 0 0 12px 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.cart-progress-card.success {
    border-color: var(--success);
    background-color: rgba(16, 185, 129, 0.04);
}

.cart-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.cart-progress-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-progress-desc {
    font-size: 12px;
    color: var(--secondary);
}

.cart-progress-bar-bg {
    height: 8px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.cart-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--line-green) 0%, var(--line-green-dark) 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.cart-progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: progress-shimmer 2s infinite linear;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.cart-progress-bar-fill.success {
    background: linear-gradient(90deg, #10B981 0%, #059669 100%);
}

.success-icon {
    display: inline-block;
    animation: gift-bounce 1s infinite alternate;
}

@keyframes gift-bounce {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-3px) scale(1.15); }
}

/* 2. Cart Quick Add-ons Slider */
.cart-addons-container {
    background-color: var(--bg-card);
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 12px 0 0 0;
    box-shadow: var(--shadow-sm);
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    flex-shrink: 0;
}

.cart-addons-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.cart-addons-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE/Edge */
    padding: 4px 4px 12px 4px;
    margin: 0;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
}

.cart-addons-scroll::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}

.cart-addon-card {
    flex: 0 0 140px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.cart-addon-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: rgba(6, 199, 85, 0.15);
}

.cart-addon-img-wrapper {
    width: 100%;
    height: 70px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.cart-addon-img-wrapper svg {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: var(--transition);
}

.cart-addon-card:hover .cart-addon-img-wrapper svg {
    transform: scale(1.1);
}

.cart-addon-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-addon-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.3;
    height: 2.6em; /* Limit to 2 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    cursor: pointer;
}

.cart-addon-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-addon-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--line-green-dark);
}

.btn-addon-add {
    background-color: var(--line-green);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-addon-add:hover {
    background-color: var(--line-green-dark);
    transform: scale(1.1);
}

/* 3. Points Reward Shop */
.reward-shop-card {
    background-color: var(--bg-card);
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 0 20px 20px 20px;
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.reward-shop-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reward-shop-desc {
    font-size: 12px;
    color: var(--secondary);
    margin-bottom: 16px;
    line-height: 1.4;
}

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

.reward-item {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.reward-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
    flex: 1;
}

.reward-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.4;
}

.reward-cost {
    font-size: 11px;
    font-weight: 600;
    color: var(--secondary);
}

.btn-redeem {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    flex-shrink: 0;
}

.btn-redeem.active {
    background-color: var(--line-green);
    color: white;
    box-shadow: 0 2px 6px rgba(6, 199, 85, 0.2);
}

.btn-redeem.active:hover {
    background-color: var(--line-green-dark);
    transform: translateY(-1px);
}

.btn-redeem.premium.active {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.btn-redeem.premium.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.4);
}

.btn-redeem.active-vip {
    background-color: #FEF3C7;
    color: #D97706;
    border: 1px solid #FCD34D;
    cursor: default;
}

.btn-redeem.disabled {
    background-color: #E2E8F0;
    color: #94A3B8;
    cursor: not-allowed;
}

/* Custom Autocomplete Dropdown */
.address-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 180px;
    overflow-y: auto;
    z-index: 1000;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.address-autocomplete-dropdown.hidden {
    display: none !important;
}

.address-dropdown-item {
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--primary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-align: left;
    word-break: break-all;
    overflow-wrap: break-word;
}

.address-dropdown-item:hover {
    background-color: var(--line-green-light);
    color: var(--line-green-dark);
    font-weight: 600;
}

.custom-leaflet-marker {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Modal animation overrides for premium feel */
.modal-overlay {
    animation: fadeInModalOverlay 0.25s ease-out forwards;
}

.modal-content {
    animation: slideUpModalContent 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes fadeInModalOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpModalContent {
    from { transform: translateY(60px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Address Cards selection on Checkout */
.address-select-card {
    border: 2px solid var(--border) !important;
    transition: var(--transition) !important;
}

.address-select-card:hover {
    border-color: #CBD5E1 !important;
}

.address-select-card.active {
    border-color: var(--line-green) !important;
    background-color: var(--line-green-light) !important;
}

.address-select-card.active .card-check-icon {
    display: inline !important;
}

/* Profile Address Manager */
.profile-address-manager {
    background-color: var(--bg-card);
    border: 1px solid var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin: 16px 20px;
    box-shadow: var(--shadow-sm);
}

.profile-address-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-address-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-address-item {
    background-color: var(--bg-primary);
    border: 1.5px solid var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    transition: var(--transition);
}

.profile-address-item:hover {
    border-color: rgba(6, 199, 85, 0.15);
}

.profile-address-info {
    flex: 1;
    text-align: left;
}

.profile-address-label-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: var(--line-green-dark);
    background-color: var(--line-green-light);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}

.profile-address-details {
    font-size: 11px;
    color: var(--secondary);
    line-height: 1.4;
}

.profile-address-actions {
    display: flex;
    gap: 6px;
}

.btn-address-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    color: var(--secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-address-action:hover {
    background-color: var(--bg-secondary);
    color: var(--primary);
}

.btn-address-action.delete:hover {
    color: var(--danger);
    background-color: var(--danger-light);
}

/* Copy buttons style */
.btn-copy-profile:hover {
    color: var(--line-green-dark) !important;
    transform: scale(1.1);
}

/* Promo Carousel Slider styling */
.carousel-container {
    position: relative;
    margin: 12px 16px;
    border-radius: var(--radius-lg);
    height: auto;
    min-height: 100px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.carousel-track {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-slide {
    flex: 0 0 33.333%;
    height: 100%;
    position: relative;
}
.slide-content {
    padding: 16px 20px;
    min-height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}
.slide-text h3 {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    line-height: 1.3;
}
.slide-text p {
    font-size: 11.5px;
    margin: 0;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    line-height: 1.4;
}
.slide-icon {
    font-size: 36px;
    opacity: 0.9;
    flex-shrink: 0;
    margin-left: 12px;
}
.carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.carousel-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}
.carousel-dots .dot.active {
    background-color: white;
    width: 14px;
    border-radius: 3px;
}

/* Category Grid styling */
.categories-container-new {
    margin: 0 16px 12px 16px;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px 4px;
    margin-top: 8px;
}
.category-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.category-grid-item:active {
    transform: scale(0.92);
}
.category-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.category-grid-item.active .category-icon-wrapper {
    box-shadow: 0 0 0 2px currentColor;
    transform: translateY(-2px);
}
.category-grid-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.category-grid-item.active .category-grid-label {
    color: var(--primary);
    font-weight: 700;
}

/* Flash Sale Section styling */
.flashsale-header-bar {
    margin: 0 16px 10px 16px;
    background: linear-gradient(90deg, #FF4B2B 0%, #FF416C 100%);
    color: white;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    animation: pulseGlow 2s infinite;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 75, 43, 0.4); }
    50% { box-shadow: 0 0 10px 2px rgba(255, 75, 43, 0.6); }
}
.flashsale-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.5px;
}
.flash-icon {
    font-size: 15px;
    animation: flashScale 1s infinite alternate;
}
@keyframes flashScale {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}
.countdown-timer {
    background-color: #333;
    color: #FFF;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.5px;
}
.flashsale-status {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.9;
}

/* Stagger animations styling */
.stagger-fade-in {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Splash Screen */
.welcome-splash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(185deg, #0F172A 0%, #1E293B 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
    opacity: 1;
    visibility: visible;
}

.welcome-splash.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.welcome-splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    animation: welcomePulse 3s ease-in-out infinite alternate;
}

@keyframes welcomePulse {
    0% { transform: scale(0.98); }
    100% { transform: scale(1.02); }
}

.welcome-logo-container {
    margin-bottom: 35px;
    animation: logoIntro 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes logoIntro {
    0% { opacity: 0; transform: translateY(-30px) scale(0.8); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.welcome-logo {
    width: 130px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

.welcome-profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    animation: profileIntro 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
    opacity: 0;
}

@keyframes profileIntro {
    0% { opacity: 0; transform: translateY(30px) scale(0.8); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.welcome-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3.5px solid var(--line-green);
    box-shadow: 0 8px 24px rgba(6, 199, 85, 0.35);
    object-fit: cover;
    margin-bottom: 12px;
}

.welcome-greeting {
    font-size: 13px;
    font-weight: 600;
    color: var(--line-green);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.welcome-username {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    margin-top: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.welcome-spinner-container {
    margin-top: 45px;
    animation: fadeInSpinner 1s ease forwards 0.4s;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes fadeInSpinner {
    to { opacity: 1; }
}

/* Progress Bar styling */
.welcome-progress-container {
    width: 200px;
    background: rgba(255, 255, 255, 0.15);
    height: 6px;
    border-radius: var(--radius-full);
    margin-top: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.welcome-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--line-green);
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px rgba(6, 199, 85, 0.5);
    transition: width 0.05s linear;
}
.welcome-progress-text {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 8px;
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: 1px;
}

/* Back to Top Button */
.btn-back-to-top {
    position: absolute;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    left: 20px;
    width: 44px;
    height: 44px;
    background-color: var(--line-green);
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, visibility 0.3s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.btn-back-to-top:hover {
    background-color: var(--line-green-dark);
    transform: scale(1.1) translateY(-2px);
}

.btn-back-to-top:active {
    transform: scale(0.9) translateY(0);
}

/* Screen Block Style */
.screen-block {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top, #0F172A 0%, #020617 100%);
    padding: 20px;
    box-sizing: border-box;
    z-index: 10000;
}

.block-content {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.block-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.block-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(6, 199, 85, 0.1);
    border: 2px solid rgba(6, 199, 85, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 0 20px rgba(6, 199, 85, 0.15);
}

.block-icon-container svg {
    stroke: var(--line-green);
    filter: drop-shadow(0 0 4px rgba(6, 199, 85, 0.5));
}

.block-title {
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 12px;
}

.block-desc {
    font-size: 13px;
    color: #94A3B8;
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 320px;
}

.block-qr-area {
    background: #FFFFFF;
    padding: 16px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.block-qr-code {
    width: 150px;
    height: 150px;
    display: block;
    margin-bottom: 12px;
}

.block-qr-text {
    font-size: 12px;
    font-weight: 600;
    color: #0F172A;
    margin: 0;
}

/* --- Responsive & Tablet/PC Optimization --- */

/* Align content to the center on tablets and PCs */
@media (min-width: 768px) {
    .app-header {
        padding: 16px calc((100% - 720px) / 2);
    }
    
    .simulation-banner {
        padding: 10px calc((100% - 720px) / 2);
    }

    .bottom-nav {
        padding: 0 calc((100% - 720px) / 2) calc(12px + env(safe-area-inset-bottom, 0px)) calc((100% - 720px) / 2);
    }

    .carousel-container,
    .search-section,
    .categories-container-new,
    .flashsale-header-bar,
    .products-container,
    .section-title,
    .cart-items-list,
    .cart-summary,
    .orders-list,
    #profile-info-container,
    #screen-shipping {
        max-width: 720px;
        margin-left: auto !important;
        margin-right: auto !important;
        width: calc(100% - 40px) !important;
    }

    .walking-mascot-container {
        right: calc((100% - 720px) / 2 + 20px) !important;
    }
}

@media (min-width: 1024px) {
    .app-header {
        padding: 16px calc((100% - 960px) / 2);
    }
    
    .simulation-banner {
        padding: 10px calc((100% - 960px) / 2);
    }

    .bottom-nav {
        padding: 0 calc((100% - 960px) / 2) calc(12px + env(safe-area-inset-bottom, 0px)) calc((100% - 960px) / 2);
    }

    .carousel-container,
    .search-section,
    .categories-container-new,
    .flashsale-header-bar,
    .products-container,
    .section-title,
    .cart-items-list,
    .cart-summary,
    .orders-list,
    #profile-info-container,
    #screen-shipping {
        max-width: 960px;
        margin-left: auto !important;
        margin-right: auto !important;
        width: calc(100% - 40px) !important;
    }

    .walking-mascot-container {
        right: calc((100% - 960px) / 2 + 20px) !important;
    }
}

@media (min-width: 1280px) {
    .app-header {
        padding: 16px calc((100% - 1200px) / 2);
    }
    
    .simulation-banner {
        padding: 10px calc((100% - 1200px) / 2);
    }

    .bottom-nav {
        padding: 0 calc((100% - 1200px) / 2) calc(12px + env(safe-area-inset-bottom, 0px)) calc((100% - 1200px) / 2);
    }

    .carousel-container,
    .search-section,
    .categories-container-new,
    .flashsale-header-bar,
    .products-container,
    .section-title,
    .cart-items-list,
    .cart-summary,
    .orders-list,
    #profile-info-container,
    #screen-shipping {
        max-width: 1200px;
        margin-left: auto !important;
        margin-right: auto !important;
        width: calc(100% - 40px) !important;
    }

    .walking-mascot-container {
        right: calc((100% - 1200px) / 2 + 20px) !important;
    }
}

/* Category Grid layout responsiveness */
@media (min-width: 600px) {
    .category-grid {
        grid-template-columns: repeat(8, 1fr) !important;
    }
}

/* Product Grid column scale-up */
@media (min-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

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

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* Modal layout responsive adaptations - convert bottom drawer into centered dialog */
@media (min-width: 600px) {
    .modal-overlay {
        display: none;
        align-items: center !important;
        justify-content: center !important;
        background-color: rgba(15, 23, 42, 0.4) !important;
        padding: 20px;
    }

    .modal-content {
        width: 100% !important;
        max-width: 500px !important;
        border-radius: 24px !important;
        max-height: 85% !important;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
        animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }

    .modal-content.full-screen-modal {
        height: 90vh !important;
        max-height: 90vh !important;
        width: 100% !important;
        max-width: 680px !important;
        border-radius: 24px !important;
        position: relative !important;
        margin: auto !important;
        animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }

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

/* Login screen responsive wrapper */
@media (min-width: 600px) {
    .screen-login {
        justify-content: center;
        align-items: center;
        max-width: 480px !important;
        margin: auto !important;
        border-radius: 24px !important;
        box-shadow: var(--shadow-lg) !important;
        padding: 60px 40px !important;
        background-color: var(--bg-card) !important;
        border: 1px solid var(--border) !important;
        flex: none !important;
        height: auto !important;
        align-self: center !important;
    }
}

/* --- Small Screen Optimizations for LINE LIFF --- */

/* Standard mobile (≤ 480px) — uniform 16px padding system */
@media (max-width: 480px) {
    .search-section {
        padding: 0 16px;
    }

    .categories-container-new {
        margin: 0 16px 10px 16px;
    }

    .carousel-container {
        margin: 10px 16px;
    }

    .flashsale-header-bar {
        margin: 0 16px 10px 16px;
    }

    .products-container {
        padding: 0 16px;
    }

    .cart-items-list {
        padding: 16px;
    }

    .orders-list {
        padding: 16px;
    }
}

/* Tiny screens (iPhone SE, small Android, LINE LIFF webview) */
@media (max-width: 380px) {
    .app-header {
        padding: 8px 12px;
    }

    .brand-name {
        font-size: 13px;
    }

    .brand-section img {
        height: 24px !important;
    }

    .header-actions {
        gap: 4px;
    }

    .btn-sync {
        width: 28px;
        height: 28px;
    }

    .header-user-img {
        width: 28px;
        height: 28px;
    }

    .search-section {
        padding: 0 12px;
    }

    .search-input {
        font-size: 12px;
        padding: 8px 14px 8px 36px;
    }

    .search-icon {
        left: 12px;
        width: 16px;
        height: 16px;
    }

    .carousel-container {
        margin: 8px 12px;
    }

    .slide-content {
        padding: 12px 16px;
        min-height: 88px;
    }

    .slide-text h3 {
        font-size: 14px;
    }

    .slide-text p {
        font-size: 10px;
    }

    .slide-icon {
        font-size: 30px;
    }

    .categories-container-new {
        margin: 0 12px 10px 12px;
    }

    /* Horizontal scrollable category grid on small screens */
    .category-grid {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 10px;
        padding: 4px 2px 8px 2px;
        margin-top: 6px;
    }

    .category-grid-item {
        flex: 0 0 auto;
        min-width: 60px;
        scroll-snap-align: start;
    }

    .category-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .category-grid-label {
        font-size: 10px;
    }

    .flashsale-header-bar {
        margin: 0 12px 8px 12px;
        padding: 8px 12px;
    }

    .flashsale-title {
        font-size: 11px;
        gap: 4px;
    }

    .flashsale-status {
        font-size: 9px;
    }

    .products-container {
        padding: 0 12px;
    }

    .products-grid {
        gap: 8px;
    }

    .product-info {
        padding: 8px;
    }

    .product-category {
        font-size: 9px;
    }

    .product-name {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .product-price {
        font-size: 13px;
    }

    .section-title {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .bottom-nav {
        height: calc(58px + env(safe-area-inset-bottom, 0px));
        padding: 0 2px calc(2px + env(safe-area-inset-bottom, 0px)) 2px;
    }

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

    .nav-item span {
        font-size: 9px;
    }

    .nav-item.active::after {
        width: 20px;
        height: 2.5px;
    }

    .cart-items-list {
        padding: 12px;
    }

    .orders-list {
        padding: 12px;
    }
}

/* Very tiny screens (320px width — iPhone SE 1st gen) */
@media (max-width: 340px) {
    .app-header {
        padding: 6px 10px;
    }

    .brand-name {
        font-size: 12px;
        letter-spacing: -0.5px;
    }

    .brand-section img {
        height: 22px !important;
    }

    .brand-section {
        gap: 4px;
    }

    .header-actions {
        gap: 3px;
    }

    .btn-sync {
        width: 26px;
        height: 26px;
    }

    .header-user-img {
        width: 26px;
        height: 26px;
    }

    .search-section {
        padding: 0 10px;
    }

    .search-input {
        font-size: 11px;
        padding: 7px 12px 7px 32px;
    }

    .carousel-container {
        margin: 6px 10px;
    }

    .slide-content {
        padding: 10px 14px;
        min-height: 80px;
    }

    .slide-text h3 {
        font-size: 12px;
    }

    .slide-text p {
        font-size: 9px;
    }

    .slide-icon {
        font-size: 24px;
        margin-left: 8px;
    }

    .categories-container-new {
        margin: 0 10px 8px 10px;
    }

    .category-icon-wrapper {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .category-grid-label {
        font-size: 9px;
    }

    .flashsale-header-bar {
        margin: 0 10px 8px 10px;
        padding: 6px 10px;
    }

    .flashsale-title {
        font-size: 10px;
    }

    .countdown-timer {
        font-size: 10px;
        padding: 2px 4px;
    }

    .products-container {
        padding: 0 10px;
    }

    .products-grid {
        gap: 6px;
    }

    .product-info {
        padding: 6px;
    }

    .product-name {
        font-size: 10px;
    }

    .product-price {
        font-size: 12px;
    }

    .product-category {
        font-size: 8px;
        margin-bottom: 2px;
    }

    .btn-add-cart-mini {
        width: 24px;
        height: 24px;
    }

    .btn-add-cart-mini svg {
        width: 12px;
        height: 12px;
    }

    .section-title {
        font-size: 13px;
    }

    .bottom-nav {
        height: calc(54px + env(safe-area-inset-bottom, 0px));
    }

    .nav-item svg {
        width: 16px;
        height: 16px;
    }

    .nav-item span {
        font-size: 8px;
    }

    .cart-items-list {
        padding: 10px;
    }

    .orders-list {
        padding: 10px;
    }
}

/* Smooth scrolling for all screens */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Orders Filter Pills Styles */
.orders-filter-container {
    padding: 8px 20px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 8px;
    user-select: none;
    align-items: center;
    min-height: 48px;
    box-sizing: border-box;
    flex-shrink: 0;
}
.orders-filter-container::-webkit-scrollbar {
    display: none;
}
.order-filter-pill {
    padding: 6px 14px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}
.order-filter-pill:hover {
    background-color: var(--bg-secondary);
    color: var(--primary);
}
.order-filter-pill.active {
    background: linear-gradient(135deg, var(--line-green-light) 0%, rgba(6, 199, 85, 0.15) 100%) !important;
    border-color: var(--line-green) !important;
    color: var(--line-green-dark) !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(6, 199, 85, 0.08);
}

/* ==========================================
   ADMIN CONSOLE STYLES (DASHBOARD & FORMS)
   ========================================== */

#screen-dashboard {
    padding: 20px 20px calc(80px + env(safe-area-inset-bottom, 0px)) 20px;
}

#screen-products {
    padding: 0 0 calc(80px + env(safe-area-inset-bottom, 0px)) 0;
}

#screen-orders {
    padding: 0 0 calc(80px + env(safe-area-inset-bottom, 0px)) 0;
}

#screen-profile {
    padding: 0 20px calc(80px + env(safe-area-inset-bottom, 0px)) 20px;
}

/* Stats Cards styling */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

/* Modal Form Styles */
.modal-body form label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary);
}

.modal-body form input[type="text"],
.modal-body form input[type="number"],
.modal-body form input[type="url"],
.modal-body form select,
.modal-body form textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    font-family: var(--font-sans);
    color: var(--primary);
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.modal-body form input:focus,
.modal-body form select:focus,
.modal-body form textarea:focus {
    border-color: var(--line-green);
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(6, 199, 85, 0.08);
}

.modal-body form textarea {
    resize: none;
    height: 70px;
}

/* Console Terminal styles */
#admin-log-console {
    background-color: #0f172a !important;
    border: 1px solid #1e293b;
    color: #e2e8f0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    padding: 12px;
    border-radius: var(--radius-sm);
    height: 180px;
    overflow-y: auto;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
}

#admin-log-console div::-webkit-scrollbar {
    width: 4px;
}

#admin-log-console div::-webkit-scrollbar-thumb {
    background-color: #334155;
    border-radius: 2px;
}

/* Category grid quick actions */
.btn-add-product:hover {
    background-color: var(--line-green-dark) !important;
    transform: translateY(-1px);
}

.btn-add-product:active {
    transform: translateY(0);
}

/* Admin receipts panel styling */
.admin-slip-preview {
    max-width: 100%;
    max-height: 240px;
    border-radius: var(--radius-sm);
    margin: 8px 0;
    border: 1px solid var(--border);
}

/* Desktop Sidebar adaptation */
@media (min-width: 769px) {
    .app-container {
        flex-direction: row;
        max-width: 100%;
        margin: 0 auto;
        border-radius: 0;
        box-shadow: none;
    }

    #app-header {
        position: absolute;
        top: 0;
        right: 0;
        left: 240px;
        height: 60px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
    }

    .bottom-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 240px;
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px 10px;
        background-color: #0f172a; /* Sleek Dark Sidebar */
        border-right: 1px solid #1e293b;
        border-top: none;
        z-index: 20;
        gap: 8px;
        box-shadow: var(--shadow-lg);
    }

    .bottom-nav .nav-item {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        padding: 12px 16px;
        gap: 12px;
        color: #94a3b8;
        border-radius: var(--radius-md);
        height: 48px;
    }

    .bottom-nav .nav-item svg {
        width: 20px;
        height: 20px;
        stroke: #94a3b8;
        margin: 0;
    }

    .bottom-nav .nav-item span {
        font-size: 13.5px;
        font-weight: 600;
        margin-top: 0;
    }

    .bottom-nav .nav-item:hover {
        background-color: rgba(255,255,255,0.03);
        color: white;
    }

    .bottom-nav .nav-item:hover svg {
        stroke: white;
    }

    .bottom-nav .nav-item.active {
        background: var(--line-green) !important;
        color: white !important;
        box-shadow: 0 4px 14px rgba(6, 199, 85, 0.3);
    }

    .bottom-nav .nav-item.active svg {
        stroke: white !important;
    }

    .screen {
        margin-left: 240px;
        padding-top: 80px !important;
        padding-bottom: 40px !important;
    }
}

