/* ============================================================
   STAF GROS — Quote Mode (Demande de Devis)
   ============================================================ */

/* ── Floating "Mon Devis" button ─────────────────────────── */

.sg-quote-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0d1b2a;
  color: #fff;
  padding: 12px 20px 12px 16px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(13, 27, 42, 0.35), 0 2px 8px rgba(0,0,0,0.15);
  text-decoration: none;
  font-family: 'Montserrat', -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.sg-quote-fab:hover {
  background: #e63128;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(230, 49, 40, 0.35), 0 2px 8px rgba(0,0,0,0.15);
  text-decoration: none;
}

.sg-quote-fab__icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.sg-quote-fab__label {
  white-space: nowrap;
}

.sg-quote-fab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: #e63128;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50px;
  line-height: 1;
}
.sg-quote-fab:hover .sg-quote-fab__count {
  background: #fff;
  color: #e63128;
}

/* Pulse animation when item added */
.sg-quote-fab--pulse {
  animation: sg-fab-pulse 0.6s ease;
}
@keyframes sg-fab-pulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.12); }
  60%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}


/* ── Cart page overrides (quote mode) ────────────────────── */

/* Remove price & subtotal columns */
.sg-quote-mode .woocommerce-cart-form .product-price,
.sg-quote-mode .woocommerce-cart-form .product-subtotal,
.sg-quote-mode .cart_totals {
  display: none !important;
}

/* Style the cart table cleaner */
.woocommerce-cart-form__contents {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.woocommerce-cart-form__contents th {
  background: #f8fafc;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #4a5568;
  padding: 12px 16px;
}

.woocommerce-cart-form__contents td {
  padding: 14px 16px;
  vertical-align: middle;
  border-top: 1px solid #e5e7eb;
}

.woocommerce-cart-form__contents .product-thumbnail img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
}

.woocommerce-cart-form__contents .product-name a {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #0d1b2a;
  text-decoration: none;
  transition: color 0.15s;
}
.woocommerce-cart-form__contents .product-name a:hover {
  color: #e63128;
}

/* Quantity input */
.woocommerce-cart-form__contents .quantity .qty {
  width: 60px;
  height: 38px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
}
.woocommerce-cart-form__contents .quantity .qty:focus {
  border-color: #0F2B8C;
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 43, 140, 0.08);
}

/* Update button */
.woocommerce-cart-form button[name="update_cart"] {
  background: #f8fafc !important;
  color: #4a5568 !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 8px !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
  cursor: pointer;
  transition: all 0.2s;
}
.woocommerce-cart-form button[name="update_cart"]:hover {
  background: #0d1b2a !important;
  color: #fff !important;
  border-color: #0d1b2a !important;
}

/* Remove "×" button */
.woocommerce-cart-form .product-remove a {
  color: #9ca3af !important;
  font-size: 18px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s;
}
.woocommerce-cart-form .product-remove a:hover {
  background: rgba(230, 49, 40, 0.08);
  color: #e63128 !important;
}

/* Empty cart message */
.cart-empty.woocommerce-info {
  text-align: center;
  padding: 60px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #6b7280;
  background: #f8fafc;
  border-radius: 12px;
  border: 1.5px dashed #e5e7eb;
}

.woocommerce .return-to-shop a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e63128;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
}
.woocommerce .return-to-shop a:hover {
  background: #cc2820;
  transform: translateY(-1px);
}


/* ── Quote Form ──────────────────────────────────────────── */

.sg-quote-form-wrap {
  margin-top: 30px;
  padding: 28px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.sg-quote-form__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #0d1b2a;
  margin: 0 0 6px;
}
.sg-quote-form__title svg {
  color: #e63128;
  flex-shrink: 0;
}

.sg-quote-form__desc {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px;
  line-height: 1.6;
}

.sg-quote-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.sg-quote-form__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sg-quote-form__field--full {
  margin-bottom: 20px;
}

.sg-quote-form__field label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.sg-req {
  color: #e63128;
}

