/* ========================================
   BLUECART HOMEPAGE - COMPLETE CSS
   Created: July 12, 2025
   Purpose: ALL homepage styling in ONE file
   NO OTHER CSS FILES SHOULD AFFECT HOMEPAGE
   ======================================== */

/* ===== CSS RESET & VARIABLES ===== */
:root {
  /* Primary Colors */
  --primary: #2196f3;
  --primary-dark: #1976d2;
  --primary-light: #e3f2fd;
  --secondary: #ffb300;
  --accent: #ff6b35;
  
  /* Text Colors */
  --text-dark: #222;
  --text-medium: #4a5568;
  --text-light: #64748b;
  --text-white: #fff;
  
  /* Background Colors */
  --bg-light: #f7f8fa;
  --bg-white: #fff;
  --bg-overlay: rgba(0, 0, 0, 0.4);
  
  /* Border & Effects */
  --border-light: #e5e7eb;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 4px 15px rgba(33, 150, 243, 0.4);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 25px;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== LOADING SPINNER ===== */
#loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modern-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--primary-light);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== FLOATING PARTICLES ===== */
#particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: floatUp 15s linear infinite;
  opacity: 0.6;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* ===== PROMOTIONAL BANNER - MINIMAL VISIBILITY ===== */
#promo-banner {
  background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #f9ca24);
  background-size: 400% 400%;
  animation: gradientShift 4s ease infinite;
  color: white;
  text-align: center;
  padding: 0.2rem 0.5rem; /* ULTRA MINIMAL */
  font-weight: 500;
  position: relative;
  z-index: 1000;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  font-size: 0.7rem; /* VERY SMALL TEXT */
  max-height: 30px; /* VERY LIMITED HEIGHT */
  overflow: hidden;
  opacity: 0.9; /* SLIGHTLY TRANSPARENT */
}

.promo-banner-content {
  display: flex;
  align-items: center;
  justify-content: center; /* SIMPLE CENTER LAYOUT */
  gap: 0.3rem;
  max-width: 800px; /* CONSTRAIN WIDTH */
  margin: 0 auto;
  min-height: 25px;
  padding: 0 1rem; /* CONTAINER PADDING */
}

/* HIDE COMPLEX BANNER ELEMENTS - KEEP IT SIMPLE */
.banner-left,
.banner-right {
  display: none; /* REMOVE BUTTONS TO MINIMIZE */
}

.banner-center {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  justify-content: center;
  flex: 1;
}

.banner-tagline {
  font-size: 0.65rem;
  opacity: 0.8;
  font-weight: 400;
  margin-left: 0.3rem;
}

.promo-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: 50%;
  transition: background 0.2s ease;
  opacity: 0.7;
}

.promo-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  opacity: 1;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== WELCOME BAR ===== */
#welcome-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 999;
}

.welcome-container {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.welcome-message {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* ===== SEARCH BAR ===== */
#search-bar-container {
  margin: 2rem auto 1rem auto;
  max-width: 700px;
}

.search-wrapper {
  position: relative;
}

#search-input {
  width: 100%;
  padding: 1.2rem 3rem 1.2rem 1.5rem;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

#search-input:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-primary);
}

#search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

#search-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-50%) scale(1.05);
}

#search-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  margin-top: 0.5rem;
  overflow: hidden;
}

#search-results {
  display: none;
  margin: 2rem 0;
}

#search-results h2 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

/* ===== HERO SECTION - BALANCED SIZE ===== */
.hero {
  position: relative;
  min-height: 30vh; /* INCREASED FROM 20vh - 25% REDUCTION FROM ORIGINAL 40vh */
  height: auto; /* ALLOW NATURAL HEIGHT */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  overflow: visible; /* CHANGED FROM HIDDEN TO VISIBLE */
  margin-bottom: 2rem;
  padding: 2rem 0; /* INCREASED PADDING FOR BETTER SPACING */
  z-index: 10; /* ENSURE HERO IS ABOVE OTHER SECTIONS */
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 30vh; /* MATCH HERO HEIGHT */
}

