/* ==============================================
   0. Wrapper care izolează pluginul de tema Betheme
   ============================================== */
.wfpc-wrapper {
  clear: both;
  display: block !important;
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin-bottom: 2rem;
}

/* ==============================================
   1. Containerul principal și gruparea de câmpuri
   ============================================== */
.wfpc-custom-container {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 360px;
  margin: 0 auto;
}

.wfpc-field {
  display: flex;
  flex-direction: column;
}

.wfpc-field label {
  margin-bottom: .5rem;
  font-weight: 600;
}

/* ==============================================
   2. Stiluri pentru input, select și slider
   ============================================== */
.wfpc-text-input,
.wfpc-font-select,
.wfpc-length-slider {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  transition: border 0.3s ease-in-out;
}

.wfpc-text-input:focus,
.wfpc-font-select:focus {
  border-color: #007bff;
}

/* ==============================================
   3. Preț și animație
   ============================================== */
.wfpc-price-preview {
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  text-align: center;
}

.wfpc-price-line strong {
  color: #c0392b;
  font-size: 18px;
}

.wfpc-price-note {
  font-size: 13px;
  color: #666;
  font-style: italic;
}

@keyframes fadeSlideUp {
  0% { opacity: 0; transform: translateY(10px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.wfpc-price-line.animated {
  display: inline-block;
  animation: fadeSlideUp 0.4s ease-out;
  transition: all 0.2s ease-in-out;
}

/* ————————————————
   4. Zona de previzualizare text – UI rafinat
   ———————————————— */
.wfpc-preview-container {
  position: relative;
  width: 360px;
  margin: 2rem auto 1rem;
  padding: 2rem;
  background: #ffffff;                           /* fundal curat */
  border: 1px solid #ececec;                     /* chenar subtil */
  border-radius: 12px;                           /* colțuri rotunjite */
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);        /* umbră moale */
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease;
}

.wfpc-preview-container:hover {
  transform: translateY(-2px);                   /* hover lift */
}

.wfpc-preview-container::before {
  content: "🪵";
  position: absolute;
  top: 12px;
  left: 16px;
  font-size: 1.5rem;
  opacity: 0.3;
}

.wfpc-preview-container > strong {
  display: block;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Preview box efectiv */
.wfpc-preview-box {
  width: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: bold;
  font-family: 'Borel', cursive;
  /* gradient text pentru contrast */
  background: linear-gradient(120deg, #333333 0%, #555555 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* contur fin */
  -webkit-text-stroke: 1px rgba(0,0,0,0.3);
  text-stroke: 1px rgba(0,0,0,0.3);
  /* umbră ușoară */
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  /* animație pop-in */
  opacity: 0;
  transform: scale(0.9);
  animation: popIn 0.35s ease-out forwards;
  transition: all 0.3s ease;
}

.wfpc-preview-box:hover {
  transform: scale(1.02);
  text-shadow: 2px 2px 6px rgba(0,0,0,0.2);
}

@keyframes popIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==============================================
   5. Reordonare și estetizare cantitate / butoane
   ============================================== */
.single-product form.cart {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1rem !important;
}

.single-product form.cart .wfpc-wrapper { order: 0; }
.single-product form.cart .quantity {
  order: 1;
  margin: 0 !important;
  margin-bottom: .5rem !important;
}
.single-product form.cart button.single_add_to_cart_button {
  order: 2;
  margin: 0 !important;
  padding: .75rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: background .2s;
}
.single-product form.cart button.single_add_to_cart_button:hover {
  background: #0047ab;
}
.single-product form.cart .yith-wcwl-add-to-wishlist {
  order: 3;
  margin: 0 !important;
}

/* ==============================================
   6. Responsiv
   ============================================== */
@media (max-width: 480px) {
  .wfpc-custom-container,
  .wfpc-preview-container { width: 100%; }
  .wfpc-preview-box { font-size: 2.5rem; }
}