.sg-quote-form__field input,
.sg-quote-form__field textarea {
  width: 100%;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 11px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #0d1b2a;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sg-quote-form__field input:focus,
.sg-quote-form__field textarea:focus {
  border-color: #0F2B8C;
  box-shadow: 0 0 0 3px rgba(15, 43, 140, 0.08);
  outline: none;
}
.sg-quote-form__field input::placeholder,
.sg-quote-form__field textarea::placeholder {
  color: #9ca3af;
}

.sg-quote-form__field textarea {
  resize: vertical;
  min-height: 80px;
}

/* Submit button */
.sg-quote-form__submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #e63128;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 14px 32px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(230, 49, 40, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sg-quote-form__submit:hover {
  background: #cc2820;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(230, 49, 40, 0.3);
}
.sg-quote-form__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}
.sg-quote-form__submit svg {
  flex-shrink: 0;
}

/* Status messages */
.sg-quote-form__status {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.sg-quote-form__status--success {
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.2);
}
.sg-quote-form__status--error {
  background: rgba(230, 49, 40, 0.08);
  color: #e63128;
  border: 1px solid rgba(230, 49, 40, 0.2);
}

/* Success done state */
.sg-quote-form__done {
  text-align: center;
  padding: 30px 20px;
}
.sg-quote-form__done svg {
  margin-bottom: 12px;
}
.sg-quote-form__done h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #059669;
  margin: 0 0 8px;
}
.sg-quote-form__done p {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px;
}
.sg-quote-form__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #0d1b2a;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
}
.sg-quote-form__back:hover {
  background: #e63128;
  color: #fff;
}


/* ── Add to cart buttons everywhere → quote style ────────── */

.woocommerce a.button.add_to_cart_button,
.woocommerce a.button.product_type_simple,
.woocommerce a.button.product_type_variable,
.woocommerce .products .add_to_cart_button {
  background: #0F2B8C !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  letter-spacing: 0.02em;
  transition: all 0.2s !important;
}
.woocommerce a.button.add_to_cart_button:hover,
.woocommerce a.button.product_type_simple:hover {
  background: #e63128 !important;
}

/* "View cart" link after adding → "Voir mon devis" */
.woocommerce a.added_to_cart {
  font-size: 11.5px;
  color: #0F2B8C;
  font-weight: 600;
}


/* ══════════════════════════════════════════════════════════════
   [sg_add_to_quote] — Single product page button
   ══════════════════════════════════════════════════════════════ */
