/* Cerere de ofertă – stiluri front (independente de temă; culorile vin din configurare prin variabilele --rfq-*) */
:root {
  --rfq-accent: #bf9e7f;        /* bej – butoane, accente */
  --rfq-accent-dark: #222222;   /* hover (ca la „Adaugă în coș” din temă) */
  --rfq-soft: #f7f2ec;          /* bej foarte deschis – fundaluri */
  --rfq-line: #e6ddd3;          /* linii / chenare */
  --rfq-ink: #222222;
  --rfq-muted: #777777;
  --rfq-bg: #ffffff;
  --rfq-radius: 6px;
}

/* ─── ascunderea prețului 0 / coșului ─────────────────────────────────────── */
/* pagina produsului / quick view (clasa e pusă pe „fișa” produsului, nu pe toată pagina) */
.rfq-zero-page .product-prices,
.rfq-zero-page .product-add-to-cart,
.rfq-zero-page .product-discounts,
.rfq-zero-page .product-quantity,
.rfq-zero-page .product-availability,
.rfq-zero-page #product-availability,
.rfq-zero-page .product-minimal-quantity,
.rfq-zero-page .tax-shipping-delivery-label,
.rfq-zero-page .product-actions .add-to-cart { display: none !important; }
/* miniaturi în liste (Classic + Antomi) */
.rfq-zero .product-price-and-shipping,
.rfq-zero .product-price-and-shipping-top,
.rfq-zero .product-price,
.rfq-zero .price,
.rfq-zero .regular-price,
.rfq-zero .discount-product,
.rfq-zero .availability,
.rfq-zero .cart,
.rfq-zero .product-add-to-cart,
.rfq-zero .add-to-cart,
.rfq-zero .ajax_add_to_cart_button { display: none !important; }
.rfq-zero .rfq-btn, .rfq-zero-page .rfq-btn { display: inline-flex !important; }
.rfq-zero-page .rfq-product { display: block !important; }

/* ─── butoane ─────────────────────────────────────────────────────────────── */
.rfq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--rfq-accent); color: #fff !important; border: 0; cursor: pointer;
  font-weight: 500; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
  border-radius: 3px; box-shadow: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  font-family: inherit; white-space: nowrap;
}
.rfq-btn:hover { background: var(--rfq-accent-dark); }
.rfq-btn:focus-visible { outline: 2px solid var(--rfq-accent); outline-offset: 2px; }
.rfq-btn-lg { font-size: 13px; height: 50px; padding: 0 30px; }
.rfq-btn-sm { font-size: 11px; height: 36px; padding: 0 16px; margin-top: 8px; }
.rfq-btn svg { flex: none; }

.rfq-product { margin: 10px 0 20px; }
.rfq-product-note {
  display: flex; gap: 10px; align-items: flex-start; color: #555; font-size: 13px; line-height: 1.5;
  background: var(--rfq-soft); border-left: 3px solid var(--rfq-accent); border-radius: 3px; padding: 12px 14px; margin-bottom: 16px;
}
.rfq-product-note svg { color: var(--rfq-accent); flex: none; margin-top: 1px; }

/* în miniaturi: butonul nu depășește cartonașul (textul se împarte pe 2 rânduri dacă e lung) */
.product-miniature .rfq-btn, .js-product-miniature .rfq-btn {
  max-width: 100%; box-sizing: border-box; white-space: normal; height: auto; min-height: 36px; line-height: 1.25; padding: 8px 14px; text-align: center;
}
/* în miniaturi: butonul mic, centrat, în locul coșului */
.product-miniature .rfq-btn-sm, .js-product-miniature .rfq-btn-sm { margin: 6px auto 10px; }
.product-miniature .product-description { text-align: center; }
.js-product-miniature .product_desc { text-align: center; }

