   :root {
        --primary-blue: #5b58ff; 
        --bg-color: #f5f6fa;
        --card-bg: #ffffff;
        --text-main: #1a1a1a;
        --text-muted: #888888;
        --border-radius: 12px;
        --cyclone-bg: #ffffff;
        --border-color: #eee;
        --toast-bg: #333;
        --footer-bg: rgba(255, 255, 255, 0.85);
        --active-shipping-bg: #e6e5ff;
    }

    [data-theme="dark"] {
        --primary-blue: #706dff;
        --bg-color: #121212;
        --card-bg: #1e1e1e;
        --text-main: #f5f5f5;
        --text-muted: #aaaaaa;
        --cyclone-bg: #1e1e1e;
        --border-color: #333;
        --toast-bg: #5b58ff;
        --footer-bg: rgba(30, 30, 30, 0.85);
        --active-shipping-bg: rgba(91, 88, 255, 0.2);
    }

    * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }
    
    body {
        background-color: #e0e0e0; display: flex; justify-content: center;
        height: 100vh; height: 100dvh; overflow: hidden; transition: background-color 0.3s;
        -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; 
    }

    .app-container {
        width: 100%; max-width: 414px; background-color: var(--bg-color);
        height: 100vh; height: 100dvh; display: flex; flex-direction: column;
        box-shadow: 0 0 20px rgba(0,0,0,0.1); position: relative; transition: background-color 0.3s;
    }

    .header {
        background: var(--card-bg); padding: 15px 20px; flex-shrink: 0; z-index: 100;
        box-shadow: 0 2px 5px rgba(0,0,0,0.02); transition: background-color 0.3s;
        border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center;
    }
    
    .logo { color: var(--primary-blue); font-size: 24px; cursor: pointer; }
    .top-icons { display: flex; gap: 18px; align-items: center; }
    .top-icons i, .top-icons svg { font-size: 20px; color: var(--text-main); cursor: pointer; transition: color 0.2s; position: relative;}
    .top-icons i:hover, .top-icons svg:hover { color: var(--primary-blue); }
    
    .badge {
        position: absolute; top: -6px; right: -8px; background: #ff4757; color: white;
        font-size: 10px; font-weight: bold; padding: 2px 5px; border-radius: 10px; display: none; z-index: 2;
    }

    .content {
        flex-grow: 1; overflow-y: auto; padding: 15px; padding-bottom: 20px;
        -ms-overflow-style: none; scrollbar-width: none; scroll-behavior: smooth;
    }
    .content::-webkit-scrollbar { display: none; }
    .view-section { flex-grow: 1; overflow: hidden; display: none; flex-direction: column; height: 0; }
    .view-section.active { display: flex; }

    .search-bar { width: 100%; margin-bottom: 20px; }
    .search-input { width: 100%; background: var(--card-bg); color: var(--text-main); border: 1px solid var(--border-color); border-radius: 25px; padding: 12px 20px; outline: none; font-size: 14px; }

    .hero-carousel { position: relative; border-radius: var(--border-radius); overflow: hidden; margin-bottom: 20px; height: 170px; background: var(--card-bg); }
    .hero-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s ease; display: flex; align-items: center; justify-content: space-between; padding: 25px 20px; color: white; }
    .hero-slide.active { opacity: 1; z-index: 1; }
    .slide-text { flex: 1; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
    .slide-text h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; opacity: 0; transform: translateY(15px); }
    .slide-text p { font-size: 13px; font-weight: 500; margin-bottom: 15px; opacity: 0; transform: translateY(15px); }
    .slide-text button { border: none; padding: 10px 20px; border-radius: 20px; font-weight: 600; cursor: pointer; opacity: 0; transform: translateY(15px); transition: transform 0.1s; font-family: 'Inter', sans-serif;}
    .slide-text button:active { transform: scale(0.95); }
    .slide-img-wrap { width: 45%; height: 100%; position: relative; z-index: 2; display: flex; align-items: center; justify-content: flex-end; }
    .slide-img-wrap img { max-height: 120px; max-width: 100%; object-fit: contain; }
    
    .hero-slide.active h2 { animation: slideUpFade 0.5s forwards 0.1s; }
    .hero-slide.active p { animation: slideUpFade 0.5s forwards 0.2s; }
    .hero-slide.active button { animation: slideUpFade 0.5s forwards 0.3s; }
    
    @keyframes slideUpFade {
        to { opacity: 1; transform: translateY(0); }
    }

    .hero-dots { position: absolute; bottom: 12px; width: 100%; display: flex; justify-content: center; align-items: center; gap: 8px; z-index: 3; }
    .hero-dot { width: 8px; height: 8px; background: white; border-radius: 50%; cursor: pointer; transition: all 0.2s; box-sizing: border-box; opacity: 0.8;}
    .hero-dot.active { opacity: 1; width: 10px; height: 10px; background: #5b58ff; border: 2px solid white; box-shadow: 0 0 0 2px #5b58ff; }

    .categories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; margin-bottom: 25px; }
    .category-item { background: var(--card-bg); padding: 15px 5px; border-radius: var(--border-radius); font-size: 11px; font-weight: 500; color: var(--text-main); cursor: pointer; border: 1px solid var(--border-color); }
    .category-item:active { transform: scale(0.95); }
    .category-item i { font-size: 22px; color: var(--primary-blue); margin-bottom: 8px; }
    .category-item.sale-item { background: var(--active-shipping-bg); border-color: transparent; color: var(--primary-blue); }

    .section-title { display: flex; justify-content: space-between; align-items: center; margin: 25px 0 15px; font-weight: 600; font-size: 16px; color: var(--text-main); }
    .view-all { background: var(--card-bg); color: var(--text-main); font-size: 12px; font-weight: 500; padding: 6px 14px; border-radius: 20px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
    .view-all:active { transform: scale(0.95); }
    .timer-text { color: var(--text-muted); font-size: 12px; }

    .horizontal-scroll { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 5px; cursor: grab; }
    .horizontal-scroll:active { cursor: grabbing; }
    .horizontal-scroll::-webkit-scrollbar { display: none; }
    .scroll-item { flex-shrink: 0; transition: opacity 0.2s; }
    .scroll-item:active { opacity: 0.8; }

    .cyclone-card { width: 140px; background: var(--cyclone-bg); padding: 12px; border-radius: var(--border-radius); pointer-events: none; border: 1px solid var(--border-color); }
    .cyclone-card * { pointer-events: auto; }
    .cyclone-img { width: 100%; height: 90px; border-radius: 8px; margin-bottom: 10px; mix-blend-mode: multiply; }
    [data-theme="dark"] .cyclone-img { mix-blend-mode: normal; }
    .cyclone-title { font-size: 14px; font-weight: 600; color: var(--text-main); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .price { font-weight: 700; font-size: 15px; color: var(--text-main); }
    .old-price { text-decoration: line-through; color: var(--text-muted); font-size: 12px; margin-left: 4px; }
    .sold-text { font-size: 11px; color: var(--text-muted); margin: 8px 0 4px; }
    .progress-bar { width: 100%; height: 4px; background: #dfe4ea; border-radius: 2px; overflow: hidden; }
    .progress-fill { height: 100%; background: var(--primary-blue); border-radius: 2px; }

    .product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-card { background: var(--card-bg); border-radius: var(--border-radius); overflow: hidden; border: 1px solid var(--border-color); transition: transform 0.2s, box-shadow 0.2s; }
    .product-card:active { transform: scale(0.98); }
    .img-wrapper { position: relative; width: 100%; height: 130px; background: var(--bg-color); }
    .product-img { width: 100%; height: 100%; }
    .tag { position: absolute; font-size: 11px; padding: 4px 10px; border-radius: 12px; font-weight: 600; }
    .tag.sale { top: 12px; left: 12px; background: #ffb142; color: #fff; }
    .tag.new { top: 12px; left: 12px; background: #00cec9; color: #fff; }
    .tag.timer { bottom: 10px; left: 50%; transform: translateX(-50%); background: #ffb142; color: #1a1a1a; white-space: nowrap; }
	.tag.discount { top: 12px; left: 12px; background: #ff4757; color: #fff; }
    .fav-btn { position: absolute; top: 10px; right: 10px; color: var(--text-muted); background: white; border: none; font-size: 16px; cursor: pointer; width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: center; transition: color 0.2s; }
    .fav-btn.active { color: #ff4757; }
    .product-info { padding: 12px; }
    .product-title { font-size: 14px; font-weight: 500; color: var(--text-main); margin-bottom: 4px; }
    .stars { color: #ffb142; font-size: 10px; margin-bottom: 8px; }
    .price-row { display: flex; justify-content: space-between; align-items: center; }
    .add-btn { background: var(--primary-blue); color: white; border: none; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; transition: transform 0.1s; }
    .add-btn:active { transform: scale(0.9); }

    .list-view { display: flex; flex-direction: column; gap: 10px; }
    .list-card { display: flex; align-items: center; background: var(--card-bg); padding: 10px; border-radius: var(--border-radius); border: 1px solid var(--border-color); cursor: pointer; }
    .list-card:active { background: var(--bg-color); }
    .list-img { width: 60px; height: 60px; border-radius: 8px; margin-right: 15px; }
    .list-info { flex-grow: 1; }
    .list-info .product-title { font-size: 13px; margin-bottom: 2px; }

    .promo-banner { background: linear-gradient(135deg, var(--primary-blue), #8c7ae6); color: white; padding: 20px; border-radius: var(--border-radius); margin: 20px 0; display: flex; align-items: center; gap: 15px; }
    .promo-icon { font-size: 30px; }
    .promo-text h3 { font-size: 16px; margin-bottom: 5px; }
    .promo-text p { font-size: 12px; opacity: 0.9; }

    .featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .featured-card { background: var(--card-bg); border-radius: var(--border-radius); text-align: center; border: 1px solid var(--border-color); overflow: hidden; position: relative; cursor: pointer; }
    .featured-card .img-wrapper { height: 80px; }
    .featured-card .star-badge { position: absolute; top: 6px; left: 6px; background: #ffb142; color: #fff; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; }
    .featured-info { padding: 8px; }
    .featured-title { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .collection-card { width: 120px; height: 160px; border-radius: var(--border-radius); position: relative; background-color: var(--text-muted); overflow: hidden; pointer-events: none; }
    .col-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6); padding: 10px; display: flex; justify-content: space-between; align-items: center; color: white; font-size: 12px; font-weight: 500; }
    .col-count { background: #ff4757; color: white; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; }

    .footer {
        background: var(--footer-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        display: flex; justify-content: space-around; align-items: center; height: 70px; padding: 0 10px; 
        padding-bottom: calc(10px + env(safe-area-inset-bottom)); flex-shrink: 0; z-index: 100;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05); border-top: 1px solid var(--border-color); transition: background-color 0.3s;
    }
    .footer-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); font-size: 11px; cursor: pointer; transition: color 0.2s; position: relative; }
    .footer-item svg { width: 22px; height: 22px; margin-bottom: 4px; stroke-width: 2; }
    .footer-item.active, .footer-item:hover { color: var(--primary-blue); }

    .toast { position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--toast-bg); color: white; padding: 12px 20px; border-radius: 20px; font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 1000; white-space: nowrap; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
    .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
	
	.filter-pill { background: var(--card-bg); color: var(--text-main); padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 500; border: 1px solid var(--border-color); cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 6px; transition: all 0.2s; }
    .filter-pill:active { transform: scale(0.95); }
    .filter-pill.active { background: var(--primary-blue); color: white; border-color: var(--primary-blue); }
    .filter-pill .col-count { background: #ff4757; color: white; border-radius: 12px; padding: 2px 6px; font-size: 10px; font-weight: 700; transition: all 0.2s; }
    .filter-pill.active .col-count { background: white; color: var(--primary-blue); }
	
    /* --- CART, BILLING & WISHLIST PAGE STYLES --- */
    .cart-card, .coupon-card, .billing-card { background: var(--card-bg); border-radius: var(--border-radius); padding: 20px; margin-bottom: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); border: 1px solid var(--border-color); }
    .cart-item { display: flex; align-items: center; gap: 15px; }
.remove-btn { width: 30px; height: 30px; border-radius: 50%; background: #ff4757; color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; transition: transform 0.1s; flex-shrink: 0; }    .remove-btn:active { transform: scale(0.9); }
    .cart-img { width: 50px; height: 50px; border-radius: 8px; border: 1px solid var(--border-color); }
    .cart-info { flex-grow: 1; }
    .cart-info .title { font-size: 14px; font-weight: 600; color: var(--text-main); margin-bottom: 4px; }
    .cart-info .price { font-size: 12px; color: var(--text-muted); }
    
    .qty-pill { display: flex; align-items: center; gap: 10px; background: #d0d9ff; color: #1a1a1a; padding: 6px 12px; border-radius: 20px; font-weight: 600; font-size: 14px; }
    [data-theme="dark"] .qty-pill { background: rgba(91, 88, 255, 0.3); color: white; }
    .qty-btn { cursor: pointer; padding: 0 4px; font-size: 16px; transition: color 0.2s; }
    .qty-btn:active { color: var(--primary-blue); }
    .cart-divider { height: 1px; border-top: 1px dashed var(--border-color); margin: 20px 0; }
    
    .coupon-card h3, .billing-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 5px; color: var(--text-main); }
    .coupon-card p { font-size: 12px; color: var(--text-muted); margin-bottom: 15px; }
    .coupon-input-group { display: flex; border: 1px solid var(--border-color); border-radius: 25px; overflow: hidden; background: var(--bg-color);}
    .coupon-input-group input { flex-grow: 1; border: none; padding: 12px 15px; outline: none; background: transparent; color: var(--text-main); font-size: 14px;}
    .coupon-input-group button { background: var(--primary-blue); color: white; border: none; padding: 0 25px; font-weight: 600; cursor: pointer; }
    
    .checkout-footer { background: var(--card-bg); display: flex; align-items: center; justify-content: space-between; border-radius: 0; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); padding: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-color); flex-shrink: 0;}
    .checkout-footer .total-price { font-size: 22px; font-weight: 700; color: var(--text-main); }
    
    .checkout-btn { background: var(--primary-blue); color: white; border: none; padding: 12px 20px; border-radius: 25px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14px; transition: opacity 0.3s;}
    .checkout-btn:disabled { background: var(--text-muted); cursor: not-allowed; opacity: 0.5; }
	
	.confim-btn { background: var(--primary-blue); color: white; border: none; padding: 12px 20px; border-radius: 25px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14px; transition: opacity 0.3s;}
    
	

    .address-option { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: var(--border-radius); background: transparent; cursor: pointer; transition: background 0.3s, border-color 0.3s; border: 1px solid var(--border-color); margin-bottom: 10px;}
    .address-option.active { background: var(--active-shipping-bg); border-color: var(--primary-blue); }
    .address-details { display: flex; flex-direction: column; gap: 4px; flex-grow: 1; }
    .address-name { font-weight: 600; font-size: 14px; color: var(--text-main);}
    .address-mobile { font-size: 12px; color: var(--text-muted); }
    .address-text { font-size: 12px; color: var(--text-muted); line-height: 1.4;}
    .address-delete { color: #ff4757; background: none; border: none; font-size: 14px; padding: 5px; cursor: pointer; opacity: 0.8;}
    .address-delete:hover { opacity: 1; }

    .shipping-option { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 20px; background: transparent; cursor: pointer; transition: background 0.3s; border: 1px solid transparent; }
    .shipping-option.active { background: var(--active-shipping-bg); border-color: var(--border-color);}
    .shipping-option .opt-title { font-weight: 500; font-size: 14px; color: var(--text-muted); }
    .shipping-option .opt-desc { font-size: 12px; color: var(--text-muted); margin-left: auto; }
    .shipping-option.active .opt-title, .shipping-option.active .opt-desc { color: var(--primary-blue); }

    /* --- PROFILE PAGE STYLES --- */
    .profile-header-bg { background: var(--primary-blue); padding: 20px 20px 40px; display: flex; align-items: center; gap: 15px; color: white; border-radius: 0 0 15px 15px;}
    .profile-avatar-wrap { position: relative; }
    .profile-avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 2px solid white; }
    .edit-avatar-btn { position: absolute; bottom: 0; right: 0; background: white; color: var(--text-main); width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
    .profile-header-info h2 { font-size: 18px; font-weight: 600; margin-top: 2px;}
    .profile-header-info p { font-size: 13px; opacity: 0.9; }

    .profile-card { background: var(--card-bg); margin: -20px 20px 20px; border-radius: var(--border-radius); padding: 15px 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); z-index: 10; position: relative; border: 1px solid var(--border-color);}
    .profile-row { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px dashed var(--border-color); }
    .profile-row:last-child { border-bottom: none; }
    .profile-label-group { display: flex; align-items: center; gap: 15px;}
    .profile-icon { width: 32px; height: 32px; background: var(--primary-blue); color: white; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
    .profile-label { font-weight: 600; font-size: 14px; color: var(--text-main); }
    .profile-value { font-size: 13px; color: var(--text-muted); text-align: right; }
    .status-pill { background: var(--primary-blue); color: white; padding: 5px 12px; border-radius: 15px; font-size: 11px; display: inline-flex; align-items: center; gap: 5px; cursor: pointer;}
    .btn-primary { width: 100%; background: var(--primary-blue); color: white; border: none; padding: 14px; border-radius: 25px; font-weight: 600; margin-top: 10px; cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px;}
    
    .edit-input { width: 100%; padding: 10px 15px; border-radius: 20px; border: 1px solid var(--border-color); background: var(--bg-color); color: var(--text-main); outline: none; font-size: 14px; font-family: inherit;}
    textarea.edit-input { border-radius: 12px; resize: none; }
	
	.footer-item#nav-wishlist.has-items { color: #ff4757 !important; }
    .footer-item#nav-wishlist.has-items svg { fill: #ff4757; stroke: #ff4757; }
	
	.wishlist-badge {
        position: absolute; top: -6px; right: -8px; background: #b2bec3; color: white;
        font-size: 10px; font-weight: bold; padding: 2px 5px; border-radius: 10px; display: none; z-index: 2;
    }
    [data-theme="dark"] .wishlist-badge { background: #636e72; color: #f5f5f5; }
	
	.variant-group { margin-bottom: 15px; }
    .variant-title { font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
    .variant-options { display: flex; gap: 10px; }
    .variant-pill { padding: 6px 12px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 12px; font-weight: 500; cursor: pointer; color: var(--text-muted); transition: all 0.2s; }
    .variant-pill.active { border-color: var(--primary-blue); color: var(--primary-blue); background: var(--active-shipping-bg); }
    .color-circle { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 1px var(--border-color); transition: all 0.2s; }
    .color-circle.active { box-shadow: 0 0 0 2px var(--primary-blue), 0 0 0 4px var(--bg-color) inset; }
    .sort-select { padding: 6px 12px; border-radius: 15px; border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-main); font-size: 12px; outline: none; }
	
	.sort-option { cursor: pointer; padding: 15px 0; border-bottom: 1px solid var(--border-color); color: var(--text-main); font-size: 14px; transition: color 0.2s; }
    .sort-option:last-child { border-bottom: none; }
    .sort-option.active { color: var(--primary-blue); font-weight: 600; }	
	@keyframes slideUpModal {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.tag.oos { top: 12px; left: 12px; background: #ff4757; color: #fff; z-index: 2; }
.product-card.out-of-stock .product-img { opacity: 0.4; filter: grayscale(100%); }