/* ── B2B Inquiry Cart – Flat / Corporate ── */

:root {
  --bic-text:    #1a1a1a;
  --bic-muted:   #6b7280;
  --bic-border:  #d1d5db;
  --bic-bg:      #ffffff;
  --bic-bg-alt:  #f9fafb;
  --bic-accent:  #111827;
  --bic-radius:  4px;
}

/* ── Shortcode icon ─────────────────────── */
.b2bic-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.b2bic-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.b2bic-icon-count {
  position: absolute;
  top: -7px;
  right: -9px;
  background: #e5383b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}
.b2bic-icon-count.b2bic-hidden { display: none; }

/* ── Page layout ────────────────────────── */
.b2bic-page {
  width: 100%;
  padding: 0 0 60px;
  box-sizing: border-box;
}

/* ── Full-width products, centered form below ── */
.b2bic-products-section {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 40px;
}
.b2bic-form-wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Empty state ────────────────────────── */
.b2bic-empty {
  padding: 48px 0;
  text-align: center;
  color: var(--bic-muted);
}
.b2bic-empty svg { display: block; margin: 0 auto 12px; opacity: .4; }
.b2bic-empty p   { margin: 0; font-size: 15px; }

/* ── Item row ───────────────────────────── */
.b2bic-item {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--bic-border);
}
.b2bic-item:first-child { border-top: 1px solid var(--bic-border); }

.b2bic-item-img-wrap {
  flex-shrink: 0;
}
.b2bic-item-img-wrap img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--bic-border);
}
.b2bic-no-img {
  width: 90px;
  height: 90px;
  display: block;
  background: var(--bic-bg-alt);
  border: 1px solid var(--bic-border);
}

.b2bic-item-info {
  min-width: 0;
}
.b2bic-item-name {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bic-text);
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
}
.b2bic-item-meta,
.b2bic-item-sku {
  margin: 0;
  font-size: 12px;
  color: var(--bic-muted);
  line-height: 1.5;
}

/* ── Qty control ────────────────────────── */
.b2bic-qty-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--bic-border);
  flex-shrink: 0;
}
.b2bic-qty-btn {
  background: var(--bic-bg-alt);
  border: none;
  width: 26px;
  height: 30px;
  cursor: pointer;
  font-size: 14px;
  color: var(--bic-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.b2bic-qty-btn:hover { background: var(--bic-border); }
.b2bic-qty-input {
  width: 34px;
  height: 30px;
  border: none;
  border-left: 1px solid var(--bic-border);
  border-right: 1px solid var(--bic-border);
  text-align: center;
  font-size: 13px;
  color: var(--bic-text);
  outline: none;
  -moz-appearance: textfield;
}
.b2bic-qty-input::-webkit-outer-spin-button,
.b2bic-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.b2bic-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bic-muted);
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color .15s;
  flex-shrink: 0;
}
.b2bic-remove-btn:hover { color: #e5383b; }

/* ── Mobile item: stack vertically ─────── */
@media (max-width: 600px) {
  .b2bic-item {
    grid-template-columns: 70px 1fr;
    grid-template-rows: auto auto;
    gap: 6px 12px;
    align-items: start;
  }
  .b2bic-item-img-wrap {
    grid-row: 1 / 3;
  }
  .b2bic-item-img-wrap img,
  .b2bic-no-img {
    width: 70px;
    height: 70px;
  }
  .b2bic-item-info {
    grid-column: 2;
    grid-row: 1;
  }
  .b2bic-qty-wrap {
    grid-column: 2;
    grid-row: 2;
    width: fit-content;
  }
  .b2bic-remove-btn {
    position: absolute;
    top: 14px;
    right: 0;
  }
  .b2bic-item {
    position: relative;
    padding-right: 28px;
  }
}

/* ── List footer ────────────────────────── */
.b2bic-list-footer {
  padding: 12px 0 0;
  text-align: right;
}
.b2bic-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--bic-muted);
  text-decoration: underline;
  padding: 0;
}
.b2bic-link-btn:hover { color: var(--bic-text); }

/* ── Form column ────────────────────────── */
.b2bic-form-section {
  border: 1px solid var(--bic-border);
  padding: 20px;
  margin-bottom: 16px;
  background: var(--bic-bg);
}

.b2bic-form-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--bic-muted);
  margin: 0 0 16px;
}

.b2bic-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.b2bic-field {
  margin-bottom: 12px;
}
.b2bic-field:last-child { margin-bottom: 0; }

