/* ===============================
   RESET
================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}

body {
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ===============================
   APP WRAPPER (PHONE SIZE)
================================ */
.app-container {
    max-width: 430px;
    margin: 0 auto;
    padding: 60px 14px 90px;
}

/* ===============================
   TOP APP HEADER
================================ */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: 70px;
    background: #fff;
    border-bottom: 1px solid #ddd;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 0 14px;
    z-index: 1000;
}

.app-logo {
    height: 34px;
}

.header-search {
    flex: 1;
    position: relative;
}

.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.header-search input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border-radius: 20px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.header-cart {
    position: relative;
    color: #111;
    font-size: 20px;
    text-decoration: none;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* ===============================
   BANNERS
================================ */
.banner-slider {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 18px;
}

.banner-track {
    display: flex;
}

.banner-track img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ===============================
   CATEGORIES
================================ */
.category-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.category-row a {
    background: #fff;
    border-radius: 12px;
    padding: 12px 6px;

    text-align: center;
    text-decoration: none;
    color: #111;
    font-size: 12px;
}

.category-row i {
    font-size: 20px;
    margin-bottom: 6px;
}

/* ===============================
   SECTION TITLES
================================ */
.section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 18px 0 10px;
}

/* ===============================
   PRODUCT ROW
================================ */
.product-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
}

.product-card {
    min-width: 140px;
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    text-decoration: none;
    color: #111;
}

.product-card img {
    width: 100%;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
}

.p-name {
    font-size: 13px;
    margin-top: 6px;
}

.p-price {
    font-size: 13px;
    font-weight: 600;
}

.p-price small {
    display: block;
    color: #888;
    text-decoration: line-through;
}

/* ===============================
   BOTTOM NAV
================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    height: 70px;
    background: #fff;
    border-top: 1px solid #ddd;

    display: flex;
    justify-content: space-around;
    align-items: center;

    z-index: 1000;
}

.bottom-nav a {
    text-decoration: none;
    color: #666;
    font-size: 11px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bottom-nav i {
    font-size: 20px;
}

.bottom-nav a.active {
    color: #071347;
}

/* ===============================
   BANNER SLIDER (FIXED SIZE)
================================ */
.banner-slider {
    overflow: hidden;
    border-radius: 16px;
    margin: 16px 0 20px;
}

/* Track */
.banner-track {
    display: flex;
    transition: transform 0.6s ease;
}

/* One slide = one viewport */
.banner-item {
    min-width: 100%;
    height: 160px;              /* 🔒 FIXED PLACEHOLDER HEIGHT */
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 16px;
}

/* Clickable area fills slide */
.banner-item a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Image ALWAYS fits placeholder */
.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;          /* ✅ fills, crops overflow */
    object-position: center;    /* 🎯 center focus */
    display: block;
}
.banner-item {
    height: clamp(140px, 32vw, 180px);
}


.search-results {
    position: absolute;
    top: 56px;
    left: 12px;
    right: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    z-index: 999;
    overflow: hidden;
    display: none;
}

.search-results a {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: #111;
    border-bottom: 1px solid #eee;
}

.search-results a small {
    color: #888;
}

.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 6px;
    font-weight: bold;
}

.product-card {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
}

.cart-icon,
.header-cart,
.order-icon {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    min-width: 10px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
}

.quick-add.added {
    transform: scale(1.2);
    background: #0d6efd;
}

/* ===============================
   TOAST
================================ */
.toast {
    position: fixed;
    bottom: 90px; /* above bottom nav */
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #111;
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: all .3s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===============================
   CART SHEET
================================ */
.cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    opacity: 0;
    pointer-events: none;
    transition: .3s;
    z-index: 9997;
}

.cart-backdrop.show {
    opacity: 1;
    pointer-events: all;
}

.cart-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100%;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 14px;
    transition: .3s ease;
    z-index: 9998;
}

.cart-sheet.show {
    bottom: 0;
}

.cart-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cart-sheet-header button {
    background: none;
    border: none;
    font-size: 18px;
}

