/* Entry CSS Tailwind pentru TopPro.
 * Preflight e dezactivat în tailwind.config.js, iar utilitarele au prefix `tw-`,
 * ca să coexiste cu CSS-ul/Bootstrap-ul existent al temei fără regresii vizuale.
 * CSS-ul actual al temei rămâne în public/themes/biomag/css/*.css (neatins).
 */

*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

.tw-mb-0 {
  margin-bottom: 0px;
}

.tw-mb-10 {
  margin-bottom: 2.5rem;
}

.tw-mb-3 {
  margin-bottom: 0.75rem;
}

.tw-space-y-1 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
}

.tw-space-y-2 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}

.tw-px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.tw-pb-3 {
  padding-bottom: 0.75rem;
}

.tw-opacity-80 {
  opacity: 0.8;
}

.tw-transition-opacity {
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.tw-duration-300 {
  transition-duration: 300ms;
}

/* ───────── Quick-view: buton card ───────── */

.biomag-image-wrapper {
  position: relative;
}

.biomag-quickview-btn {
  position: absolute;
  top: .6rem;
  right: .6rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .7rem;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 20, .82);
  color: #f3dfad;
  font-size: .8rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
}

.biomag-product-card:hover .biomag-quickview-btn {
  opacity: 1;
  transform: translateY(0);
}

.biomag-quickview-btn:hover {
  background: #1f2a23;
}

@media (hover: none) {
  .biomag-quickview-btn {
    opacity: 1;
    transform: none;
  }
}

/* ───────── Quick-view: overlay + modal ───────── */

.qv-overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 1rem;
  background: rgba(10, 14, 12, .6);
  backdrop-filter: blur(2px);
  overflow-y: auto;
}

.qv-overlay[data-open="true"] {
  display: flex;
}

.qv-modal {
  position: relative;
  width: 100%;
  max-width: 920px;
  background: #fff;
  color: #233;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  padding: 1.5rem;
}

.qv-close {
  position: absolute;
  top: .8rem;
  right: .8rem;
  border: 0;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #f1efe7;
  color: #4a4534;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qv-close:hover {
  background: #e6e2d4;
}

.qv-body {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.5rem;
}

@media (max-width: 720px) {
  .qv-body {
    grid-template-columns: 1fr;
  }
}

.qv-gallery {
  position: relative;
  min-height: 240px;
}

.qv-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  -o-object-fit: contain;
     object-fit: contain;
}

.qv-brand {
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8a8268;
}

.qv-name {
  font-size: 1.4rem;
  margin: .2rem 0 .6rem;
}

.qv-price-row {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin: .4rem 0 .8rem;
}

.qv-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f7a44;
}

.qv-old-price {
  text-decoration: line-through;
  color: #a09a86;
}

.qv-desc {
  color: #555;
  font-size: .92rem;
  line-height: 1.55;
  max-height: 7.5rem;
  overflow: hidden;
}

.qv-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.qv-add[disabled] {
  opacity: .5;
  cursor: progress;
}

.qv-details-link {
  color: #C7A54A;
  font-size: .9rem;
}

/* Skeleton shimmer */

.qv-skeleton {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
  background-size: 400% 100%;
  animation: qv-shimmer 1.3s ease infinite;
  border-radius: 8px;
}

.qv-skeleton--img {
  width: 100%;
  height: 240px;
}

.qv-skeleton--line {
  height: 14px;
  width: 70%;
  margin: .4rem 0;
}

@keyframes qv-shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.qv-body[data-qv-state="ready"] [data-qv-skeleton] {
  display: none;
}

/* ───────── Quick-view: produse similare ───────── */

.qv-similar {
  margin-top: 1.6rem;
  border-top: 1px solid #eee;
  padding-top: 1.1rem;
}

.qv-similar__title {
  font-size: 1.05rem;
  margin: 0 0 .8rem;
}

.qv-similar__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .8rem;
}

@media (max-width: 720px) {
  .qv-similar__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.qv-sim-card {
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.qv-sim-card__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  -o-object-fit: contain;
     object-fit: contain;
  background: #faf9f5;
}

.qv-sim-card__body {
  padding: .55rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.qv-sim-card__name {
  font-size: .82rem;
  color: #233;
  line-height: 1.3;
  min-height: 2.1em;
  overflow: hidden;
}

.qv-sim-card__price {
  font-weight: 700;
  color: #1f7a44;
  font-size: .95rem;
}

.qv-sim-card__old {
  text-decoration: line-through;
  color: #a09a86;
  font-size: .8rem;
  margin-right: .3rem;
}

.qv-sim-card__add {
  margin-top: auto;
  font-size: .8rem;
  padding: .35rem .5rem;
}

.qv-sim-skeleton {
  border: 1px solid #eee;
  border-radius: 12px;
  height: 190px;
}

/* Titlul modalului = link către pagina produsului: arată ca titlul (culoare + fără subliniere),
   subliniere doar la hover (regula de hover e în biomag-home.css). */

.biomag-modal-title a {
  color: inherit;
  text-decoration: none;
}

/* Grilă modal: flex cu `gap` (ca `.products-grid` din sursă), NU Bootstrap `.row g-3`.
   Utilitarele w-50p/w-md-16p sunt calculate pentru gap de flex; cu gutter-ul Bootstrap
   (padding) cardurile nu însumează 100% și rămânea spațiu inegal în dreapta. */

.qv-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--product-item-gap, 1rem);
  margin: 0;
  padding: 0;
  align-items: stretch;
}