#hero-image {
  width: 100%;
  height: 100%;
  min-height: 30vh; /* MATCH HERO HEIGHT BUT ALLOW GROWTH */
  object-fit: cover;
  opacity: 0.7; /* MUCH MORE VISIBLE - LESS FILTER */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 250, 252, 0.3); /* REDUCED WHITE OVERLAY */
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 15; /* HIGHER Z-INDEX TO ENSURE BUTTONS SHOW ABOVE EVERYTHING */
  text-align: center;
  color: var(--text-dark); /* DARK TEXT ON LIGHT BACKGROUND */
  padding: 2.5rem 2rem; /* INCREASED PADDING FOR BETTER SPACING */
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.2rem; /* INCREASED GAP FOR BETTER SPACING */
}

.hero-content h1 {
  font-size: 2rem; /* SMALLER TEXT */
  font-weight: 800;
  margin-bottom: 0.8rem; /* REDUCED MARGIN */
  line-height: 1.2;
  color: var(--text-dark);
}

.typing-text {
  border-right: 2px solid var(--primary);
  white-space: nowrap;
  overflow: hidden;
  animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--primary); }
}

.hero-subtitle {
  font-size: 1rem; /* SMALLER SUBTITLE */
  margin-bottom: 1.5rem; /* REDUCED MARGIN */
  opacity: 0.8;
  color: var(--text-medium);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 1s ease forwards 3s;
  color: var(--text-medium);
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  z-index: 20; /* ENSURE BUTTONS ARE ABOVE EVERYTHING */
  position: relative;
}

/* ===== BUTTON SYSTEM - PILL SHAPED ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-pill); /* PILL SHAPE */
  padding: 0.75rem 1.5rem; /* COMPACT */
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-primary);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(33, 150, 243, 0.4);
  background: linear-gradient(135deg, var(--primary-dark), #1565c0);
  color: white;
  text-decoration: none;
}

.btn-premium {
  background: linear-gradient(135deg, var(--accent), #f7931e, #ffab00);
  color: white;
  border: none;
  border-radius: var(--radius-pill); /* PILL SHAPE */
  padding: 0.75rem 1.5rem; /* COMPACT */
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 
    0 6px 24px rgba(255, 107, 53, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-premium:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 12px 36px rgba(255, 107, 53, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset,
    0 0 30px rgba(255, 171, 0, 0.3);
  background: linear-gradient(135deg, #ff5722, var(--accent), #f7931e);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: rgba(33, 150, 243, 0.1);
  color: var(--primary-dark);
  border: 1px solid rgba(33, 150, 243, 0.3);
  border-radius: var(--radius-pill); /* PILL SHAPE */
  padding: 0.6rem 1.2rem; /* COMPACT */
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(33, 150, 243, 0.15);
  transform: translateY(-1px);
  color: var(--primary-dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-pill); /* PILL SHAPE */
  padding: 0.6rem 1.2rem; /* COMPACT */
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
  text-decoration: none;
}

/* ===== SECTIONS ===== */
.featured-categories,
.featured-products,
.featured-popular-brands {
  margin-bottom: 4rem;
  position: relative;
  z-index: 5; /* LOWER THAN HERO CONTENT */
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.title-primary {
  color: var(--text-dark);
}

.title-accent {
  color: var(--primary);
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  margin: 4rem 0;
}

/* ===== CARD GRID ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card img {
  width: 100%;
  max-width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.card-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Card buttons should also be pill-shaped */
.card .btn-primary,
.card .btn-outline,
.card .btn-secondary {
  border-radius: var(--radius-pill); /* PILL SHAPE FOR CARD BUTTONS */
  padding: 0.5rem 1rem; /* SMALLER FOR CARDS */
  font-size: 0.85rem;
}

/* ===== MARKET SECTION - IMPROVED UX ===== */
.market-shop-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  padding: 3rem 0;
  margin: 3rem 0;
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(33, 150, 243, 0.1);
  position: relative;
  overflow: hidden;
}

.market-shop-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23e3f2fd" opacity="0.5"/><circle cx="75" cy="75" r="1" fill="%23bbdefb" opacity="0.3"/><circle cx="50" cy="10" r="0.5" fill="%232196f3" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.4;
  z-index: 1;
}

.market-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding: 0 2rem;
  flex-wrap: wrap;
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.market-title-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.market-logo-wrapper {
  position: relative;
  transition: transform 0.3s ease;
}

.market-logo-wrapper:hover {
  transform: scale(1.05) rotate(2deg);
}

.market-logo {
  width: 70px; /* SLIGHTLY LARGER */
  height: 70px;
  border-radius: var(--radius-lg);
  box-shadow: 
    0 12px 40px rgba(33, 150, 243, 0.3),
    0 0 0 3px rgba(255, 255, 255, 0.8);
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border: none;
  transition: all 0.3s ease;
}

.market-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  border-radius: 50%;
  width: 28px; /* SLIGHTLY LARGER */
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
  animation: pulse 2s infinite;
}

/* ===== ENHANCED MARKET SECTION UX ===== */
.market-shop-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 3rem 0 4rem 0;
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}

.market-shop-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(33, 150, 243, 0.03) 0%, transparent 70%);
  animation: marketBackgroundFloat 20s ease-in-out infinite;
  z-index: 1;
}

