/* Responsive styles for main site */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  --border-radius: 20px;
  --border-radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0,0,0,0.1);
  --shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
}

/* Base responsive typography */
html {
  font-size: 16px;
}

* {
  font-family: 'Poppins', sans-serif;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Navbar responsive */
.navbar {
  background: var(--dark-gradient) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Search container responsive */
.search-container {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.search-container input {
  border-radius: 25px;
  padding-left: 3rem;
  border: 2px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
  width: 100%;
}

.search-container input::placeholder {
  color: rgba(255,255,255,0.7);
}

.search-container i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.7);
  z-index: 10;
}

/* Button responsive styles */
.btn-gradient-primary {
  background: var(--primary-gradient);
  border: none;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  white-space: nowrap;
}

.btn-gradient-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
  color: white;
}

.btn-gradient-secondary {
  background: var(--secondary-gradient);
  border: none;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
  white-space: nowrap;
}

.btn-gradient-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(240, 147, 251, 0.6);
  color: white;
}

/* Hero banner responsive */
.hero-banner {
  background: var(--primary-gradient);
  color: white;
  padding: 4rem 0;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.hero-banner::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="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="90" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  animation: float 20s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* Product cards responsive */
.product-card {
  border: none;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all 0.3s ease;
  background: white;
  box-shadow: var(--shadow);
  height: 100%;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.product-card img {
  object-fit: cover;
  height: 200px;
  transition: transform 0.3s ease;
  width: 100%;
}

.product-card:hover img {
  transform: scale(1.05);
}

/* Category sidebar responsive */
.category-sidebar {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  position: sticky;
  top: 2rem;
}

.list-group-item {
  border: none;
  border-radius: var(--border-radius-sm) !important;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.list-group-item:hover {
  background: var(--primary-gradient);
  color: white;
  transform: translateX(5px);
}

.list-group-item.active {
  background: var(--primary-gradient);
  border: none;
}

/* Price and badge styles */
.price-tag {
  background: var(--success-gradient);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: 600;
  display: inline-block;
}

.sale-badge,
.boosted-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--secondary-gradient);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 3;
}

/* Stats section responsive */
.stats-section {
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.stat-item {
  text-align: center;
  padding: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Floating elements */
.floating-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.floating-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.1);
  animation: floatUpDown 6s ease-in-out infinite;
}

.floating-circle:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-circle:nth-child(2) {
  width: 60px;
  height: 60px;
  top: 60%;
  right: 10%;
  animation-delay: 2s;
}

.floating-circle:nth-child(3) {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes floatUpDown {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-30px); }
}

/* Footer responsive */
footer {
  background: var(--dark-gradient);
  color: white;
  margin-top: 4rem;
  padding: 3rem 0 1rem;
}

/* Responsive breakpoints */
@media (max-width: 1199.98px) {
  html {
    font-size: 15px;
  }
  
  .hero-banner {
    padding: 3rem 0;
  }
  
  .stat-number {
    font-size: 2.2rem;
  }
  
  .product-card img {
    height: 180px;
  }
}

@media (max-width: 991.98px) {
  html {
    font-size: 14px;
  }
  
  .navbar-brand {
    font-size: 1.3rem;
  }
  
  .hero-banner {
    padding: 2.5rem 0;
    margin-bottom: 2rem;
  }
  
  .search-container {
    max-width: 100%;
    margin: 1rem 0;
  }
  
  .category-sidebar {
    position: static;
    margin-bottom: 1.5rem;
  }
  
  .product-card img {
    height: 160px;
  }
  
  .stats-section {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }
  
  .stat-number {
    font-size: 1.8rem;
  }
  
  .stat-item {
    padding: 0.5rem;
  }
  
  /* Navbar collapse styling */
  .navbar-collapse {
    margin-top: 1rem;
  }
  
  .navbar-nav {
    text-align: center;
  }
  
  .d-flex.align-items-center.gap-2.ms-auto {
    flex-direction: column;
    gap: 0.5rem !important;
    width: 100%;
  }
  
  .d-flex.align-items-center.gap-2.ms-auto .btn {
    width: 100%;
    margin: 0.25rem 0;
  }
}

