/* ============================================
   BUYNEARBY V3 COMPLETE STYLESHEET
   ============================================ */

/* ==============================
   CSS VARIABLES
============================== */
:root {
  /* Brand Colors */
  --bnb-primary: #667eea;
  --bnb-primary-dark: #5568d3;
  --bnb-secondary: #764ba2;
  --bnb-accent: #4B9CE2;
  --bnb-accent-dark: #3B7AB8;
  
  /* UI Colors */
  --bnb-success: #10b981;
  --bnb-warning: #f59e0b;
  --bnb-danger: #ef4444;
  --bnb-info: #3b82f6;
  
  /* Text Colors */
  --bnb-dark: #1f2937;
  --bnb-gray: #6b7280;
  --bnb-light-gray: #9ca3af;
  
  /* Background Colors */
  --bnb-bg-light: #f9fafb;
  --bnb-bg-white: #ffffff;
  --bnb-bg-dark: #111827;
  
  /* Border Colors */
  --bnb-border-light: #e5e7eb;
  --bnb-border-medium: #d1d5db;
  
  /* Other */
  --whatsapp: #25D366;
  --header-height: 80px;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

/* ==============================
   GLOBAL RESET & BASE
============================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--bnb-dark);
  background: var(--bnb-bg-light);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--bnb-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--bnb-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ==============================
   FLOATING CART
============================== */
.floating-cart, #cart-summary {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 15px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: none;
  align-items: center;
  gap: 15px;
  z-index: 998;
  max-width: 90%;
  transition: all 0.3s ease;
}

/* Show cart when it has items */
.floating-cart[style*="display: flex"],
#cart-summary[style*="display: flex"] {
  display: flex !important;
}

.floating-cart:hover, #cart-summary:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

.floating-cart .cart-info, #cart-summary .cart-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bnb-dark);
}

.floating-cart .cart-divider, #cart-summary .cart-divider {
  color: var(--bnb-gray);
}

.floating-cart button, #cart-summary button,
.floating-cart .cart-checkout-btn, #cart-summary .cart-checkout-btn {
  background: linear-gradient(135deg, var(--bnb-primary), var(--bnb-secondary));
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.floating-cart button:hover, #cart-summary button:hover,
.floating-cart .cart-checkout-btn:hover, #cart-summary .cart-checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .floating-cart, #cart-summary {
    bottom: 15px;
    padding: 14px 20px;
    gap: 12px;
    max-width: calc(100vw - 30px);
  }
  
  .floating-cart .cart-info, #cart-summary .cart-info {
    font-size: 14px;
    gap: 10px;
  }
  
  .floating-cart button, #cart-summary button,
  .floating-cart .cart-checkout-btn, #cart-summary .cart-checkout-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* PWA prompt visible adjustment */
.floating-cart.pwa-visible, #cart-summary.pwa-visible {
  bottom: 100px;
}

/* ==============================
   HEADER
============================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  height: var(--header-height);
  width: 100%;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--bnb-primary);
  text-decoration: none;
}

.logo i {
  font-size: 28px;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 15px;
  color: var(--bnb-dark);
  transition: color 0.2s;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--bnb-primary);
}

.nav-highlight {
  background: linear-gradient(135deg, var(--bnb-primary), var(--bnb-secondary));
  color: white !important;
  padding: 8px 16px;
  border-radius: 50px;
}

.nav-whatsapp {
  background: var(--whatsapp);
  color: white !important;
  padding: 8px 16px;
  border-radius: 50px;
}

.nav-cart-btn,
#header-cart-btn {
  background: var(--bnb-primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: all 0.2s;
}

.nav-cart-btn:hover,
#header-cart-btn:hover {
  background: var(--bnb-primary-dark);
  transform: translateY(-2px);
}

.cart-badge,
#header-cart-count {
  background: var(--bnb-danger);
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
  display: none;
}

#header-cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--bnb-dark);
  transition: all 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ==============================
   CONTAINER & LAYOUT
============================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

body {
  padding-top: 0;
  margin: 0;
}

/* ==============================
   HERO SECTION
============================== */
.hero-section {
  background: linear-gradient(135deg, var(--bnb-primary) 0%, var(--bnb-secondary) 100%);
  color: white;
  padding: 60px 2rem;
  margin: 2rem auto;
  max-width: 1200px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.hero-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

.location-search {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.radius-selector select {
  padding: 12px 20px;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  background: white;
  color: var(--bnb-dark);
  cursor: pointer;
}

.btn-primary-large {
  background: white;
  color: var(--bnb-primary);
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.hero-stat-item i {
  font-size: 36px;
  opacity: 0.9;
}

.hero-stat-item h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hero-stat-item p {
  font-size: 14px;
  opacity: 0.85;
}

/* ==============================
   SECTIONS
============================== */
.section {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--bnb-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--bnb-gray);
}



/* ==============================
   STORE GRID/CAROUSEL
============================== */
.stores-grid {
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  padding: 1rem 0;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--bnb-primary) var(--bnb-bg-light);
}

.stores-grid::-webkit-scrollbar {
  height: 8px;
}

.stores-grid::-webkit-scrollbar-track {
  background: var(--bnb-bg-light);
  border-radius: 10px;
}

.stores-grid::-webkit-scrollbar-thumb {
  background: var(--bnb-primary);
  border-radius: 10px;
}

.store-card {
  flex: 0 0 auto;
  width: 120px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s;
}

.store-card:hover {
  transform: translateY(-5px);
}

.store-card img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  box-shadow: var(--shadow-md);
  border: 3px solid white;
}

.store-info h6 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--bnb-dark);
  margin-bottom: 4px;
}

.store-info p {
  font-size: 0.85rem;
  color: var(--bnb-gray);
  margin: 0;
}

/* ==============================
   PRODUCT SECTIONS
============================== */
.product-section {
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2rem;
  color: var(--bnb-dark);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--bnb-primary);
}

