/* ==========================================================================
   1. GLOBAL SETTINGS & VARIABLES (CLEAN LIGHT THEME)
   ========================================================================== */
:root {
  --primary-color: #0284c7;        /* Vibrant Blue */
  --primary-dark: #0369a1;         /* Dark Blue */
  --text-color: #0f172a;           /* Main Dark Blue Text */
  --border-color: #38bdf8;         /* Light Blue Default Border */
  --discount-color: #e11d48;       /* Soft Red Badge */
  --new-color: #059669;            /* Green Badge */

  /* Dedicated Text Colors */
  --title-color: #1e40af;          /* Deep Royal Blue for Titles */
  --price-color: #16a34a;          /* Energetic Green for Price */
  --rating-color: #f59e0b;         /* Warm Gold for Ratings */

  /* Color Palette for Border Cycles */
  --c-red: #ef4444;
  --c-yellow: #f59e0b;
  --c-green: #10b981;
  --c-blue: #0284c7;
  --c-purple: #8b5cf6;
  --c-pink: #ec4899;

  /* Card & Body Backgrounds */
  --main-bg: #ffffff;              /* Pure White Background */
  --card-bg: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(2, 132, 199, 0.2);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--main-bg);
  color: var(--text-color);
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.main-header {
  padding: 15px;
  background: #ffffff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--title-color);
  background: linear-gradient(135deg, #0284c7, #1e40af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-icons {
  display: flex;
  gap: 16px;
  font-size: 1.25rem;
  position: relative;
  color: var(--primary-dark);
}

.icon-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--discount-color);
  color: #ffffff;
  font-size: 0.7rem;
  padding: 2px 5px;
  border-radius: 50%;
}

/* Welcome Text & Animations */
.welcome {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: inline-block;
  background: linear-gradient(120deg, #ec4899, #0284c7, #16a34a, #8b5cf6);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shineEffect 3s linear infinite, pulseEffect 2s ease-in-out infinite alternate;
}

@keyframes shineEffect {
  0% { background-position: 0% center; }
  100% { background-position: 300% center; }
}

@keyframes pulseEffect {
  0% { transform: scale(1); }
  100% { transform: scale(1.03); }
}

/* Search Bar & Category Dropdown Button */
.search-category-row {
  display: flex;
  gap: 10px;
  width: 100%;
  align-items: center;
}

.search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #ffffff;
  color: var(--primary-dark);
  font-weight: 600;
  outline: none;
  transition: all 0.3s ease;
}

.search-box input::placeholder {
  color: #64748b;
  font-weight: 500;
}

.search-box input:focus {
  border-color: #ec4899;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.25);
}

.search-box i {
  position: absolute;
  left: 12px;
  color: var(--primary-color);
  font-size: 1rem;
  pointer-events: none;
}

.category-dropdown-btn {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  padding: 0 16px; 
  height: 42px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  display: inline-flex; 
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none; 
  white-space: nowrap;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transition: all 0.2s ease;
}

.category-dropdown-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

/* ==========================================================================
   3. HERO SLIDER & BUTTONS
   ========================================================================== */