/* ───────── Modal: carduri compacte „Similare / Același brand / Categorii" ─────────
   Card `product-small-card` — structură + metrici (fontsize, spațieri, înălțime poză)
   IDENTICE cu sursa biomag (item-small-template + produs_style.php). Wrapper w-50p/w-md-20p
   (2/rând mobil, 5/rând desktop) e definit în theme.min.css. Overrides scopate pe
   `.product-small-card` ca să nu afecteze cardurile din listă/home. */

.product-small-card {
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.biomag-product-img-wrap {
  background: #fff;
  border-bottom: 1px solid #f3f3f3;
  padding: .6rem .7rem .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.biomag-product-img-wrap img {
  max-height: 115px;
  width: auto;
  max-width: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

.product-small-card .biomag-product-info {
  flex: auto;
  padding: .55rem .75rem .3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-small-card .biomag-brand {
  font-size: 14px;
  color: #888;
  margin-bottom: 2px;
}

.biomag-product-name {
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: .25rem;
  color: #222;
}

.biomag-product-name a {
  color: #222;
  text-decoration: none;
}

.product-small-card .biomag-product-name {
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-clamp: 3;
  max-height: 4.5em;
}

.product-small-card:has(.biomag-old-price:not([style*="none"])) .biomag-product-name {
  -webkit-line-clamp: 2;
  line-clamp: 2;
  max-height: 3em;
}

.biomag-product-price-row {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  margin-bottom: .05rem;
}

.product-small-card .biomag-old-price {
  font-size: .75rem;
  color: #999;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.product-small-card .biomag-prp-info {
  font-size: .75rem;
}

.product-small-card .biomag-price {
  font-size: .96rem;
  font-weight: 700;
  color: #e30613;
  margin-bottom: 5px;
}

.product-small-card .biomag-btn-wrapper {
  padding: 0 .75rem .7rem;
}

.product-small-card .biomag-btn-cart {
  padding: .5rem .6rem;
  font-size: .7rem;
  gap: 6px;
  border-radius: 8px;
}

.product-small-card .biomag-btn-cart i {
  font-size: 14px;
}

.product-small-card .biomag-qty-btn {
  padding: 6px 0;
  border-radius: 8px;
}

.product-small-card .biomag-qty-btn i {
  font-size: 14px;
}

.product-small-card .biomag-qty-value {
  font-size: 13px;
}

/* ───────── Modal: tab „Caracteristici" (caracteristici + ingrediente, ca sursa biomag) ───────── */

.bm-charing {
  font-size: 14px;
  line-height: 1.6;
}

.bm-section-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #333;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: .8rem;
}

.bm-char-section {
  margin-bottom: 1.5rem;
}

.bm-char-list {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 8px 16px;
}

.bm-char-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem 0;
  font-size: 13px;
}

.bm-char-item--border {
  border-top: 1px solid #e9ecef;
}

.bm-char-label {
  font-weight: 500;
  color: #333;
}

.bm-char-value {
  text-align: right;
  color: #6c757d;
  margin-left: 16px;
  max-width: 60%;
}

.bm-ingredients {
  font-size: 14px;
  line-height: 1.6;
}

.bm-ingredients__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bm-ingredient-tag {
  display: inline-block;
  background: #e9ecef;
  color: #495057;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid #dee2e6;
}

.bm-ingredients__text {
  color: #555;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 13px;
}

.bm-ingredients__empty i {
  font-size: 2rem;
}

/* ───────── Modal: chips „Categorii similare" ───────── */

.biomag-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.biomag-category-chip {
  display: inline-flex;
  align-items: center;
  padding: .35rem .8rem;
  border: 1px solid #e3decb;
  border-radius: 999px;
  background: #faf8f0;
  color: #4a4534;
  font-size: .85rem;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}

.biomag-category-chip:hover {
  background: #f1ead6;
  border-color: #cbb39a;
  color: #2c2a20;
}

/* ───────── Modal: ancorează steagurile RO/BIO peste imaginea principală ───────── */

#productModal .biomag-modal-image-main {
  position: relative;
}
