.item-card {
  background: #181818 !important;
  border: 2px solid #007bff !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 12px 0 rgba(0, 123, 255, 0.15) !important;
  padding: 14px 10px 50px 10px !important;
  min-height: 220px;
  max-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.4s, transform 0.25s;
  position: relative !important;
  overflow: hidden !important;
}

.item-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.item-card img {
  height: 50px !important;
  width: 50px !important;
  min-height: 50px !important;
  min-width: 50px !important;
  object-fit: contain;
  border-radius: 6px;
  background: #222;
  box-shadow: 0 1px 6px 0 rgba(0, 123, 255, 0.3);
  flex-shrink: 0 !important;
  margin: 0 0 20px 0;
}

.item-card h6 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: 0.2px;
  line-height: 1.2;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

.item-card .text-gold {
  color: #fff !important;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
}

.item-card .text-muted {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.72rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
}

.item-card:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 0 18px 0 rgba(0, 123, 255, 0.5), 0 2px 8px 0 rgba(0, 123, 255, 0.2);
  border-color: #80bdff !important;
}

/* Hide default arrows first, then show custom styled ones */
.item-card input[type="number"]::-webkit-inner-spin-button,
.item-card input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.item-card input[type="number"] {
  -moz-appearance: textfield;
}

/* Now style them like cart */
.item-card input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: inner-spin-button;
  opacity: 1;
  background: url('data:image/svg+xml;utf8,<svg width="16" height="14" xmlns="http://www.w3.org/2000/svg"><polygon points="8,3 13,9 3,9" fill="%23007bff"/></svg>') no-repeat center top, url('data:image/svg+xml;utf8,<svg width="16" height="14" xmlns="http://www.w3.org/2000/svg"><polygon points="8,11 13,5 3,5" fill="%23007bff"/></svg>') no-repeat center bottom;
  background-color: #232323;
  background-size: 16px 7px;
  width: 16px;
  height: 25px;
  border-radius: 3px;
  cursor: pointer;
}


.item-card .controls input[type="number"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5) inset;
}

.item-card:has(.sale-badge) .controls input[type="number"]:focus {
  box-shadow: 0 0 0 2px rgba(156, 39, 176, 0.5) inset;
}


/* Make input and button exactly the same size and flush */
.item-card .mb-2.controls,
.item-card .controls {
  position: absolute !important;
  bottom: 10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin: 0 !important;
  width: auto !important;
  flex-shrink: 0;
  padding: 0;
}

.item-card .mb-2.controls input[type="number"],
.item-card .controls input[type="number"] {
  background: #222 !important;
  color: rgb(255, 255, 255) !important;
  font-weight: 700;
  border: 1.5px solid #007bff !important;
  border-radius: 8px 0 0 8px !important;
  outline: none;
  text-align: center;
  height: 38px;
  width: 90px;
  max-width: 90px;
  min-width: 90px;
  padding: 0 8px;
  font-size: 1rem;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  border-right: none !important;
  line-height: 1;
  margin: 0;
  display: block;
}

.item-card .mb-2.controls .btn-gold,
.item-card .controls .btn-gold {
  border-radius: 0 8px 8px 0 !important;
  margin-left: 0 !important;
  height: 38px;
  padding: 0 18px;
  font-size: 1.08rem;
  font-weight: 700;
  box-shadow: none;
  border: 1.5px solid #007bff;
  border-left: none !important;
  background: #222;
  color: rgb(255, 255, 255);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.controls {
  margin-top: auto;
  width: 100%;
  flex-shrink: 0;
}

#item-filters {
  margin-bottom: 32px;
}

#item-filters input,
#item-filters select {
  background: #181818;
  color: #007bff;
  border: 2px solid #007bff;
  font-weight: 600;
  box-shadow: 0 2px 8px 0 rgba(0, 123, 255, 0.25);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#item-filters select option {
  background: #181818;
  color: #007bff;
}

