/* =========================================================
   CARDURI DE PRODUS – homepage, categorii, căutare
   Selectorii încep cu „html body" ca să treacă peste
   style.css, CSS-ul suplimentar și stilurile Flatsome.
   ========================================================= */
:root {
  --vs-card-navy: #0b3b60;
  --vs-card-navy-hover: #072740;
  --vs-card-cart: #2878b8;       /* „Adaugă în coș" */
  --vs-card-cart-hover: #1f6299;
  --vs-card-green: #4d7c0f;
  --vs-card-red: #d32f2f;
  --vs-card-ink: #111827;
  --vs-card-muted: #6b7280;
  --vs-card-line: #e5e7eb;
  --vs-card-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --vs-card-title-font: "Inter", var(--vs-card-font);
}

/* ---------- Cardul ---------- */
html body .product-small.col > .col-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px 10px 12px !important;
  background: #fff !important;
  border: 1px solid var(--vs-card-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 2px 8px rgba(17, 24, 39, .04) !important;
  transition: transform .2s ease, box-shadow .2s ease !important;
}

html body .product-small.col:hover > .col-inner {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(17, 24, 39, .09) !important;
}

html body .product-small.col .product-small.box {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Imaginea și textul pe toată lățimea cardului (altfel, în flex, imaginea rămâne cu lățime 0) */
html body .product-small.col .product-small.box > .box-image,
html body .product-small.col .product-small.box > .box-text {
  width: 100% !important;
  align-self: stretch;
}

/* Imaginea */
html body .product-small.col .box-image {
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

html body .product-small.col .box-image img { object-fit: contain; }

/* Uneltele Flatsome peste imagine (quick view etc.) */
html body .product-small.col .box-image .image-tools.grid-tools { display: none !important; }

/* ---------- Badge-uri pe imagine ---------- */
html body .product-small.col .badge-container {
  top: 10px !important;
  left: 10px !important;
  right: 10px !important;
  margin: 0 !important;
  z-index: 5;
  pointer-events: none;
}

/* Bula „Reduceri!" a Flatsome – reducerea apare acum la preț („Economisește X%") */
html body .product-small.col .badge-container .callout { display: none !important; }

/* „NOU" – stânga-sus: pastilă cu degrade, steluță și o lumină care trece peste ea */
.vs-card-new {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 11px 0 9px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff3d6e 0%, #e11d48 55%, #be123c 100%);
  box-shadow: 0 4px 12px rgba(225, 29, 72, .38), inset 0 1px 0 rgba(255, 255, 255, .35);
  color: #fff;
  font-family: var(--vs-card-font);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.vs-card-new-star { font-size: 10px; line-height: 1; }

.vs-card-new::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  animation: vs-card-new-shine 3.2s ease-in-out infinite;
}

@keyframes vs-card-new-shine {
  0%, 60% { left: -60%; }
  100%    { left: 130%; }
}

/* „PREȚ PROMO" (plugin Advanced Woo Labels) – aceeași pastilă modernă ca „NOU", în portocaliu */
html body .product-small.col .advanced-woo-labels {
  top: 0 !important;
  left: 0 !important;
  z-index: 4 !important;
  pointer-events: none;
}

/* Dacă produsul e și „NOU", promo coboară sub el */
html body .product-small.col:has(.vs-card-new) .advanced-woo-labels { top: 32px !important; }

html body .advanced-woo-labels .awl-product-label {
  position: relative !important;
  display: inline-flex !important;
  align-items: center;
  height: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, #fb923c 0%, #f97316 50%, #ea580c 100%) !important;
  box-shadow: 0 4px 12px rgba(234, 88, 12, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  font-family: var(--vs-card-font) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  line-height: 1 !important;
  text-transform: uppercase;
}

html body .advanced-woo-labels .awl-label-text {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  padding: 0 11px 0 9px !important;
  background: none !important;
  border-radius: 0 !important;
}

html body .advanced-woo-labels .awl-label-text::before {
  content: "%";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  color: #ea580c;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
}

/* Colțul „tăiat" al pluginului */
html body .advanced-woo-labels .awl-label-after,
html body .advanced-woo-labels .awl-label-before { display: none !important; }

/* Aceeași lumină care trece peste ca la „NOU" */
html body .advanced-woo-labels .awl-product-label::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  animation: vs-card-new-shine 3.2s ease-in-out infinite;
  animation-delay: 1.2s;
}

/* Pagina produsului – aceeași pastilă, puțin mai mare, peste imaginea mare */
html body.single-product .product-gallery .advanced-woo-labels { pointer-events: none; }

html body.single-product .product-gallery .advanced-woo-labels .awl-product-label {
  height: 32px;
  font-size: 13px !important;
}

html body.single-product .product-gallery .advanced-woo-labels .awl-label-text {
  gap: 6px;
  padding: 0 14px 0 10px !important;
}

html body.single-product .product-gallery .advanced-woo-labels .awl-label-text::before {
  width: 18px;
  height: 18px;
  font-size: 11px;
}

/* Cadou – dreapta-sus, pe toate produsele: se clatină, capacul sare, scântei în jur */
.vs-card-gift {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, .22), 0 0 0 1px rgba(225, 29, 72, .12);
  animation: vs-gift-wiggle 3.6s ease-in-out infinite;
}

.vs-card-gift svg { width: 21px; height: 21px; overflow: visible; }
.vs-card-gift .vs-gift-body   { fill: #e11d48; }
.vs-card-gift .vs-gift-top    { fill: #ff3d6e; }
.vs-card-gift .vs-gift-ribbon,
.vs-card-gift .vs-gift-bow    { fill: #fbbf24; }

.vs-card-gift .vs-gift-lid {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: vs-gift-lid 3.6s ease-in-out infinite;
}

/* Scântei */
.vs-card-gift::before,
.vs-card-gift::after {
  content: "✦";
  position: absolute;
  color: #fbbf24;
  line-height: 1;
  opacity: 0;
  animation: vs-gift-sparkle 3.6s ease-out infinite;
}
.vs-card-gift::before { top: -3px; left: -2px; font-size: 9px; }
.vs-card-gift::after  { top: 1px; right: -4px; font-size: 7px; animation-delay: .15s; }

@keyframes vs-gift-wiggle {
  0%, 62%, 100% { transform: rotate(0) scale(1); }
  66% { transform: rotate(-12deg) scale(1.08); }
  70% { transform: rotate(10deg) scale(1.08); }
  74% { transform: rotate(-7deg) scale(1.05); }
  78% { transform: rotate(4deg); }
  82% { transform: rotate(0); }
}

@keyframes vs-gift-lid {
  0%, 74%, 100% { transform: translateY(0) rotate(0); }
  79% { transform: translateY(-4px) rotate(-8deg); }
  85% { transform: translateY(0) rotate(0); }
}

@keyframes vs-gift-sparkle {
  0%, 74% { opacity: 0; transform: scale(.3); }
  80%     { opacity: 1; transform: scale(1.2); }
  92%, 100% { opacity: 0; transform: scale(.6) translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .vs-card-new::after,
  html body .advanced-woo-labels .awl-product-label::after { animation: none; display: none; }
  .vs-card-gift,
  .vs-card-gift .vs-gift-lid,
  .vs-card-gift::before,
  .vs-card-gift::after { animation: none; }
}

/* ---------- Textul ---------- */
html body .product-small.col .box-text {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 10px 2px 0 !important;
  text-align: center !important;
  font-family: var(--vs-card-font);
}

/* a) Categoria */
html body .product-small.col .box-text .category {
  margin: 0 0 3px !important;
  font-family: var(--vs-card-font) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--vs-card-green) !important;
  opacity: 1 !important;
}

/* b) Titlul – maximum 2 rânduri */
html body .product-small.col .box-text .title-wrapper { margin: 0 0 6px; }

html body .product-small.col .box-text .name,
html body .product-small.col .box-text .name a,
html body .product-small.col .box-text .woocommerce-loop-product__title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  margin: 0 !important;
  font-family: var(--vs-card-title-font) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-transform: none !important;
  color: var(--vs-card-ink) !important;
}

html body .product-small.col .box-text .name a:hover { color: var(--vs-card-navy) !important; }

/* Zona de preț împinge butonul jos, ca toate cardurile să fie aliniate */
html body .product-small.col .box-text .price-wrapper {
  display: flex;
  flex-direction: column;
  width: 100% !important;
  margin: auto 0 0 !important;
  text-align: center !important;
}

/* Textul de livrare al pluginului și stelele (înlocuite de linia de livrare de mai jos) */
html body .product-small.col .box-text .product-shipping-class-catalogue,
html body .product-small.col .box-text .star-rating,
html body .product-small.col .box-text .review-count,
html body .product-small.col .box-text .price-wrapper > .price { display: none !important; }

/* Tot conținutul cardului centrat */
html body .product-small.col .box-text .price-wrapper > *,
html body .product-small.col .box-text .vs-card-row2 {
  width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-content: center;
  text-align: center !important;
}

/* c) Livrare – etichetă albastru-deschis (ca pastila de livrare din pagina produsului), cu bulină verde care pulsează */
html body .product-small.col .vs-card-delivery {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 8px !important;
  padding: 4px 10px;
  border: 1px solid #d6e6f7;
  border-radius: 999px;
  background: #eef5fd;
  font-size: 11.5px !important;
  font-weight: 600;
  line-height: 1.2;
  color: var(--vs-card-navy) !important;
  text-align: center;
}

html body .product-small.col .vs-card-delivery::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
  animation: vs-delivery-pulse 1.8s ease-out infinite;
}

/* Mereu pe un singur rând */
html body .product-small.col .box-text { container-type: inline-size; }
html body .product-small.col .vs-card-delivery { white-space: nowrap; }
html body .product-small.col .vs-card-delivery .vs-dl-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card îngust: fără „lucrătoare" */
@container (max-width: 225px) {
  html body .product-small.col .vs-card-delivery .vs-dl-long { display: none; }
}

/* Card foarte îngust: puțin mai mic */
@container (max-width: 160px) {
  html body .product-small.col .vs-card-delivery { gap: 4px; padding: 3px 7px; font-size: 10px !important; }
}

/* Mașinuța veche (poate rămâne în paginile din cache) */
html body .product-small.col .vs-card-delivery .vs-card-truck { display: none !important; }

@keyframes vs-delivery-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70%  { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html body .product-small.col .vs-card-delivery::before { animation: none; }
}

/* d) „ECONOMISEȘTE X%" – la stânga, deasupra prețurilor */
.vs-card-prices { margin: 0 0 10px; }

html body .product-small.col .box-text .vs-card-row1 {
  display: flex;
  justify-content: center !important;
  margin-bottom: 5px;
}

.vs-card-save {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--vs-card-green);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

/* e) Prețuri centrate; cu reducere = redus (verde) + vechi tăiat, unul lângă altul */
html body .product-small.col .box-text .vs-card-row2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}

html body .product-small.col .box-text .vs-card-row2.is-single { justify-content: center !important; text-align: center !important; }
html body .product-small.col .box-text .vs-card-row2.is-sale { justify-content: center !important; gap: 2px 10px; }

html body .product-small.col .vs-card-final,
html body .product-small.col .vs-card-final .amount,
html body .product-small.col .vs-card-final ins .amount {
  font-family: var(--vs-card-font) !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1.2;
  color: #11519b !important; /* albastrul prețului din pagina produsului */
  text-decoration: none !important;
}

html body .product-small.col .vs-card-old,
html body .product-small.col .vs-card-old .amount,
html body .product-small.col .vs-card-old span.amount {
  font-family: var(--vs-card-font) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--vs-card-muted) !important;
  text-decoration: line-through !important;
  text-decoration-color: #e11d48 !important;
  text-decoration-thickness: 1.5px !important;
  opacity: 1 !important;
}

