/* =========================
   GLOBAL STYLES
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', Arial, sans-serif;
}

body {
  background: #f1f3f6;
  color: #333;
}

/* ================= HEADER ================= */
.header {
  background: grey;
  color: #fff;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.header h2 {
  font-size: 22px;
  font-weight: bold;
}

.header nav a {
  text-decoration:none;
  color:white;
  background:rgba(28, 31, 30, 0.15);
  padding:6px 12px;
  border-radius:6px;
  font-size:14px;
}

.header nav a:hover {
    background:#00c853;
    border-color:#00c853;
    transform:translateY(-2px);
  }
  
  .header nav a{
    display:flex;
    gap:10px;
  }

/* ================= PRODUCTS CONTAINER ================= */
.products-container {
  padding: 20px 30px;
}

/* ================= PRODUCTS GRID ================= */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  align-items: start;
}

/* ================= PRODUCT CARD ================= */
.product-card {
  background: #fff;
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
}

.product-card h4 {
  font-size: 15px;
  margin: 8px 0 4px;
  font-weight: 600;
}

.price {
  font-size: 16px;
  font-weight: bold;
  margin: 4px 0;
}

.selling-price {
  color: #111;
}

.mrp {
  text-decoration: line-through;
  color: #888;
  font-size: 13px;
  margin-left: 6px;
}

.discount {
  color: #388e3c;
  font-size: 13px;
  font-weight: bold;
  margin-left: 6px;
}

/* View Button */
.product-card button {
  margin-top: 8px;
  padding: 8px;
  border: none;
  border-radius: 4px;
  background: #ff9f00;
  color: #111;
  font-weight: bold;
  cursor: pointer;
}

.product-card button:hover {
  background: #fb8c00;
}

/* ================= AMAZON STYLE SEARCH ================= */

.search-wrapper {
  position: relative;
  width: 600px;
  max-width: 100%;
}

.amazon-search {
  display: flex;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #fff;
  transition: 0.2s ease;
}

.amazon-search:focus-within {
  border: 2px solid #febd69;
  box-shadow: 0 0 0 3px rgba(254,189,105,0.4);
}

.amazon-search input {
  flex: 1;
  border: none;
  padding: 10px;
  font-size: 14px;
  outline: none;
}

.search-btn {
  background: #febd69;
  border: none;
  padding: 0 16px;
  cursor: pointer;
  font-size: 16px;
}

.search-btn:hover {
  background: #f3a847;
}

/* ================= SEARCH DROPDOWN ================= */



/* ================= PRODUCT PAGE ================= */
.product-page {
  max-width: 1100px;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.product-page img {
  width: 100%;
  border-radius: 10px;
}

/* ================= CART ================= */
.cart-item {
  display: flex;
  gap: 15px;
  padding: 10px;
  background: #fff;
  margin-bottom: 15px;
  border-radius: 6px;
}

.cart-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
}

/* ================= CHECKOUT ================= */
.checkout-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.checkout-left,
.checkout-right {
  flex: 1;
  background: #fff;
  padding: 20px;
  border-radius: 6px;
}

.place-order {
  margin-top: 15px;
  background: #fb641b;
  color: #fff;
  padding: 12px;
  border: none;
  width: 100%;
  border-radius: 4px;
}

/* ================= AUTH ================= */
.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 320px;
  padding: 30px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  text-align: center;
  color: #fff;
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-wrapper {
    width: 100%;
    margin: 10px 0;
  }

  .products-container {
    padding: 15px;
  }

  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-card img {
    height: 160px;
  }

  .product-page {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .products {
    grid-template-columns: 1fr;
  }

  .product-card img {
    height: 180px;
  }
}
/* ================= CATEGORY SCROLL ================= */
.category-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 15px 30px;
  background: #fff;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.category-item {
  text-align: center;
  cursor: pointer;
  min-width: 80px;
}

.category-item img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  background: #f1f3f6;
  padding: 10px;
  border-radius: 50%;
  transition: 0.3s;
}

.category-item span {
  display: block;
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
}

.category-item:hover img {
  transform: scale(1.1);
  background: #e3f2fd;
}


/* ================= TOP FILTER BAR ================= */
.top-filter-bar {
  background: #fff;
  padding: 10px 30px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.top-filter-bar button {
  padding: 6px 14px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  cursor: pointer;
  border-radius: 4px;
  font-size: 13px;
}

.top-filter-bar button:hover {
  background: #2874f0;
  color: #fff;
  border-color: #2874f0;
}


/* ===== Filter Button ===== */
.filter-open-btn {
  background: #fff;
  color: #2874f0;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 100px;
}



.filter-drawer {
  position: fixed;
  right: -320px;
  top: 0;
  width: 300px;
  height: 100%;
  background: #fff;
  padding: 20px;
  transition: 0.3s;
  z-index: 1001;
  box-shadow: -5px 0 15px rgba(0,0,0,0.2);
}

.filter-drawer.active {
  right: 0;
}

.filter-drawer h3 {
  margin-bottom: 75px;
}

.filter-drawer input[type="range"] {
  width: 100%;
  margin: 10px 0;
}

.rating-filter label {
  display: block;
  margin: 8px 0;
}

.filter-drawer button {
  margin-top: 15px;
  width: 100%;
  padding: 10px;
  background: #2874f0;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* ================= SEARCH SUGGESTIONS (CLEAN UI) ================= */

.search-wrapper{
  position:relative;
  width:520px;
}

/* suggestions box */
#suggestions{
  position:absolute;
  width:100%;
  top:45px;
  background:#ffffff;
  border-radius:8px;
  box-shadow:0 6px 20px rgba(0,0,0,0.15);
  max-height:320px;
  overflow-y:auto;
  z-index:1000;
}

/* normal suggestion */
.suggestion-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 16px;
  font-size:14px;
  color:#212121;
  cursor:pointer;
  background:#ffffff;
  border-bottom:1px solid #f0f0f0;
}

