/* Modern Animations and Enhanced UI for Ecommerce Website */

/* ===== GLOBAL ANIMATIONS ===== */
* {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* ===== LOADING ANIMATIONS ===== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Page loading overlay */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: all 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
  color: white;
}

.loader-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ===== HEADER ANIMATIONS ===== */
header {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95) !important;
  transition: all 0.3s ease;
}

header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
}

/* Logo animation */
.logo-container {
  overflow: hidden;
}

.logo-container img {
  transition: transform 0.3s ease;
}

.logo-container:hover img {
  transform: scale(1.05) rotate(2deg);
}

/* Search bar enhancement */
.search-container {
  position: relative;
  overflow: hidden;
}

.search-container::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;
}

.search-container:hover::before {
  left: 100%;
}

/* Navigation menu animations */
.navbar-nav .nav-link {
  position: relative;
  overflow: hidden;
}

.navbar-nav .nav-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: left 0.3s ease;
}

.navbar-nav .nav-link:hover::before {
  left: 0;
}

/* ===== CARD ANIMATIONS ===== */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Product card image animations */
.card-img-top {
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.card:hover .card-img-top {
  transform: scale(1.1);
}

/* Card overlay effect */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1),
    rgba(118, 75, 162, 0.1)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.card:hover::before {
  opacity: 1;
}

.card-body {
  position: relative;
  z-index: 2;
  
}

