/* ============================================================
   ACFixMart – Main Stylesheet
   Design: Electric Blue × White with accent orange
   Font: Plus Jakarta Sans
   ============================================================ */

:root {
  --blue-900: #0f1d3a;
  --blue-700: #1a3a6e;
  --blue-500: #1e5cbf;
  --blue-400: #3575d4;
  --blue-100: #dce9fc;
  --blue-50:  #f0f5ff;
  --orange:   #ff6b1a;
  --orange-l: #ff8f4a;
  --gold:     #f5a623;
  --green:    #1cb85a;
  --red:      #e53935;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --white:    #ffffff;

  --header-h:    116px; /* header + category nav */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.14);
  --transition:  0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', sans-serif; color: var(--gray-900); background: var(--white); line-height: 1.55; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ─── CONTAINER ─── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ─── HEADER ─── */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--blue-900); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.header-inner { display: flex; align-items: center; gap: 16px; padding: 10px 20px; max-width: 1280px; margin: 0 auto; }
.header-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo { display: flex; align-items: center; }
.city-selector { display: flex; align-items: center; gap: 5px; background: none; border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius-sm); padding: 5px 10px; color: var(--white); cursor: pointer; font-size: 13px; transition: var(--transition); }
.city-selector:hover { border-color: rgba(255,255,255,.6); }
.city-name { max-width: 100px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-search { flex: 1; display: flex; max-width: 560px; }
.search-input { flex: 1; padding: 9px 16px; border: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); font-size: 14px; font-family: inherit; outline: none; }
.search-btn { padding: 9px 16px; background: var(--orange); border: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--white); cursor: pointer; font-size: 16px; }
.header-right { display: flex; align-items: center; gap: 10px; }
.header-icon { color: var(--white); font-size: 18px; position: relative; padding: 4px 8px; }
.cart-badge { position: absolute; top: 0; right: 0; background: var(--orange); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.btn-login  { padding: 7px 18px; border: 1.5px solid rgba(255,255,255,.5); border-radius: var(--radius-sm); color: var(--white); background: none; cursor: pointer; font-size: 14px; font-family: inherit; transition: var(--transition); }
.btn-login:hover { background: rgba(255,255,255,.1); }
.btn-signup { padding: 7px 18px; border: none; border-radius: var(--radius-sm); background: var(--orange); color: var(--white); cursor: pointer; font-size: 14px; font-family: inherit; font-weight: 600; transition: var(--transition); }
.btn-signup:hover { background: var(--orange-l); }
.user-menu { position: relative; display: flex; align-items: center; gap: 7px; cursor: pointer; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.4); }
.user-menu > span { color: var(--white); font-size: 13px; }
.prime-badge-sm { background: var(--gold); color: #000; font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 3px; }
.user-dropdown { display: none; position: absolute; top: calc(100% + 10px); right: 0; background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); min-width: 200px; overflow: hidden; z-index: 500; }
.user-dropdown.show { display: block; }
.user-dropdown a { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: 14px; transition: var(--transition); }
.user-dropdown a:hover { background: var(--gray-100); }
.user-dropdown a i { width: 16px; color: var(--blue-500); }
.user-dropdown hr { border: none; border-top: 1px solid var(--gray-300); margin: 4px 0; }
.prime-link { color: var(--gold) !important; font-weight: 600; }

/* ─── CATEGORY NAV ─── */
.category-nav { background: var(--blue-700); }
.category-nav-inner { display: flex; align-items: center; gap: 0; max-width: 1280px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; padding: 0 12px; }
.category-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav-item { display: flex; align-items: center; gap: 6px; padding: 9px 16px; color: rgba(255,255,255,.85); font-size: 13px; white-space: nowrap; border-bottom: 2px solid transparent; transition: var(--transition); }
.cat-nav-item:hover { color: var(--white); border-bottom-color: var(--orange); background: rgba(255,255,255,.06); }
.cat-nav-item i { font-size: 14px; }