/* product image */
.suggestion-img{
  width:42px;
  height:42px;
  border-radius:6px;
  object-fit:cover;
}

/* product name */
.suggestion-text{
  display:flex;
  flex-direction:column;
}

/* category text */
.suggestion-category{
  font-size:12px;
  color:#777;
}

/* hover like Flipkart */
.suggestion-item:hover{
  background:#E3F2FD;
}

/* keyboard select */
.active-suggestion{
  background:#BBDEFB;
}
/* highlight search text */
.highlight{
  background:#ffe58f;
  padding:1px 3px;
  border-radius:3px;
  font-weight:600;
}


#suggestions::-webkit-scrollbar{
  width:6px;
}

#suggestions::-webkit-scrollbar-thumb{
  background:#ddd;
  border-radius:10px;
}

/* ===== Collections ===== */
.collection-heading {
  text-align: center;
  margin: 30px 0 20px;
  font-size: 22px;
  font-weight: bold;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 20px;
  padding: 0 30px 30px;
}



/* Responsive */
@media (max-width: 1000px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 600px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2874f0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
  margin: auto;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.highlight {
  background: yellow;
  font-weight: bold;
}


.product-card {
  transition: 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.price-section {
  margin: 8px 0;
}

.current-price {
  font-weight: bold;
  font-size: 16px;
}

.mrp {
  text-decoration: line-through;
  color: gray;
  margin-left: 8px;
}

.discount {
  color: green;
  font-weight: bold;
  margin-left: 8px;
}
@media (max-width: 768px) {

  .banner {
    height: 160px;
    margin: 10px;
  }

  .banner-slider img {
    height: 160px;
  }

  .banner-btn {
    font-size: 18px;
    padding: 6px 10px;
  }

}


.filter-overlay {
  position: fixed;
  top: 0;
  right: -100%;   /* hidden by default */
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.filter-overlay.active {
  right: 0;   /* open when active */
}

.filter-header {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}

.filter-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.filter-left {
  width: 40%;
  background: #f2f2f2;
}

.filter-left ul {
  list-style: none;
  padding: 0;
}

.filter-left li {
  padding: 15px;
  cursor: pointer;
}

.filter-left li.active {
  background: white;
  font-weight: bold;
}

.filter-right {
  width: 60%;
  padding: 15px;
  overflow-y: auto;
}

.filter-section label {
  display: block;
  margin-bottom: 15px;
}

.hidden {
  display: none;
}

.filter-footer {
  padding: 15px;
  border-top: 1px solid #ddd;
}

.filter-footer button {
  width: 100%;
  padding: 12px;
  background: #ff6f00;
  border: none;
  color: white;
  font-weight: bold;
  border-radius: 5px;
}

/* Desktop */
@media (min-width: 768px) {
  .filter-overlay {
      width: 400px;
  }
}
.mini-ad-strip{
  background: linear-gradient(90deg,red,#ffb347);
  color:white;
  padding:8px;
  text-align:center;
  font-size:14px;
  white-space:nowrap;
  overflow:hidden;
  animation: scrollAd 12s linear infinite;
}

@keyframes scrollAd{
  0%{transform:translateX(100%);}
  100%{transform:translateX(-100%);}
}

@media(max-width:768px){
  .products{grid-template-columns:repeat(2,1fr);}
  .banner{height:200px;}
}
/* NAV RIGHT */
.nav-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:5px;
  }
  
  /* FILTER BUTTON */
  .filter-btn{
  background:#fff;
  color:#333;
  border:none;
  padding:6px 12px;
  border-radius:6px;
  cursor:pointer;
  font-weight:500;
  }

  
  
  /* MOBILE RESPONSIVE */
  @media(max-width:768px){
  
  .banner-slider{
  height:180px;
  }
  
  .banner-text{
  font-size:12px;
  left:15px;
  bottom:15px;
  }
  
  }
 


/* dots */
#bannerDots {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
}

.banner-dot {
  height: 8px;
  width: 8px;
  margin: 0 4px;
  background: #ccc;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
}

.banner-dot.active {
  background: #2874f0;
}


.wishlist-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 22px;
  cursor: pointer;
  color: #bbb;
}

.wishlist-icon.active {
  color: red;
}
.product-card{
  position: relative;
}
#searchInput::placeholder{
  color:#888;
  font-size:14px;
  opacity:1;
}