.b2bic-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--bic-text);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.b2bic-field label span { color: #e5383b; }

.b2bic-field input,
.b2bic-field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--bic-border);
  border-radius: var(--bic-radius);
  font-size: 14px;
  color: var(--bic-text);
  background: var(--bic-bg);
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
  font-family: inherit;
}
.b2bic-field input:focus,
.b2bic-field textarea:focus {
  border-color: var(--bic-text);
}
.b2bic-field input.b2bic-error { border-color: #e5383b; }
.b2bic-field textarea { resize: vertical; min-height: 90px; }

/* ── Submit ─────────────────────────────── */
.b2bic-submit-btn {
  width: 100%;
  padding: 13px;
  background: var(--bic-accent);
  color: #fff;
  border: none;
  border-radius: var(--bic-radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .4px;
  cursor: pointer;
  transition: opacity .2s;
  font-family: inherit;
  margin-bottom: 40px;
}
.b2bic-submit-btn:hover    { opacity: .85; }
.b2bic-submit-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Success ────────────────────────────── */
.b2bic-success {
  padding: 60px 20px;
  text-align: center;
  color: var(--bic-text);
}
.b2bic-success svg {
  display: block;
  margin: 0 auto 16px;
  color: #16a34a;
}
.b2bic-success h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}
.b2bic-success p {
  margin: 0;
  color: var(--bic-muted);
  font-size: 15px;
}

/* ── Toast ──────────────────────────────── */
#b2bic-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.b2bic-toast {
  background: var(--bic-accent);
  color: #fff;
  padding: 12px 18px;
  font-size: 13px;
  border-radius: var(--bic-radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  min-width: 240px;
  max-width: 320px;
  animation: bic-in .25s ease;
}
.b2bic-toast.bic-error { background: #b91c1c; }
@keyframes bic-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Account tabs ───────────────────────── */
.b2bic-account-tabs {
  display: flex;
  border-bottom: 1px solid var(--bic-border);
  margin-bottom: 16px;
}
.b2bic-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--bic-muted);
  font-family: inherit;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.b2bic-tab-btn.active {
  color: var(--bic-text);
  border-bottom-color: var(--bic-text);
  font-weight: 600;
}
.b2bic-tab-note {
  margin: 0;
  font-size: 13px;
  color: var(--bic-muted);
}
.b2bic-tab-note a { color: var(--bic-text); }

.b2bic-logged-in-notice p {
  margin: 0;
  font-size: 14px;
  color: var(--bic-muted);
}
.b2bic-logged-in-notice a {
  color: var(--bic-text);
  font-weight: 600;
}

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


@media (max-width: 480px) {
  .b2bic-row-2 {
    grid-template-columns: 1fr;
  }
  .b2bic-form-section {
    padding: 16px;
  }
  .b2bic-account-tabs {
    flex-wrap: wrap;
  }
  .b2bic-tab-btn {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* ── Clickable image + name ─────────────── */
a.b2bic-item-img-wrap {
  display: block;
  flex-shrink: 0;
  text-decoration: none;
}
a.b2bic-item-img-wrap:hover img {
  opacity: 0.85;
}
.b2bic-item-name-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.b2bic-item-name-link:hover .b2bic-item-name {
  text-decoration: underline;
  color: var(--bic-accent);
}

/* ── Login hint / opt-in ────────────────── */
.b2bic-login-hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--bic-muted);
}
.b2bic-login-hint a {
  color: var(--bic-accent);
  font-weight: 600;
}

.b2bic-optin {
  border: 1px solid var(--bic-border);
  padding: 16px 20px;
  margin-bottom: 16px;
  background: var(--bic-bg-alt);
}
.b2bic-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--bic-text);
  line-height: 1.5;
}
.b2bic-checkbox input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--bic-accent);
  cursor: pointer;
}

.b2bic-logged-in-notice {
  border: 1px solid var(--bic-border);
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--bic-bg-alt);
  font-size: 13px;
  color: var(--bic-muted);
}
.b2bic-logged-in-notice a {
  color: var(--bic-accent);
  font-weight: 600;
  text-decoration: none;
}

/* Products list max width already constrained; keep items clean */
.b2bic-products-section .b2bic-item:first-child {
  border-top: 1px solid var(--bic-border);
}

/* ── Inline login box ───────────────────── */
.b2bic-login-box {
  border: 1px solid var(--bic-border);
  background: var(--bic-bg-alt);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.b2bic-login-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.b2bic-login-toggle span {
  font-size: 13px;
  color: var(--bic-muted);
}
.b2bic-login-open-btn {
  background: none;
  border: 1px solid var(--bic-accent);
  color: var(--bic-accent);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--bic-radius);
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.b2bic-login-open-btn:hover {
  background: var(--bic-accent);
  color: #fff;
}
.b2bic-login-fields {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--bic-border);
}
.b2bic-login-submit-btn {
  width: 100%;
  padding: 11px;
  background: var(--bic-accent);
  color: #fff;
  border: none;
  border-radius: var(--bic-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
  transition: opacity .2s;
}
.b2bic-login-submit-btn:hover { opacity: .85; }
.b2bic-login-submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.b2bic-lostpass {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--bic-muted);
  text-align: center;
  text-decoration: none;
}
.b2bic-lostpass:hover { color: var(--bic-text); text-decoration: underline; }
