@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Poppins:wght@500;600;700;800&display=swap');

:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-input: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.96);

  --accent-blue: #2563eb;
  --accent-cyan: #0284c7;
  --accent-green: #16a34a;
  --accent-orange: #ea580c;
  --accent-purple: #7c3aed;

  --navy-dark: #1f2430;
  --navy-nav: #3a4256;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dark: #020617;

  --border-color: #e2e8f0;
  --border-glow: rgba(2, 132, 199, 0.35);

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* ==========================================================================
   MOBILE FIRST BASE STYLES (DEFAULT FOR MOBILE BREAKPOINTS 0px - 639px)
   ========================================================================== */

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: 64px; /* Space for Mobile Bottom Nav */
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease-in-out;
  min-height: 40px; /* Touch friendly tap target */
}

/* ANNOUNCEMENT TOP BAR */
.announcement-bar {
  background: linear-gradient(90deg, #1e3a8a, #0284c7, #0d9488);
  color: #ffffff;
  font-size: 0.78rem;
  padding: 6px 12px;
  text-align: center;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.announcement-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.announcement-right {
  display: none;
}

.badge-glow {
  background: var(--accent-orange);
  color: #fff;
  padding: 2px 6px;
  border-radius: 14px;
  font-size: 0.68rem;
  font-weight: 800;
}

/* HEADER & NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
}

.navbar-container {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.15rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
}

.logo span {
  background: linear-gradient(135deg, #0f172a 40%, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-img {
  height: 32px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
}

.search-box {
  order: 3;
  width: 100%;
  flex-basis: 100%;
  position: relative;
  margin-top: 4px;
}

.search-box input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-main);
  font-size: 0.82rem;
}

.search-box input:focus {
  background-color: #ffffff;
  border-color: var(--accent-cyan);
  outline: none;
}

.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.nav-actions {
  order: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 18px;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  min-height: 34px;
}

.nav-btn span:not(.cart-count) {
  display: none;
}

.cart-btn {
  position: relative;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  border: none;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--accent-orange);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* USER PROFILE AVATAR */
.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: 20px;
  cursor: pointer;
  min-height: 34px;
}

.user-avatar-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

/* SECONDARY CATEGORY MEGA NAV BAR */
.rc-nav2 {
  background: var(--navy-nav);
  position: sticky;
  top: 94px;
  z-index: 99;
  box-shadow: var(--shadow-md);
}

.rc-nav2-inner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 6px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.rc-nav2-inner::-webkit-scrollbar {
  display: none;
}

.rc-nav2-inner a {
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
}

.rc-nav2-inner a:hover, .rc-nav2-inner a.active {
  background: rgba(255, 255, 255, 0.18);
  color: #38bdf8;
}

/* HERO BANNER */
.hero {
  width: 100%;
  padding: 12px 12px 0;
}

.hero-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 58, 138, 0.85)), url('../images/hero-banner.webp') center/cover;
  border-radius: var(--radius-md);
  padding: 24px 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  color: #ffffff;
}

.hero-content {
  width: 100%;
}

.hero-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #38bdf8;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
  color: #ffffff;
}

.hero-subtitle {
  color: #cbd5e1;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.hero-btn {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 6px 14px rgba(2, 132, 199, 0.3);
}

/* TRUST BADGES STRIP */
.trust-badges-strip {
  width: 100%;
  padding: 14px 12px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.trust-badge-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.trust-badge-icon {
  font-size: 1.2rem;
  background: #f0f9ff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-badge-title {
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--text-dark);
  line-height: 1.2;
}

.trust-badge-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: none;
}

/* BRAND SHOWCASE LOGOS */
.brand-showcase-section {
  width: 100%;
  padding: 16px 12px 0;
}

.brand-logos-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.brand-logo-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  height: 46px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.brand-logo-card img {
  max-height: 26px;
  max-width: 76px;
  object-fit: contain;
}

/* FILTER SECTION */
.filter-section {
  width: 100%;
  padding: 16px 12px 0;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
}

.section-title span {
  color: var(--accent-cyan);
}

.filter-tabs-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.filter-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 70px;
  flex-shrink: 0;
}

.filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}

.pill-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 32px;
}

.pill-btn.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  border-color: transparent;
}