/* ===== BUTTON ANIMATIONS ===== */
.btn {
  position: relative;
  overflow: hidden;
  border: none;
  transition: all 0.3s ease;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

/* Floating action button */
.btn-floating {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  z-index: 1000;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ===== HERO SECTION ANIMATIONS ===== */
.hero-section {
  background: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: "";
  animation: grain 20s linear infinite;
}

@keyframes grain {
  0%,
  100% {
    transform: translate(0, 0);
  }
  10% {
    transform: translate(-5%, -10%);
  }
  20% {
    transform: translate(-15%, 5%);
  }
  30% {
    transform: translate(7%, -25%);
  }
  40% {
    transform: translate(-5%, 25%);
  }
  50% {
    transform: translate(-15%, 10%);
  }
  60% {
    transform: translate(15%, 0%);
  }
  70% {
    transform: translate(0%, 15%);
  }
  80% {
    transform: translate(3%, 35%);
  }
  90% {
    transform: translate(-10%, 10%);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  animation: slideInUp 1s ease-out;
}

.hero-subtitle {
  animation: slideInUp 1s ease-out 0.2s both;
}

.hero-button {
  animation: slideInUp 1s ease-out 0.4s both;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* ===== PRODUCT GRID ANIMATIONS ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 20px 0;
}

.product-item {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.product-item:nth-child(1) {
  animation-delay: 0.1s;
}
.product-item:nth-child(2) {
  animation-delay: 0.2s;
}
.product-item:nth-child(3) {
  animation-delay: 0.3s;
}
.product-item:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== CATEGORY HOVER EFFECTS ===== */
.category-card {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  transition: all 0.4s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(102, 126, 234, 0.8),
    rgba(118, 75, 162, 0.8)
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.category-card:hover::before {
  opacity: 1;
}

.category-card .card-body {
  position: relative;
  z-index: 2;
  transition: transform 0.4s ease;
}

.category-card:hover .card-body {
  transform: translateY(-10px);
}

.category-card:hover {
  transform: scale(1.05);
}

/* ===== PRICE ANIMATIONS ===== */
.price-container {
  position: relative;
}

.price-old {
  position: relative;
  overflow: hidden;
}

.price-old::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -100%;
  width: 100%;
  height: 2px;
  background: #e74c3c;
  transition: left 0.5s ease;
}

.price-old.animate::after {
  left: 0;
}

.price-new {
  animation: priceGlow 2s ease-in-out infinite alternate;
}

@keyframes priceGlow {
  from {
    text-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
  }
  to {
    text-shadow: 0 0 20px rgba(231, 76, 60, 0.8);
  }
}

/* ===== CART ANIMATIONS ===== */
.cart-icon {
  position: relative;
  transition: transform 0.3s ease;
}

.cart-icon:hover {
  transform: scale(1.1);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Add to cart animation */
.add-to-cart-animation {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  animation: addToCart 1s ease-out forwards;
}

@keyframes addToCart {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: scale(0.3) translateX(200px) translateY(-200px);
    opacity: 0;
  }
}

/* ===== FOOTER ANIMATIONS ===== */
footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
  animation: footerGlow 3s ease-in-out infinite;
}

@keyframes footerGlow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* ===== FORM ANIMATIONS ===== */
.form-group {
  position: relative;
  margin-bottom: 30px;
}

.form-control {
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  padding: 15px 20px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.form-label {
  position: absolute;
  top: 15px;
  left: 20px;
  color: #6c757d;
  transition: all 0.3s ease;
  pointer-events: none;
  background: white;
  padding: 0 5px;
}

.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label {
  top: -10px;
  font-size: 12px;
  color: #667eea;
}

/* ===== NOTIFICATION ANIMATIONS ===== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 20px;
  z-index: 9999;
  transform: translateX(400px);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  border-left: 4px solid #27ae60;
}

.notification.error {
  border-left: 4px solid #e74c3c;
}

.notification.warning {
  border-left: 4px solid #f39c12;
}

/* ===== RESPONSIVE ANIMATIONS ===== */
@media (max-width: 768px) {
  .card:hover {
    transform: translateY(-4px);
  }

  .btn-floating {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

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

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  .card {
    background: #2d3748;
    color: white;
  }

  .form-control {
    background: #4a5568;
    border-color: #718096;
    color: white;
  }

  .notification {
    background: #2d3748;
    color: white;
  }
}
/* ==
=== HERO SECTION ENHANCEMENTS ===== */
.hero-section {
  min-height: 70vh;
  position: relative;
  overflow: hidden;
}

.hero-image {
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

.floating-icon {
  position: absolute;
  animation: float 3s ease-in-out infinite;
}

.floating-icon:nth-child(2) {
  animation-delay: 1s;
}

.floating-icon:nth-child(3) {
  animation-delay: 2s;
}

/* Background shapes */
.bg-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: bgFloat 20s ease-in-out infinite;
}

.bg-shape-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.bg-shape-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 20%;
  animation-delay: 7s;
}

.bg-shape-3 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 60%;
  animation-delay: 14s;
}

@keyframes bgFloat {
  0%,
  100% {
    transform: translateY(0px) translateX(0px) scale(1);
  }
  33% {
    transform: translateY(-30px) translateX(20px) scale(1.1);
  }
  66% {
    transform: translateY(20px) translateX(-20px) scale(0.9);
  }
}

/* ===== CATEGORY CARD ENHANCEMENTS ===== */
.category-overlay {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.9),
    rgba(118, 75, 162, 0.9)
  );
  opacity: 0;
  transition: all 0.4s ease;
}

.category-card:hover .category-overlay {
  opacity: 1;
}

.category-content {
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.category-card:hover .category-content {
  transform: translateY(0);
}

/* ===== PRODUCT CARD ENHANCEMENTS ===== */
.product-overlay {
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: all 0.4s ease;
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.product-actions {
  transform: scale(0.8);
  transition: transform 0.4s ease;
}

.product-card:hover .product-actions {
  transform: scale(1);
}

.new-arrival-overlay {
  background: linear-gradient(
    135deg,
    rgba(40, 167, 69, 0.9),
    rgba(25, 135, 84, 0.9)
  );
  opacity: 0;
  transition: all 0.4s ease;
}

.new-arrival-card:hover .new-arrival-overlay {
  opacity: 1;
}

/* ===== PULSE ANIMATION ===== */
.pulse-animation {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ===== ENHANCED HOVER EFFECTS ===== */
.card-img-container {
  position: relative;
  overflow: hidden;
}

.card-img-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: 1;
}

.card:hover .card-img-container::before {
  transform: translateX(100%);
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
}

.newsletter-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"><animate attributeName="opacity" values="0.1;0.3;0.1" dur="3s" repeatCount="indefinite"/></circle><circle cx="80" cy="40" r="1.5" fill="white" opacity="0.1"><animate attributeName="opacity" values="0.1;0.4;0.1" dur="4s" repeatCount="indefinite"/></circle><circle cx="40" cy="80" r="1" fill="white" opacity="0.1"><animate attributeName="opacity" values="0.1;0.2;0.1" dur="5s" repeatCount="indefinite"/></circle></svg>');
}

/* ===== RESPONSIVE ENHANCEMENTS ===== */
@media (max-width: 768px) {
  .hero-section {
    min-height: 60vh;
    text-align: center;
  }

  .floating-icon {
    display: none;
  }

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

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

@media (max-width: 576px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

/* ===== LOADING STATES ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

.skeleton-title {
  height: 1.5rem;
  width: 60%;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.skeleton-image {
  height: 200px;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* ===== MICRO INTERACTIONS ===== */
.btn:active {
  transform: scale(0.98);
}

.card:active {
  transform: scale(0.99);
}

/* Icon animations */
.fas,
.far {
  transition: transform 0.3s ease;
}

.btn:hover .fas,
.btn:hover .far {
  transform: scale(1.1);
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
.btn:focus,
.form-control:focus,
.card:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid #000;
  }

  .btn {
    border: 2px solid currentColor;
  }
} /* ===
== IMPROVED FEATURED PRODUCTS SECTION ===== */
.featured-products-section {
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
  position: relative;
}

.featured-products-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="%23667eea" opacity="0.1"/><circle cx="80" cy="40" r="1.5" fill="%23764ba2" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="%23667eea" opacity="0.1"/></svg>');
  pointer-events: none;
}

.featured-product-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.featured-product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

.featured-product-card .card-img-top {
  transition: all 0.4s ease;
}

.featured-product-card:hover .card-img-top {
  transform: scale(1.1);
}

.product-badges .badge {
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
}

.product-overlay {
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: all 0.4s ease;
  backdrop-filter: blur(2px);
}

.featured-product-card:hover .product-overlay {
  opacity: 1;
}

.product-actions {
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.featured-product-card:hover .product-actions {
  transform: translateY(0);
}

.product-actions .btn {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.product-actions .btn:hover {
  transform: scale(1.1);
}

.product-rating .stars {
  display: inline-flex;
  gap: 2px;
}

.product-rating .stars i {
  font-size: 0.8rem;
}

.price-container {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===== REDUCED SPACING ADJUSTMENTS ===== */
.hero-section {
  margin-bottom: -20px;
}

#categories {
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}

.featured-products-section {
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}

/* ===== CATEGORY CARDS IMPROVEMENTS ===== */
.category-card {
  border-radius: 10px;
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.category-card .card-body {
  padding: 1rem !important;
}

.category-card .card-title {
  font-size: 1rem;
  margin-bottom: 0.5rem !important;
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 768px) {
  .hero-section {
    padding: 40px 0 !important;
  }

  .hero-section .row {
    min-height: 400px !important;
  }

  .hero-image {
    max-height: 250px !important;
  }

  .floating-icon {
    display: none;
  }

  #categories,
  .featured-products-section {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  .featured-product-card:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .product-actions .btn {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 576px) {
  .hero-section .display-4 {
    font-size: 2rem;
  }

  .hero-section .lead {
    font-size: 1rem;
  }

  .hero-section .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .category-card .card-img-top,
  .featured-product-card .card-img-top {
    height: 150px !important;
  }
}

/* ===== SECTION TRANSITIONS ===== */
section {
  position: relative;
  z-index: 1;
}

section:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(102, 126, 234, 0.1),
    transparent
  );
}

/* ===== IMPROVED ANIMATIONS ===== */
.fade-in {
  animation-duration: 0.8s;
  animation-fill-mode: both;
}

.product-item {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.product-item:nth-child(1) {
  animation-delay: 0.1s;
}
.product-item:nth-child(2) {
  animation-delay: 0.2s;
}
.product-item:nth-child(3) {
  animation-delay: 0.3s;
}
.product-item:nth-child(4) {
  animation-delay: 0.4s;
}
.product-item:nth-child(5) {
  animation-delay: 0.5s;
}
.product-item:nth-child(6) {
  animation-delay: 0.6s;
}
.product-item:nth-child(7) {
  animation-delay: 0.7s;
}
.product-item:nth-child(8) {
  animation-delay: 0.8s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
} /* ===== 
FEATURED DEALS BANNER ===== */
.featured-deals-slider {
  position: relative;
}

.deal-card {
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
  background: white;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.deal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.deal-badge {
  z-index: 2;
}

.deal-badge .badge {
  font-size: 0.7rem;
  animation: pulse 2s infinite;
}

.deal-image {
  position: relative;
  overflow: hidden;
}

.deal-image img {
  transition: transform 0.3s ease;
}

.deal-card:hover .deal-image img {
  transform: scale(1.1);
}

.deal-title a:hover {
  color: #667eea !important;
}

.deal-price {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deal-card .btn {
  transition: all 0.3s ease;
  border-radius: 20px;
}

.deal-card:hover .btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .deal-card {
    min-height: 180px;
    padding: 0.75rem !important;
  }

  .deal-image img,
  .deal-image > div {
    height: 60px !important;
    width: 60px !important;
  }

  .deal-title {
    font-size: 0.7rem !important;
  }
}

@media (max-width: 576px) {
  .featured-deals-slider .row {
    margin: 0 -5px;
  }

  .featured-deals-slider .col-6 {
    padding: 0 5px;
  }

  .deal-card {
    min-height: 160px;
    padding: 0.5rem !important;
  }
}

/* Animation for deal cards */
.deal-card {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.deal-card:nth-child(1) {
  animation-delay: 0.1s;
}
.deal-card:nth-child(2) {
  animation-delay: 0.2s;
}
.deal-card:nth-child(3) {
  animation-delay: 0.3s;
}
.deal-card:nth-child(4) {
  animation-delay: 0.4s;
}
.deal-card:nth-child(5) {
  animation-delay: 0.5s;
}
.deal-card:nth-child(6) {
  animation-delay: 0.6s;
}

/* Hot deals section styling */
.bg-white {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%) !important;
}

.border-bottom {
  border-bottom: 2px solid #e9ecef !important;
}

/* Fire icon animation */
@keyframes fireFlicker {
  0%,
  100% {
    transform: scale(1) rotate(-2deg);
  }
  25% {
    transform: scale(1.1) rotate(2deg);
  }
  50% {
    transform: scale(1.05) rotate(-1deg);
  }
  75% {
    transform: scale(1.1) rotate(1deg);
  }
}

.fa-fire {
  animation: fireFlicker 2s ease-in-out infinite;
}
 /* ===== MESSAGES OVERLAY SYSTEM =====  */
.messages-overlay {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  pointer-events: none;
}

.toast-message {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  border-left: 4px solid;
  overflow: hidden;
  position: relative;
}

.toast-message.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-message.hide {
  transform: translateX(100%);
  opacity: 0;
}

.toast-success {
  border-left-color: #28a745;
  background: linear-gradient(135deg, #d4edda 0%, #ffffff 100%);
}

.toast-error {
  border-left-color: #dc3545;
  background: linear-gradient(135deg, #f8d7da 0%, #ffffff 100%);
}

.toast-warning {
  border-left-color: #ffc107;
  background: linear-gradient(135deg, #fff3cd 0%, #ffffff 100%);
}

.toast-info {
  border-left-color: #17a2b8;
  background: linear-gradient(135deg, #d1ecf1 0%, #ffffff 100%);
}

.toast-content {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 12px;
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  color: #28a745;
}

.toast-error .toast-icon {
  color: #dc3545;
}

.toast-warning .toast-icon {
  color: #ffc107;
}

.toast-info .toast-icon {
  color: #17a2b8;
}

.toast-text {
  flex: 1;
  font-weight: 500;
  color: #333;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

/* Progress bar for auto-dismiss */
.toast-message::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  width: 100%;
  transform-origin: left;
  animation: progressBar 5s linear forwards;
}

.toast-success::after {
  background: #28a745;
}

.toast-error::after {
  background: #dc3545;
}

.toast-warning::after {
  background: #ffc107;
}

.toast-info::after {
  background: #17a2b8;
}

@keyframes progressBar {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Hover to pause auto-dismiss */
.toast-message:hover::after {
  animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .messages-overlay {
    top: 70px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast-content {
    padding: 12px 16px;
    gap: 10px;
  }

  .toast-text {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .messages-overlay {
    top: 60px;
    right: 5px;
    left: 5px;
  }

  .toast-content {
    padding: 10px 12px;
    gap: 8px;
  }

  .toast-icon {
    font-size: 1rem;
  }

  .toast-text {
    font-size: 0.85rem;
  }
}

/* Animation for multiple messages */
.toast-message:nth-child(1) {
  animation-delay: 0.1s;
}
.toast-message:nth-child(2) {
  animation-delay: 0.2s;
}
.toast-message:nth-child(3) {
  animation-delay: 0.3s;
}
.toast-message:nth-child(4) {
  animation-delay: 0.4s;
}
.toast-message:nth-child(5) {
  animation-delay: 0.5s;
}

/* Backdrop blur effect */
.toast-message {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Pulse animation for important messages */
.toast-error {
  animation: errorPulse 0.5s ease-in-out;
}

@keyframes errorPulse {
  0%,
  100% {
    transform: translateX(0) scale(1);
  }
  50% {
    transform: translateX(0) scale(1.02);
  }
} /* ===== 
REMOVE SPACE BETWEEN NAVBAR AND HERO ===== */
body {
  margin: 0;
  padding: 0;
}

/* Remove any default margins and padding */
.container,
.container-fluid {
  padding-left: 15px;
  padding-right: 15px;
}

/* Ensure no space between header and content */
header + * {
  margin-top: 0 !important;
}

/* Remove any top margin from the first section */
section:first-of-type,
.hero-section {
  margin-top: 0 !important;
  padding-top: 60px !important;
}

/* Ensure navbar is flush */
.navbar {
  margin-bottom: 0 !important;
}

/* Remove any spacing from navigation */
nav {
  margin-bottom: 0 !important;
}

/* Make sure content starts immediately after header */
main,
.content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Remove Bootstrap default spacing */
.mt-3,
.my-3 {
  margin-top: 0 !important;
}

/* Ensure hero section is flush with navbar */
.hero-section {
  position: relative;
  z-index: 1;
}

/* Remove any container spacing at the top */
.container:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Override any Bootstrap spacing utilities */
.pt-3,
.py-3,
.pt-4,
.py-4,
.pt-5,
.py-5 {
  padding-top: 0 !important;
}

/* Specific fix for the hero section */
.hero-section {
  margin-top: 0 !important;
  border-top: none !important;
}

/* Remove any default body spacing */
body > * {
  margin-top: 0 !important;
}

/* Ensure no gap between elements */
* + .hero-section {
  margin-top: 0 !important;
}

/* Force remove any spacing */
.hero-section::before {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Remove spacing from content block */
.content,
[role="main"] {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Ensure messages don't create space */
.messages-overlay {
  position: fixed !important;
  top: 80px !important;
  z-index: 9999 !important;
}

/* Remove any default spacing from Django messages */
.alert {
  margin-bottom: 0 !important;
  margin-top: 0 !important;
}

/* Force hero to be flush */
.hero-section {
  display: block !important;
  margin: 0 !important;
  padding-top: 60px !important;
} /* ===
== CRITICAL FIX: REMOVE ALL SPACING ===== */
/* Force remove all spacing between navbar and hero */
body {
  margin: 0 !important;
  padding: 0 !important;
}

/* Remove spacing from main content area */
main,
.main-content,
#content {
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure hero section starts immediately */
.hero-section {
  margin: 0 !important;
  padding-top: 60px !important;
  padding-bottom: 60px !important;
  margin-top: 0 !important;
  border-top: none !important;
  position: relative;
  z-index: 1;
}

/* Remove any container spacing */
.container-fluid,
.container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Override Bootstrap spacing utilities */
.mt-1,
.mt-2,
.mt-3,
.mt-4,
.mt-5,
.my-1,
.my-2,
.my-3,
.my-4,
.my-5 {
  margin-top: 0 !important;
}

.pt-1,
.pt-2,
.pt-3,
.pt-4,
.pt-5,
.py-1,
.py-2,
.py-3,
.py-4,
.py-5 {
  padding-top: 0 !important;
}

/* Ensure no spacing from header */
header {
  margin-bottom: 0 !important;
}

header + * {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Remove spacing from navigation */
.navbar,
nav {
  margin-bottom: 0 !important;
}

/* Force content to be flush */
.content,
[role="main"],
.main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Remove any default section spacing */
section {
  margin-top: 0 !important;
}

section:first-child,
section:first-of-type {
  margin-top: 0 !important;
  padding-top: 60px !important;
}

/* Specific override for hero section */
.hero-section.text-white.position-relative.overflow-hidden {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 60px !important;
}

/* Remove any wrapper spacing */
.wrapper,
.page-wrapper,
.content-wrapper {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Force immediate start */
body > .hero-section,
body > main > .hero-section,
body > .container > .hero-section,
.content > .hero-section {
  margin-top: 0 !important;
}

/* Remove Bootstrap row/col spacing at top */
.row:first-child {
  margin-top: 0 !important;
}

.col:first-child,
[class*="col-"]:first-child {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Ensure messages don't interfere */
.messages-overlay {
  position: fixed !important;
  top: 80px !important;
  right: 20px !important;
  z-index: 9999 !important;
  pointer-events: none;
}

.messages-overlay .toast-message {
  pointer-events: auto;
}

/* Remove any alert spacing */
.alert,
.alert-dismissible {
  margin: 0 !important;
  position: relative;
}

/* Critical override */
* {
  margin-top: 0 !important;
}

/* Allow only hero section padding */
.hero-section * {
  margin-top: revert !important;
}

.hero-section .container * {
  margin-top: revert !important;
}

.hero-section .row * {
  margin-top: revert !important;
}

.hero-section .col-md-6 * {
  margin-top: revert !important;
}
