/* GENERAL STYLES */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #333;
  transition: background 0.3s ease, color 0.3s ease;
}

header, footer {
  background: #e74c3c;
  color: white;
  padding: 20px;
  text-align: center;
}

/* SEARCH BAR */
.search-container {
  text-align: center;
  margin: 20px;
}

#search {
  width: 80%;
  max-width: 400px;
  padding: 12px;
  border: 2px solid #e74c3c;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
}

/* ✅ PRODUCT GRID */
#products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 20px;
  box-sizing: border-box;
}

/* ✅ MOBILE FIX: 2 CARDS ON SMALL SCREENS */
@media (max-width: 768px) {
  #products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  #products {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ✅ CARD STYLING */
.card {
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.card .title {
  font-size: 14px;
  margin: 10px 0;
  word-break: break-word;
  line-height: 1.3;
  max-height: 3.9em;
  overflow: hidden;
}

/* ✅ IMAGE BOX */
.img-carousel {
  width: 100%;
  height: 170px;
  position: relative;
  overflow: hidden;
}

.img-carousel img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Prevents cropping */
  border-radius: 6px;
}

/* ✅ IMAGE HOVER ZOOM */
.img-carousel img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {
  .img-carousel:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
}


/* ✅ ARROWS */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  background: rgba(0,0,0,0.4);
  color: white;
  padding: 5px 8px;
  cursor: pointer;
  border-radius: 4px;
  user-select: none;
  z-index: 1;
}
.arrow.left { left: 5px; }
.arrow.right { right: 5px; }

.buy-btn {
  background: #ff4747;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  margin-top: 10px;
  text-align: center;
  display: inline-block;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.buy-btn:hover {
  background: #d93d3d;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}


.arrow:hover {
  transform: translateY(-50%) scale(1.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.fade {
  opacity: 0.5;
  transition: opacity 0.3s ease-in-out;
}

/* DARK MODE */
body.dark {
  background-color: #121212;
  color: #f1f1f1;
}

body.dark header,
body.dark footer {
  background-color: #1e1e1e;
  color: white;
}

body.dark .card {
  background-color: #1c1c1c;
  color: white;
}

body.dark .card a {
  background-color: #c0392b;
}

#darkToggle {
  background: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 10px;
}

body.dark #darkToggle {
  background: #333;
  color: white;
}

/* BACK TO TOP BUTTON */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #e74c3c;
  color: white;
  padding: 14px;
  font-size: 20px;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 999;
  transition: transform 0.3s ease, background 0.3s ease;
}

.back-to-top:hover {
  background: #c0392b;
  transform: scale(1.2) rotate(360deg); /* 🔥 rotate + scale on hover */
}


/* INTRO LOADER */
.intro-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #e74c3c;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 0.6s ease 1.2s forwards;
}

.intro-logo {
  font-size: 40px;
  font-weight: bold;
  animation: scaleUp 1s ease;
  font-family: 'Segoe UI', sans-serif;
  letter-spacing: 2px;
}

@keyframes scaleUp {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
html {
  scroll-behavior: smooth;
}



#progress-bar {
  height: 5px;
  background: #e74c3c;
  width: 0%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
}
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(255, 60, 60, 0.2);
}
.card a {
  transition: transform 0.
}
#darkToggle {
  transition: all 0.3s ease;
  cursor: pointer;
}

#darkToggle:hover {
  background-color: #222;
  color: #ff3c3c;
  box-shadow: 0 0 10px #ff3c3c80;
  transform: scale(1.05);
}
.buy-btn.amazon {
  background: #ff9900; /* Amazon orange */
}
.buy-btn.amazon:hover {
  background: #e68a00;
}

.buy-btn.aliexpress {
  background: #ff4747; /* AliExpress red */
}
.buy-btn.aliexpress:hover {
  background: #d93d3d;
}
@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-100%); opacity: 0; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.slide-out-left {
  animation: slideOutLeft 0.3s forwards;
}

.slide-in-right {
  animation: slideInRight 0.3s forwards;
}

.slide-out-right {
  animation: slideOutRight 0.3s forwards;
}

.slide-in-left {
  animation: slideInLeft 0.3s forwards;
}
.sold-count {
  font-size: 13px;
  color: #000000; /* green trust color */
  font-weight: bold;
  margin: 4px 0;
}