.pill-btn.combo-pill {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

/* PRODUCT CATALOG GRID */
.catalog-section {
  width: 100%;
  padding: 16px 12px 30px;
  flex: 1;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.product-image-wrap {
  position: relative;
  width: 100%;
  height: 130px;
  overflow: hidden;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: block;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-cyan);
  border: 1px solid var(--border-color);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
}

.combo-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, var(--accent-orange), #c2410c);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
}

.product-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.5em;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.selling-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
}

.mrp-price {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.discount-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-green);
  background: #dcfce7;
  padding: 1px 4px;
  border-radius: 4px;
}

.card-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.btn-add-cart {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 36px;
}

.btn-quick-view {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  min-height: 36px;
}

/* MOBILE BOTTOM NAVIGATION BAR */
.mobile-bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  z-index: 150;
  justify-content: space-around;
  align-items: center;
  box-shadow: var(--shadow-lg);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  gap: 2px;
  width: 20%;
}

.mobile-nav-item.active {
  color: var(--accent-cyan);
}

.mobile-nav-icon {
  font-size: 1.15rem;
}

/* MODALS & DRAWERS */
.cart-drawer-backdrop, .modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-drawer-backdrop.active, .modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--border-color);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}

.cart-drawer.active {
  right: 0;
}

.cart-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
}

.cart-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  min-height: auto;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-item {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  background: #f8fafc;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  min-height: 26px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.cart-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  margin-top: auto;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--text-main);
  font-weight: 600;
}

.btn-checkout {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #ffffff;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.95rem;
  margin-top: 12px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  display: block;
  text-align: center;
}

.modal-content {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 620px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px;
  position: relative;
  margin: 20px auto;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.order-tracking-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.tracking-timeline {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  position: relative;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  gap: 4px;
  flex: 1;
}

.step-node.active {
  color: var(--accent-cyan);
}

.step-node.completed {
  color: var(--accent-green);
}

.step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.step-node.active .step-dot {
  background: var(--accent-cyan);
  color: #fff;
}

.step-node.completed .step-dot {
  background: var(--accent-green);
  color: #fff;
}

.payment-method-selector {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 10px 0;
}

.payment-option-card {
  border: 2px solid var(--border-color);
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
}

.payment-option-card.selected {
  border-color: var(--accent-cyan);
  background: #f0f9ff;
}

.payment-option-card.selected.cod-selected {
  border-color: var(--accent-orange);
  background: #fff7ed;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.form-group {
  margin-bottom: 10px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
}

/* FOOTER */
footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 20px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: auto;
}

/* ==========================================================================
   PROGRESSIVE MEDIA QUERIES (MOBILE-FIRST DESKTOP ENHANCEMENTS)
   ========================================================================== */

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
  }
  .product-image-wrap {
    height: 160px;
  }
  .trust-badges-strip {
    grid-template-columns: repeat(4, 1fr);
  }
  .trust-badge-sub {
    display: block;
  }
  .payment-method-selector {
    grid-template-columns: 1fr 1fr;
  }
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }

  .announcement-bar {
    justify-content: space-between;
    padding: 8px 20px;
    font-size: 0.82rem;
  }

  .announcement-right {
    display: flex;
  }

  .navbar {
    padding: 12px 20px;
  }

  .navbar-container {
    flex-wrap: nowrap;
    gap: 16px;
  }

  .logo-img {
    height: 40px;
    max-width: 160px;
  }

  .search-box {
    order: 0;
    margin-top: 0;
    max-width: 440px;
    flex-basis: auto;
  }

  .search-box input {
    padding: 10px 16px 10px 42px;
    font-size: 0.88rem;
  }

  .nav-actions {
    order: 0;
    gap: 10px;
  }

  .nav-btn span:not(.cart-count) {
    display: inline;
  }

  .rc-nav2 {
    top: 64px;
  }

  .rc-nav2-inner {
    padding: 4px 20px;
  }

  .hero-banner {
    padding: 42px;
    border-radius: var(--radius-lg);
  }

  .hero-title {
    font-size: 2.3rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }

  .product-image-wrap {
    height: 190px;
  }

  .mobile-bottom-nav {
    display: none;
  }
}

@media (min-width: 1280px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
