:root {
    --primary-color: #9f2089;
    --primary-light: #eef0fa;
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    --bg-light: #f8f8ff;
    --border-color: #e5e5e5;
    --pink-color: #f43397;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    background-color: #e5e5e5;
    overflow-x: hidden;
}

body {
    background-color: #ffffff;
    color: var(--text-dark);
    padding-bottom: 70px; /* Space for bottom nav */
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    overflow-x: hidden;
    position: relative;
}

/* Typography & Utils */
button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

/* Promo Banner */
.promo-banner {
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    position: relative;
}

.promo-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.promo-icon {
    position: relative;
    width: 32px;
    height: 32px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    font-size: 14px;
}
.promo-icon .m-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: #f6a11e;
    color: white;
    font-size: 8px;
    font-weight: bold;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-text {
    display: flex;
    flex-direction: column;
}
.promo-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
}
.promo-subtitle {
    font-size: 11px;
    color: var(--text-medium);
    margin-top: 2px;
}

.download-btn {
    background-color: var(--primary-color);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
}

.close-btn {
    color: var(--text-medium);
    font-size: 14px;
    padding: 4px;
}

/* Main Header */
.header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-btn {
    font-size: 20px;
    color: var(--text-dark);
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    gap: 16px;
}

.icon-btn {
    font-size: 20px;
}

.search-container {
    width: 100%;
}

.search-bar {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    background-color: #ffffff;
}

.search-icon {
    color: var(--text-light);
    margin-right: 10px;
    font-size: 16px;
}

.search-bar input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: var(--text-dark);
}
.search-bar input::placeholder {
    color: var(--text-light);
}

/* Location Banner */
.location-banner {
    display: flex;
    align-items: center;
    background-color: #f3f4f8;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.location-icon {
    color: #3b82f6;
    margin-right: 8px;
    font-size: 16px;
}

.arrow-icon {
    color: var(--text-light);
    margin-left: auto;
    font-size: 12px;
    letter-spacing: -2px;
}

/* Categories Carousel */
.categories-scroll {
    display: flex;
    overflow-x: auto;
    padding: 20px 16px;
    gap: 20px;
    border-bottom: 8px solid #f2f2f2;
}
.categories-scroll::-webkit-scrollbar {
    display: none; /* Hide scrollbar */
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    gap: 8px;
}

.category-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #f5f5f5;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-grid-bg {
    background-color: #ffebf3;
}

.grid-icon {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 28px;
    height: 28px;
}
.grid-icon span {
    background-color: var(--pink-color);
    border-radius: 2px;
}

.category-name {
    font-size: 12px;
    color: var(--text-dark);
    text-align: center;
    white-space: nowrap;
}

/* Main Content Area */
.main-content {
    padding-top: 16px;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    padding: 0 16px;
    margin-bottom: 16px;
    color: var(--text-dark);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.filter-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 0;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
    border-right: 1px solid var(--border-color);
}
.filter-item:last-child {
    border-right: none;
}
.filter-item i {
    color: var(--text-medium);
    font-size: 12px;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background-color: var(--border-color); /* Creates 1px border effect */
}

.product-card {
    background-color: white;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 120%; /* 1/1.2 Aspect Ratio */
    background-color: #f9f9f9;
    overflow: hidden;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: var(--text-medium);
    font-size: 16px;
}

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

