/* Rutnätet */
.pw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

/* Korten */
.pw-card {
  background: #fff;
  border: 1px solid #eaeaec;
  border-radius: 4px;
  padding: 15px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  height: 100%;
  container-type: inline-size;
}

.pw-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* REA-Badge */
.pw-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background-color: #e70808;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Bilden - Låser höjden för att matcha ojämna bilder */
.pw-image-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 15px;
  width: 100%;
  height: 220px !important;
  background: #fff;
}

.pw-image {
  max-height: 100% !important;
  width: auto !important;
  object-fit: contain !important;
}

/* Titel-fix för spikrak linje */
.pw-title {
  width: 100%;
  margin: 10px 0 !important;
  font-size: clamp(14px, 6cqw, 16px) !important;
  font-weight: 800;
  line-height: 1.2;
  color: #000;
  min-height: 40px !important;
  display: flex !important;
  flex-direction: column;
  justify-content: flex-start;
}

.pw-title a {
  color: inherit;
  text-decoration: none;
}

/* Pris */
.pw-price {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
  color: #000;
}

.pw-price del {
  color: #777;
  font-size: 18px;
  margin-right: 6px;
  font-weight: normal;
}

.pw-price ins {
  text-decoration: none;
  color: #000;
}

/* Lagerstatus - Trycker hela bottenpaketet spikrakt nedåt */
.pw-stock-status {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: auto !important;
  margin-bottom: 10px;
  display: block;
}

.pw-stock-status.in-stock {
  color: #2e7d32;
}
.pw-stock-status.out-of-stock {
  color: #d32f2f;
}
.pw-stock-status.available-on-backorder {
  color: #ef6c00;
}

/* Kvantitetsbox och Köpknapp */
.pw-add-to-cart-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  width: 100%;
  margin-top: 5px;
}

/* Kvantitetsmodul */
.pw-add-to-cart-wrapper .quantity {
  display: flex !important;
  align-items: center !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  background: #fff !important;
  margin: 0 !important;
  height: 42px !important;
}

/* Runda touchknappar */
.pw-add-to-cart-wrapper .pw-qty-btn {
  width: 28px !important;
  height: 100% !important;
  background: #f5f5f5 !important;
  color: #333 !important;
  border: none !important;
  font-size: 16px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  user-select: none !important;
}

.pw-add-to-cart-wrapper .pw-qty-btn:hover {
  background: #e0e0e0 !important;
}

/* Inputsiffran i mitten */
.pw-add-to-cart-wrapper .quantity input.qty {
  border: none !important;
  border-left: 1px solid #ddd !important;
  border-right: 1px solid #ddd !important;
  height: 100% !important;
  width: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -moz-appearance: textfield !important;
}

.pw-add-to-cart-wrapper .quantity input.qty::-webkit-outer-spin-button,
.pw-add-to-cart-wrapper .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* Köpknappen */
.pw-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 42px !important;
  flex-grow: 1 !important;
  margin: 0 !important;
  background-color: #4A41B4 !important; /* Grön färg */
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  font-size: 13px;
}

.pw-button:hover {
  background-color: #4186B4 !important;
}
