/* ==== WC Per-Product Bundle: Stil complet unificat ==== */

/* ==== Structura generală ==== */
.wcppb {
  display: inline-block;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.48);
  margin: auto;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  background: #fff;
}

/* Titlu secțiune */
.wcppb-title {
  background-color: black !important;
  color: #ffba00;
  font-weight: 800;
  font-size: 22px;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

/* === Lista de produse în bundle === */
.wcppb-items {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
}

/* Card produs individual */
.wcppb-item {
  width: 220px;
  text-align: center;
  padding: 2px;
  border-radius: 15px;
  scroll-snap-align: start;
}

.wcppb-thumb img {
  border-radius: 10px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.wcppb-name {
  display: block;
  margin-top: 8px;
  font-weight: 600;
  text-decoration: none;
}

/* === Prețuri produs individual === */
.wcppb-price {
  margin-top: 4px;
  line-height: 1.4;
  opacity: 0.9;
  font-size: 15px;
  font-weight: 500;
}

/* Preț vechi (tăiat) */
.wcppb-price del {
  color: #999;
  opacity: 0.7;
  margin-right: 4px;
  text-decoration: line-through;
  font-weight: 400;
}

/* Preț redus (nou) */
.wcppb-price ins {
  color: #d32f2f !important;
  text-decoration: none;
  font-weight: 600;
}

/* Simbolul + dintre produse */
.wcppb-plus {
  font-size: 28px;
  font-weight: 700;
  align-self: center;
}

/* === Rezumat (Preț pachet, Economisești, Buton) === */
.wcppb-summary {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 800;
}

.wcppb-line {
  font-size: 16px;
  margin: auto;
  line-height: 1.3;
}

.wcppb-line strong {
  color: #d00;
  margin-left: 6px;
}

.wcppb-line .woocommerce-Price-amount {
  color: red;
}

.wcppb-saves {
  opacity: .9;
}

/* === Butonul de adăugare === */
.wcppb-add.button {
  background-color: red !important;
  color: white !important;
  font-weight: 800;
  padding: 10px 16px !important;
  border-radius: 6px;
  margin: auto;
  white-space: nowrap;
}

.wcppb-add.button .fa-basket-shopping {
  color: white !important;
}

/* Ascunde linkul "Vezi coșul" care se inserează automat */
.wcppb-summary a.added_to_cart.wc-forward { display: none !important; }

/* ==== Responsivitate ==== */

/* 📱 Mobile */
@media (max-width: 768px) {
  .single-product .wcppb {
    box-sizing: border-box;
    width: 95%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px !important;
    padding: 12px 8px;
  }

  .wcppb-title { font-size: 14px; }

  .single-product .wcppb-items {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 0 0 0 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .single-product .wcppb-item { flex: 0 0 42%; max-width: 42%; }
  .single-product .wcppb-plus { flex: 0 0 8%; font-size: 22px; }

  .single-product .wcppb-summary {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-weight: 800 !important;
  }

  .single-product .wcppb-add.button {
    width: 100%;
    padding: 12px 14px;
  }
}

/* 💻 Desktop */
@media (min-width: 1024px) {
  .single-product .wcppb {
    display: grid;
    grid-template-areas:
      "title title"
      "items summary";
    grid-template-columns: 1fr 360px;
    column-gap: 50px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 15px;
    width: 100%;
  }

  .single-product .wcppb-title   { grid-area: title; }
  .single-product .wcppb-items   { grid-area: items; }
  .single-product .wcppb-summary { grid-area: summary; }

  .single-product .wcppb-items {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 78px;
    flex-wrap: nowrap;
  }

  .single-product .wcppb-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: 8px;
    text-align: center;
  }

  .single-product .wcppb-summary .wcppb-line strong { color: #d00; }
  .single-product .wcppb-add.button {
    width: 100%;
    max-width: 260px;
    padding: 12px 16px;
    margin-top: 6px;
  }
}

/* Ascunde linkul "Vezi coșul" peste tot (siguranță) */
a.added_to_cart.wc-forward,
a.added_to_cart,
a.wc-forward[href*="/cart/"],
a[href*="/cart/"].view-cart,
.view-cart-link {
  display: none !important;
  visibility: hidden !important;
}