@keyframes marketBackgroundFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.market-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
  gap: 2rem;
}

.market-title-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.market-logo-wrapper {
  position: relative;
  filter: drop-shadow(0 8px 16px rgba(33, 150, 243, 0.2));
}

.market-logo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  border: 3px solid white;
  box-shadow: 0 8px 32px rgba(33, 150, 243, 0.3);
  transition: all 0.3s ease;
}

.market-logo:hover {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 12px 40px rgba(33, 150, 243, 0.4);
}

.market-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
  animation: marketBadgePulse 3s ease-in-out infinite;
}

@keyframes marketBadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.market-text {
  flex: 1;
}

.market-title {
  margin: 0;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title-accent {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.market-subtitle {
  color: var(--text-medium);
  font-size: 1.2rem;
  margin: 0.5rem 0 0 0;
  font-weight: 500;
  line-height: 1.4;
  opacity: 0.8;
}

/* Enhanced View Market Button */
.market-header .btn-outline {
  background: white;
  border: 2px solid #2196f3;
  color: #2196f3;
  padding: 0.8rem 1.8rem;
  border-radius: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.2);
  position: relative;
  overflow: hidden;
}

.market-header .btn-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.market-header .btn-outline:hover {
  background: #2196f3;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

.market-header .btn-outline:hover::before {
  left: 100%;
}

.market-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

/* Enhanced Market Cards with Beautiful UX - FIXED CLASS NAME */
.market-item-card {
  background: white;
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* SMOOTH EASING */
  border: 1px solid rgba(33, 150, 243, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 280px;
  cursor: pointer;
  transform: translateZ(0); /* ENABLE GPU ACCELERATION */
  backface-visibility: hidden; /* PREVENT FLICKER */
}

.market-item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2196f3, #ff6b35, #2196f3);
  background-size: 200% 100%;
  animation: marketCardShimmer 3s ease-in-out infinite;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes marketCardShimmer {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
}

.market-item-card:hover::before {
  transform: scaleX(1);
}

.market-item-card:hover {
  transform: translateY(-8px) translateZ(0); /* SMOOTH LIFT ONLY */
  box-shadow: 0 20px 40px rgba(33, 150, 243, 0.15);
  border-color: rgba(33, 150, 243, 0.3);
}

.market-item-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.2rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: #f8f9fa; /* LOADING BACKGROUND */
}

.market-item-card:hover img {
  transform: scale(1.05); /* SUBTLE SCALE ONLY */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.market-item-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 0.8rem 0;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.market-item-card:hover h3 {
  color: #2196f3;
}

.market-item-card .description {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-item-card .price {
  font-size: 1.3rem;
  font-weight: 800;
  color: #10b981;
  margin-bottom: 1.2rem;
  text-shadow: 0 1px 2px rgba(16, 185, 129, 0.2);
}

/* Market Card Actions */
.market-item-card .actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: auto;
}

.market-add-to-cart-btn {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%) !important;
  color: white !important;
  border: none !important;
  padding: 0.8rem 1.2rem !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  font-size: 0.9rem;
  width: 100%;
  transform: translateZ(0);
}

.market-add-to-cart-btn:hover {
  transform: translateY(-2px) translateZ(0) !important;
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4) !important;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%) !important;
}

.market-qty-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  background: #f8fafc;
  border-radius: 10px;
  padding: 0.6rem;
  border: 1px solid #e2e8f0;
}

.market-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: white;
  color: #374151;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.market-qty-btn:hover {
  background: #2196f3;
  color: white;
  border-color: #2196f3;
  transform: scale(1.1);
}