.product-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* Mobile: Smaller tiles that fit properly */
@media (max-width: 767px) {
  .product-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Small phones: Even more compact */
@media (max-width: 374px) {
  .product-row {
    gap: 8px;
  }
}

.product-item {
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.product-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.product-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.product-item h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bnb-dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-item p {
  font-size: 0.85rem;
  color: var(--bnb-gray);
  margin-bottom: 1rem;
}

.product-item button {
  width: 100%;
  background: linear-gradient(135deg, var(--bnb-primary), var(--bnb-secondary));
  color: white;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.product-item button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Duplicate section removed - see main FLOATING CART section above */

/* ==============================
   MODAL SYSTEM
============================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: var(--radius);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideDown 0.3s ease;
  margin: auto;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 2px solid var(--bnb-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.modal-header h2 {
  font-size: 1.75rem;
  color: var(--bnb-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--bnb-gray);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bnb-bg-light);
  color: var(--bnb-dark);
}

.modal-body {
  padding: 2rem;
}

/* ==============================
   CHECKOUT FORM
============================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--bnb-dark);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group label i {
  color: var(--bnb-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--bnb-border-light);
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--bnb-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Checkout Method Selection */
.checkout-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 25px;
}

.checkout-option {
  padding: 20px;
  border: 3px solid var(--bnb-border-light);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
  background: white;
}

.checkout-option:hover {
  border-color: var(--bnb-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.checkout-option.active {
  border-color: var(--bnb-primary);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.checkout-option i {
  font-size: 36px;
  margin-bottom: 10px;
  display: block;
}

.checkout-option.whatsapp i {
  color: var(--whatsapp);
}

.checkout-option.regular i {
  color: var(--bnb-primary);
}

.checkout-option strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.checkout-option small {
  color: var(--bnb-gray);
  font-size: 13px;
}

/* Tip Selection */
.tip-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.tip-btn {
  padding: 12px;
  background: var(--bnb-bg-light);
  border: 2px solid var(--bnb-border-light);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.tip-btn:hover {
  background: var(--bnb-border-light);
}

.tip-btn.active {
  background: linear-gradient(135deg, var(--bnb-primary) 0%, var(--bnb-secondary) 100%);
  color: white;
  border-color: var(--bnb-primary);
}

/* Order Summary */
.order-summary {
  background: var(--bnb-bg-light);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.order-summary h3 {
  color: var(--bnb-primary);
  font-size: 18px;
  margin-bottom: 15px;
}

.store-group {
  background: white;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.store-name {
  font-weight: 700;
  color: var(--bnb-primary);
  margin-bottom: 10px;
  font-size: 15px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--bnb-border-light);
}

.summary-line:last-child {
  border-bottom: none;
}

.summary-line.discount {
  color: var(--bnb-success);
}

.summary-line.free {
  color: var(--bnb-success);
  font-weight: 600;
}

.summary-breakdown {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid var(--bnb-border-light);
}

.summary-line.total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid var(--bnb-primary);
  font-size: 18px;
  font-weight: 700;
  color: var(--bnb-primary);
}

.order-summary-loading {
  background: var(--bnb-bg-light);
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 15px;
  margin-top: 2rem;
}

.modal-actions button {
  flex: 1;
  padding: 14px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-secondary {
  background: var(--bnb-bg-light);
  color: var(--bnb-dark);
  border: 2px solid var(--bnb-border-medium);
}

.btn-secondary:hover {
  background: var(--bnb-border-light);
}

#checkout-submit-btn {
  background: linear-gradient(135deg, var(--bnb-primary) 0%, var(--bnb-secondary) 100%);
  color: white;
  border: none;
}

#checkout-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

#checkout-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==============================
   LOADING SPINNER
============================== */
.loading-section {
  text-align: center;
  padding: 3rem 1rem;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--bnb-border-light);
  border-top-color: var(--bnb-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==============================
   ALERTS
============================== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

/* ==============================
   TABLET & MOBILE RESPONSIVE
============================== */

/* iPad and Tablet Support (768px - 1024px) */
@media (max-width: 1024px) {
  .main-nav {
    padding: 0 1.5rem;
  }
  
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    z-index: 999;
    -webkit-overflow-scrolling: touch;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .nav-links a,
  .nav-links button,
  .nav-links .user-menu-container,
  .nav-links .login-btn {
    width: 100%;
    justify-content: flex-start;
  }
  
  #header-cart-btn {
    width: 100%;
    justify-content: space-between;
    background: var(--bnb-primary);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
  }
}

/* Mobile Specific (under 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  body {
    padding-top: 70px;
  }
  
  .site-header {
    height: 70px;
  }
  
  .main-nav {
    padding: 0 1rem;
    height: 70px;
  }
  
  .logo img {
    height: 35px;
  }
  
  .logo span {
    font-size: 20px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
  }
  
  .section-header h2 {
    font-size: 1.75rem;
  }
  
  .product-row {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .checkout-options {
    grid-template-columns: 1fr;
  }
  
  .tip-options {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .modal-content {
    max-height: 95vh;
    border-radius: 12px 12px 0 0;
  }
  
  .modal-header {
    padding: 1rem 1.5rem;
  }
  
  .modal-header h2 {
    font-size: 1.5rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .floating-cart {
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    bottom: 10px !important;
    max-width: 600px !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 1rem 1.5rem !important;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 65px;
  }
  
  body {
    padding-top: 65px;
  }
  
  .site-header {
    height: 65px;
  }
  
  .main-nav {
    padding: 0 0.75rem;
    height: 65px;
  }
  
  .logo img {
    height: 30px;
  }
  
  .logo span {
    font-size: 18px;
  }
  
  .hero-section {
    padding: 40px 1rem;
    margin: 1rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .location-search {
    flex-direction: column;
    width: 100%;
  }
  
  .radius-selector select,
  .btn-primary-large {
    width: 100%;
  }
  
  .section {
    padding: 0 1rem;
  }
  
  .product-row {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   UTILITY CLASSES
============================== */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Desktop/Mobile/Tablet visibility */
.desktop-only {
  display: inline;
}

.mobile-only {
  display: none;
}

.tablet-only {
  display: none;
}

/* Tablet (iPad) - 768px to 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .tablet-only {
    display: inline;
  }
}

/* Mobile and Tablet - under 1024px */
@media (max-width: 1024px) {
  .desktop-only {
    display: none;
  }
}

/* Mobile only - under 768px */
@media (max-width: 768px) {
  .mobile-only {
    display: inline;
  }
}

/* ==============================
   FOOTER STYLES
============================== */
.site-footer {
    background: var(--bnb-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--whatsapp);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: transform 0.2s;
}

.social-link:hover {
    transform: scale(1.1);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0.5rem 0;
}

.whatsapp-float {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--whatsapp);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 998;
    transition: all 0.3s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* ==============================
   MISSION PAGE STYLES
============================== */
.hero {
    background: linear-gradient(135deg, var(--bnb-primary) 0%, var(--bnb-secondary) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p,
.hero .subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

.section {
    max-width: 900px;
    margin: 3rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.section h2 {
    font-size: 2rem;
    color: var(--bnb-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.section h3 {
    font-size: 1.5rem;
    color: var(--bnb-accent);
    margin: 2rem 0 1rem;
    text-align: center;
}

.section p {
    line-height: 1.8;
    color: var(--bnb-dark);
    margin-bottom: 1rem;
    text-align: left;
}

.section ul {
    line-height: 2;
    color: var(--bnb-dark);
}

.section ul li {
    margin-bottom: 1rem;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
}

.cta-buttons .btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--bnb-primary), var(--bnb-secondary));
    color: white;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.cta-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.or-text {
    color: var(--bnb-gray);
    font-weight: 600;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.image-gallery img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

/* ==============================
   PARTNERS PAGE STYLES
============================== */
.forms-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
}

.form-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.form-card h2 {
    font-size: 1.75rem;
    color: var(--bnb-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-card > p {
    color: var(--bnb-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.form-card .form-group {
    margin-bottom: 1.5rem;
}

.form-card label {
    display: block;
    font-weight: 600;
    color: var(--bnb-dark);
    margin-bottom: 0.5rem;
}

.form-card input,
.form-card select,
.form-card textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--bnb-border-light);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    outline: none;
    border-color: var(--bnb-primary);
}

.form-card textarea {
    resize: vertical;
    min-height: 100px;
}

.form-card button[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--bnb-primary), var(--bnb-secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.form-card button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.success-message {
    background: var(--bnb-success);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    display: none;
}

.success-message.show {
    display: block;
}

/* ==============================
   FOOTER STYLES
============================== */
.site-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.site-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p {
    margin-bottom: 0.75rem;
    opacity: 0.9;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: white;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.footer-section ul li a:hover {
    opacity: 1;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0.5rem 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* ==============================
   MOBILE RESPONSIVE - FOOTER & PAGES
============================== */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-float {
        bottom: 70px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p,
    .hero .subtitle {
        font-size: 1rem;
    }
    
    .section {
        padding: 1.5rem;
        margin: 2rem 1rem;
    }
    
    .forms-section {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .form-card {
        padding: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
        text-align: center;
    }
}
/**************************************
    MOBILE-FIRST STORE PAGE UI
**************************************/

/* Root colors */
:root {
    --bnb-primary: #ff6600;
    --bnb-accent: #ff8f3d;
    --bnb-bg: #fafafa;
    --bnb-text: #222;
}

/**************************************
    Department Dropdown (Mobile)
**************************************/
.department-tabs {
    display: none; /* Hidden on mobile (replaced by dropdown) */
}

@media(min-width: 768px) {
    .department-tabs {
        display: flex;
        gap: 0.7rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .department-tab {
        padding: 0.6rem 1rem;
        background: #fff;
        border-radius: 20px;
        border: 1px solid #ddd;
        font-size: 0.95rem;
        cursor: pointer;
        white-space: nowrap;
        transition: all 0.25s ease;
    }

    .department-tab.active {
        background: var(--bnb-primary);
        color: #fff;
        border-color: var(--bnb-primary);
    }
}

/**************************************
    MOBILE DEPARTMENT DROPDOWN
**************************************/
.department-dropdown {
    width: 100%;
    margin-bottom: 1rem;
}

.department-select {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fff;
}

/**************************************
    Sort Dropdown
**************************************/
.sort-dropdown {
    position: relative;
}

.sort-button {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 0.8rem 1.2rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.25s ease;
}

.sort-button:hover {
    background: #f1f1f1;
}

.sort-menu {
    position: absolute;
    top: 110%;
    right: 0;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #ddd;
    width: 210px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    display: none;
    z-index: 2000;
}

.sort-menu.active {
    display: block;
}

.sort-option {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: 0.2s ease;
}

.sort-option:hover {
    background: #f8f8f8;
}

.sort-option.active {
    background: var(--bnb-primary);
    color: #fff;
}

/**************************************
    Product Grid
**************************************/
.product-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

@media(min-width: 700px) {
    .product-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(min-width: 1024px) {
    .product-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-item {
    background: #fff;
    border-radius: 16px;
    padding: 1rem;
    text-align: left;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.product-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
}

/**************************************
    Add to Cart Button
**************************************/
.add-to-cart-btn {
    width: 100%;
    margin-top: 0.8rem;
    background: var(--bnb-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.9rem;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.25s ease;
}

.add-to-cart-btn:hover {
    background: #e45500;
}

/**************************************
    Search Bar (mobile improved)
**************************************/
#search-container {
    width: 100%;
    padding: 0 1rem;
}

#search-input {
    width: 100%;
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid #ddd;
    font-size: 1.05rem;
}

#search-clear {
    font-size: 1rem;
}

/**************************************
    Empty State
**************************************/
.empty-state {
    text-align: center;
    padding: 5rem 1rem;
    color: #666;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/**************************************
    STORE SEARCH BAR
**************************************/
.search-container {
    width: 100%;
    margin-bottom: 1.3rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    padding: 0.95rem 1rem 0.95rem 2.7rem;
    font-size: 1.05rem;
    border: 1px solid #ddd;
    border-radius: 14px;
    outline: none;
    background: #fff;
    transition: 0.25s ease;
}

.search-box input:focus {
    border-color: var(--bnb-primary);
    box-shadow: 0 0 0 3px rgba(255,102,0,0.15);
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 1.2rem;
    color: #888;
}

.search-clear {
    position: absolute;
    right: 12px;
    font-size: 1.4rem;
    cursor: pointer;
    color: #999;
    display: none;
}

.search-clear.visible {
    display: block;
}

/* Product Search Container - matches store search styling */
.product-search-container {
    width: 100%;
    margin-bottom: 1.3rem;
}

.product-search-container .search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.product-search-container .search-box input {
    width: 100%;
    padding: 0.95rem 1rem 0.95rem 2.7rem;
    font-size: 1.05rem;
    border: 1px solid #ddd;
    border-radius: 14px;
    outline: none;
    background: #fff;
    transition: 0.25s ease;
}

.product-search-container .search-box input:focus {
    border-color: var(--bnb-primary);
    box-shadow: 0 0 0 3px rgba(255,102,0,0.15);
}



/**************************************
    MOBILE HAMBURGER MENU FIX
**************************************/

/* Hamburger button - visible on mobile/tablet */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  position: relative;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--bnb-dark);
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Hamburger animation when active */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile/Tablet Navigation */
@media (max-width: 1024px) {
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
    z-index: 1000;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  /* Backdrop when menu is open */
  .nav-links.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
  
  .nav-links a,
  .nav-links button,
  .nav-links .user-menu-container,
  .nav-links .login-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.2s;
  }
  
  .nav-links a:hover,
  .nav-links button:hover {
    background: var(--bnb-bg-light);
  }
  
  #header-cart-btn {
    width: 100%;
    justify-content: space-between;
    background: var(--bnb-primary);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
  }
  
  .nav-highlight,
  .nav-whatsapp {
    width: 100%;
  }
}

/* Tablet specific (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .nav-links {
    width: 320px;
    left: -320px;
  }
  
  .nav-links.active {
    left: 0;
  }
}

/* Desktop - hide hamburger, show inline nav */
@media (min-width: 1025px) {
  .hamburger {
    display: none !important;
  }
  
  .nav-links {
    position: static;
    flex-direction: row;
    width: auto;
    height: auto;
    padding: 0;
    gap: 2rem;
    box-shadow: none;
    background: transparent;
  }
  
  .nav-links a,
  .nav-links button {
    width: auto;
  }
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
  overflow: hidden;
}


/* ============================================
   MOBILE RESPONSIVE ENHANCEMENTS
   ============================================ */

/* Mobile-First Base Improvements */
html {
  font-size: 16px; /* Base font size */
}

body {
  font-size: 16px; /* Prevents iOS zoom on inputs */
  min-width: 320px; /* Minimum supported width */
}

/* Touch-Friendly Buttons */
button, .btn, input[type="submit"], input[type="button"], .qty-btn {
  min-height: 44px !important; /* Apple HIG touch target */
  min-width: 44px !important;
  font-size: 16px !important;
  padding: 12px 20px;
}

/* Form Inputs - Prevent Zoom on iOS */
input, textarea, select {
  font-size: 16px !important; /* Critical: prevents iOS zoom */
  width: 100%;
  max-width: 100%;
  padding: 12px;
  border-radius: 8px;
}

/* Responsive Container */
.container, .section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container, .section {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .container, .section {
    padding: 0 3rem;
  }
}

/* Responsive Product Grid */
.products-grid, .stores-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr; /* Mobile: 1 column */
  padding: 1rem;
}

@media (min-width: 640px) {
  .products-grid, .stores-grid {
    grid-template-columns: repeat(2, 1fr); /* Tablet: 2 columns */
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr); /* Desktop: 4 columns */
    gap: 2rem;
  }
  
  .stores-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Product Cards - Mobile Optimized */
.product-card {
  width: 100%;
  max-width: 100%;
}

/* Hero Section Responsive */
.hero-section {
  padding: 2rem 1rem !important;
  min-height: auto !important;
}

.hero-title {
  font-size: 2rem !important; /* Mobile */
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1rem !important;
}

.hero-stats {
  flex-direction: column !important;
  gap: 1rem !important;
}

.hero-stat-item {
  width: 100% !important;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-section {
    padding: 3rem 2rem !important;
  }
  
  .hero-title {
    font-size: 3rem !important;
  }
  
  .hero-subtitle {
    font-size: 1.25rem !important;
  }
  
  .hero-stats {
    flex-direction: row !important;
  }
  
  .hero-stat-item {
    width: auto !important;
  }
}

@media (min-width: 1024px) {
  .hero-section {
    padding: 4rem 3rem !important;
  }
  
  .hero-title {
    font-size: 4rem !important;
  }
}

/* Location Search - Mobile */
.location-search {
  flex-direction: column !important;
  gap: 1rem !important;
  width: 100% !important;
}

.location-search select,
.location-search button {
  width: 100% !important;
  font-size: 16px !important;
}

@media (min-width: 768px) {
  .location-search {
    flex-direction: row !important;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .location-search select {
    width: auto !important;
    flex: 0 0 auto;
  }
  
  .location-search button {
    width: auto !important;
    flex: 1;
  }
}

/* Checkout Modal - Mobile Responsive */
.modal-content {
  width: 95% !important;
  max-width: 95% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  margin: 1rem !important;
}

@media (min-width: 768px) {
  .modal-content {
    width: 600px !important;
    max-width: 90% !important;
    margin: 2rem auto !important;
  }
}

@media (min-width: 1024px) {
  .modal-content {
    width: 700px !important;
  }
}

/* Checkout Options - Stack on Mobile */
.checkout-options {
  flex-direction: column !important;
  gap: 1rem !important;
}

.checkout-option {
  width: 100% !important;
  min-height: 60px !important;
}

@media (min-width: 640px) {
  .checkout-options {
    flex-direction: row !important;
  }
  
  .checkout-option {
    width: auto !important;
    flex: 1;
  }
}

/* Form Groups - Mobile Spacing */
.form-group {
  margin-bottom: 1.5rem !important;
}

.form-group label {
  font-size: 14px !important;
  margin-bottom: 0.5rem !important;
  display: block;
}

.form-group input,
.form-group textarea,
.form-group select {
  font-size: 16px !important;
  padding: 12px !important;
}

/* Tip Options - Mobile Stack */
.tip-options {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 0.75rem !important;
}

.tip-btn {
  min-height: 48px !important;
  font-size: 16px !important;
}

@media (min-width: 640px) {
  .tip-options {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* Modal Actions - Stack on Mobile */
.modal-actions {
  flex-direction: column !important;
  gap: 1rem !important;
}

.modal-actions button {
  width: 100% !important;
  min-height: 50px !important;
  font-size: 16px !important;
}

@media (min-width: 640px) {
  .modal-actions {
    flex-direction: row !important;
  }
  
  .modal-actions button {
    width: auto !important;
    flex: 1;
  }
}

/* Floating Cart styles moved to consolidated section below */

/* Tables - Mobile Card Layout */
@media (max-width: 767px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Alternative: Convert to cards */
  table.mobile-cards {
    display: block;
  }
  
  table.mobile-cards thead {
    display: none;
  }
  
  table.mobile-cards tbody,
  table.mobile-cards tr {
    display: block;
    width: 100%;
  }
  
  table.mobile-cards tr {
    margin-bottom: 1rem;
    border: 1px solid var(--bnb-border-light);
    border-radius: 8px;
    padding: 1rem;
    background: white;
  }
  
  table.mobile-cards td {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bnb-border-light);
  }
  
  table.mobile-cards td:last-child {
    border-bottom: none;
  }
  
  table.mobile-cards td:before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 1rem;
  }
}

/* Utility Classes */
.mobile-only {
  display: block !important;
}

.tablet-up {
  display: none !important;
}

.desktop-only {
  display: none !important;
}

@media (min-width: 768px) {
  .mobile-only {
    display: none !important;
  }
  
  .tablet-up {
    display: block !important;
  }
}

@media (min-width: 1024px) {
  .desktop-only {
    display: block !important;
  }
}

/* Text Utilities */
.text-center-mobile {
  text-align: center;
}

@media (min-width: 768px) {
  .text-center-mobile {
    text-align: left;
  }
}

/* Spacing Utilities */
.p-mobile {
  padding: 1rem !important;
}

.px-mobile {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.py-mobile {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

@media (min-width: 768px) {
  .p-mobile {
    padding: 2rem !important;
  }
  
  .px-mobile {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }
  
  .py-mobile {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* Prevent Horizontal Scroll */
body, html {
  overflow-x: hidden;
  max-width: 100vw;
}

* {
  max-width: 100%;
}

/* Touch Improvements */
button, a, .clickable {
  -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
  touch-action: manipulation; /* Prevents double-tap zoom */
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading States */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

/* Focus Styles for Accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--bnb-primary);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .site-header,
  .floating-cart,
  .modal,
  button,
  .no-print {
    display: none !important;
  }
}


/* ============================================
   COMPACT PRODUCT TILES FOR MOBILE
   ============================================ */

/* Mobile Product Cards - Compact Design */
@media (max-width: 767px) {
  .product-card {
    padding: 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }
  
  .product-card img {
    height: 150px !important;
    object-fit: cover;
    border-radius: 8px;
  }
  
  .product-card h3,
  .product-card .product-name {
    font-size: 0.95rem !important;
    line-height: 1.3;
    margin: 0.5rem 0 !important;
    max-height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  
  .product-card .product-price,
  .product-card .price {
    font-size: 1.1rem !important;
    margin: 0.5rem 0 !important;
  }
  
  .product-card .product-description,
  .product-card .description {
    font-size: 0.85rem !important;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  
  .product-card button,
  .product-card .btn {
    padding: 0.6rem 1rem !important;
    font-size: 0.9rem !important;
    min-height: 40px !important;
  }
  
  /* Compact quantity controls in product cards */
  .product-card .product-qty-controls {
    margin: 0.5rem 0 !important;
    gap: 6px !important;
  }
  
  .product-card .qty-btn-small {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }
  
  .product-card .product-qty-input {
    width: 50px !important;
    padding: 6px !important;
    font-size: 14px !important;
  }
  
  .product-card .live-price {
    font-size: 1rem !important;
    margin-top: 0.5rem !important;
  }
  
  /* Store cards - also compact */
  .store-card {
    padding: 0.75rem !important;
  }
  
  .store-card img {
    height: 120px !important;
    object-fit: cover;
  }
  
  .store-card h3 {
    font-size: 1rem !important;
    margin: 0.5rem 0 !important;
  }
  
  .store-card p {
    font-size: 0.85rem !important;
  }
}

/* Small mobile phones (< 375px) - Extra compact */
@media (max-width: 374px) {
  .product-card {
    padding: 0.5rem !important;
  }
  
  .product-card img {
    height: 130px !important;
  }
  
  .product-card h3,
  .product-card .product-name {
    font-size: 0.9rem !important;
  }
  
  .product-card .product-price,
  .product-card .price {
    font-size: 1rem !important;
  }
  
  .product-card button,
  .product-card .btn {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.85rem !important;
  }
}

/* Tablet - Medium size */
@media (min-width: 768px) and (max-width: 1023px) {
  .product-card {
    padding: 1rem !important;
  }
  
  .product-card img {
    height: 180px !important;
  }
  
  .product-card h3,
  .product-card .product-name {
    font-size: 1rem !important;
  }
}

/* Desktop - Full size */
@media (min-width: 1024px) {
  .product-card {
    padding: 1.25rem !important;
  }
  
  .product-card img {
    height: 220px !important;
  }
  
  .product-card h3,
  .product-card .product-name {
    font-size: 1.1rem !important;
  }
}


/* Duplicate section removed - see main FLOATING CART section at top of file */


/* ============================================
   FIX HEADER NAVIGATION OVERLAP ON IPAD/TABLET
   ============================================ */

/* Header - Prevent Logo/Nav Overlap */
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
  background: white !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

.main-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0.75rem 1rem !important;
  max-width: 100% !important;
  gap: 1rem !important;
}

.logo {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
  z-index: 10 !important;
}

.logo img {
  height: 40px !important;
  width: auto !important;
}

.logo span {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

/* Mobile - Hide nav links, show hamburger */
@media (max-width: 767px) {
  .nav-links {
    position: fixed !important;
    top: 0 !important;
    left: -100% !important;
    width: 80% !important;
    max-width: 300px !important;
    height: 100vh !important;
    background: white !important;
    flex-direction: column !important;
    padding: 80px 20px 20px !important;
    transition: left 0.3s ease !important;
    z-index: 999 !important;
    overflow-y: auto !important;
  }
  
  .nav-links.active {
    left: 0 !important;
  }
  
  .hamburger {
    display: flex !important;
  }
  
  .logo span {
    font-size: 1.1rem !important;
  }
}

/* Tablet (iPad) - Show limited nav items, better spacing */
@media (min-width: 768px) and (max-width: 1023px) {
  .main-nav {
    padding: 0.75rem 1.5rem !important;
  }
  
  .logo {
    margin-right: auto !important;
  }
  
  .logo span {
    font-size: 1.3rem !important;
  }
  
  /* Show hamburger on iPad */
  .hamburger {
    display: flex !important;
  }
  
  /* Use mobile menu layout on iPad */
  .nav-links {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 300px !important;
    height: 100vh !important;
    background: white !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 100px 2rem 2rem !important;
    gap: 1.5rem !important;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1) !important;
    transition: right 0.3s ease !important;
    overflow-y: auto !important;
    z-index: 999 !important;
  }
  
  .nav-links.active {
    right: 0 !important;
  }
  
  .nav-links a {
    width: 100% !important;
    padding: 0.75rem 0 !important;
    font-size: 16px !important;
  }
  
  #header-cart-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  
  .user-menu-container {
    width: 100% !important;
  }
  
  .user-menu-btn {
    width: 100% !important;
    justify-content: flex-start !important;
  }
  
  .login-btn {
    width: 100% !important;
    text-align: center !important;
    padding: 0.75rem !important;
  }
}

/* Desktop - Full navigation */
@media (min-width: 1024px) {
  .main-nav {
    padding: 1rem 2rem !important;
    gap: 2rem !important;
  }
  
  .logo span {
    font-size: 1.5rem !important;
  }
  
  .nav-links {
    display: flex !important;
    align-items: center !important;
    gap: 1.5rem !important;
  }
  
  .nav-links a,
  .nav-links button {
    font-size: 1rem !important;
    padding: 0.5rem 1rem !important;
  }
  
  .nav-links a span.desktop-only {
    display: inline !important;
  }
  
  .hamburger {
    display: none !important;
  }
}

/* Cart Button in Header */
#header-cart-btn {
  position: relative !important;
  background: var(--bnb-primary) !important;
  color: white !important;
  border: none !important;
  border-radius: 50% !important;
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

.cart-badge {
  position: absolute !important;
  top: -5px !important;
  right: -5px !important;
  background: var(--bnb-danger) !important;
  color: white !important;
  border-radius: 50% !important;
  width: 20px !important;
  height: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

/* User Menu - Responsive */
.user-menu-container {
  position: relative !important;
  flex-shrink: 0 !important;
}

.user-menu-btn {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.5rem 1rem !important;
  background: var(--bnb-bg-light) !important;
  border: 1px solid var(--bnb-border-light) !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-size: 0.9rem !important;
  white-space: nowrap !important;
}

@media (max-width: 767px) {
  .user-menu-btn span {
    max-width: 80px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* Login Button */
.login-btn {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.5rem 1rem !important;
  background: var(--bnb-primary) !important;
  color: white !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

@media (max-width: 767px) {
  .login-btn {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem !important;
  }
}


/* ============================================
   HORIZONTAL SCROLLING STORES ON MOBILE
   ============================================ */

/* Stores Grid - Horizontal Scroll on Mobile */
@media (max-width: 767px) {
  .stores-grid, #nearby-stores {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 1rem !important;
    padding: 1rem !important;
    grid-template-columns: none !important;
  }
  
  .stores-grid .store-card,
  #nearby-stores .store-card {
    flex: 0 0 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    scroll-snap-align: start !important;
  }
  
  /* Hide scrollbar but keep functionality */
  .stores-grid::-webkit-scrollbar,
  #nearby-stores::-webkit-scrollbar {
    height: 6px !important;
  }
  
  .stores-grid::-webkit-scrollbar-track,
  #nearby-stores::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 10px !important;
  }
  
  .stores-grid::-webkit-scrollbar-thumb,
  #nearby-stores::-webkit-scrollbar-thumb {
    background: var(--bnb-primary) !important;
    border-radius: 10px !important;
  }
}

/* Tablet - 2 columns but allow scroll if needed */
@media (min-width: 768px) and (max-width: 1023px) {
  .stores-grid, #nearby-stores {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
  }
}


/* ============================================
   FIX TOUCH INTERACTIONS ON IPAD
   ============================================ */

/* Enable touch scrolling and interactions */
* {
  -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2) !important;
  -webkit-touch-callout: default !important;
}

/* Ensure all clickable elements are touch-friendly */
a, button, input, select, textarea, [onclick], [role="button"] {
  touch-action: manipulation !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  cursor: pointer !important;
}

/* Allow text selection in inputs */
input, textarea {
  -webkit-user-select: text !important;
  user-select: text !important;
}

/* Smooth scrolling for touch */
.stores-grid, .products-grid, #nearby-stores, #search-results {
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
}

/* Remove hover states on touch devices */
@media (hover: none) and (pointer: coarse) {
  button:hover, a:hover, .clickable:hover {
    transform: none !important;
  }
  
  /* Add active states instead */
  button:active, a:active, .clickable:active {
    transform: scale(0.98) !important;
    opacity: 0.9 !important;
  }
}

/* Fix iOS Safari specific issues */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari */
  body {
    -webkit-text-size-adjust: 100% !important;
  }
  
  input, textarea, select {
    -webkit-appearance: none !important;
    border-radius: 8px !important;
  }
}


/* ============================================
   MOBILE/TABLET CHECKOUT FIXES
   Critical fixes for touch, modal, and cart issues
   ============================================ */

/* ==============================
   1. TOUCH INTERACTION FIXES
============================== */

/* Enable fast touch response (remove 300ms delay) */
button,
a,
.btn,
.checkout-option,
.tip-btn,
.qty-btn,
.remove-btn,
.modal-close,
[role="button"],
[onclick] {
  touch-action: manipulation !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2) !important;
}

/* Prevent text selection on buttons */
button,
.btn,
.checkout-option,
.tip-btn,
.qty-btn,
.remove-btn {
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* Ensure minimum 44x44px touch targets */
button,
.btn,
.qty-btn,
.tip-btn,
.checkout-option,
a.btn,
.modal-close {
  min-width: 44px !important;
  min-height: 44px !important;
}

/* Add visual feedback for touch */
button:active,
.btn:active,
a:active {
  transform: scale(0.98) !important;
  opacity: 0.9 !important;
}

/* ==============================
   2. MODAL SYSTEM FIXES
============================== */

/* Prevent modal duplication and fix positioning */
.modal {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(4px) !important;
  z-index: 10000 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
}

.modal.active {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 1rem !important;
}

/* Modal content responsive sizing */
.modal-content {
  background: white !important;
  border-radius: 12px !important;
  width: 100% !important;
  max-width: 95% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15) !important;
  margin: auto !important;
  position: relative !important;
  z-index: 10001 !important;
}

/* Tablet modal sizing */
@media (min-width: 768px) and (max-width: 1023px) {
  .modal-content {
    width: 600px !important;
    max-width: 90% !important;
    max-height: 85vh !important;
  }
  
  .modal.active {
    padding: 2rem 1rem !important;
  }
}

/* Desktop modal sizing */
@media (min-width: 1024px) {
  .modal-content {
    width: 700px !important;
    max-width: 700px !important;
    max-height: 90vh !important;
  }
  
  .modal.active {
    padding: 2rem !important;
  }
}

/* Prevent background scrolling when modal is open */
body.modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
}

/* Modal header sticky positioning */
.modal-header {
  position: sticky !important;
  top: 0 !important;
  background: white !important;
  z-index: 10 !important;
  padding: 1rem 1.5rem !important;
  border-bottom: 2px solid var(--bnb-border-light) !important;
}

/* Modal body scrollable */
.modal-body {
  padding: 1.5rem !important;
  overflow-y: auto !important;
}

/* ==============================
   3. FLOATING CART FIXES
============================== */

/* Fix floating cart positioning - stay within viewport */
.floating-cart,
#cart-summary {
  position: fixed !important;
  bottom: 10px !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  background: white !important;
  border-radius: 12px !important;
  padding: 0.75rem !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
  display: none !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.5rem !important;
  z-index: 999 !important;
  max-width: calc(100vw - 20px) !important;
  width: 90% !important;
  box-sizing: border-box !important;
}

/* Hide floating cart on cart page */
body.cart-page .floating-cart,
body.cart-page #cart-summary {
  display: none !important;
}

/* Tablet floating cart positioning */
@media (min-width: 768px) and (max-width: 1023px) {
  .floating-cart,
  #cart-summary {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    bottom: 15px !important;
    max-width: 600px !important;
    width: 90% !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 1rem 1.5rem !important;
  }
}

/* Desktop floating cart positioning */
@media (min-width: 1024px) {
  .floating-cart,
  #cart-summary {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    bottom: 20px !important;
    max-width: 600px !important;
    width: auto !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 1rem 1.5rem !important;
  }
}

/* Adjust floating cart when PWA prompt is visible */
.floating-cart.pwa-visible,
#cart-summary.pwa-visible {
  bottom: 90px !important;
}

/* ==============================
   4. PWA PROMPT Z-INDEX FIX
============================== */

/* Ensure PWA prompt is below floating cart */
#pwa-prompt,
.pwa-install-prompt {
  z-index: 998 !important;
  position: fixed !important;
  bottom: 10px !important;
}

/* ==============================
   5. HEADER NAVIGATION FIXES (iPad)
============================== */

/* iPad-specific header fixes */
@media (min-width: 768px) and (max-width: 1023px) {
  .site-header {
    height: 70px !important;
  }
  
  .main-nav {
    padding: 0.5rem 1.5rem !important;
    gap: 0.75rem !important;
  }
  
  /* Reduce logo size on iPad */
  .logo img {
    height: 40px !important;
  }
  
  .logo span {
    font-size: 1.2rem !important;
  }
  
  /* Ensure nav links are visible */
  .nav-links {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-wrap: nowrap !important;
  }
  
  .nav-links a,
  .nav-links button {
    font-size: 14px !important;
    padding: 0.5rem 0.75rem !important;
    white-space: nowrap !important;
  }
  
  /* Ensure login button is visible */
  .login-btn,
  .user-menu-btn {
    display: flex !important;
    flex-shrink: 0 !important;
    font-size: 14px !important;
    padding: 0.5rem 0.75rem !important;
  }
  
  /* Cart button visible */
  #header-cart-btn {
    display: flex !important;
    flex-shrink: 0 !important;
    width: 40px !important;
    height: 40px !important;
  }
  
  /* Hide hamburger on iPad */
  .hamburger {
    display: none !important;
  }
}

/* ==============================
   6. FORM INPUT KEYBOARD FIX
============================== */

/* Ensure form inputs stay visible when keyboard appears */
@media (max-width: 767px) {
  .form-group input:focus,
  .form-group textarea:focus,
  .form-group select:focus {
    scroll-margin-top: 100px !important;
    scroll-margin-bottom: 100px !important;
  }
  
  /* Adjust modal body padding when input is focused */
  .modal-body:has(input:focus),
  .modal-body:has(textarea:focus) {
    padding-bottom: 300px !important;
  }
}

/* ==============================
   7. CHECKOUT OPTIONS TOUCH FIX
============================== */

/* Ensure checkout options are touch-friendly */
.checkout-option {
  min-height: 80px !important;
  padding: 1rem !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.checkout-option:active {
  transform: scale(0.98) !important;
  opacity: 0.9 !important;
}

/* Stack checkout options on mobile */
@media (max-width: 639px) {
  .checkout-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .checkout-option {
    width: 100% !important;
  }
}

/* ==============================
   8. TIP BUTTONS TOUCH FIX
============================== */

/* Ensure tip buttons are touch-friendly */
.tip-btn {
  min-height: 48px !important;
  padding: 12px !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  font-size: 16px !important;
}

.tip-btn:active {
  transform: scale(0.95) !important;
}

/* Stack tip buttons on small mobile */
@media (max-width: 639px) {
  .tip-options {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
}

/* ==============================
   9. MODAL ACTIONS TOUCH FIX
============================== */

/* Ensure modal action buttons are touch-friendly */
.modal-actions {
  display: flex !important;
  gap: 1rem !important;
  margin-top: 1.5rem !important;
}

.modal-actions button {
  min-height: 50px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  touch-action: manipulation !important;
  cursor: pointer !important;
}

/* Stack modal actions on mobile */
@media (max-width: 639px) {
  .modal-actions {
    flex-direction: column !important;
  }
  
  .modal-actions button {
    width: 100% !important;
  }
}

/* ==============================
   10. QUANTITY BUTTONS TOUCH FIX
============================== */

/* Ensure quantity buttons are touch-friendly */
.qty-btn {
  min-width: 44px !important;
  min-height: 44px !important;
  touch-action: manipulation !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.qty-btn:active {
  transform: scale(0.95) !important;
}

/* ==============================
   11. SMOOTH SCROLLING
============================== */

/* Enable smooth scrolling for all scrollable elements */
.modal,
.modal-content,
.modal-body,
.stores-grid,
#nearby-stores,
#search-results {
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: smooth !important;
}

/* ==============================
   12. PREVENT ZOOM ON INPUT FOCUS (iOS)
============================== */

/* Prevent iOS zoom on input focus */
@media (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* ==============================
   END MOBILE/TABLET CHECKOUT FIXES
============================== */


/* ===== MOBILE PRODUCT TILES - COMPACT & FIT SCREEN ===== */
@media (max-width: 767px) {
  .product-item {
    padding: 0.6rem !important;
    border-radius: 12px !important;
  }
  
  .product-item img {
    height: 120px !important;
    border-radius: 8px !important;
    margin-bottom: 0.5rem !important;
  }
  
  .product-item h4 {
    font-size: 0.85rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.3rem !important;
  }
  
  .product-item .unit-price,
  .product-item p[style*="font-weight:bold"] {
    font-size: 1.1rem !important;
    margin: 0.4rem 0 !important;
  }
  
  .product-item button {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.85rem !important;
  }
  
  .product-item .product-qty-controls {
    gap: 4px !important;
    margin: 0.4rem 0 !important;
  }
  
  .product-item .qty-btn-small {
    width: 32px !important;
    height: 32px !important;
    font-size: 1rem !important;
  }
  
  .product-item .product-qty-input {
    width: 45px !important;
    padding: 4px !important;
    font-size: 0.9rem !important;
  }
}

/* Extra small phones - Ultra compact */
@media (max-width: 374px) {
  .product-item {
    padding: 0.5rem !important;
  }
  
  .product-item img {
    height: 100px !important;
  }
  
  .product-item h4 {
    font-size: 0.8rem !important;
  }
  
  .product-item .unit-price,
  .product-item p[style*="font-weight:bold"] {
    font-size: 1rem !important;
  }
  
  .product-item button {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8rem !important;
  }
}


/* ===== IPAD HEADER FIX - USE HAMBURGER MENU ===== */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Show hamburger on iPad */
  .hamburger {
    display: flex !important;
  }
  
  /* Hide desktop nav links, use mobile menu */
  .nav-links {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 320px !important;
    height: 100vh !important;
    background: white !important;
    flex-direction: column !important;
    padding: 2rem 1.5rem !important;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1) !important;
    transition: right 0.3s ease !important;
    z-index: 999 !important;
    overflow-y: auto !important;
  }
  
  .nav-links.active {
    right: 0 !important;
  }
  
  .nav-links a,
  .nav-links button,
  .nav-links .user-menu-container {
    width: 100% !important;
    justify-content: flex-start !important;
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }
  
  .nav-links a span.desktop-only {
    display: inline !important;
  }
  
  /* Backdrop when menu is open */
  .nav-links.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: -1;
  }
}


/* ===== FIX MOBILE PRODUCT GRID - PREVENT CUT OFF ===== */
@media (max-width: 767px) {
  /* Ensure container has proper padding */
  .product-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Ensure product items don't overflow */
  .product-item {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  /* Ensure parent containers don't cause overflow */
  .product-section,
  #products-container {
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix any container padding that might cause issues */
  body,
  .container,
  [style*="max-width:1200px"] {
    overflow-x: hidden !important;
  }
}

/* Extra small phones */
@media (max-width: 374px) {
  .product-row {
    gap: 8px !important;
  }
}


/* ===== IPAD STORES - HORIZONTAL SCROLL LIKE MOBILE ===== */
@media (min-width: 768px) and (max-width: 1024px) {
  .stores-grid, #nearby-stores {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 1rem !important;
    padding: 1rem 0 !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .stores-grid .store-card,
  #nearby-stores .store-card {
    flex: 0 0 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    scroll-snap-align: start !important;
  }
  
  /* Scrollbar styling for iPad */
  .stores-grid::-webkit-scrollbar,
  #nearby-stores::-webkit-scrollbar {
    height: 8px !important;
  }
  
  .stores-grid::-webkit-scrollbar-track,
  #nearby-stores::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 4px !important;
  }
  
  .stores-grid::-webkit-scrollbar-thumb,
  #nearby-stores::-webkit-scrollbar-thumb {
    background: var(--bnb-primary) !important;
    border-radius: 4px !important;
  }
}

/* ============================================
   TIP SELECTION AND CHECKOUT ENHANCEMENTS
   ============================================ */

/* Tip Selection */
.tip-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.tip-btn {
    padding: 12px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tip-btn:hover {
    background: #e5e7eb;
}

.tip-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

/* Order Summary */
.order-summary {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.order-summary h3 {
    color: #667eea;
    font-size: 18px;
}

.store-group {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.store-name {
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 15px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.summary-line:last-child {
    border-bottom: none;
}

.summary-line.discount {
    color: #10b981;
}

.summary-line.free {
    color: #10b981;
    font-weight: 600;
}

.summary-breakdown {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e5e7eb;
}

.summary-line.total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #667eea;
    font-size: 18px;
    color: #667eea;
}

.order-summary-loading {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    min-height: 100px;
}

/* Checkout Options Enhanced */
.checkout-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.checkout-option {
    padding: 20px;
    border: 3px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    background: white;
}

.checkout-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.checkout-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.checkout-option i {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}

.checkout-option.whatsapp i {
    color: #25D366;
}

.checkout-option.regular i {
    color: #667eea;
}

.checkout-option strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.checkout-option small {
    color: #6b7280;
    font-size: 13px;
}

/* Mobile Responsive for Tip and Checkout */
@media (max-width: 640px) {
    .tip-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .checkout-options {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        padding: 15px;
    }
    
    .store-group {
        padding: 12px;
    }
}