/**
 * GW Product Card Widget Styles
 */

.gw-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: hsl(var(--gw-background));
  padding: 0.75rem;
  border-radius: 4px;
}

.gw-product-card__image-link {
  display: block;
  text-decoration: none;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.gw-product-card__image {
  position: relative;
  overflow: hidden;
  background-color: hsl(var(--gw-muted));
  /* Force square aspect ratio */
  width: 100%;
  padding-bottom: 100%; /* 1:1 aspect ratio */
  border-radius: 2px;
}

.gw-product-card__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Fill and zoom to cover entire area */
  object-position: center;
  transition: transform 0.5s ease;
}

.gw-product-card:hover .gw-product-card__image img {
  transform: scale(1.05);
}

.gw-product-card__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0.25rem 0.25rem 0;
}

.gw-product-card__category {
  font-family: var(--gw-font-sans);
  font-size: 0.6875rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: hsl(var(--gw-muted-foreground));
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}

.gw-product-card__title {
  font-family: var(--gw-font-serif);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
  color: hsl(var(--gw-foreground));
  margin: 0 0 0.25rem;
  transition: color var(--gw-transition-base);
  /* Limit to 2 lines for consistent height */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6em; /* Exactly 2 lines */
  flex-shrink: 0;
}

.gw-product-card a:hover .gw-product-card__title {
  color: hsl(var(--gw-primary));
}

.gw-product-card__price {
  font-family: var(--gw-font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--gw-foreground));
  margin-bottom: 0.75rem;
  flex-shrink: 0;
  /* Fixed height for price */
  min-height: 1.25rem;
  line-height: 1.25rem;
}

.gw-product-card__price del {
  color: hsl(var(--gw-muted-foreground));
  margin-right: 0.5rem;
}

.gw-product-card__price ins {
  text-decoration: none;
  color: hsl(var(--gw-primary));
}

/* Outline button style with brand color */
.gw-product-card__button {
  margin-top: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.5rem;
  padding: 0.5rem 1rem;
  background-color: transparent;
  color: #6e022a;
  font-family: var(--gw-font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid #6e022a;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.gw-product-card__button:hover {
  background-color: #6e022a;
  color: #fff;
  border-color: #6e022a;
}

.gw-product-card__button .gw-button__loading {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.gw-product-card__button.is-loading .gw-button__text {
  visibility: hidden;
}

.gw-product-card__button.is-loading .gw-button__loading {
  display: flex;
}
