
/* ============================================================
   GRAMXPRESS - Swiggy Instamart Exact Clone
   ============================================================ */

:root {
    --swiggy-orange: #F07C29;
    --swiggy-orange-hover: #E06E1C;
    --swiggy-blue: #3D4F6B;
    --swiggy-green: #1BA672;
    --bg-white: #FFFFFF;
    --bg-gray: #F2F2F7;
    --bg-dark: #1C1C1C;
    --text-dark: #282C3F;
    --text-medium: #686B78;
    --text-light: #93959F;
    --border-light: #E8E8E8;
    --card-shadow: 0 1px 4px rgba(0,0,0,0.06);
    --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.1);
}

* { font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; box-sizing: border-box; margin:0;padding:0; }
html { font-size: 15px; overflow-x: hidden; }
body { background: var(--bg-white); color: var(--text-dark); min-height: 100vh; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ========== COLORS ========== */
.text-orange { color: var(--swiggy-orange) !important; }
.bg-orange { background-color: var(--swiggy-orange) !important; }
.text-blue { color: var(--swiggy-blue) !important; }
.bg-blue { background-color: var(--swiggy-blue) !important; }
.text-green { color: var(--swiggy-green) !important; }

  /* ========== HEADER (Swiggy Style) ========== */
.gx-header { background: #fff; border-bottom: 1px solid var(--border-light); }
.gx-header-inner { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 20px; }
.gx-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.gx-logo img { height: 42px; width: 42px; border-radius: 50%; object-fit: cover; }
.gx-logo-text { font-weight: 800; font-size: 20px; letter-spacing: -0.3px; }
.gx-logo-text .gram { color: var(--swiggy-orange); }
.gx-logo-text .xpress { color: var(--swiggy-blue); }


.gx-location { display: flex; flex-direction: column; line-height: 1.2; cursor: pointer; min-width: 160px; }
.gx-location .loc-title { font-size: 13px; font-weight: 700; color: var(--text-dark); display: flex; align-items: center; gap: 4px; }
.gx-location .loc-title i { color: var(--swiggy-orange); font-size: 11px; }
.gx-location .loc-sub { font-size: 11px; color: var(--text-light); }

.gx-search { flex: 1; max-width: 420px; }
.gx-search form { position: relative; }
.gx-search input { width: 100%; background: var(--bg-gray); border: none; border-radius: 10px; padding: 11px 16px 11px 40px; font-size: 13px; color: var(--text-medium); outline: none; transition: background 0.2s; }
.gx-search input:focus { background: #EBEBF0; }
.gx-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-light); }

.gx-actions { display: flex; align-items: center; gap: 8px; }
.gx-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; border: none; background: transparent; color: var(--text-dark); }
.gx-btn:hover { background: var(--bg-gray); }
.gx-btn i { font-size: 18px; }
.gx-btn-cart { background: var(--bg-gray); }
.gx-btn-cart:hover { background: #EBEBF0; }
.gx-btn-orange { background: var(--swiggy-orange); color: #fff; }
.gx-btn-orange:hover { background: var(--swiggy-orange-hover); }

/* ========== PINCODE MODAL ========== */
.gx-modal .modal-content { border: none; border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.gx-modal .modal-body { padding: 32px; }
.gx-modal-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; text-align: center; }
.gx-modal-logo { display: block; margin: 0 auto 16px; width: 72px; height: 72px; border-radius: 50%; }
.gx-modal-sub { font-size: 13px; color: var(--text-medium); text-align: center; margin-bottom: 20px; }
.gx-pin-input { width: 100%; border: 2px solid var(--border-light); border-radius: 12px; padding: 14px 16px; font-size: 16px; text-align: center; letter-spacing: 6px; font-weight: 700; outline: none; transition: border-color 0.2s; }
.gx-pin-input:focus { border-color: var(--swiggy-orange); }
.gx-btn-submit { width: 100%; padding: 12px; border: none; border-radius: 12px; background: var(--swiggy-orange); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 12px; }
.gx-btn-submit:hover { background: var(--swiggy-orange-hover); }
.gx-modal-login { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-medium); }
.gx-modal-login a { color: var(--swiggy-blue); font-weight: 600; }





/* ========== FOOTER ========== */
.gx-footer { background: var(--bg-dark); color: #fff; padding: 48px 20px 20px; margin-top: 0; }
.gx-footer-inner { max-width: 1200px; margin: 0 auto; }
.gx-footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 32px; }
@media (min-width: 768px) { .gx-footer-grid { grid-template-columns: repeat(4, 1fr); } }
.gx-footer-logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.gx-footer-logo img { height: 36px; width: 36px; border-radius: 50%; }
.gx-footer h5 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: #fff; }
.gx-footer a { display: block; color: #9CA3AF; font-size: 13px; margin-bottom: 8px; transition: color 0.2s; text-decoration: none; }
.gx-footer a:hover { color: #fff; }
.gx-footer-bottom { border-top: 1px solid #333; padding-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }


/* ========== BADGES ========== */
.badge-out { background: #FFF3E8; color: var(--swiggy-orange); border: 1px solid rgba(240,124,41,0.3); border-radius: 999px; padding: 5px 10px; font-weight: 800; }

/* ========== WHATSAPP FLOAT ========== */
.gx-whatsapp-float {
    position: fixed;
    right: 18px;
    bottom: 86px; /* above mobile nav */
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(0,0,0,0.22);
    z-index: 2500;
}
.gx-whatsapp-float i { font-size: 28px; }
.gx-whatsapp-float:hover { color: #fff; filter: brightness(0.98); }
@media (min-width: 992px) { .gx-whatsapp-float { bottom: 22px; } }

/* ========== LAYOUT ========== */
.container-gx { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========== FORMS ========== */
.gx-input {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gx-input:focus {
    border-color: var(--swiggy-orange);
    box-shadow: 0 0 0 3px rgba(240,124,41,0.15);
}

/* ========== BUTTONS ========== */
.btn-sw {
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.05s ease, background 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.btn-sw:active { transform: scale(0.98); }
.btn-sw-orange { background: var(--swiggy-orange); color: #fff; }
.btn-sw-orange:hover { background: var(--swiggy-orange-hover); color: #fff; }


/* ============================================================
   MOBILE HEADER (Instamart Style)
   ============================================================ */
.gx-mobile-header { background: linear-gradient(135deg, #1e3a8a, #1e40af); color: #fff; padding: 10px 14px 12px; display: none; width: 100%; max-width: 100vw; box-sizing: border-box; overflow: hidden; }
.gx-mobile-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.gx-mobile-location { flex: 1; cursor: pointer; }
.gx-mobile-loc-line1 { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.9); }
.gx-mobile-pin { font-weight: 700; color: #fff; }
.gx-mobile-loc-line2 { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.gx-mobile-profile { text-decoration: none; }
.gx-mobile-search form { position: relative; }
.gx-mobile-search input { width: 100%; background: #fff; border: none; border-radius: 10px; padding: 10px 14px 10px 38px; font-size: 13px; color: var(--text-medium); outline: none; }
.gx-mobile-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--text-light); }
/* ============================================================
   MOBILE BOTTOM NAV
   ============================================================ */
.gx-mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border-light); display: none; justify-content: space-around; align-items: flex-end; padding-bottom: 8px; z-index: 9999; min-height: 64px; box-shadow: 0 -2px 10px rgba(0,0,0,0.08); width: 100%; max-width: 100vw; box-sizing: border-box; transform: translateZ(0); }
.gx-mobile-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 8px 0; color: var(--text-light); text-decoration: none; font-size: 10px; font-weight: 500; flex: 1 1 0; min-width: 0; gap: 3px; transition: all .2s; }
.gx-mobile-nav-item i { font-size: 20px; }
.gx-mobile-nav-item.active { color: var(--swiggy-orange); }
.gx-mobile-nav-item.active i { color: var(--swiggy-orange); }
.gx-mobile-nav-center { position: relative; }
.gx-nav-center-btn { width: 28px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, var(--swiggy-orange), #e65100); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(240,124,41,0.25); position: relative; }
.gx-nav-center-btn i { font-size: 16px; }
.gx-nav-cart-badge { position: absolute; top: -2px; right: -2px; background: #fff; color: var(--swiggy-orange); font-size: 10px; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Fix overflow on cat sections */
.cat-section { margin-bottom: 32px; overflow: hidden; max-width: 100%; }
.subcat-row { display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden; padding: 0 12px 8px; max-width: 100%; justify-content: flex-start; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-left: 12px; }
@media (max-width: 768px) {
    .gx-mobile-header { display: block !important; }
    .gx-mobile-nav { display: flex !important; visibility: visible !important; opacity: 1 !important; }
    .gx-header-inner { padding: 10px 12px; gap: 10px; }
    .gx-logo-text { font-size: 16px; }
    .gx-location { display: none !important; }
    .gx-search { max-width: none; }
    .container-gx { padding: 0 12px; max-width: 100%; overflow-x: hidden; box-sizing: border-box; }
    .row.row-cols-2 { --bs-gutter-x: .65rem; --bs-gutter-y: .65rem; }
    .product-card { border-radius: 12px; padding: 8px; min-width: 0; }
    .product-card .prod-img-wrap { height: 110px; }
    .product-card .prod-name { font-size: 12px; }
    .prod-weight { font-size: 10px; margin-bottom: 6px; }
    .prod-price-row { flex-direction: column; align-items: flex-start; gap: 0; }
    .prod-price { font-size: 13px; }
    .prod-mrp { font-size: 10px; }
    .btn-add { padding: 5px 13px; font-size: 11px; }
    .product-card .qty-stepper { transform: scale(.86); transform-origin: right center; }
    body { padding-bottom: 90px; overflow-x: hidden; }
    /* Keep category blocks consistent with desktop emulation (4 per row) */
    .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .subcat-row { gap: 10px; padding-left: 12px; padding-right: 12px; }
    .d-flex {
      /* display: inline !important; */
    }
    .im-cat-sidebar {
width: 75px !important;
    }
    .profile{
          font-size: 24px !important;
    font-weight: 700 !important;
    padding: 5px !important;
    }
    .rounded-circle{
      padding: 5px !important;
    }

    .subcat-item { width: 80px; flex-shrink: 0; min-width: 0; }
    .subcat-item .sub-img { width: 80px; height: 80px; }
    main { max-width: 100%; overflow-x: hidden; }
    img { max-width: 100%; height: auto; }
    .cat-section { width: 100%; overflow: hidden; }
    .subcat-row { width: 100%; max-width: 100%; box-sizing: border-box; justify-content: flex-start; }
    .cat-slider { width: 100%; max-width: 100%; gap: 10px; box-sizing: border-box; }
    .cat-slider .cat-card { flex-basis: 80px; }
    .cat-card { min-width: 0; }
}

@media (min-width: 769px) {
    .gx-mobile-header { display: none !important; }
    .gx-mobile-nav { display: none !important; }
}
/* Container */
.container-gx { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn-sw { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 24px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; border: none; transition: all 0.2s; }
.btn-sw-orange { background: var(--swiggy-orange); color: #fff; }
.btn-sw-orange:hover { background: var(--swiggy-orange-hover); }

/* Form */
.gx-input { width: 100%; padding: 12px 16px; border: 1px solid var(--border-light); border-radius: 10px; font-size: 14px; outline: none; transition: all 0.2s; }
.gx-input:focus { border-color: var(--swiggy-orange); box-shadow: 0 0 0 3px rgba(240,124,41,0.1); }

/* Card */
.gx-card { background: #fff; border-radius: 16px; padding: 20px; border: 1px solid var(--border-light); }

/* Scrollbar hide */
.scrollbar-hide { overflow-x: auto; -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }
/* ========== PRODUCT CARD (Swiggy Exact) ========== */
.product-card { background: #fff; border-radius: 16px; padding: 12px; position: relative; transition: all 0.2s; height: 100%; display: flex; flex-direction: column; border: 1px solid var(--border-light); cursor: pointer; }
.product-card:hover { box-shadow: var(--card-shadow-hover); }
.discount-badge { position: absolute; top: 8px; left: 8px; background: var(--swiggy-green); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; z-index: 2; }
.prod-img-wrap { height: 140px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.prod-img-wrap img { max-height: 100%; max-width: 100%; object-fit: contain; mix-blend-mode: multiply; }
.prod-name { font-size: 13px; font-weight: 600; color: var(--text-dark); line-height: 1.4; margin-bottom: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-weight { font-size: 11px; color: var(--text-light); margin-bottom: 8px; }
.prod-price-row { display: flex; align-items: center; gap: 6px; }
.prod-price { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.prod-mrp { font-size: 12px; color: var(--text-light); text-decoration: line-through; }

.btn-add { background: #fff; border: 1px solid var(--swiggy-green); color: var(--swiggy-green); font-weight: 700; font-size: 12px; padding: 6px 24px; border-radius: 8px; cursor: pointer; text-transform: uppercase; transition: all 0.2s; }
.btn-add:hover { background: var(--swiggy-green); color: #fff; }

.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--swiggy-green); border-radius: 8px; overflow: hidden; }
.qty-stepper button { background: #fff; border: none; padding: 5px 12px; color: var(--swiggy-green); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty-stepper .qty-val { padding: 5px 10px; font-size: 13px; font-weight: 700; color: var(--swiggy-green); min-width: 28px; text-align: center; }

/* ========== PRODUCT CARD (Swiggy Exact) ========== */
.product-card { background: #fff; border-radius: 16px; padding: 12px; position: relative; transition: all 0.2s; height: 100%; display: flex; flex-direction: column; border: 1px solid var(--border-light); cursor: pointer; }
.product-card:hover { box-shadow: var(--card-shadow-hover); }
.discount-badge { position: absolute; top: 8px; left: 8px; background: var(--swiggy-green); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; z-index: 2; }
.prod-img-wrap { height: 140px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.prod-img-wrap img { max-height: 100%; max-width: 100%; object-fit: contain; mix-blend-mode: multiply; }
.prod-name { font-size: 13px; font-weight: 600; color: var(--text-dark); line-height: 1.4; margin-bottom: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-weight { font-size: 11px; color: var(--text-light); margin-bottom: 8px; }
.prod-price-row { display: flex; align-items: center; gap: 6px; }
.prod-price { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.prod-mrp { font-size: 12px; color: var(--text-light); text-decoration: line-through; }

.btn-add { background: #fff; border: 1px solid var(--swiggy-green); color: var(--swiggy-green); font-weight: 700; font-size: 12px; padding: 6px 24px; border-radius: 8px; cursor: pointer; text-transform: uppercase; transition: all 0.2s; }
.btn-add:hover { background: var(--swiggy-green); color: #fff; }

.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--swiggy-green); border-radius: 8px; overflow: hidden; }
.qty-stepper button { background: #fff; border: none; padding: 5px 12px; color: var(--swiggy-green); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty-stepper .qty-val { padding: 5px 10px; font-size: 13px; font-weight: 700; color: var(--swiggy-green); min-width: 28px; text-align: center; }
