/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Dancing+Script:wght@400..700&family=Josefin+Sans:ital,wght@0,100..700;1,100..700&family=Monoton&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Outfit:wght@100..900&display=swap');

/* ===== ROOT COLORS & FONT ===== */
:root {
  --primary-font: "Montserrat", sans-serif;
  --tittle-font: "Dancing Script", cursive;
  --background: #f7efef;
  --box: #ffffff;
  /* Product cards: fluid columns from viewport + minimum card width */
  --product-card-min: 178px;
  --section-content-max: 1320px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--primary-font);
}

body {
  background: var(--background);
}

/* ===== Slider Section ===== */
.image-slider {
  width: min(var(--section-content-max), 94vw);
  margin: 64px auto 0; /* Centered */
  padding: 0;
  display: flex;
  justify-content: center;
}

.ads img {
  height: 344px;
}

.container.swiper {
  width: 100%;
  position: relative;
}

.swiper-slide img {
  width: 100%;
  object-fit: cover;
  height: 344px;
  display: block;
}

/* Hide swiper arrows on homepage */
.swiper-button-prev,
.swiper-button-next {
  display: none !important;
}

/* Pagination bullets */
.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: black;
  opacity: 1;
  border-radius: 50% !important;
}

.swiper-pagination-bullet-active {
  background: white;
  border-radius: 50% !important;
}

/* ===== Top Sale ===== */
.head, .head2 {
  background: var(--box);
  width: min(var(--section-content-max), 94vw);
  margin: 20px auto; /* Center horizontally with spacing */
  padding: 10px;
  text-align: center; /* Center text inside */
}

.head span, .head2 span {
  font-size: 24px;
  font-weight: 600;
  display: inline-block;
  margin: 0;
}

/* Top Sale Section */
.top_sale {
  width: min(var(--section-content-max), 94vw);
  margin: 0 auto;
  position: relative;
  background: var(--box);
}

.top_sale button {
  display: inline-block;
  float: right;
  margin: 10px 10px;
  padding: 8px 15px;
  background: #fff;
  color: black;
  border: 1px solid #000000;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
}

.top_sale span {
  font-size: 18px;
  font-weight: 400;
  margin: 10px 0px 10px 10px;
  display: inline-block;
}

hr {
  height: 1px;
  background-color: #7e7a7a;
  border: none;
  width: 90%;
  margin: 0px auto;
}

/* Empty state (used on index + search) */
.empty-state {
  grid-column: 1 / -1;
  margin: 10px 10px 18px;
  padding: 18px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(209, 44, 98, 0.08), rgba(81, 158, 135, 0.08));
  border: 1px solid rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: start;
}

.empty-state__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px rgba(0,0,0,0.06);
}

.empty-state__icon svg {
  width: 22px;
  height: 22px;
  color: #D12C62;
}

.empty-state__title {
  font-weight: 700;
  font-size: 15px;
  color: #222;
  margin: 2px 0 4px;
}

.empty-state__text {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.empty-state__actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-state__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
}

.empty-state__btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #D12C62, #b02052);
  box-shadow: 0 10px 20px rgba(209, 44, 98, 0.25);
}

.empty-state__btn--primary:hover {
  transform: translateY(-1px);
}

.empty-state__btn--ghost {
  background: #fff;
  color: #D12C62;
  border-color: rgba(209, 44, 98, 0.35);
}

.empty-state__btn--ghost:hover {
  background: rgba(209, 44, 98, 0.06);
}

/* ===== Cards ===== */
.cards {
  flex-wrap: wrap;
  gap: clamp(6px, 1.8vw, 20px);
  padding: clamp(8px, 1.5vw, 20px) clamp(5px, 1.2vw, 12px);
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(min(var(--product-card-min), 100%), 1fr)
  );
}

.card {
  background: var(--box);
  width: 100%;
  min-width: 0;
  text-align: center;
  transition: transform 0.3s;
  padding-bottom: 12px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: rgb(0, 0, 0);
  min-width: 0;
}

.card img {
  width: 100%;
  aspect-ratio: 360 / 400;
  height: auto;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
}

.card-title,
.card p {
  font-size: 13px;
  line-height: 1.3em;
  margin: 5px 10px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.card span {
  font-size: 12px;
  color: gray;
  padding: 0;
  margin-top: 0;
}

.price span:nth-of-type(2) {
  color: #519E87;
  font-weight: 600;
  padding: 0;
}

.price span:nth-of-type(1) {
  color: #D12C62;
  font-weight: 600;
  font-size: 18px;
  padding: 0;
}

.price_2 span {
  color: #519E87;
  font-weight: 600;
  font-size: 18px;
  padding: 0;
}

.card-meta {
  margin-top: auto;
  padding: 4px 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  flex-wrap: wrap;
  column-gap: 6px;
  row-gap: 4px;
  min-width: 0;
  font-size: clamp(10px, 2.5vw, 12px);
}

.card-meta .meta-item,
.card-meta .meta-separator {
  margin: 0;
  flex: 0 1 auto;
}

.card-meta .meta-item {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta .meta-separator {
  flex: 0 0 auto;
}

.card-info {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  color: gray;
  margin-top: 5px;
}

.load {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* Load more button (shared) */
.load button,
.load #loadMoreBtn {
  appearance: none;
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  min-width: 180px;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, #D12C62, #b02052);
  color: #fff;
  box-shadow: 0 14px 26px rgba(209, 44, 98, 0.25);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s, opacity 0.15s;
}

.load button:hover,
.load #loadMoreBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(209, 44, 98, 0.30);
  filter: brightness(1.02);
}

.load button:active,
.load #loadMoreBtn:active {
  transform: translateY(0px) scale(0.99);
  box-shadow: 0 10px 20px rgba(209, 44, 98, 0.22);
}

