/* =========================================
   PUNJAB MOBILE HUB - ORIGINAL DESIGN LOOK
   ========================================= */

:root {
  --primary: #0084ff;
  --dark: #1a1a1a;
  --gray: #666;
  --border: #e0e0e0;
  --bg-light: #f8f9fa;
  --upi: #5f259f;
  --whatsapp: #25d366;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-light);
  color: var(--dark);
  line-height: 1.5;
}

/* Header Styling */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 997;
  padding: 12px 20px;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-track-btn {
  background: #f0f7ff;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-track-btn:hover {
  background: var(--primary);
  color: #fff;
}

.cart-btn {
  background: #f0f7ff;
  color: var(--primary);
  border: 1px solid var(--border);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 16px;
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #dc3545;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Original Blue Banner Look */
.sub-banner {
  background: var(--primary);
  color: #fff;
  padding: 40px 20px;
  margin-bottom: 25px;
  text-align: center;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.1);
}

.banner-main-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.banner-sub-title {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px;
}

/* Section Styling */
section {
  margin-bottom: 30px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Track Section */
.track-section-box {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  margin-bottom: 25px;
}

.track-form {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.track-select, .track-input {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.track-select:focus, .track-input:focus {
  border-color: var(--primary);
}

/* Category Pills */
.category-scroll-container {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.category-scroll-container::-webkit-scrollbar {
  display: none;
}

.category-pills {
  display: flex;
  gap: 8px;
}

.pill {
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  color: var(--dark);
}

.pill.active, .pill:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.scroll-hint {
  font-size: 11px;
  color: var(--gray);
  text-align: right;
  margin-top: 4px;
  margin-bottom: 15px;
}

/* Product Grid & Cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}

.product-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.product-img {
  width: 100%;
  height: 190px;
  object-fit: contain;
  background: var(--bg-light);
  padding: 10px;
  cursor: pointer;
  display: block;
}

.product-details {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gray);
  font-weight: 600;
  margin-bottom: 4px;
}

.product-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
  line-height: 1.3;
}

.product-title:hover {
  color: var(--primary);
}

.price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.price {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}

.old-price {
  font-size: 12px;
  color: var(--gray);
  text-decoration: line-through;
}

/* Badges */
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
  text-transform: uppercase;
}

/* Buttons */
.card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-row-dual {
  display: flex;
  gap: 6px;
}

.btn {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: opacity 0.2s;
  text-decoration: none;
}

.btn:hover {
  opacity: 0.9;
}

.btn-upi {
  background: var(--upi);
  color: #fff;
  flex: 1;
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  flex: 1;
}

.btn-cart {
  background: var(--bg-light);
  color: var(--dark);
  border: 1px solid var(--border);
  width: 100%;
}

.btn-share {
  background: #eef2f5;
  color: var(--dark);
  border: 1px solid var(--border);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 15px;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 20px;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f1f1f1;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.main-modal-img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: var(--bg-light);
  border-radius: 8px;
}

.tag-badge {
  display: inline-block;
  background: #eef2f5;
  color: var(--gray);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* Cart Sidebar */
.cart-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 998;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -360px;
  width: 350px;
  height: 100%;
  background: #fff;
  z-index: 999;
  box-shadow: -4px 0 15px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 15px 20px;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f1f1f1;
}

.cart-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  background: var(--bg-light);
  border-radius: 6px;
  padding: 4px;
}

.cart-item-info {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}

.cart-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* UPI Modal Specifics */
.upi-box {
  padding: 15px 0;
}

.upi-qr-frame {
  background: #fff;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: inline-block;
  margin-bottom: 12px;
}

.upi-qr-frame img {
  width: 200px;
  height: 200px;
  display: block;
}

.upi-id-pill {
  background: #f1f5f9;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 12px;
}

/* Footer */
footer {
  background: var(--dark);
  color: #fff;
  padding: 40px 20px 20px;
  margin-top: 40px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #fff;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: #aaa;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  font-size: 12px;
  color: #888;
  border-top: 1px solid #333;
  padding-top: 20px;
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-card {
    border-radius: 8px;
  }
  .product-img {
    height: 150px;
  }
  .product-details {
    padding: 10px;
  }
  .product-title {
    font-size: 13px;
    height: 34px;
  }
}