.card-rdesign {
  @media (min-width: 1200px) and (max-width: 1400px) {
    width: 20%;
  }
}

@media (max-width: 400px) {
  .item-card .mb-2.controls input[type="number"],
  .item-card .controls input[type="number"] {
    height: 32px;
    width: 70px;
    max-width: 70px;
    min-width: 70px;
    padding: 0 6px;
    font-size: 0.9rem;
  }

  .item-card .mb-2.controls .btn-gold,
  .item-card .controls .btn-gold {
    height: 32px;
    padding: 0 12px;
    font-size: 0.95rem;
  }
}

/* ==========================================
   SALE BADGE - top-left purple glow
   ========================================== */
.sale-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #9c27b0, #7b1fa2);
  color: white;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 3px 10px 3px 6px;
  border-radius: 14px 0 10px 0;
  z-index: 2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(156, 39, 176, 0.6);
  animation: purplePulse 2s ease-in-out infinite;
}

@keyframes purplePulse {
  0%, 100% { box-shadow: 0 0 10px rgba(156, 39, 176, 0.6); }
  50% { box-shadow: 0 0 20px rgba(156, 39, 176, 0.9), 0 0 40px rgba(156, 39, 176, 0.3); }
}

/* ==========================================
   ORIGINAL PRICE - purple strikethrough
   ========================================== */
.original-price {
  text-decoration: line-through;
   text-decoration-color: red;
  /*color: rgba(156, 39, 176, 0.7);*/
  font-size: 0.75em;
  font-weight: 500;
}

/* ==========================================
   SALE CARD - purple glow border
   Has .sale-badge = item is on sale
   ========================================== */
.item-card:has(.sale-badge) {
  border-color: #9c27b0 !important;
  box-shadow: 0 0 12px 0 rgba(156, 39, 176, 0.3) !important;
}

.item-card:has(.sale-badge):hover {
  border-color: #ba68c8 !important;
  box-shadow: 0 0 22px 0 rgba(156, 39, 176, 0.5), 0 0 8px 0 rgba(156, 39, 176, 0.2) !important;
}

/* Sale card input/button borders match purple */
.item-card:has(.sale-badge) .controls input[type="number"] {
  border-color: #9c27b0 !important;
}

.item-card:has(.sale-badge) .controls .btn-gold {
  border-color: #9c27b0;
}

/* Purple spin arrows on sale cards */
.item-card:has(.sale-badge) input[type="number"]::-webkit-inner-spin-button {
  background: url('data:image/svg+xml;utf8,<svg width="16" height="14" xmlns="http://www.w3.org/2000/svg"><polygon points="8,3 13,9 3,9" fill="%239c27b0"/></svg>') no-repeat center top, url('data:image/svg+xml;utf8,<svg width="16" height="14" xmlns="http://www.w3.org/2000/svg"><polygon points="8,11 13,5 3,5" fill="%239c27b0"/></svg>') no-repeat center bottom;
  background-color: #232323;
  background-size: 16px 7px;
}
.item-card .controls input[data-len="1"] { font-size: 1rem !important; }
.item-card .controls input[data-len="2"] { font-size: 1rem !important; }
.item-card .controls input[data-len="3"] { font-size: 0.9rem !important; }
.item-card .controls input[data-len="4"] { font-size: 0.8rem !important; }
.item-card .controls input[data-len="5"] { font-size: 0.7rem !important; }
.item-card .controls input[data-len="6"] { font-size: 0.6rem !important; }
.item-card .controls input[data-len="7"] { font-size: 0.6rem !important; }
.item-card .controls input[data-len="8"] { font-size: 0.6rem !important; }
.item-card .controls input[data-len="9"] { font-size: 0.6rem !important; }
.item-card .controls input[data-len="10"] { font-size: 0.6rem !important; }
.item-card .controls input[data-len="11"] { font-size: 0.6rem !important; }
.item-card .controls input[data-len="12"] { font-size: 0.6rem !important; }


