:root {
    --bg-dark: #0F0F0F;
    --accent-red: #FF4D4D;
    --text-light: #FFFFFF;
    --bg-card: #1A1A1A;
    --text-muted: #AAAAAA;
    --bg-gray: #F5F5F5;
    --bg-input: #EEEEEE;
    --text-dark: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#app-container {
    width: 100%;
    max-width: 390px;
    height: 100vh;
    max-height: 844px;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
    color: var(--text-light);
    box-shadow: 0 0 50px rgba(255, 77, 77, 0.15);
    border-radius: 40px;
    border: 8px solid #222;
}

@media (max-width: 400px), (max-height: 850px) {
    #app-container {
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(20px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 90px;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.screen.fade-out {
    opacity: 0;
    transform: translateX(-20px);
}

.screen::-webkit-scrollbar { display: none; }
.screen { -ms-overflow-style: none; scrollbar-width: none; }

/* SPLASH SCREEN */
#splash-screen {
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transform: translateX(0);
}
#splash-screen::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255,77,77,0.15) 0%, transparent 70%);
    top: -50px;
    left: 50px;
}
.logo-box {
    width: 120px;
    height: 120px;
    background-color: var(--accent-red);
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 72px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(255, 77, 77, 0.4);
    animation: pulse 2s infinite ease-in-out;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.brand-title {
    font-size: 42px;
    letter-spacing: 4px;
    font-weight: 700;
    margin-bottom: 5px;
}
.brand-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    letter-spacing: 2px;
    margin-bottom: 60px;
}
.loader-bar {
    width: 150px;
    height: 4px;
    background-color: #2A2A2A;
    border-radius: 2px;
    overflow: hidden;
}
.loader-fill {
    width: 0%;
    height: 100%;
    background-color: var(--accent-red);
    animation: loading 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes loading {
    100% { width: 100%; }
}

/* HEADER */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    position: sticky;
    top: 0;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10;
}
.main-header h2 {
    font-size: 24px;
    letter-spacing: 2px;
}
.cart-icon {
    font-size: 24px;
    position: relative;
    cursor: pointer;
}
.cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--accent-red);
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cart-badge.visible {
    opacity: 1;
    transform: scale(1);
}

/* HOME SCREEN */
.hero-banner {
    margin: 10px 24px 24px;
    height: 180px;
    background: linear-gradient(135deg, #1A1A1A 0%, #2A2A2A 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
.hero-banner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background-color: var(--accent-red);
}
.hero-content {
    padding-left: 20px;
    z-index: 2;
}
.hero-label {
    color: var(--accent-red);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
}
.hero-content h3 {
    font-size: 26px;
    line-height: 1.2;
    margin: 8px 0 16px;
}
.cta-btn {
    background-color: var(--accent-red);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 18px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}
.hero-image {
    font-size: 72px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%) rotate(-15deg);
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5));
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    margin-bottom: 16px;
}
.section-title h3 {
    font-size: 20px;
}
.see-all {
    color: var(--accent-red);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    padding: 0 24px 24px;
    gap: 16px;
    scroll-snap-type: x mandatory;
}
.horizontal-scroll::-webkit-scrollbar { display: none; }

.product-card {
    min-width: 160px;
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 10px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.product-card:active { transform: scale(0.96); }

.card-img-bg {
    height: 110px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 52px;
    margin-bottom: 12px;
    background: #222;
}
.card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-price {
    color: var(--accent-red);
    font-weight: 700;
    font-size: 15px;
}
.add-btn {
    width: 28px;
    height: 28px;
    border-radius: 14px;
    background-color: var(--text-light);
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

/* BOTTOM NAV */
#bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    z-index: 50;
    transition: transform 0.3s;
}
#bottom-nav.hidden {
    transform: translateY(100%);
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 10px;
    cursor: pointer;
    transition: color 0.2s;
}
.nav-item.active {
    color: var(--text-light);
}
.nav-icon {
    font-size: 22px;
    filter: grayscale(100%) opacity(0.5);
    transition: all 0.2s;
}
.nav-item.active .nav-icon {
    filter: grayscale(0%) opacity(1);
    transform: translateY(-2px);
}
.nav-item.active::after {
    content: '';
    width: 40px;
    height: 3px;
    background: var(--accent-red);
    position: absolute;
    bottom: -10px;
    border-radius: 2px;
}