.cart-sheet-body {
    max-height: 250px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
}

.cart-sheet-btn {
    display: block;
    margin-top: 12px;
    padding: 12px;
    background: #0d6efd;
    color: #fff;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
}


.discover-cards {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0;
}

.discover-card {
    min-width: 160px;
    padding: 14px;
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
}

.discover-card span {
    font-size: 22px;
}

.card-blue { background: linear-gradient(135deg,#4e73df,#224abe); }
.card-green { background: linear-gradient(135deg,#1cc88a,#13855c); }
.card-orange { background: linear-gradient(135deg,#f6c23e,#dda20a); }
.card-purple { background: linear-gradient(135deg,#9f7aea,#6b46c1); }


.order-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.order-stat {
    background: #fff;
    border-radius: 16px;
    padding: 14px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
    text-decoration: none;
    color: #111;
}

.order-stat strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
}

.order-stat span {
    font-size: 12px;
    color: #6b7280;
}

.order-stat.warning {
    background: #fff7ed;
    color: #c2410c;
}

.order-stat.success {
    background: #ecfdf5;
    color: #047857;
}


.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-top: 6px;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-item {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: #111;
    border-bottom: 1px solid #f1f1f1;
}

.search-item:hover {
    background: #f8f9fb;
}

.search-item strong {
    display: block;
    font-size: 14px;
}

.search-item small {
    font-size: 12px;
    color: #777;
}


.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #111;
    border-bottom: 1px solid #f1f1f1;
}

.search-item img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.search-text strong {
    display: block;
    font-size: 14px;
    line-height: 1.2;
}

.search-text small {
    font-size: 12px;
    color: #777;
}

.preview-notice {
    background: #fff3cd;
    color: #856404;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.login-btn {
    font-size: 14px;
    text-decoration: none;
    color: #0d6efd;
    font-weight: 600;
}

.locked {
    opacity: .95;
}

.btn-login {
    display: block;
    margin-top: 8px;
    padding: 10px;
    background: #0d6efd;
    color: #fff;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
}

.hero {
    padding: 70px 18px 30px;
    background: linear-gradient(135deg, #0d6efd, #4e73df);
    color: #fff;
    text-align: center;
}

.hero h1 {
    font-size: 26px;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero p {
    font-size: 14px;
    opacity: .95;
    margin-bottom: 18px;
}

.hero-btn {
    display: inline-block;
    padding: 12px 22px;
    background: #fff;
    color: #0d6efd;
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
}

.how-it-works {
    padding: 28px 16px;
    text-align: center;
}

.how-it-works h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.step {
    background: #fff;
    border-radius: 14px;
    padding: 14px 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.step-icon {
    font-size: 26px;
    display: block;
    margin-bottom: 8px;
}

.step h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.step p {
    font-size: 12px;
    color: #666;
}

.filter-preview {
    padding: 26px 16px;
}

.filter-preview h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.filter-chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.filter-chips button {
    flex-shrink: 0;
    border: none;
    background: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
    cursor: pointer;
}

.filter-cta {
    display: block;
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #0d6efd;
    text-decoration: none;
}


.featured-shops {
    padding: 26px 16px;
}

.featured-shops h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.shop-preview-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
}

.shop-preview-card {
    min-width: 160px;
    background: #fff;
    border-radius: 16px;
    text-decoration: none;
    color: #111;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
    overflow: hidden;
}

.shop-preview-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.shop-preview-info {
    padding: 10px;
}

.shop-preview-info strong {
    display: block;
    font-size: 13px;
}

.shop-preview-info small {
    font-size: 12px;
    color: #666;
}

.view-more {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #0d6efd;
}

.landing-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 24px 16px 30px;
    text-align: center;
}

.footer-brand img {
    height: 36px;
    margin-bottom: 6px;
}

.footer-brand p {
    font-size: 12px;
    color: #666;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 14px 0;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 13px;
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

.footer-bottom {
    font-size: 11px;
    color: #888;
}