.hero-slider {
  width: 100%;
  max-width: 720px;
  height: 300px;
  margin: 0 auto 20px auto;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  border: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.swiper-slide {
  width: 100%;
  height: 100%;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.btn-shop1-now,
.btn-shop2-now {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  padding: 10px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.btn-shop1-now {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.btn-shop2-now {
  display: inline-block;
  width: fit-content;
  margin-top: 15px;
}

/* ==========================================================================
   4. CATEGORIES SECTION
   ========================================================================== */
.categories-section {
  padding: 15px;
  display: flex;
  gap: 15px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.categories-section::-webkit-scrollbar {
  display: none;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 65px;
  text-decoration: none;
  color: var(--primary-dark);
}

.category-icon-circle {
  width: 60px;
  height: 60px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.category-item:hover .category-icon-circle {
  transform: scale(1.1);
}

.category-icon-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-item span {
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  max-width: 75px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--title-color);
}

/* Category Multi-Color Cycling */
.category-item:nth-child(6n+1) .category-icon-circle { border-color: var(--c-red); }
.category-item:nth-child(6n+2) .category-icon-circle { border-color: var(--c-yellow); }
.category-item:nth-child(6n+3) .category-icon-circle { border-color: var(--c-green); }
.category-item:nth-child(6n+4) .category-icon-circle { border-color: var(--c-blue); }
.category-item:nth-child(6n+5) .category-icon-circle { border-color: var(--c-purple); }
.category-item:nth-child(6n+6) .category-icon-circle { border-color: var(--c-pink); }

/* ==========================================================================
   5. FEATURES GRID SECTION
   ========================================================================== */
.features-section {
  margin: 20px 15px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.08);
}

.feature-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  transition: background 0.3s, border-color 0.3s;
}

.feature-box:nth-child(6n+1) { border-color: var(--c-red); }
.feature-box:nth-child(6n+2) { border-color: var(--c-yellow); }
.feature-box:nth-child(6n+3) { border-color: var(--c-green); }
.feature-box:nth-child(6n+4) { border-color: var(--c-blue); }
.feature-box:nth-child(6n+5) { border-color: var(--c-purple); }
.feature-box:nth-child(6n+6) { border-color: var(--c-pink); }

.feature-box:hover {
  background: #f1f5f9;
}

.feature-box i {
  font-size: 1.5rem;
  color: var(--primary-color);
  background: #e0f2fe;
  padding: 10px;
  border-radius: 50%;
}

.feature-info h5 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--title-color);
}

.feature-info p {
  margin: 2px 0 0 0;
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.2;
}

/* ==========================================================================
   6. PROMO BANNERS SECTION
   ========================================================================== */
.promo-section {
  margin: 15px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.promo-card {
  border-radius: 12px;
  padding: 15px;
  color: var(--primary-dark);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.promo-card:nth-child(6n+1) { border-color: var(--c-red); }
.promo-card:nth-child(6n+2) { border-color: var(--c-yellow); }
.promo-card:nth-child(6n+3) { border-color: var(--c-green); }
.promo-card:nth-child(6n+4) { border-color: var(--c-blue); }
.promo-card:nth-child(6n+5) { border-color: var(--c-purple); }
.promo-card:nth-child(6n+6) { border-color: var(--c-pink); }

.promo-card h4 { 
  margin: 0; 
  font-size: 0.95rem; 
  color: var(--title-color); 
  font-weight: 700;
}

.promo-card p { 
  margin: 5px 0; 
  font-size: 0.75rem; 
  color: #334155; 
}

/* Exclusive Banner */
.exclusive-banner {
  margin: 15px;
  background: linear-gradient(135deg, #ffffff, #e0f2fe);
  color: var(--primary-dark);
  border: 1px solid var(--c-pink);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.15);
}

/* ==========================================================================
   7. PRODUCTS GRID & CARD STYLES
   ========================================================================== */
.section-header {
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.section-header h3 { 
  margin: 0; 
  font-size: 1.2rem; 
  color: var(--title-color);
  font-weight: 800;
}

.view-all { 
  color: var(--primary-color); 
  text-decoration: none; 
  font-size: 0.85rem; 
  font-weight: 600;
}

.products-grid {
  padding: 15px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.latest-products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); 
  gap: 12px;
  padding: 0 15px;
  margin-bottom: 20px;
}

.product-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  position: relative;
  background: var(--card-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 6-Color Multi-Border Cycling */
.product-card:nth-child(6n+1), .product-card-link:nth-child(6n+1) .product-card { border-color: var(--c-red); }
.product-card:nth-child(6n+2), .product-card-link:nth-child(6n+2) .product-card { border-color: var(--c-yellow); }
.product-card:nth-child(6n+3), .product-card-link:nth-child(6n+3) .product-card { border-color: var(--c-green); }
.product-card:nth-child(6n+4), .product-card-link:nth-child(6n+4) .product-card { border-color: var(--c-blue); }
.product-card:nth-child(6n+5), .product-card-link:nth-child(6n+5) .product-card { border-color: var(--c-purple); }
.product-card:nth-child(6n+6), .product-card-link:nth-child(6n+6) .product-card { border-color: var(--c-pink); }

/* Dynamic Hover Effects */
.product-card:nth-child(6n+1):hover, .product-card-link:nth-child(6n+1):hover .product-card { box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3); }
.product-card:nth-child(6n+2):hover, .product-card-link:nth-child(6n+2):hover .product-card { box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3); }
.product-card:nth-child(6n+3):hover, .product-card-link:nth-child(6n+3):hover .product-card { box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3); }
.product-card:nth-child(6n+4):hover, .product-card-link:nth-child(6n+4):hover .product-card { box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3); }
.product-card:nth-child(6n+5):hover, .product-card-link:nth-child(6n+5):hover .product-card { box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3); }
.product-card:nth-child(6n+6):hover, .product-card-link:nth-child(6n+6):hover .product-card { box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3); }