/* ─── HERO ─── */
.hero-section { background: var(--blue-50); }
.hero-slider { position: relative; height: 400px; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s; }
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.5); cursor: pointer; transition: var(--transition); }
.dot.active { background: var(--white); width: 24px; border-radius: 4px; }
.hero-default { padding: 60px 20px; max-width: 1280px; margin: 0 auto; }
.hero-content h1 { font-size: clamp(28px, 4vw, 52px); font-weight: 800; line-height: 1.15; color: var(--blue-900); }
.city-highlight { color: var(--blue-500); }
.hero-content p { margin: 20px 0 28px; font-size: 17px; color: var(--gray-700); max-width: 520px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary { padding: 13px 28px; background: var(--blue-500); color: #fff; border-radius: var(--radius-sm); font-weight: 700; font-size: 15px; transition: var(--transition); }
.btn-primary:hover { background: var(--blue-700); }
.btn-outline { padding: 13px 28px; border: 2px solid var(--blue-500); color: var(--blue-500); border-radius: var(--radius-sm); font-weight: 700; font-size: 15px; transition: var(--transition); }
.btn-outline:hover { background: var(--blue-50); }

/* ─── SECTIONS ─── */
.section { padding: 48px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-head h2 { font-size: 22px; font-weight: 700; }
.see-all { font-size: 14px; color: var(--blue-500); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.center-head { text-align: center; font-size: 26px; font-weight: 800; margin-bottom: 40px; }

/* ─── SERVICES ─── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.service-card { display: flex; align-items: center; gap: 14px; background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-md); padding: 16px; cursor: pointer; transition: var(--transition); }
.service-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue-400); transform: translateY(-2px); }
.service-icon { width: 48px; height: 48px; background: var(--blue-100); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.service-icon i { font-size: 22px; color: var(--blue-500); }
.service-info { flex: 1; }
.service-info h4 { font-size: 14px; font-weight: 600; }
.service-info p { font-size: 12px; color: var(--gray-500); margin: 2px 0 6px; }
.price-main { font-size: 16px; font-weight: 700; color: var(--blue-900); }
.price-old { font-size: 12px; color: var(--gray-500); text-decoration: line-through; margin-left: 5px; }
.btn-book { padding: 7px 14px; background: var(--blue-500); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* ─── PRIME BANNER ─── */
.prime-banner-section { background: linear-gradient(135deg, var(--gold) 0%, #e08b00 100%); }
.prime-banner { max-width: 1280px; margin: 0 auto; padding: 20px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.prime-banner-text { display: flex; align-items: center; gap: 12px; color: #000; }
.prime-banner-text i { font-size: 28px; }
.prime-banner-text h3 { font-size: 18px; font-weight: 700; }
.prime-banner-text p { font-size: 14px; opacity: .8; }
.btn-prime { padding: 10px 24px; background: #000; color: #fff; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; white-space: nowrap; }

/* ─── PRODUCTS GRID ─── */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.product-card { background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-md); overflow: hidden; position: relative; transition: var(--transition); }
.product-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue-400); }
.discount-badge { position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 3px; z-index: 1; }
.product-card img { width: 100%; height: 180px; object-fit: contain; background: var(--gray-100); padding: 10px; }
.product-info { padding: 12px; }
.product-brand { font-size: 11px; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.product-name { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; color: var(--gray-900); }
.rating-badge { background: var(--green); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 3px; }
.review-count { font-size: 11px; color: var(--gray-500); margin-left: 4px; }
.product-price { margin: 8px 0 6px; }
.price-sell { font-size: 17px; font-weight: 700; color: var(--gray-900); }
.price-mrp { font-size: 12px; color: var(--gray-500); text-decoration: line-through; margin-left: 5px; }
.seller-name { font-size: 11px; color: var(--gray-500); display: flex; align-items: center; gap: 4px; }
.product-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 12px 12px; }
.btn-cart { padding: 7px 14px; background: var(--blue-500); color: #fff; border: none; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; }
.btn-wish { padding: 7px 10px; background: none; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); cursor: pointer; color: var(--gray-500); transition: var(--transition); }
.btn-wish:hover { color: var(--red); border-color: var(--red); }

/* ─── USED PRODUCTS ─── */
.used-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.used-card { background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-md); overflow: hidden; cursor: pointer; transition: var(--transition); }
.used-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue-400); }
.used-card img { width: 100%; height: 160px; object-fit: cover; }
.used-info { padding: 10px; }
.used-info h4 { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.used-cond { font-size: 11px; color: var(--gray-500); text-transform: capitalize; margin-bottom: 8px; }
.used-footer { display: flex; justify-content: space-between; align-items: center; }
.used-price { font-weight: 700; color: var(--blue-900); }
.used-city { font-size: 11px; color: var(--gray-500); }
.used-actions { display: flex; gap: 12px; align-items: center; }
.btn-sell-used { padding: 7px 14px; background: var(--orange); color: #fff; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.used-loading, .empty-state, .select-city-msg { text-align: center; padding: 40px; color: var(--gray-500); }

/* ─── HOW IT WORKS ─── */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.how-step { text-align: center; }
.how-icon { width: 64px; height: 64px; background: var(--blue-100); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.how-icon i { font-size: 26px; color: var(--blue-500); }
.how-step h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.how-step p { font-size: 14px; color: var(--gray-700); max-width: 220px; margin: 0 auto; }

/* ─── JOIN SECTION ─── */
.join-section { background: var(--gray-100); }
.join-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.join-card { background: var(--white); border-radius: var(--radius-lg); padding: 32px 24px; text-align: center; }
.join-card i { font-size: 40px; margin-bottom: 16px; color: var(--blue-500); }
.join-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.join-card p { font-size: 14px; color: var(--gray-700); margin-bottom: 20px; }
.btn-join { display: inline-block; padding: 10px 24px; background: var(--blue-500); color: #fff; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; }
.tech-join i { color: var(--orange); }
.franchise-join i { color: var(--green); }

/* ─── FOOTER ─── */
.site-footer { background: var(--blue-900); color: rgba(255,255,255,.8); padding: 48px 0 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-brand p { font-size: 14px; margin: 12px 0 20px; opacity: .7; }
.footer-app-btns { display: flex; gap: 10px; }
.app-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius-sm); font-size: 13px; color: rgba(255,255,255,.8); transition: var(--transition); }
.app-btn:hover { border-color: rgba(255,255,255,.6); }
.footer-links h5 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #fff; margin-bottom: 16px; }
.footer-links a { display: block; font-size: 14px; margin-bottom: 8px; opacity: .7; transition: var(--transition); }
.footer-links a:hover { opacity: 1; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 20px; text-align: center; font-size: 13px; opacity: .6; }

/* ─── MODALS ─── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 9000; display: none; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.city-modal { background: var(--white); border-radius: var(--radius-lg); padding: 32px; max-width: 480px; width: 90%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-logo { height: 40px; margin: 0 auto 12px; }
.city-modal h2 { font-size: 22px; font-weight: 800; text-align: center; }
.city-modal p { text-align: center; color: var(--gray-500); font-size: 14px; margin: 8px 0 20px; }
.city-modal-brand { text-align: center; margin-bottom: 24px; }
.btn-detect-location { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; background: var(--blue-50); border: 1.5px solid var(--blue-400); border-radius: var(--radius-md); color: var(--blue-500); font-weight: 600; cursor: pointer; font-size: 15px; transition: var(--transition); }
.btn-detect-location:hover { background: var(--blue-100); }
.city-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--gray-500); font-size: 13px; }
.city-divider::before, .city-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-300); }
.city-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.city-chip { padding: 7px 14px; background: var(--gray-100); border: 1px solid var(--gray-300); border-radius: 20px; font-size: 13px; cursor: pointer; transition: var(--transition); font-family: inherit; }
.city-chip:hover { background: var(--blue-100); border-color: var(--blue-400); color: var(--blue-700); }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--gray-500); line-height: 1; }

/* ─── AUTH MODAL ─── */
.auth-modal { background: var(--white); border-radius: var(--radius-lg); padding: 32px; max-width: 400px; width: 90%; position: relative; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid var(--gray-300); }
.auth-tab { flex: 1; padding: 10px; background: none; border: none; font-size: 15px; font-weight: 600; cursor: pointer; color: var(--gray-500); font-family: inherit; transition: var(--transition); }
.auth-tab.active { color: var(--blue-500); border-bottom: 2px solid var(--blue-500); margin-bottom: -2px; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-md); font-size: 14px; font-weight: 600; color: var(--gray-900); background: var(--white); cursor: pointer; transition: var(--transition); text-decoration: none; }
.btn-google:hover { border-color: var(--gray-500); }
.btn-google img { width: 20px; height: 20px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--gray-500); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-300); }
.auth-input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; margin-bottom: 12px; outline: none; transition: var(--transition); }
.auth-input:focus { border-color: var(--blue-400); }
.otp-input { font-size: 22px; letter-spacing: 8px; text-align: center; font-weight: 700; }
.btn-auth-primary { width: 100%; padding: 12px; background: var(--blue-500); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; margin-bottom: 10px; }
.btn-resend { width: 100%; padding: 8px; background: none; border: none; color: var(--blue-500); font-size: 13px; cursor: pointer; font-family: inherit; }
.otp-hint { font-size: 13px; color: var(--gray-500); text-align: center; margin-bottom: 12px; }
.auth-note { text-align: center; font-size: 12px; color: var(--gray-500); margin-top: 16px; }
.auth-form.hidden { display: none; }
.hidden { display: none !important; }

/* ─── TOAST ─── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; z-index: 99999; animation: toastIn .3s ease; }
.toast.success { background: var(--green); color: #fff; }
.toast.error { background: var(--red); color: #fff; }
@keyframes toastIn { from { opacity:0; bottom:10px; } to { opacity:1; bottom:24px; } }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  .header-search { order: 3; width: 100%; max-width: 100%; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-slider { height: 220px; }
  .services-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr 1fr; }
  .category-nav-inner { padding: 0 8px; }
  .cat-nav-item span { display: none; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero-default { padding: 40px 16px; }
}
