/* ==========================================================================
   Top Keramika – priedas „Akcijos ženklas“
   Spalvos – iš svetainės (Elementor Kit):
     #BA9A67 – pagrindinė auksinė (ženklelio fonas)
     #8F7247 – ta pati auksinė patamsinta, kad kaina ant balto fono būtų
               įskaitoma (kontrastas 4.5:1, WCAG AA). Gryna #BA9A67 tekstui – 2.66:1.
     #F3ECE1 / #7A5F36 – šviesus auksinis „-%“ langelis ir jo tekstas (5.1:1)
   Ženklelis – tai temos etiketė „Akcija“ (.product-label-1433), kuri svetainėje
   rodoma lygiai toms prekėms, kurios turi aktyvią akciją. Tekstas lieka iš
   administravimo, pridedama ikonėlė ir forma.
   ========================================================================== */

:root {
  --tk-sale-gold: #BA9A67;
  --tk-sale-text: #8F7247;
  --tk-sale-pill-bg: #F3ECE1;
  --tk-sale-pill-text: #7A5F36;
  --tk-sale-old: #A4A29F;
  /* Ikonėlė – atskiras elementas: auksinis rombas su keturiais baltais rombais viduje */
  --tk-sale-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg transform='rotate(45 16 16)'%3E%3Crect x='5' y='5' width='22' height='22' rx='3.5' fill='%23BA9A67'/%3E%3Cg fill='%23fff'%3E%3Crect x='8' y='8' width='7.2' height='7.2' rx='1.2'/%3E%3Crect x='16.8' y='8' width='7.2' height='7.2' rx='1.2'/%3E%3Crect x='8' y='16.8' width='7.2' height='7.2' rx='1.2'/%3E%3Crect x='16.8' y='16.8' width='7.2' height='7.2' rx='1.2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Ženklelis „AKCIJA“ ----------
   Sudarytas iš dviejų dalių:
   ::after  – auksinė juosta su įstrižu dešiniuoju kraštu (už teksto);
   ::before – atskira ikonėlė (auksinis rombas), didesnė už juostą ir
              išlendanti už jos viršaus ir apačios – kaip pavyzdyje. */
html body .product-labels .product-label-1433 {
  --tk-badge-icon: 34px;
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 6px 20px 6px calc(var(--tk-badge-icon) + 2px);
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .05em;
  text-transform: uppercase;
  border: 0;
  border-radius: 0;
  clip-path: none;
  overflow: visible;
  box-shadow: none;
}

html body .product-labels .product-label-1433::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: calc(var(--tk-badge-icon) / 2);
  right: 0;
  background: var(--tk-sale-gold);
  border-radius: 0 0 0 0;
  /* dešinysis kraštas nukirstas įstrižai */
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

html body .product-labels .product-label-1433::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  top: 50%;
  width: var(--tk-badge-icon);
  height: var(--tk-badge-icon);
  transform: translateY(-50%);
  background: var(--tk-sale-icon) center / contain no-repeat;
  -webkit-mask: none;
          mask: none;
}

/* Prekės puslapyje ženklelis didesnis */
html body.single-product .summary .product-labels .product-label-1433 {
  --tk-badge-icon: 42px;
  min-height: 32px;
  font-size: 15px;
  padding: 7px 24px 7px calc(var(--tk-badge-icon) + 2px);
  margin: 6px 0;
}

@media (max-width: 479px) {
  html body .product-labels .product-label-1433 {
    --tk-badge-icon: 28px;
    min-height: 22px;
    font-size: 11px;
    padding: 5px 15px 5px calc(var(--tk-badge-icon) + 2px);
  }
}

/* ---------- Kaina akcijinėms prekėms ---------- */
html body li.product.sale .price,
html body.single-product div.product.sale .summary .price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

/* Nauja kaina (<ins> arba svetainės formate <strong>) – kortelėse 18 px */
html body li.product.sale .price ins,
html body li.product.sale .price > strong {
  order: 1;
  color: var(--tk-sale-text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  background: none;
}
html body.single-product div.product.sale .summary .price ins,
html body.single-product div.product.sale .summary .price > strong {
  order: 1;
  color: var(--tk-sale-text);
  font-weight: 700;
  text-decoration: none;
  background: none;
}

/* Sena kaina – perbraukta, šalia naujos */
html body li.product.sale .price del,
html body.single-product div.product.sale .summary .price del {
  order: 2;
  color: var(--tk-sale-old);
  font-size: 14px;
  font-weight: 400;
  opacity: 1;
}
html body.single-product div.product.sale .summary .price del { font-size: 20px; }

/* Svetainės kainų formate tarp senos ir naujos kainos yra <br> – kainos rodomos vienoje eilutėje */
html body li.product.sale .price > br,
html body.single-product div.product.sale .summary .price > br { display: none; }

/* ---------- „-29 %“ langelis ---------- */
html body .price .tk-sale-pill {
  order: 3;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--tk-sale-pill-bg);
  color: var(--tk-sale-pill-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
}
html body.single-product div.product .summary .price .tk-sale-pill {
  font-size: 16px;
  padding: 7px 11px;
}
