/* Hide Radio button */
.rate > input{
  display: none;
}

.rate{
  display: inline-block;;
  border: 0;
}

.rate > label{
  float: right;
}

/* Showing the stars */
.rate > label:before{
  display: inline-block;
  font-size: 1.1rem;
  font-family: FontAwesome;
  content: "\f005";
  margin:0;
  padding:0.3rem .2rem;
  cursor: pointer;
}

/* Half star */
.rate .half:before{
  content: "\f089";
  position: absolute;
  padding-right: 0;
}

/* Click and hover */
input:checked ~ label, label:hover ~ label{
  color: #ffb503;
}

/* hover hightlight */
input:checked + label:hover, input:checked ~ label:hover,input:checked ~ label:hover ~ label,
label:hover ~ input:checked ~ label{
  color: #cc9000;
}

.rating-star i{
  color: #ffb503 !important;
}

ul.thumb{
  margin:0 auto;
  padding: 0;
  float: left;
}
ul.thumb li{
  list-style: none;
  margin: 10px;
}
ul.thumb li img{
  width: 80px;
  height: 80px;
  border: 1px solid grey;
}

/* ===== Home (Top) page ===== */
.site-body { min-height: 100vh; }
.site-page { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1 0 auto; }

.container-ec {
  /* Wider layout + a bit more side padding for better "余白" */
  max-width: 1280px;
  padding-left: 22px;
  padding-right: 22px;
}

@media (max-width: 576px) {
  .container-ec {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Product cards polish */
.card-product-grid {
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06);
  overflow: hidden;
  transition: border-color .18s ease, background-color .18s ease;
}
.card-product-grid:hover {
  /* no "floating" hover */
  transform: none;
  box-shadow: none;
  border-color: rgba(0,0,0,0.14);
}
.card-product-grid .img-wrap {
  height: 240px;
}
.card-product-grid .info-wrap {
  padding: 16px 16px;
}
.card-product-grid .title {
  font-weight: 700;
}
.card-product-grid .fix-height {
  height: 124px;
  overflow: hidden;
}

@media (max-width: 576px) {
  .card-product-grid .img-wrap { height: 200px; }
  .card-product-grid .fix-height { height: 140px; }
}

/* Product detail select: give the dropdown chevron breathing room */
.item-option-select select.form-control{
  padding-right: 44px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M1.41 0L6 4.58 10.59 0 12 1.41 6 7.41 0 1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
.item-option-select select.form-control::-ms-expand{ display: none; }

.intro-hero {
  position: relative;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
}
.intro-hero__media {
  width: 100%;
  height: clamp(240px, 45vh, 360px);
  object-fit: cover;
  display: block;
  background: #111;
  position: relative;
  z-index: 0;
}
.intro-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 70%, rgba(0,0,0,0.65) 100%);
  z-index: 1;
}
.intro-hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  color: #fff;
  z-index: 2;
}
.intro-hero__title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px 0;
  letter-spacing: 0.5px;
}
.intro-hero__lead {
  margin: 0 0 16px 0;
  max-width: 52ch;
  color: rgba(255,255,255,0.9);
}
.intro-hero__actions .btn {
  margin-right: 8px;
}

/* 2-line truncation helper */
.text-truncate-2{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 576px) {
  .intro-hero__media { height: 240px; }
  .intro-hero__title { font-size: 24px; }
  .intro-hero__content { padding: 18px; }
}
