/* =========================================================
   Cenoteka Product Cards — консолидиран CSS (без глобал/inline)
   Мигрирано + расчистено од: content-product-small (inline),
   cenoteka-small-card.css, retailer wp_head стилови, retailer inline.
   Десктоп = реплика на постоечкото; мобилен = подобрен (media queries).
   ========================================================= */

/* ---------- Card wrapper ---------- */
.cen-small-card{
  display:flex;
  flex-direction:column;
  gap:0;
  background:#fff;
  border-radius:8px;
  position:relative;
}

/* ---------- Title row (discount + attribute image + title) ---------- */
.cen-small-card .product-element-title{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
}
.cen-small-card .product-discount{
  background:#DD3333;
  color:#fff;
  font-size:12px;
  font-weight:bold;
  padding:3px 10px;
  border-radius:12px;
  flex-shrink:0;
}
.cen-small-card .wd-product-attribute{ display:flex; gap:4px; flex-shrink:0; }
.cen-small-card .wd-product-attribute .attribute-image img{ max-width:50px; height:auto; border-radius:5px; display:block; }
.cen-small-card .wd-entities-title{
  font-size:13px;
  font-weight:bold;
  margin:0;
  line-height:1.15;
  white-space:normal;
  overflow:visible;
}
.cen-small-card .wd-entities-title a{ color:#333; text-decoration:none; }

/* ---------- Rating ---------- */
.cen-small-card .product-rating{
  margin-top:5px;
  font-size:12px;
  color:#f39c12;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:5px;
}
.cen-small-card .product-rating-num{ font-size:14px; font-weight:bold; color:#333; }

/* ---------- Columns (image + retailers) ---------- */
.cen-small-card .product-element-columns{
  display:flex;
  justify-content:space-between;
  align-items:stretch;
  gap:15px;
}
.cen-small-card .product-element-image{ flex:0 0 25%; text-align:center; position:relative; }
.cen-small-card .product-element-image img{ width:100%; height:auto; }
.cen-small-card .product-element-retailers{
  flex:1 1 auto;
  min-width:0;
  text-align:left;
  display:flex;
  flex-direction:column;
}
.cen-small-card .retailer-info-container{
  font-size:12px;
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
}

/* ---------- Retailer rows (cpc-*) — 1:1 реплика на старите inline + wp_head стилови ---------- */
.cen-small-card .cpc-retailers{ width:100%; clear:both; margin-top:5px; font-size:12px; flex:1 1 auto; }
.cen-small-card .cpc-retailer-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:5px;
  flex-wrap:wrap;
}
.cen-small-card .cpc-retailer-logo{ width:45%; max-width:65px; display:block; }
.cen-small-card .cpc-retailer-logo img{ width:100%; height:auto; display:block; }
.cen-small-card .cpc-retailer-price{
  width:55%;
  text-align:right;
  font-weight:bold;
  font-size:13px;
  color:#000;
  position:relative;
  padding-right:16px;
  cursor:help;
}
.cen-small-card .cpc-retailer-price.cpc-price-cen{ color:#ED8A19; }
.cen-small-card .cpc-cur,
.cen-small-card .cpc-soon{ font-size:10px; font-style:italic; }
.cen-small-card .cpc-more-markets{ text-align:center; color:#003D28; margin-top:1px; font-weight:bold; font-size:13px; }
.cen-small-card .cpc-more-markets b{ color:#DD3333; font-size:15px; }

/* % разлика во цени */
.retailer-price-difference{ color:#ED1C24; font-weight:700; font-size:11px; margin:6px 0; text-align:left; }

/* Members-only / not listed */
.cen-small-card .cpc-members-only{ font-size:13px; font-weight:bold; color:#DD3333; }
.cen-small-card .cpc-not-listed{ font-size:14px; font-weight:bold; color:#DD3333; text-align:center; }

/* ---------- Tooltip (акции ★) — scoped .cen-small-card за да победи во каскада (како старото wp_head) ---------- */
.cen-small-card .cpc-tooltip-wrap{ position:absolute; right:0; top:50%; transform:translateY(-50%); display:block; line-height:1; z-index:10; }
.cen-small-card .cpc-tooltip-btn{
  display:inline-flex; align-items:center; justify-content:center;
  width:14px; height:14px; border:none; padding:0; background:transparent;
  cursor:pointer; font-size:13px; line-height:1; color:#1E66FF;
  user-select:none; -webkit-tap-highlight-color:transparent;
}
.cen-small-card .cpc-tooltip{
  display:none; position:absolute; right:0; top:100%;
  max-width:260px; width:max-content;
  background:#003D28; color:#fff; padding:10px 12px; border-radius:8px;
  font-size:11px; line-height:1.3; box-shadow:0 10px 26px rgba(0,0,0,.18);
  z-index:9999; white-space:normal; margin:-110px -10px;
}
@media (hover:hover) and (pointer:fine){
  .cen-small-card .cpc-retailer-price:hover .cpc-tooltip,
  .cen-small-card .cpc-tooltip-wrap:focus-within .cpc-tooltip{ display:block; }
}
@media (hover:none), (pointer:coarse){
  .cen-small-card .cpc-tooltip-wrap.is-open .cpc-tooltip{ display:block; }
}
@media (max-width:360px){
  .cen-small-card .cpc-retailer-price{ padding-right:12px; }
  .cen-small-card .cpc-tooltip-btn{ width:14px; height:14px; font-size:12px; }
  .cen-small-card .cpc-tooltip{ max-width:220px; }
}

/* ---------- Quantity + add-to-cart ---------- */
.cen-small-card .cen-small-atc-wrap{
  margin-top:auto;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
  padding-top:8px;
}
.cen-small-card .cen-small-qty{ display:flex; align-items:center; gap:6px; }
.cen-small-card .cen-small-qty .btn{
  width:34px; height:34px; border-radius:12px; border:1px solid #ddd; background:#fff; cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease;
}
.cen-small-card .cen-small-qty .btn:hover{ transform:translateY(-1px); box-shadow:0 6px 14px rgba(0,0,0,.12); }
.cen-small-card .cen-small-qty .qty{ width:46px; height:34px; text-align:center; border-radius:12px; border:1px solid #ddd; padding:0; }

.cen-small-card a.ajax_add_to_cart.add-to-cart-loop{
  width:44px; height:44px; min-height:44px; padding:0; border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  background:#FE5000; border:1px solid #FE5000;
  transition:transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}
.cen-small-card a.ajax_add_to_cart.add-to-cart-loop:hover{ transform:translateY(-1px) scale(1.03); box-shadow:0 10px 20px rgba(0,0,0,.18); }
.cen-small-card a.ajax_add_to_cart.add-to-cart-loop:active{ transform:scale(.97); opacity:.92; }
.cen-small-card a.ajax_add_to_cart.add-to-cart-loop > span{ display:none; }
.cen-small-card a.ajax_add_to_cart.add-to-cart-loop::before{
  content:""; width:26px; height:26px; display:block;
  background-repeat:no-repeat; background-position:center; background-size:contain;
  background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 36 36%27 fill=%27none%27%3E%3Cpath d=%27M27.76 14.2198c0 .02-.02.06-.04.08l-2.12 5.6c-.52 1.34-1.82 2.22-3.26 2.22h-6.4c-1.66 0-3.1-1.18-3.42-2.82l-1.26-6.5c-.14-.72-.7-1.3-1.42-1.44l-.96-.18a.83.83 0 0 1-.64-.98.83.83 0 0 1 .98-.64l.98.2c1.38.28 2.46 1.36 2.72 2.76l1.24 6.5c.18.84.92 1.46 1.8 1.46h6.4c.76 0 1.44-.46 1.7-1.18l2.14-5.56a.83.83 0 0 1 1.04-.54c.44.14.68.62.54 1.04Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M19 10v6M16 13h6%27 stroke=%27%23fff%27 stroke-width=%271.5%27 stroke-linecap=%27round%27/%3E%3Cpath d=%27M22.24 24.16a1.66 1.66 0 1 0 0 3.32 1.66 1.66 0 0 0 0-3.32ZM15.72 24.16a1.66 1.66 0 1 0 0 3.32 1.66 1.66 0 0 0 0-3.32Z%27 fill=%27%23fff%27/%3E%3C/svg%3E");
}

/* Наскоро цена */
.custom-price-text{ font-style:italic; color:#888; }

/* ---------- Badges ---------- */
.cpc-badges{ position:absolute; top:8px; left:8px; z-index:6; display:flex; flex-direction:column; gap:4px; pointer-events:none; }
.cpc-badge{
  font-size:10px; font-weight:600; letter-spacing:.3px; text-transform:uppercase;
  padding:3px 7px; border-radius:6px; color:#fff; background:#282828; line-height:1; white-space:nowrap;
}
.cpc-badge--recommended{ background:#1D9E75; }
.cpc-badge--choice{      background:#185FA5; }
.cpc-badge--bestseller{  background:#D85A30; }
.cpc-badge--sponsored{   background:#282828; }
.cpc-badge--custom{      background:#7F77DD; }

/* ---------- Mobile ---------- */
@media (max-width:768px){
  .cen-small-card .product-element-image{ flex-basis:30%; }
  .cen-small-card .wd-entities-title{ font-size:13px; line-height:1.2; }
  .cen-small-card .cpc-retailer-logo{ max-width:60px; }
}
@media (max-width:480px){
  .cen-small-card .product-element-columns{ gap:10px; }
  .cen-small-card .product-element-image{ flex-basis:32%; }
}
