:root {
  --tag-bg: #ffffff;
  --tag-text: #1a1a1a;
  --tag-accent: #e11d48; /* Red for sales/highlights */
  --tag-border: #d1d5db;
  --tag-muted: #6b7280;
  --eink-texture: #f3f4f6;
}

body {
  background: #0f172a;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  font-family: 'Outfit', sans-serif;
}

.price-tag-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
}

/* Digital Price Tag Aesthetic */
.digital-tag {
  width: 350px;
  height: 200px;
  background-color: var(--tag-bg);
  border: 4px solid #000;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 10px rgba(0,0,0,0.1);
  display: flex;
  padding: 1rem;
  box-sizing: border-box;
  color: var(--tag-text);
  user-select: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.digital-tag:hover {
  transform: scale(1.05);
}

/* Texture overlay for E-Ink feel */
.digital-tag::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("https://www.transparenttextures.com/patterns/p6.png");
  opacity: 0.1;
  pointer-events: none;
}

.tag-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tag-right {
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  border-left: 2px dashed var(--tag-border);
  padding-left: 1rem;
}

.product-name {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
  text-transform: uppercase;
  max-height: 3.3rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tag-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.unit-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tag-text);
}

.price-block {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-top: auto;
}

.price-currency {
  font-size: 1.5rem;
  font-weight: 800;
}

.price-value {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
}

.tag-barcode-container {
  width: 100%;
  height: 60px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.barcode-sim {
  width: 100%;
  height: 40px;
  background: repeating-linear-gradient(
    90deg,
    #000,
    #000 2px,
    #fff 2px,
    #fff 5px,
    #000 5px,
    #000 6px,
    #fff 6px,
    #fff 10px
  );
}

.barcode-text {
  font-family: monospace;
  font-size: 0.7rem;
  margin-top: 2px;
}

.qr-code-sim {
  width: 60px;
  height: 60px;
  background: #000;
  mask-image: url("https://upload.wikimedia.org/wikipedia/commons/d/d0/QR_code_for_mobile_English_Wikipedia.svg");
  mask-size: contain;
  -webkit-mask-image: url("https://upload.wikimedia.org/wikipedia/commons/d/d0/QR_code_for_mobile_English_Wikipedia.svg");
  -webkit-mask-size: contain;
}

.stock-status {
  background: #000;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Sale variation */
.digital-tag.sale {
  border-color: var(--tag-accent);
}

.digital-tag.sale .price-value, 
.digital-tag.sale .price-currency {
  color: var(--tag-accent);
}

.sale-badge {
  position: absolute;
  top: 10px;
  right: -30px;
  background: var(--tag-accent);
  color: #fff;
  padding: 0.2rem 3rem;
  font-weight: 900;
  font-size: 0.8rem;
  transform: rotate(45deg);
}
