/* CHAMNAB Updated & Cleaned CSS */

img {
  max-width: 100%;
  height: auto;
}

/* --- Multi-select Category Dropdown --- */
/*.category-filter-section {*/
/*  margin-top: 20px !important;*/
/*}*/
/* --- Telegram Button --- */
.mobile-btn-buy-telegram {
  margin-bottom: 15px;
  background-color: #7ac256;
  color: #ffffff;
  border: none;
  border-radius: 25px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 136, 204, 0.2);
  cursor: pointer;
  text-align: center;
}
.mobile-btn-buy-telegram i {
  font-size: 20px;
}
.mobile-btn-buy-telegram span {
  font-family: "Khmer OS Battambang", sans-serif;
}
.mobile-btn-buy-telegram:hover {
  background-color: #64ad3f;
  transform: translateY(-2px);
}
.mobile-btn-buy-telegram:active {
  transform: scale(0.98);
}

.footer-item__logo a {
  /*width: 10vw;*/
  aspect-ratio: 1/1;
  overflow: hidden;
}

.footer-item__logo a img {
  border-radius: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Copy Animation --- */
.base-color {
  /* FIX: Use var(--main) directly, not hsl(var(--main)) if --main is already hsl */
  color: var(--main) !important;
}
:root {
  /* FIX: Use var(--base) directly if --base is an hsl value */
  --main: var(--base);
}
.copyInput {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  text-align: center;
  font-size: 14px;
  line-height: 50px;
  cursor: pointer;
  transition: all 0.3s;
}
.copied::after {
  content: "COPIED";
  position: absolute;
  top: 8px;
  /* FIX: Use right: 0; left: 0; margin: auto; for better centering */
  right: 0;
  left: 0;
  margin: auto;
  width: 100px;
  padding: 5px;
  color: #fff;
  background-color: #ff7000;
  border-radius: 3px;
  opacity: 0;
  animation: showcopied 1.5s ease;
}
@keyframes showcopied {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  50% {
    opacity: 0.7;
    transform: translateX(40%);
  }
  70% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
  }
}

