* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:host {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 8px;
  width: 100%;
  border: 1px solid #d3d3d3;
  overflow: hidden;
  cursor: pointer;
}

.card-container {
  display: flex;
  flex-direction: column;
  background: white;
  position: relative;
}

.product-content {
  display: flex;
  flex-direction: column;
}

/* Member banner */
.members-banner {
  position: absolute;
  top: 0.875rem;
  left: 0.875rem;
  background-color: #0a2240;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 20px;
  z-index: 10;
}

.product-header {
  padding: 1rem 1rem 0.5rem;
}

/* Brand name */
.brand {
  color: #666;
  font-size: 0.875rem;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: #333;
  line-height: 1.3;
  max-width: 100%;
  margin-bottom: 0.5rem;

  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-name a {
  color: inherit;
}

/* Star rating */
.rating {
  display: flex;
  align-items: center;
  margin: 0.25rem 0;
}

.star {
  color: #ffd700; /* Bright yellow color for stars */
  font-size: 1.125rem;
  letter-spacing: -1px;
}

.star.empty {
  color: #d3d3d3;
}

.star.half {
  position: relative;
  color: #d3d3d3;
}

.star.half:before {
  content: '★';
  position: absolute;
  left: 0;
  color: #ffd700;
  width: 50%;
  overflow: hidden;
}

.image-container {
  width: 100%;
  height: 300px;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.image-container img {
  display: block;
  max-width: 100%;
  max-height: 260px;
  margin: 0 auto;
  object-fit: contain;
}

.slider-controls {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}

.slider-btn {
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: #333;
  transition: background-color 0.2s;
  z-index: 2;
}

.slider-btn:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.image-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ccc;
  margin: 0 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dot.active {
  background-color: #248f7e;
}

.product-info {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem;
}

/* Price section */
.price-section {
  display: flex;
  justify-content: space-between;
  /* margin: 0.5rem 0 1rem; */
}

.member-price,
.non-member-price {
  display: flex;
  flex-direction: column;
}

.price {
  font-size: 1rem; /* Larger size for prices */
  font-weight: 600;
  line-height: 1.1;
}

.member-price .price {
  color: #1976d2; /* Blue color for member price */
}

.non-member-price .price {
  color: #666; /* Darker gray for non-member price */
}

.price-label {
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.25rem;
}

.availability {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.available-label {
  color: #666;
}

.available-count {
  font-weight: 600;
  color: #333;
}

/* Talents section */
.talents-section {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0.5rem 0;
  color: #666;
  font-size: 0.875rem;
}

.earn-text {
  font-weight: 500;
}

.talents-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.talents-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.talents-value {
  font-weight: 500;
}

/* Product Description Styles */
.product-description {
  border-top: 1px solid #f0f0f0;
  padding-top: 1rem;
  margin-top: 0.5rem;
  color: #333;
  line-height: 1.5;
  font-size: 0.9rem;
}

/* Collapsed state: limit height and add a fade-out effect */
.product-description.collapsed {
  max-height: 100px;
  overflow: hidden;
  position: relative;
}

.product-description.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(rgba(255, 255, 255, 0), white);
}

/* Toggle button style */
.toggle-description {
  background: none;
  border: none;
  color: #1976d2;
  cursor: pointer;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  text-align: left;
  font-weight: 500;
}