@media (max-width: 767.98px) {
  html {
    font-size: 13px;
  }
  
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .hero-banner {
    padding: 2rem 0;
    text-align: center;
  }
  
  .hero-banner .display-4 {
    font-size: 2rem;
  }
  
  .hero-banner .lead {
    font-size: 1rem;
  }
  
  .product-card img {
    height: 140px;
  }
  
  .category-sidebar {
    padding: 1rem;
  }
  
  .stats-section {
    padding: 1rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .floating-circle {
    display: none;
  }
  
  /* Product grid adjustments */
  .row.g-4 {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
  }
  
  /* Button group responsive */
  .d-flex.gap-3.flex-wrap {
    gap: 0.5rem !important;
    flex-direction: column;
  }
  
  .d-flex.gap-3.flex-wrap .btn {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  html {
    font-size: 12px;
  }
  
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .hero-banner {
    padding: 1.5rem 0;
  }
  
  .hero-banner .display-4 {
    font-size: 1.75rem;
  }
  
  .product-card {
    border-radius: 15px;
  }
  
  .product-card img {
    height: 120px;
  }
  
  .category-sidebar {
    border-radius: 15px;
    padding: 0.75rem;
  }
  
  .stats-section {
    border-radius: 15px;
    padding: 0.75rem;
    margin: 1rem 0;
  }
  
  .stat-item {
    padding: 0.25rem;
  }
  
  .stat-number {
    font-size: 1.2rem;
  }
  
  /* Navigation adjustments for very small screens */
  .navbar-brand img {
    height: 30px;
  }
  
  .search-container input {
    padding: 0.5rem 0.5rem 0.5rem 2.5rem;
  }
  
  .search-container i {
    left: 0.75rem;
  }
  
  /* Card body adjustments */
  .card-body {
    padding: 0.75rem;
  }
  
  .price-tag {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .sale-badge,
  .boosted-badge {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    top: 5px;
    right: 5px;
  }
}

@media (max-width: 480px) {
  .row.g-4 > * {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  .hero-banner .d-flex.gap-3 {
    flex-direction: column;
  }
  
  .stats-section .row > * {
    margin-bottom: 0.5rem;
  }
  
  /* Single column layout for very small screens */
  .col-lg-3,
  .col-lg-9 {
    width: 100%;
  }
  
  /* Simplify product cards for very small screens */
  .product-card:hover {
    transform: none;
  }
  
  .product-card img {
    height: 100px;
  }
}

/* Print styles */
@media print {
  .floating-elements,
  .hero-banner::before,
  .navbar,
  footer,
  .btn,
  .floating-circle {
    display: none !important;
  }
  
  .hero-banner {
    background: none !important;
    color: black !important;
    padding: 1rem 0;
  }
  
  .product-card,
  .category-sidebar,
  .stats-section {
    box-shadow: none !important;
    border: 1px solid #ddd;
  }
  
  body {
    background: white !important;
  }
}

/* Enhanced Logo Visibility - Global Logo Size Overrides */
img[alt="logo"],
img[alt*="logo"],
img[src*="logo"],
.navbar-brand img,
.topbar img,
.login-header img {
  min-height: 48px !important;
  height: auto !important;
  width: auto !important;
  max-width: 200px !important;
  object-fit: contain !important;
}

/* Specific page logo enhancements */
.navbar-brand img {
  height: 65px !important;
}

.topbar .container img {
  height: 50px !important;
}

/* Login and register page logos */
.login-header img,
.card-body .text-center img {
  height: 95px !important;
  max-height: 110px !important;
}

/* Footer logos */
footer img,
.bg-dark img[alt*="logo"] {
  height: 45px !important;
}

/* Admin area logos */
.sidebar img,
admin img[alt*="logo"] {
  height: 52px !important;
}

/* Contact and other utility pages */
.contact img,
.checkout img,
.track-order img {
  height: 50px !important;
}

/* Email template logos */
.email-header img {
  height: 55px !important;
}

/* Hover effects for better interaction */
.navbar-brand img:hover,
.topbar img:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --shadow: 0 10px 30px rgba(255,255,255,0.1);
    --shadow-hover: 0 20px 40px rgba(255,255,255,0.15);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-gradient-primary,
  .btn-gradient-secondary {
    border: 2px solid white;
  }
  
  .product-card {
    border: 2px solid #333;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .floating-circle {
    animation: none;
  }
  
  .hero-banner::before {
    animation: none;
  }
}