/* --- Cookies --- */
.cookies-card {
  width: 520px;
  padding: 30px;
  color: #1e2337;
  position: fixed;
  bottom: 15px;
  left: 15px;
  z-index: 999999;
  background: #d1d1d1;
  border-radius: 5px;
  transition: all 0.5s;
}
.cookies-card.hide {
  bottom: -500px !important;
}
.cookies-card__icon {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background-color: #6e6f70;
  color: #fff;
  font-size: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.cookies-btn {
  color: #363636;
  text-decoration: none;
  padding: 10px 35px;
  margin: 3px 5px;
  border-radius: 999px;
  display: inline-block;
}
@media (max-width: 767px) {
  .cookies-card {
    width: 100%;
    left: 0;
    bottom: 0;
    font-size: 14px;
    padding: 15px;
  }
}

/* --- Tooltip Popup --- */
.hover-input-popup {
  position: relative;
}
.input-popup {
  display: block;
  position: absolute;
  bottom: 130%;
  left: 50%;
  width: 280px;
  background-color: #1a1a1a;
  color: #fff;
  padding: 20px;
  border-radius: 5px;
  transform: translateX(-50%);
  transition: all 0.3s;
}
.input-popup::after {
  content: "";
  position: absolute;
  bottom: -19px;
  left: 50%;
  margin-left: -5px;
  border: 10px solid transparent;
  border-top-color: #1a1a1a;
  transform: rotate(180deg);
}
.input-popup p {
  padding-left: 20px;
  position: relative;
}
.input-popup p::before {
  content: "";
  font-family: "Line Awesome Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 4px;
  font-size: 18px;
}
.input-popup p.error::before {
  content: "\f057";
  color: #ea5455;
}
.input-popup p.success::before {
  content: "\f058";
  color: #28c76f;
}

/* --- Select2 --- */
.select2-dropdown {
  border: 0 !important;
  margin-top: 8px !important;
  border-radius: 5px !important;
  box-shadow: 0 3px 9px rgba(50, 50, 9, 0.05),
    6px 4px 19px rgba(115, 103, 240, 0.2);
}
/* (Truncated here for brevity — you can keep the full select2 styles if needed) */

/* --- Product Card --- */
.product-card {
  border: 0.1px solid #e0e0e0;
  border-radius: 17px !important;
  /* box-shadow: 0 2px 12px rgba(60, 72, 88, 0.1),
    0 1.5px 6px rgba(60, 72, 88, 0.08); */
  background: #ffffff;
  transition: box-shadow 0.25s, background 0.25s, transform 0.18s;
  padding-bottom: 0.5rem;
  min-width: 120px !important;
  height: 100%; /* Make cards fill the column height */
  display: flex;
  flex-direction: column; /* Stack elements vertically */
}
.product-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 6px 24px rgba(60, 72, 88, 0.18),
    0 2px 8px rgba(60, 72, 88, 0.12);
  background: #f8fafc;
}
.product-card-img-wrapper {
  aspect-ratio: 1;
  width: 100%;
  overflow: hidden;
  border-radius: 15px 15px 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(#ffffff 100%);
  box-shadow: 0 0px 8px rgba(60, 72, 88, 0.12),
    0 6px 24px rgba(60, 72, 88, 0.08);
}
.product-card:hover .product-card-img-wrapper {
  box-shadow: 0 4px 16px rgba(60, 72, 88, 0.18),
    0 2px 8px rgba(60, 72, 88, 0.12);
}
.card-img-top {
  border: 5px solid #e0e0e0;
  border-radius: inherit;
  object-fit: cover;
  width: 100%;
  height: 100%;
  background: transparent;
  box-shadow: none;
  color: #ebebeb;
}

.product-card .card-body {
  padding: 1.2rem 1.1rem 0.7rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Allow card body to grow and fill available space */
  /* gap: 0.5rem; */
}
.product-card .card-title {
  font-size: 1.08rem !important;
  font-weight: 700;
  /* line-height: 1.25em; */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  -webkit-box-orient: vertical;
  min-height: 2.3em;
  text-align: left;
}
.product-card .card-text {
  font-size: 1.13rem !important;
  color: #dc3545;
  font-weight: 900;
  /* margin-top: 0.5em; */
  text-align: left;
  /* min-height: 3em; */
}

/* Buy Button Customization */
.product-card .btn-success {
  width: 100%;
  /* font-size: 0.93rem; */
  /* border-radius: 6px; */
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
  transition: background 0.2s, box-shadow 0.2s;
  background: #28a745;
  color: #fff;
  padding: -28px;
}
.product-card .btn-success:hover {
  transform: translateY(-6px) scale(1.08);
  background: #10c039;
  color: #fff;
  box-shadow: 0 6px 24px rgba(40, 167, 69, 0.18),
    0 2px 8px rgba(40, 167, 69, 0.12);
  border-color: #218838;
  transition: box-shadow 0.25s, transform 0.18s;
}

/* --- Responsive Tweaks --- */
@media screen and (max-width: 991px) {
  .event-banner {
    padding: 73px 0 15px;
  }
}

@media (max-width: 767px) and (min-width: 576px) {
  .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: fill;
    background: #fff;
    aspect-ratio: 1/1;
    display: block;
    /* border-radius: 16px !important; */
    /* transform: scale(1); */
  }
  .product-card {
    /* min-width: 160px; */
    padding-bottom: 0.2rem;
  }
  .product-card-img-wrapper {
    min-height: 180px;
    max-height: 220px;
  }
  .product-card .btn-success {
    font-size: 1.08rem;
    padding: 10px 0;
    /* margin: 1.1rem auto 0.4rem; */
    width: calc(100% - 18px);
    border-radius: 6px;
    position: relative;
  }
  .product-card .btn-success::after {
    content: "";
    position: absolute;
    left: -60px;
    top: -40px;
    width: 50px;
    height: 140px;
    background: #fff;
    opacity: 0.13;
    transform: rotate(30deg);
    pointer-events: none;
  }
  .product-card .btn-success:hover::after {
    left: 120%;
    transform: scale(2);
  }
}

@media screen and (max-width: 575px) {
  /* Fix Bootstrap grid for mobile */
  .row-cols-2 > .col {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    /* padding: 0.25rem !important; */
  }

  .product-card {
    margin: 0;
    border-radius: 12px;
    /* box-shadow: 0 2px 8px rgba(60, 72, 88, 0.08); */
    background: #fff;
    /* min-width: unset; */
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.18s, transform 0.18s;
  }

  .product-card-img-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px 12px 0 0;
    background: #f7f7f7;
    box-shadow: none;
    margin-bottom: 0.3rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .product-card .card-body {
    padding: 0.7rem 0.4rem 0.5rem 0.4rem;
    display: flex;
    flex-direction: column;
    /* gap: 0.3rem; */
    flex: 1 1 auto;
    justify-content: space-between; /* Distribute content evenly on mobile too */
  }

  .product-card .card-title {
    font-size: 1.05rem !important;
    font-weight: 700;
    line-height: 1.25em;
    min-height: 2.1em;
    margin-bottom: 0.1rem;
    text-align: center;
  }

  .product-card .card-text {
    font-size: 1.08rem !important;
    color: #dc3545;
    font-weight: 900;
    margin-bottom: 0.1rem;
    margin-top: 0.1rem;
    text-align: center;
  }

  .product-card .btn-success {
    font-size: 0.93rem;
    padding: 7px 0;
    border-radius: 6px;
    width: 100%;
    margin-top: auto;
  }

  /* Hide scrollbar but allow scroll for category tabs */
  .category-scroll {
    margin-top: 100px;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  .category-scroll::-webkit-scrollbar {
    display: none;
  }
}
