/* ============================================================
   iDEALCAR — QUOTE CART DRAWER
   Shared across products.html & services.html (and any page).
   Injected dynamically by assets/js/cart.js
   ============================================================ */

.idc-cart-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 4000;
  opacity: 0; visibility: hidden;
  transition: opacity var(--transition);
}
.idc-cart-backdrop.open { opacity: 1; visibility: visible; }

.idc-cart-drawer {
  position: fixed; top: 0; right: -420px;
  width: 100%; max-width: 420px; height: 100vh;
  background: #fff;
  z-index: 4001;
  display: flex; flex-direction: column;
  box-shadow: -10px 0 40px rgba(0,0,0,0.2);
  transition: right var(--transition);
}
.idc-cart-drawer.open { right: 0; }

.idc-cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--color-border);
}
.idc-cart-header h3 { font-size: 18px; font-weight: 700; }
.idc-cart-header .sub { font-size: 12px; color: var(--color-text-muted); font-weight: 400; margin-top: 2px; }
.idc-cart-close {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--color-bg-soft); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.idc-cart-close:hover { background: var(--color-border); }

.idc-cart-body { flex: 1; overflow-y: auto; padding: 16px 24px; }

.idc-cart-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 60px 20px;
  font-size: 14px;
}
.idc-cart-empty .icon { font-size: 40px; margin-bottom: 14px; display: block; }

.idc-cart-item {
  display: flex; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}
.idc-cart-item-thumb {
  width: 52px; height: 52px; border-radius: 10px;
  background: var(--color-gradient);
  color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  text-align: center; flex-shrink: 0;
}
.idc-cart-item-info { flex: 1; min-width: 0; }
.idc-cart-item-title { font-size: 14px; font-weight: 600; line-height: 1.35; margin-bottom: 3px; }
.idc-cart-item-brand { font-size: 12px; color: var(--color-text-muted); margin-bottom: 8px; }
.idc-cart-item-row { display: flex; align-items: center; justify-content: space-between; }

.idc-qty {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--color-border); border-radius: 20px; padding: 3px 4px;
}
.idc-qty button {
  width: 22px; height: 22px; border: none; background: var(--color-bg-soft);
  border-radius: 50%; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.idc-qty button:hover { background: var(--color-border); }
.idc-qty span { font-size: 13px; font-weight: 600; min-width: 14px; text-align: center; }

.idc-remove-btn {
  font-size: 12px; color: var(--color-red); font-weight: 600;
  background: none; border: none; padding: 4px;
}
.idc-remove-btn:hover { text-decoration: underline; }

.idc-cart-form {
  border-top: 1px solid var(--color-border);
  padding: 18px 24px 24px;
  background: var(--color-bg-soft);
}
.idc-cart-form.hidden { display: none; }
.idc-field { margin-bottom: 12px; }
.idc-field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; color: var(--color-text-muted); }
.idc-field input, .idc-field textarea {
  width: 100%; padding: 11px 14px; border: 2px solid var(--color-border);
  border-radius: var(--radius-sm); font-size: 14px; outline: none;
  transition: border-color var(--transition); background: #fff;
}
.idc-field input:focus, .idc-field textarea:focus { border-color: var(--color-red); }
.idc-field textarea { resize: vertical; min-height: 60px; }

.idc-submit-btn {
  width: 100%; padding: 14px; border: none; border-radius: 50px;
  background: var(--color-gradient); color: #fff;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 20px rgba(192,0,0,0.25);
}
.idc-submit-btn:hover { transform: translateY(-2px); }
.idc-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.idc-cart-summary-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; font-size: 14px; font-weight: 600;
}

/* Fixed bottom-right row that holds the scroll-to-top button beside the floating quote CTA */
.idc-fab-row {
  position: fixed; bottom: 20px; right: 20px; z-index: 900;
  display: flex; flex-direction: row; align-items: center; gap: 12px;
}

/* Floating quote button shown when items exist but drawer is closed (mobile helper) */
.idc-floating-cta {
  background: var(--color-gradient); color: #fff;
  border-radius: 50px; padding: 14px 22px;
  display: none; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; box-shadow: var(--shadow-lg);
  border: none; white-space: nowrap;
}
.idc-floating-cta.show { display: flex; }

/* Scroll-to-top button — sits beside the floating quote CTA */
.idc-scroll-top {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: #fff; color: var(--color-black);
  border: 2px solid var(--color-border);
  display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: opacity var(--transition), transform var(--transition), border-color var(--transition);
  opacity: 0; transform: translateY(10px);
}
.idc-scroll-top svg { width: 20px; height: 20px; }
.idc-scroll-top.show { display: flex; opacity: 1; transform: translateY(0); }
.idc-scroll-top:hover { border-color: var(--color-red); color: var(--color-red); }

@media (max-width: 480px) {
  .idc-cart-drawer { max-width: 100%; }
}