html body .product-small.col .vs-card-old::before { content: none !important; }

/* Interval de preț la produsele cu variante */
html body .product-small.col .vs-card-final del,
html body .product-small.col .vs-card-final .screen-reader-text { display: none !important; }
html body .product-small.col .vs-card-final ins { text-decoration: none !important; background: none !important; }
html body .product-small.col .vs-card-final .woocommerce-Price-currencySymbol { font-size: .75em; }

/* f) Butonul „Adaugă în coș" – plin, cu iconiță de coș */
html body .product-small.col .add-to-cart-button { margin: 0 !important; padding: 0 !important; background: none !important; }
html body .product-small.col .add-to-cart-button::before { display: none !important; }

html body .product-small.col .box-text a.button,
html body .product-small.col .box-text a.add_to_cart_button {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  background: var(--vs-card-cart) !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(40, 120, 184, .25) !important;
  color: #fff !important;
  font-family: var(--vs-card-font) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  text-shadow: none !important;
  text-transform: none !important;
  white-space: nowrap;
  transform: none !important;
  transition: background .2s ease !important;
}

html body .product-small.col .box-text a.button:hover,
html body .product-small.col .box-text a.add_to_cart_button:hover { background: var(--vs-card-cart-hover) !important; }

html body .product-small.col .box-text a.button::before,
html body .product-small.col .box-text a.add_to_cart_button::before {
  content: "" !important;
  position: static !important;
  display: block !important;
  flex: 0 0 17px;
  width: 17px !important;
  height: 17px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 18a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm10 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4zM1 2v2h2l3.6 7.6-1.35 2.4C4.52 15.37 5.48 17 7 17h12v-2H7.42a.25.25 0 0 1-.22-.37L8.1 13h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49A1 1 0 0 0 20 4H5.21l-.94-2H1z'/%3E%3C/svg%3E") no-repeat center / 17px 17px !important;
}