/* ─── fereastra modală ───────────────────────────────────────────────────── */
.rfq-overlay {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(34, 34, 34, .6); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .18s ease;
}
.rfq-overlay[hidden] { display: none; }
.rfq-overlay.rfq-show { opacity: 1; }
.rfq-dialog {
  position: relative; display: grid; grid-template-columns: 300px 1fr; grid-template-rows: minmax(0, 1fr); width: 100%; max-width: 860px; max-height: calc(100vh - 32px);
  background: var(--rfq-bg); color: var(--rfq-ink); border-radius: var(--rfq-radius); overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); transform: translateY(14px); transition: transform .2s ease;
  font-family: inherit; text-align: left;
}
.rfq-show .rfq-dialog { transform: none; }
.rfq-close {
  position: absolute; top: 10px; right: 12px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: #fff; color: var(--rfq-ink); font-size: 26px; line-height: 1; cursor: pointer;
  border: 1px solid var(--rfq-line);
}
.rfq-close:hover { background: var(--rfq-accent); color: #fff; border-color: var(--rfq-accent); }

/* panoul din stânga – bej deschis, text închis */
.rfq-side {
  background: var(--rfq-soft); color: var(--rfq-ink); padding: 30px 26px; border-right: 1px solid var(--rfq-line);
  display: flex; flex-direction: column; justify-content: center;
}
.rfq-side-kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--rfq-accent); margin-bottom: 14px; font-weight: 600; }
.rfq-product-card { background: #fff; border: 1px solid var(--rfq-line); border-radius: var(--rfq-radius); padding: 12px; display: flex; gap: 12px; align-items: center; }
.rfq-product-img { width: 64px; height: 64px; flex: none; background: #fff; border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rfq-line); }
.rfq-product-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.rfq-product-img:empty, .rfq-product-img.rfq-noimg { display: none; }
.rfq-product-name { font-weight: 600; font-size: 14px; line-height: 1.35; }
.rfq-product-ref { font-size: 12px; color: var(--rfq-muted); margin-top: 3px; }
.rfq-benefits { list-style: none; margin: 24px 0 0; padding: 0; font-size: 13px; line-height: 1.5; color: #555; }
.rfq-benefits li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.rfq-benefits li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--rfq-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23000'/%3E%3Cpath d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6L21.5 7l-1.4-1.4z' fill='%23fff'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%23000'/%3E%3Cpath d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6L21.5 7l-1.4-1.4z' fill='%23fff'/%3E%3C/svg%3E") center/contain no-repeat;
}
.rfq-benefits li::after {
  content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
  background: #fff;
}

/* formularul */
.rfq-main { padding: 30px 32px 26px; overflow: auto; }
.rfq-title { margin: 0 32px 6px 0; font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--rfq-ink); text-transform: uppercase; letter-spacing: .03em; }
.rfq-intro { margin: 0 0 18px; color: var(--rfq-muted); font-size: 14px; line-height: 1.5; }
.rfq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.rfq-field { display: flex; flex-direction: column; }
.rfq-field-full { grid-column: 1 / -1; }
.rfq-field label { font-size: 12px; font-weight: 600; color: var(--rfq-ink); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.rfq-field label b { color: var(--rfq-accent); font-weight: 700; }
.rfq-field input, .rfq-field textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; color: var(--rfq-ink); background: #fff;
  border: 1px solid var(--rfq-line); border-radius: 3px; padding: 11px 13px; transition: border-color .12s, box-shadow .12s; margin: 0; height: auto;
}
.rfq-field textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
.rfq-field input:focus, .rfq-field textarea:focus { outline: none; border-color: var(--rfq-accent); box-shadow: 0 0 0 3px var(--rfq-soft); }
.rfq-field.rfq-invalid input, .rfq-field.rfq-invalid textarea { border-color: #e2503c; }
.rfq-qty { display: flex; align-items: stretch; }
.rfq-qty input { text-align: center; border-radius: 0; border-left: 0; border-right: 0; -moz-appearance: textfield; }
.rfq-qty input::-webkit-outer-spin-button, .rfq-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rfq-qty-btn { width: 44px; flex: none; border: 1px solid var(--rfq-line); background: var(--rfq-soft); font-size: 20px; color: var(--rfq-ink); cursor: pointer; font-family: inherit; }
.rfq-qty-btn:first-child { border-radius: 3px 0 0 3px; }
.rfq-qty-btn:last-child { border-radius: 0 3px 3px 0; }
.rfq-qty-btn:hover { background: var(--rfq-accent); color: #fff; border-color: var(--rfq-accent); }
.rfq-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.rfq-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--rfq-muted); margin: 16px 0 0; line-height: 1.45; cursor: pointer; font-weight: 400; }
.rfq-check input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--rfq-accent); }
.rfq-check a { color: var(--rfq-ink); text-decoration: underline; }
.rfq-actions { display: flex; align-items: center; gap: 18px; margin-top: 20px; flex-wrap: wrap; }
.rfq-link { background: none; border: 0; color: var(--rfq-muted); font: inherit; font-size: 14px; cursor: pointer; padding: 6px 2px; text-decoration: underline; }
.rfq-link:hover { color: var(--rfq-ink); }
.rfq-submit[disabled] { opacity: .7; cursor: progress; transform: none; }
.rfq-spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: rfq-spin .7s linear infinite; }
.rfq-spinner[hidden] { display: none; }
@keyframes rfq-spin { to { transform: rotate(360deg); } }
.rfq-alert { border-radius: 3px; padding: 11px 14px; font-size: 14px; margin-bottom: 14px; line-height: 1.45; }
.rfq-alert[hidden] { display: none; }
.rfq-alert-error { background: #fdecea; color: #a4281a; border: 1px solid #f5c2bb; }

/* mesajul de succes */
.rfq-success { text-align: center; padding: 20px 10px 10px; }
.rfq-success[hidden] { display: none; }
.rfq-success-icon { color: var(--rfq-accent); margin-bottom: 12px; animation: rfq-pop .35s ease; }
@keyframes rfq-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.rfq-success h3 { margin: 0 0 8px; font-size: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.rfq-success p { color: var(--rfq-muted); font-size: 15px; line-height: 1.5; margin: 0 auto 22px; max-width: 420px; }

/* ─── telefon / tabletă ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .rfq-overlay { padding: 0; align-items: flex-end; }
  .rfq-dialog { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); max-width: none; max-height: 100vh; max-height: 100dvh; border-radius: 10px 10px 0 0; transform: translateY(40px); }
  .rfq-side { padding: 18px 18px 14px; justify-content: flex-start; border-right: 0; border-bottom: 1px solid var(--rfq-line); }
  .rfq-side-kicker { margin-bottom: 10px; padding-right: 48px; }
  .rfq-benefits { display: none; }
  .rfq-close { top: 8px; right: 8px; }
  .rfq-main { padding: 20px 18px 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .rfq-title { font-size: 17px; margin-right: 0; }
  .rfq-grid { grid-template-columns: 1fr; gap: 12px; }
  .rfq-field input, .rfq-field textarea { font-size: 16px; } /* iOS nu face zoom la 16px */
  .rfq-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .rfq-actions .rfq-btn { width: 100%; }
  .rfq-btn-lg { padding: 0 20px; }
  .rfq-product .rfq-btn-lg { width: 100%; }
  .product-miniature .rfq-btn, .js-product-miniature .rfq-btn { width: 100%; font-size: 11px; padding: 8px 6px; margin-left: 0; margin-right: 0; }
}
@media (min-width: 768px) and (max-width: 991px) {
  .rfq-dialog { grid-template-columns: 240px 1fr; }
  .rfq-main { padding: 26px 24px 22px; }
}
body.rfq-locked { overflow: hidden; }