/* LIST SCREEN */
.back-btn {
    font-size: 24px;
    cursor: pointer;
    font-weight: bold;
}
.search-bar {
    padding: 0 24px;
    margin-bottom: 20px;
}
.search-bar input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 22px;
    border: none;
    background-color: var(--bg-card);
    color: white;
    font-size: 14px;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.search-bar input::placeholder { color: var(--text-muted); }

.filters {
    display: flex;
    padding: 0 24px;
    gap: 10px;
    overflow-x: auto;
    margin-bottom: 24px;
}
.filters::-webkit-scrollbar { display: none; }
.filter-btn {
    padding: 8px 16px;
    border-radius: 16px;
    border: none;
    background-color: #222;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn.active {
    background-color: var(--accent-red);
    color: white;
}

.product-list {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.list-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.list-img-bg {
    width: 76px;
    height: 76px;
    border-radius: 12px;
    background-color: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
}
.list-info {
    flex: 1;
}
.list-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
}
.list-brand {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 4px;
}
.list-stars {
    color: var(--accent-red);
    font-size: 11px;
    margin-bottom: 4px;
}
.list-price {
    font-weight: 700;
    color: var(--accent-red);
    font-size: 14px;
}
.list-chevron {
    color: #666;
    font-size: 28px;
    font-weight: bold;
    padding-right: 10px;
}

/* DETAIL SCREEN */
#detail-screen {
    background-color: #222;
    padding-bottom: 0;
}
.detail-header {
    position: absolute;
    top: 24px;
    left: 24px;
    right: 24px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}
.back-btn-circle, .heart-btn-circle {
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
}
.heart-btn-circle:active {
    color: var(--accent-red);
    transform: scale(0.9);
}

.product-image-zone {
    height: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: radial-gradient(circle, #333 0%, #111 100%);
}
.promo-badge {
    position: absolute;
    top: 80px;
    right: 24px;
    background-color: var(--accent-red);
    padding: 6px 12px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(255,77,77,0.4);
}
.big-emoji {
    font-size: 140px;
    filter: drop-shadow(0 20px 20px rgba(0,0,0,0.5));
    animation: float 4s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.product-sheet {
    background-color: var(--bg-dark);
    height: 65%;
    border-radius: 32px 32px 0 0;
    padding: 24px;
    position: absolute;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}
.drag-handle {
    width: 50px;
    height: 4px;
    background-color: #444;
    border-radius: 2px;
    margin: 0 auto 20px;
}
.product-brand {
    color: var(--accent-red);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 4px;
}
.product-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.product-title-row h2 {
    font-size: 28px;
    max-width: 60%;
    line-height: 1.1;
}
.price-col {
    text-align: right;
}
.old-price {
    color: #666;
    text-decoration: line-through;
    font-size: 14px;
    display: block;
}
.new-price {
    color: var(--accent-red);
    font-size: 24px;
    font-weight: 700;
}
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}
.stars {
    color: var(--accent-red);
    font-size: 16px;
}
.reviews {
    color: var(--text-muted);
    font-size: 13px;
}

.product-sheet h3 {
    font-size: 16px;
    margin-bottom: 8px;
}
.product-desc {
    color: #888;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.size-selector {
    display: flex;
    gap: 10px;
    margin-bottom: auto;
    overflow-x: auto;
    padding-bottom: 10px;
}
.size-selector::-webkit-scrollbar { display: none; }
.size-box {
    min-width: 44px;
    height: 44px;
    border: 1.5px solid #444;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.size-box.active {
    background-color: white;
    color: black;
    border-color: white;
}

.add-to-cart-btn {
    width: 100%;
    padding: 18px;
    background-color: white;
    color: black;
    border: none;
    border-radius: 28px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 20px;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 10px 20px rgba(255,255,255,0.1);
}
.add-to-cart-btn:active {
    transform: scale(0.98);
}

/* TOAST */
.toast {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: var(--accent-red);
    color: white;
    padding: 12px 24px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(255,77,77,0.4);
}
.toast.show {
    transform: translateX(-50%) translateY(0);
}
