/*
 * Global: promo badge column + country stack (was inline in product_labels()).
 * Loaded on all public pages via CssLoader.
 */
.product-labels-stack {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  max-width: calc(100% - 16px);
  pointer-events: none;
}

.product-labels-stack .product-labels {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Country pills: homepage Slick, shop overlay, any `product_labels()` stack (not `ul.products` scoped) */
.product-labels-stack .product-country-flags {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}

.product-labels-stack .product-flag {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #000;
  padding: 1px 10px;
  width: fit-content;
  width: -moz-fit-content;
  font-size: 11px;
  line-height: 1;
  color: #000;
  box-sizing: border-box;
  font-weight: 500;
}

/*
 * Homepage / new-collection / single grids: same as shop `li.product:hover .product-overlay-labels`.
 * Include `.slick-slide:hover` so labels hide when the pointer is on slide padding/edges where
 * `.product` does not fill the full slick slide hit area.
 * Scoped to fine-pointer + real hover only so touch / sticky :hover does not hide labels on mobile.
 */
@media (hover: hover) and (pointer: fine) {
  .product-wraper .product:hover .product-labels-stack,
  .product-wraper .slick-slide:hover .product-labels-stack {
    display: none;
  }
}

.product-labels .flag {
  order: 10;
}

.product-labels .flag.naujiena,
.product-labels .flag.akcija {
  order: 1;
}

.product-labels .flag.best_seller {
  order: 2;
}

.product-labels .flag.ispardavimas {
  order: 3;
}

.product-labels .flag.whole_sale {
  order: 4;
}

.product-labels .flag.pristatymas_per_1-2_dd {
  order: 5;
}

.product-labels .flag {
  display: flex;
  background: #fff;
  color: #000;
  padding: 1px;
  margin-bottom: 5px;
  width: fit-content;
  width: -moz-fit-content;
  border: 1px solid #000;
}

.product-labels .flag .icon {
  padding: 3px 10px 5px 5px;
  border-radius: 0 10px 10px 0;
}

.product-labels .flag.discount {
  color: #fff;
  background: #249e6b;
}

.product-labels .flag.naujiena {
  color: #000;
  background: #fff;
}

.product-labels .flag.discount p {
  color: #fff;
}

.product-labels .flag.ispardavimas {
  color: #fff;
  background: #ed4f35;
}

.product-labels .flag.ispardavimas p {
  color: #fff;
}

.product-labels .flag p {
  transition: opacity ease-in-out 0.3s;
  height: auto;
  border-radius: 0 10px 10px 0;
  display: flex;
  align-items: center;
  padding: 3px 10px 3px 7px;
  color: #000;
  font-size: 11px;
  align-items: center;
  gap: 5px;
}
.product_slider .product .product-labels img {
  width: 15px !important;
  height: 15px !important;
}
.product-labels .flag:hover p {
  opacity: 1;
}

.product-labels img {
  width: 20px !important;
  height: 20px !important;
  min-height: unset !important;
  object-fit: contain !important;
}

@media (max-width: 450px) {
  .product-labels-stack .product-country-flags .product-flag {
    font-size:9px;
  }
  .woocommerce ul.products li.product .product-overlay-labels ,   .woocommerce ul.products li.product .product-labels-stack {
    width:100%;
    max-width:unset;
  }
  .woocommerce ul.products li.product .product-overlay-labels {
    top:0!important;
  }
  body:not(.single-product) .product-country-flags .product-flag img {
    width: 15px !important;
    height: 13px !important;
  }
  .product-labels-stack .product-flag {
    padding: 3px 10px;
  }
  .product-labels .flag p {
    font-size: 10px;
    gap: 5px;
  }

  .product-labels img {
    width: 16px !important;
    height: 16px !important;
  }
}

/* Override broad product-card img rules (e.g. shop.css 200px min/max on `.woocommerce ul li.product img`) */
.product-country-flags .product-flag img {
  width: 20px !important;
  height: 20px !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: contain !important;
  display: block;
  flex-shrink: 0;
}

/* Shop / archive: single overlay column for promo + country labels */
.woocommerce ul.products li.product {
  position: relative;
}

.woocommerce ul.products li.product .product-overlay-labels {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  max-width: calc(100% - 16px);
  pointer-events: none;
  width:100%;
}

@media (hover: hover) and (pointer: fine) {
  .woocommerce ul.products li.product:hover .product-overlay-labels {
    display: none;
  }
}

/* Single product gallery: country flags above promo `.product-labels` */
.single-product .product-data-wrapper .product-wrapper-attributes .woocommerce-product-gallery .product-gallery-overlay-labels {
  position: absolute;
  top: 10px;
  left: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  max-width: calc(100% - 16px);
  pointer-events: none;
}

.single-product .product-data-wrapper .product-wrapper-attributes .woocommerce-product-gallery .product-gallery-overlay-labels .product-country-flags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.single-product .product-data-wrapper .product-wrapper-attributes .woocommerce-product-gallery .product-gallery-overlay-labels .product-flag {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #000;
  padding: 3px 10px;
  width: fit-content;
  width: -moz-fit-content;
  font-size: 14px;
  line-height: 1;
  color: #000;
  font-weight:500;
}

@media (max-width: 768px) {
  .single-product .product-data-wrapper .product-wrapper-attributes .woocommerce-product-gallery .product-gallery-overlay-labels {
    left: -10px;
    top: 0;
  }
}