.sg-atq { margin: 20px 0; }
.sg-atq__row { display: flex; gap: 10px; align-items: stretch; }
.sg-atq__qty-wrap { display: flex; align-items: stretch; border: 2px solid #e5e7eb; border-radius: 10px; overflow: hidden; background: #fff; }
.sg-atq__qty-btn { width: 42px; display: flex; align-items: center; justify-content: center; background: #f8fafc; border: none; cursor: pointer; font-size: 18px; font-weight: 600; color: #4a5568; transition: background 0.15s, color 0.15s; -webkit-user-select: none; user-select: none; }
.sg-atq__qty-btn:hover { background: #0F2B8C; color: #fff; }
.sg-atq__qty { width: 56px; text-align: center; border: none; border-left: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb; font-family: 'Montserrat', sans-serif; font-size: 16px; font-weight: 700; color: #0d1b2a; -moz-appearance: textfield; background: #fff; }
.sg-atq__qty::-webkit-inner-spin-button, .sg-atq__qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sg-atq__qty:focus { outline: none; background: rgba(15, 43, 140, 0.04); }
.sg-atq__btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; background: #e63128; color: #fff; font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: 0.02em; border: none; border-radius: 10px; cursor: pointer; box-shadow: 0 4px 14px rgba(230, 49, 40, 0.25); transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.sg-atq__btn:hover { background: #cc2820; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(230, 49, 40, 0.3); }
.sg-atq__btn.is-loading { opacity: 0.7; pointer-events: none; }
.sg-atq__btn.is-done { background: #059669; box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25); }
.sg-atq__btn svg { flex-shrink: 0; }
.sg-atq__status { margin-top: 10px; padding: 8px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 500; }
.sg-atq__status--ok { background: rgba(5, 150, 105, 0.08); color: #059669; }
.sg-atq__status--err { background: rgba(230, 49, 40, 0.08); color: #e63128; }

/* ══════════════════════════════════════════════════════════════
   [sg_quote_cart] — Standalone quote page
   ══════════════════════════════════════════════════════════════ */
.sg-quote-page { max-width: 900px; margin: 0 auto; padding: 20px 0; }
.sg-quote-page__header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid #e5e7eb; flex-wrap: wrap; }
.sg-quote-page__title { display: flex; align-items: center; gap: 10px; font-family: 'Montserrat', sans-serif; font-size: 26px; font-weight: 700; color: #0d1b2a; margin: 0; }
.sg-quote-page__title svg { color: #e63128; }
.sg-quote-page__count { font-size: 14px; font-weight: 500; color: #6b7280; background: #f1f5f9; padding: 4px 14px; border-radius: 20px; }
.sg-quote-empty { text-align: center; padding: 60px 20px; background: #f8fafc; border: 1.5px dashed #e5e7eb; border-radius: 14px; }
.sg-quote-empty p { font-size: 16px; color: #6b7280; margin: 16px 0; }
.sg-quote-empty__btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; background: #e63128; color: #fff; font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 600; border-radius: 10px; text-decoration: none; transition: all 0.2s; }
.sg-quote-empty__btn:hover { background: #cc2820; color: #fff; transform: translateY(-1px); }
.sg-quote-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.sg-quote-table thead th { background: #f8fafc; font-family: 'Montserrat', sans-serif; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: #4a5568; padding: 12px 16px; text-align: left; border-bottom: 1px solid #e5e7eb; }
.sg-quote-table tbody td { padding: 14px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.sg-quote-table tbody tr:last-child td { border-bottom: none; }
.sg-quote-table tbody tr:hover { background: rgba(15, 43, 140, 0.02); }
.sg-qt-img { width: 80px; }
.sg-qt-img img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; border: 1px solid #e5e7eb; background: #f8fafc; }
.sg-qt-name a { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14px; color: #0d1b2a; text-decoration: none; transition: color 0.15s; }
.sg-qt-name a:hover { color: #e63128; }
.sg-qt-sku { font-size: 12px; color: #9ca3af; }
.sg-qt-qty { width: 90px; }
.sg-qt-input { width: 64px; height: 38px; text-align: center; border: 2px solid #e5e7eb; border-radius: 8px; font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 600; color: #0d1b2a; -moz-appearance: textfield; }
.sg-qt-input:focus { border-color: #0F2B8C; outline: none; box-shadow: 0 0 0 3px rgba(15, 43, 140, 0.08); }
.sg-qt-input::-webkit-inner-spin-button, .sg-qt-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.sg-qt-rm { width: 40px; text-align: center; }
.sg-qt-remove { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: #9ca3af; transition: all 0.15s; text-decoration: none; }
.sg-qt-remove:hover { background: rgba(230, 49, 40, 0.08); color: #e63128; }
.sg-quote-table-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.sg-qt-update { background: #f8fafc; color: #4a5568; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 10px 20px; font-family: 'Montserrat', sans-serif; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.sg-qt-update:hover { background: #0d1b2a; color: #fff; border-color: #0d1b2a; }

@media (max-width: 768px) {
  .sg-atq__btn { font-size: 13px; height: 48px; }
  .sg-atq__qty-wrap { border-radius: 8px; }
  .sg-atq__qty-btn { width: 38px; }
  .sg-atq__qty { width: 48px; font-size: 14px; }
  .sg-quote-page__title { font-size: 20px; }
  .sg-qt-img { display: none; }
  .sg-qt-sku { display: none; }
  .sg-quote-table thead th { font-size: 10.5px; padding: 10px 12px; }
  .sg-quote-table tbody td { padding: 10px 12px; }
  .sg-qt-name a { font-size: 13px; }
}
@media (max-width: 480px) {
  .sg-atq__btn { font-size: 12px; height: 46px; gap: 6px; }
  .sg-atq__qty { font-size: 16px; /* prevent iOS zoom */ }
}


/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
  .sg-quote-fab {
    bottom: 16px;
    right: 16px;
    padding: 10px 16px 10px 14px;
    font-size: 12.5px;
  }
  .sg-quote-fab__label {
    display: none;
  }
  .sg-quote-fab {
    border-radius: 50%;
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
  }
  .sg-quote-fab__count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .sg-quote-form-wrap {
    padding: 18px;
    margin-top: 20px;
  }

  .sg-quote-form__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sg-quote-form__title {
    font-size: 17px;
  }

  .sg-quote-form__submit {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 14px;
  }

  /* Cart table responsive */
  .woocommerce-cart-form__contents .product-thumbnail {
    display: none;
  }
}

@media (max-width: 480px) {
  .sg-quote-form__title {
    font-size: 15px;
  }
  .sg-quote-form__field input,
  .sg-quote-form__field textarea {
    font-size: 16px; /* prevent iOS zoom */
  }
}