/* ===== FOOTER ===== */
footer {
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
  color: white;
  padding: 4rem 0 2rem 0;
  margin-top: 4rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.footer-link {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.footer-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: white;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 2rem;
  margin-top: 2rem;
  text-align: center;
}

.footer-copyright {
  margin: 0;
  opacity: 0.8;
  font-size: 0.95rem;
}

.footer-tagline {
  margin: 0.5rem 0 0 0;
  opacity: 0.6;
  font-size: 0.85rem;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.35);
  align-items: center;
  justify-content: center;
  padding: 1em;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}

/* ===== DESKTOP/TABLET RESPONSIVE (768px and up) ===== */
@media (min-width: 769px) {
  /* Ensure hero stays compact on larger screens */
  .hero {
    min-height: 30vh; /* 25% REDUCTION FROM ORIGINAL 40vh */
    max-height: 35vh; /* PREVENT GROWING TOO LARGE */
    padding: 2rem 0; /* ADEQUATE PADDING FOR BUTTONS */
  }
  
  .hero-image-wrapper,
  #hero-image {
    min-height: 30vh;
    max-height: 35vh;
  }
  
  .hero-content {
    padding: 2rem; /* GOOD PADDING FOR DESKTOP */
    gap: 1rem;
  }
  
  .hero-content h1 {
    font-size: 2rem; /* REASONABLE SIZE FOR DESKTOP */
    margin-bottom: 0.5rem;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  /* Mobile Banner - ULTRA MINIMAL */
  #promo-banner {
    padding: 0.15rem 0.3rem;
    font-size: 0.6rem;
    max-height: 25px;
  }
  
  .promo-banner-content {
    min-height: 20px;
    padding: 0 0.5rem;
  }
  
  .banner-tagline {
    display: none; /* HIDE TAGLINE ON MOBILE */
  }
  
  .promo-close-btn {
    font-size: 0.9rem;
    padding: 0.1rem 0.2rem;
  }
  
  /* Mobile Welcome Bar */
  #welcome-bar {
    padding: 0.5rem 0;
  }
  
  .welcome-message {
    font-size: 0.9rem;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  /* Mobile Search - COMPACT */
  #search-bar-container {
    margin: 1rem auto 0.5rem auto; /* REDUCED MARGINS */
  }
  
  #search-input {
    padding: 1rem 2.5rem 1rem 1rem;
    font-size: 1rem;
  }
  
  /* Mobile Hero - FLEXIBLE HEIGHT TO SHOW BUTTONS */
  .hero {
    min-height: 45vh; /* INCREASED HEIGHT FOR MOBILE */
    max-height: none; /* REMOVE MAX HEIGHT RESTRICTION */
    height: auto; /* ALLOW NATURAL HEIGHT */
    padding: 2rem 0; /* INCREASED PADDING FOR MOBILE */
    margin-bottom: 1rem;
    overflow: visible; /* ALLOW CONTENT TO SHOW */
  }
  
  .hero-image-wrapper {
    min-height: 45vh; /* MATCH MOBILE HERO HEIGHT */
    max-height: none; /* REMOVE HEIGHT RESTRICTION */
  }
  
  #hero-image {
    min-height: 45vh; /* MATCH MOBILE HERO HEIGHT */
    max-height: none; /* REMOVE HEIGHT RESTRICTION */
    opacity: 0.6; /* MORE VISIBLE ON MOBILE TOO */
  }
  
  .hero-content {
    padding: 2rem 1rem; /* INCREASED PADDING FOR MOBILE */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 1.2rem; /* ENSURE PROPER SPACING */
  }
  
  .hero-content h1 {
    font-size: 1.6rem; /* SLIGHTLY SMALLER ON MOBILE */
    margin-bottom: 0.5rem;
    line-height: 1.3;
  }
  
  .hero-subtitle {
    font-size: 0.9rem; /* SMALLER SUBTITLE */
    margin-bottom: 1.5rem; /* MORE SPACE FOR BUTTONS */
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem; /* MORE SPACE BETWEEN BUTTONS */
    margin-top: 1rem;
  }
  
  /* Mobile Buttons - ENSURE VISIBILITY */
  .btn-primary,
  .btn-premium {
    padding: 0.75rem 1.5rem; /* BETTER TOUCH TARGET */
    font-size: 0.95rem;
    margin: 0.25rem;
    border-radius: var(--radius-pill); /* KEEP PILL SHAPE */
    width: auto;
    min-width: 160px; /* MINIMUM WIDTH FOR READABILITY */
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }
  
  .btn-secondary,
  .btn-outline {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: var(--radius-pill); /* KEEP PILL SHAPE */
  }
  
  /* Mobile Sections */
  .section-header {
    flex-direction: column;
    text-align: center;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  /* Enhanced Mobile Market Section */
  .market-shop-section {
    padding: 2rem 0 3rem 0;
    margin: 2rem 0;
  }
  
  .market-header {
    flex-direction: column;
    text-align: center;
    padding: 0 1rem;
    gap: 1.5rem;
  }
  
  .market-title-group {
    flex-direction: column;
    gap: 1rem;
  }
  
  .market-logo {
    width: 60px;
    height: 60px;
  }
  
  .market-badge {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }
  
  .market-title {
    font-size: 2rem;
  }
  
  .market-subtitle {
    font-size: 1rem;
  }
  
  .market-items-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .market-item-card {
    min-height: 240px;
    padding: 1.5rem;
  }
  
  .market-item-card img {
    width: 100px;
    height: 100px;
  }
  
  .market-item-card h3 {
    font-size: 1.1rem;
  }
  
  .market-item-card .actions {
    gap: 0.6rem;
  }
  
  .market-add-to-cart-btn {
    padding: 0.7rem 1rem !important;
    font-size: 0.85rem !important;
  }
  
  .footer-links {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  /* Very Small Screens - SUPER COMPACT */
  #promo-banner {
    padding: 0.25rem 0.5rem; /* ULTRA COMPACT */
    font-size: 0.75rem;
  }
  
  .welcome-message {
    font-size: 0.8rem;
  }

  /* Mobile Search - EVEN MORE COMPACT */
  #search-bar-container {
    margin: 0.5rem auto 0.25rem auto; /* MINIMAL MARGINS */
  }
  
  #search-input {
    padding: 0.85rem 2.25rem 0.85rem 1rem; /* SMALLER PADDING */
    font-size: 0.95rem;
  }

  /* Mobile Hero - EXTRA SPACE FOR BUTTONS */
  .hero {
    min-height: 45vh !important; /* MORE HEIGHT FOR VERY SMALL SCREENS */
    padding: 1.5rem 0;
  }
  
  .hero-content {
    padding: 1rem 0.5rem;
    gap: 1.5rem; /* MORE SPACE BETWEEN ELEMENTS */
  }
  
  .hero-content h1 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
  
  .hero-buttons {
    margin-top: 1.5rem;
    gap: 1rem; /* MORE SPACE BETWEEN BUTTONS */
  }
  
  /* Mobile Buttons - FULL WIDTH BUT STILL PILL SHAPED */
  .btn-primary,
  .btn-premium {
    width: 90%;
    max-width: 280px;
    justify-content: center;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    border-radius: var(--radius-pill); /* KEEP PILL SHAPE */
    margin: 0.25rem 0;
  }
  
  .market-title {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* ===== UTILITY CLASSES ===== */
.interactive-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* ===== QUANTITY BUTTONS FOR PRODUCTS ===== */
.qty-btn {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-dark);
}

.qty-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

/* ===== VIEW PRODUCT BUTTON - PILL SHAPED ===== */
.view-product-btn {
  background: var(--bg-white) !important;
  border: 2px solid var(--primary) !important;
  color: var(--primary) !important;
  border-radius: var(--radius-pill) !important; /* PILL SHAPE */
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.view-product-btn:hover {
  background: var(--primary) !important;
  color: white !important;
  transform: translateY(-1px);
}

/* ===== ADD TO CART BUTTON - PILL SHAPED ===== */
.add-to-cart-btn {
  border-radius: var(--radius-pill) !important; /* PILL SHAPE */
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ===== ENSURE ALL BUTTONS ARE PILL SHAPED ===== */
button,
.btn-primary,
.btn-premium,
.btn-secondary,
.btn-outline,
.add-to-cart-btn,
.view-product-btn {
  border-radius: var(--radius-pill) !important; /* FORCE PILL SHAPE */
}
