/* === Produktkort (loop) === */
.vcom-product-card {
  list-style: none;
  box-sizing: border-box;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--vcom-border, #e9e9e9);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.vcom-product-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }

/* Bildyta */
.vcom-product-card__image {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  background: #fafafa;
  overflow: hidden;
}
.vcom-product-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================
   Badges (REA, Nyhet, Slut i lager)
============================ */
.vcom-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: row; /* rad istället för column */
  flex-wrap: wrap;
  gap: 6px;
  z-index: 5;
  pointer-events: none;
}
.vcom-badge {
  display: inline-block;
  padding: .25rem .5rem;
  font-size: .75rem;
  line-height: 1;
  border-radius: 6px;
  color: #fff;
  background: #111;
  pointer-events: auto;
}
.vcom-badge--sale { background: #d93636; }
.vcom-badge--new  { background: #16a34a; }
.vcom-badge--out  { background: #6b7280; }

/* Innehåll */
.vcom-product-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 14px;
}

/* Kategori */
.vcom-product-card__category {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

/* Titel */
.vcom-product-card__title {
  font-size: 1rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em; /* fix: säkerställ två rader höjd så alla knappar linjeras */
}

/* Pris */
.vcom-product-card__price .price {
  font-weight:700;
  display:inline-flex;
  gap:.5rem;
  align-items:baseline;
}
.vcom-product-card__price del { color:#9ca3af; font-weight:400; }
.vcom-product-card__price ins { text-decoration:none; color:#111827; }

/* Kort beskrivning */
.vcom-product-card__excerpt {
  font-size: 0.85rem;
  color: #444;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* CTA nederst */
.vcom-product-card__actions {
  margin-top:auto; /* fix: knappen alltid i botten */
}
.vcom-product-card__actions .button {
  width:100%;
  text-align:center;
  border-radius:10px;
  padding:.6rem .9rem;
}

/* Små justeringar */
.woocommerce .products .product .woocommerce-loop-product__link { margin: 0; }

/* =========================
   CTA-stilar
========================= */
.vcom-product-card__actions .button{
  width: 100%;
  padding: .7rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  transition: transform .08s ease, box-shadow .2s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}

.vcom-product-card__actions .add_to_cart_button.ajax_add_to_cart{
  background: var(--vcom-accent, #1f9a8c);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.vcom-product-card__actions .add_to_cart_button.ajax_add_to_cart:hover{
  background: color-mix(in srgb, var(--vcom-accent, #1f9a8c) 90%, #000 10%);
}
.vcom-product-card__actions .add_to_cart_button.ajax_add_to_cart:active{
  transform: translateY(1px);
}

.vcom-product-card__actions .product_type_variable,
.vcom-product-card__actions .product_type_grouped,
.vcom-product-card__actions .product_type_external{
  background: #f4f4f5;
  color: #111827;
  border: 1px solid var(--vcom-border, #e5e7eb);
}
.vcom-product-card__actions .product_type_variable:hover,
.vcom-product-card__actions .product_type_grouped:hover,
.vcom-product-card__actions .product_type_external:hover{
  background: #ececef;
  border-color: #d6d8de;
}

.vcom-product-card__actions .button.loading{
  opacity: .85;
  cursor: progress;
}