.mall-badge {
    align-self: flex-start;
    background-color: var(--primary-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.mall-badge i {
    font-size: 8px;
}

.product-title {
    font-size: 13px;
    color: var(--text-medium);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-section {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

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

.discount {
    font-size: 12px;
    font-weight: 600;
    color: #038d63; /* Green */
}

.delivery-badge {
    align-self: flex-start;
    background-color: #f1f1f1;
    color: var(--text-dark);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    margin-top: 4px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background-color: white;
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-medium);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
}

.nav-item i {
    font-size: 20px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active i {
    color: var(--primary-color);
}

.nav-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}
.nav-icon-container i {
    font-size: 20px;
}
.nav-icon-container .nav-m {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: var(--primary-color);
    color: white;
    font-size: 8px;
    font-weight: bold;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid white;
}

.nav-icon-m {
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--text-medium);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

/* Flash Sale Section */
.flash-sale-container {
    margin: 12px 14px 16px;
    background: linear-gradient(135deg, #fff0f6 0%, #ffe3ed 50%, #fdf2f8 100%);
    border: 2px solid #f43397;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 6px 18px rgba(244, 51, 151, 0.15);
    position: relative;
    overflow: hidden;
}

.flash-sale-banner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 1px dashed rgba(244, 51, 151, 0.3);
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.flash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.bolt-circle {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ff1e56, #f43397);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 3px 8px rgba(244, 51, 151, 0.4);
}

.bolt-anim {
    animation: boltPulse 1s infinite alternate;
}

@keyframes boltPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px #fffa8b); }
    100% { transform: scale(1.2); filter: drop-shadow(0 0 8px #fffa8b); }
}

.flash-title-text h3 {
    font-size: 16px;
    font-weight: 800;
    color: #9f2089;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.flash-title-text span {
    font-size: 11px;
    font-weight: 600;
    color: #d10061;
}

.flash-timer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.timer-label {
    font-size: 10px;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.countdown-box {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #111;
    color: #facc15;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.timer-sep {
    animation: blinkSep 1s infinite;
}

@keyframes blinkSep {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

.flash-strip-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(244, 51, 151, 0.1);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
}

.strip-badge {
    color: #e60023;
    font-weight: 700;
}

.strip-info {
    color: #555;
    font-weight: 500;
}

/* Flash Deals Horizontal Scroll Grid */
.flash-deals-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.flash-deals-scroll::-webkit-scrollbar {
    display: none;
}

.flash-deal-card {
    min-width: 120px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #ffe3ed;
    cursor: pointer;
    transition: transform 0.2s;
}

.flash-deal-card:hover {
    transform: translateY(-2px);
}

.flash-img-box {
    position: relative;
    width: 100%;
    height: 120px;
    background: #f8f8ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flash-img-box img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.discount-pill {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #ff1e56;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.flash-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
}

.flash-price {
    font-size: 14px;
    font-weight: 800;
    color: #111;
}

.flash-mrp {
    font-size: 11px;
    text-decoration: line-through;
    color: #888;
    margin-bottom: 6px;
}

.progress-bar-stock {
    width: 100%;
    height: 5px;
    background: #fed7e2;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.stock-fill {
    height: 100%;
    background: linear-gradient(90deg, #f43397, #ff1e56);
    border-radius: 3px;
}

.stock-text {
    font-size: 9px;
    font-weight: 700;
    color: #e60023;
}

/* Professional App Checkout Header & Progress Bar */
.app-checkout-header {
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-back-pill {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1f2937;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.header-back-pill:hover {
    background-color: #e5e7eb;
    color: #111827;
    transform: scale(1.03);
}

.header-title-wrap {
    display: flex;
    flex-direction: column;
}

.checkout-page-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    letter-spacing: -0.2px;
    margin: 0;
}

.checkout-step-subtitle {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    margin-top: 2px;
}

.secure-badge-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #ecfdf5;
    color: #059669;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid #a7f3d0;
}

/* 3-Step Checkout Progress Bar */
.app-progress-bar {
    background: #ffffff;
    padding: 14px 28px 16px;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
}

.progress-track-bg {
    position: absolute;
    top: 26px;
    left: 48px;
    right: 48px;
    height: 3px;
    background-color: #e5e7eb;
    z-index: 1;
    border-radius: 2px;
}

.progress-track-fill {
    height: 100%;
    background: linear-gradient(90deg, #9f2089, #f43397);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-steps-row {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    padding: 0 6px;
}

.step-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.step-item.active .step-circle {
    background-color: #9f2089;
    color: #ffffff;
    border-color: #9f2089;
    box-shadow: 0 0 0 3px rgba(159, 32, 137, 0.15);
}

.step-item.completed .step-circle {
    background-color: #059669;
    color: #ffffff;
    border-color: #059669;
}

.step-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
}

.step-item.active .step-label {
    color: #9f2089;
    font-weight: 700;
}

.step-item.completed .step-label {
    color: #059669;
}