.load button[disabled],
.load #loadMoreBtn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}



.search {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

/* input + icon wrapper */
.search-box {
  position: relative;
  width: 100%;
  max-width: 420px;
}

/* input */
.search-box input {
  width: 100%;
  padding: 10px 45px 10px 18px; /* right padding for icon */
  border-radius: 25px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
  background: #f6f6f6;
}

/* icon button */
.search-btn {
  position: absolute;
  right: 14px;          /* 🔥 input এর ভেতরে থাকবে */
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
}

.search-btn img {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.search-btn:hover img {
  opacity: 1;
}


/* ===== Responsive ===== */

/* Tablet & Small Screens (768px and below) */
@media (max-width: 768px) {
  .image-slider {
    width: 100%;
    padding: 0;
    height: 20%;
  }

  .swiper-slide img {
    height: 200px;
  }

  .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: black;
    opacity: 1;
    border-radius: 50% !important;
  }

  .ads img {
    display: none;
  }

  .cards {
    gap: 8px;
    padding: 10px 8px;
  }

  .card {
    width: 100%;
    height: auto;
    padding: 0;
    margin: 0;
  }

  .card img {
    width: 100%;
    aspect-ratio: 360 / 400;
    height: auto;
    object-fit: cover;
    margin-bottom: 5px;
  }

  .card-title,
  .card p {
    font-size: 9px;
    margin: 2px 3px;
    line-height: 1.1;
  }

  .card span {
    font-size: 8px;
  }

  .card-meta {
    gap: 4px;
    padding: 4px 4px 0;
  }

  .price span:nth-of-type(1),
  .price_2 span {
    font-size: 11px;
  }

  .top_sale {
    width: 100%;
  }

  .head, .head2 {
    width: 100%;
    margin: 15px auto;
    padding: 8px;
  }

  .head span, .head2 span {
    font-size: 18px;
  }

  .load {
    margin-bottom: 20px;
  }

  .empty-state {
    margin: 8px 8px 14px;
    padding: 14px 12px;
    grid-template-columns: 42px 1fr;
  }

  .empty-state__icon {
    width: 42px;
    height: 42px;
  }

  .empty-state__title {
    font-size: 14px;
  }

  .empty-state__text {
    font-size: 12px;
  }

  .load button,
  .load #loadMoreBtn {
    min-width: 160px;
    padding: 11px 16px;
  }
}

/* Mobile Large (600px and below) */
@media (max-width: 600px) {
  .cards {
    gap: 6px;
    padding: 8px;
  }

  .card {
    height: auto;
    padding: 0;
  }

  .card img {
    width: 100%;
    aspect-ratio: 360 / 400;
    height: auto;
    object-fit: cover;
    margin-bottom: 4px;
  }

  .card-title,
  .card p {
    font-size: 10px;
    margin: 2px 3px;
    line-height: 1.15;
  }

  .card span {
    font-size: 8px;
    margin-top: -2px;
  }

  .price span:nth-of-type(1),
  .price_2 span {
    font-size: 12px;
  }

  .head, .head2 {
    margin: 12px auto;
    padding: 6px;
  }

  .head span, .head2 span {
    font-size: 16px;
  }

  .search-box input {
    font-size: 12px;
    padding: 8px 35px 8px 12px;
  }

  .search-btn img {
    width: 16px;
    height: 16px;
  }
}

/* Mobile Small (480px and below) */
@media (max-width: 480px) {
  .cards {
    gap: 5px;
    padding: 6px;
  }

  .card {
    height: auto;
    padding: 0;
  }

  .card img {
    width: 100%;
    aspect-ratio: 360 / 400;
    height: auto;
    object-fit: cover;
    margin-bottom: 3px;
  }

  .card-title,
  .card p {
    font-size: 9px;
    margin: 2px 2px;
    line-height: 1.1;
  }

  .card span {
    font-size: 7px;
    margin-top: -3px;
  }

  .price span:nth-of-type(1),
  .price_2 span {
    font-size: 11px;
  }

  .head, .head2 {
    margin: 10px auto;
    padding: 5px;
  }

  .head span, .head2 span {
    font-size: 14px;
  }

  .image-slider {
    margin: 60px auto 0;
  }

  .search {
    padding: 0 8px;
  }

  .search-box input {
    font-size: 11px;
    padding: 7px 30px 7px 10px;
  }

  .top_sale span {
    font-size: 16px;
  }

  .top_sale button {
    padding: 6px 12px;
    font-size: 11px;
    margin: 5px 5px;
  }
}

/* ===== IMPORTANT FOR LOAD MORE ===== */
.head2 + section .card {
  display: none;
}