.product-card:hover {
  transform: translateY(-4px);
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 4px;
  color: #ffffff;
  font-weight: bold;
  z-index: 2;
}

.badge-discount { background: var(--discount-color); }
.badge-new { background: var(--new-color); color: #ffffff; }

.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #e11d48;
  font-size: 1.1rem;
  z-index: 2;
}

/* Product Image Wrapper (1:1 Square Aspect Ratio Update) */
.product-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1; /* ১:১ অনুপাত নিশ্চিত করা হয়েছে */
  overflow: hidden;
  position: relative;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin: 10px 0;
  padding: 0;
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* ছবি ফুল-স্ক্রিন ১:১ বক্সে পারফেক্টলি ফিট হবে */
  display: block;
  transition: transform 0.3s ease;
}

.random-products-section .product-card:hover .product-img-wrapper img,
.product-card:hover .product-img-wrapper img {
  transform: scale(1.05);
}

.product-card h4 {
  margin: 8px 0 4px 0;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--title-color);
  font-weight: 700;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
}

.current-price { 
  font-weight: 800; 
  color: var(--price-color); 
  font-size: 0.95rem; 
}

.old-price { 
  text-decoration: line-through; 
  color: #94a3b8; 
  font-size: 0.75rem; 
}

.rating-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #475569;
  font-weight: 600;
}

.rating-row i { color: var(--rating-color); }

.add-to-cart-btn {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  background: #e0f2fe;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* ==========================================================================
   8. NAVIGATION DRAWERS & FLOATING WIDGETS
   ========================================================================== */
/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 999;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.bottom-nav-item.active {
  color: var(--primary-color);
}

.bottom-nav-item i {
  font-size: 1.2rem;
}

.bottom-spacer {
  height: 70px;
}

/* Sidebar Drawer */
.sidebar-drawer {
  position: fixed;
  top: 55px;
  left: -260px;
  width: 230px;
  height: auto;
  background: #ffffff;
  border: 1px solid var(--border-color);
  z-index: 99999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 0 8px 8px 0;
  transition: left 0.3s ease;
  overflow: hidden;
}

.sidebar-drawer.active {
  left: 0;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  border-bottom: 1px solid #f1f5f9;
}

.sidebar-menu li:last-child {
  border-bottom: none;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.sidebar-menu a:hover {
  background: #e0f2fe;
  color: var(--primary-color);
}

.sidebar-menu i {
  width: 18px;
  color: var(--primary-color);
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 8%;
  right: 20px;
  width: 55px;
  height: 55px;
  background-color: #25d366;
  color: #ffffff !important;
  border-radius: 50%;
  text-align: center;
  font-size: 32px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease;
  animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

@keyframes whatsapp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Scroll Animation Helper */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   9. MEDIA QUERIES & RESPONSIVE LAYOUTS
   ========================================================================== */

/* Mobile Devices (Max width: 639px) */
@media (max-width: 639px) {
  .whatsapp-float {
    bottom: 9%;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 28px;
  }
}

/* Mobile & Small Tablets (Max width: 768px) */
@media (max-width: 768px) {
  .hero-slider {
    height: 200px;
  }

  .features-section {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    padding: 10px;
    gap: 10px;
  }

  .products-grid,
  .latest-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card-link,
  .product-card {
    min-width: 0;
    width: 100%;
  }
}

/* Medium Screens & Desktop (Min width: 768px / 992px) */
@media (min-width: 768px) {
  .products-grid,
  .latest-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)); /* ডেস্কটপে ৪ টি কলাম */
    gap: 20px;
  }

  .section-header h3 {
    font-size: 1.3rem;
  }

  .product-card h4 {
    font-size: 0.95rem;
  }

  .current-price {
    font-size: 1.05rem;
  }
}

@media (min-width: 992px) {
  .products-grid,
  .latest-products-grid {
    padding: 20px 15px;
  }
}