/* Linkul „Vezi coșul" apărut după adăugare ar ieși din card – bara laterală cu coșul se deschide oricum */
html body .product-small.col .box-text a.added_to_cart { display: none !important; }

/* Efectul „gloss" Flatsome (jumătatea de sus mai deschisă) */
html body .product-small.col .box-text a.button::after,
html body .product-small.col .box-text a.add_to_cart_button::after { content: none !important; display: none !important; }

/* Se încarcă / Adăugat */
html body .product-small.col .box-text a.add_to_cart_button.loading { opacity: .75 !important; }

html body .product-small.col .box-text a.add_to_cart_button.added { background: #15803d !important; }

html body .product-small.col .box-text a.add_to_cart_button.added::before {
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center / 16px 16px !important;
}

/* Textul verde global din CSS-ul suplimentar (.box-text p) nu se aplică în carduri */
html body .product-small.col .box-text p.vs-card-delivery { color: var(--vs-card-navy) !important; }

/* Stoc epuizat – eticheta Flatsome peste imagine */
html body .product-small.col .out-of-stock-label {
  font-family: var(--vs-card-font);
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Mobil: 2 coloane, totul mai compact ---------- */
@media (max-width: 768px) {
  /* Exact 2 coloane în grilele de produse (nu în slidere) */
  html body .row:not(.row-slider) > .product-small.col {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    padding-bottom: 10px !important;
  }

  html body .row:not(.row-slider):has(> .product-small.col) {
    margin-left: -5px !important;
    margin-right: -5px !important;
  }

  html body .product-small.col > .col-inner { padding: 8px 8px 10px !important; border-radius: 14px !important; }

  .vs-card-new { height: 22px; padding: 0 9px 0 7px; font-size: 10px; }
  html body .product-small.col .advanced-woo-labels .awl-product-label { height: 22px; font-size: 10px !important; }
  html body .product-small.col .advanced-woo-labels .awl-label-text { padding: 0 9px 0 7px !important; }
  html body .product-small.col:has(.vs-card-new) .advanced-woo-labels { top: 27px !important; }
  .vs-card-gift { width: 28px; height: 28px; }
  .vs-card-gift svg { width: 17px; height: 17px; }

  html body .product-small.col .box-text .name,
  html body .product-small.col .box-text .name a { font-size: 12.5px !important; }

  html body .product-small.col .vs-card-delivery { font-size: 10.5px !important; gap: 5px; padding: 3px 8px; }
  .vs-card-save { font-size: 9px; padding: 2px 7px; }
  html body .product-small.col .vs-card-old,
  html body .product-small.col .vs-card-old .amount { font-size: 12px !important; }

  html body .product-small.col .vs-card-final,
  html body .product-small.col .vs-card-final .amount { font-size: 19px !important; }
  html body .product-small.col .box-text .vs-card-row2.is-sale { gap: 0 6px; }

  html body .product-small.col .box-text a.button,
  html body .product-small.col .box-text a.add_to_cart_button {
    min-height: 36px !important;
    padding: 0 8px !important;
    gap: 6px;
    font-size: 12px !important;
    border-radius: 10px !important;
  }
}
