/* ============================================================
   Cresco: FluentCart mini-cart drawer (sitewide)
   Fires on every page via .fct-cart-drawer-open-btn (the plugin's own
   floating opener, which plugin.css takes out of the layout — see
   uploads/cresco-proto/js/main.js #8b). Unlike the cart/checkout/receipt
   pages, this panel opens over dark AND light pages alike, so it carries
   its own paper surface rather than following body.page-id-* like
   checkout-pages.css does. Tokens are hardcoded (not var(--cw-*)) for
   that reason: those custom properties only exist on 362/363/364.
   Structural mechanics (fixed position, width, slide transform,
   z-index) are the plugin's own and are left alone; only look and feel
   is themed here.
   ============================================================ */

.fct-cart-drawer-overlay {
  background: rgba(22, 36, 29, 0.55) !important;
  backdrop-filter: blur(2px);
}

.fct-cart-drawer {
  background: #f4f1e9 !important;
  color: #1f3329;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  box-shadow: -12px 0 40px rgba(22, 36, 29, 0.28) !important;
}

@media (max-width: 560px) {
  .fct-cart-drawer { width: 100vw !important; right: -100vw !important; }
}

/* ---------- header ---------- */

.fct-cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid #dcd6c6;
  background: #f4f1e9;
}
.fct-cart-drawer-header .title {
  margin: 0;
  font-family: "Bradley DJR", Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: #1f3329;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.fct-cart-drawer-header .title > span {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  font-weight: 600;
  color: #5e6e64;
  text-transform: none;
  letter-spacing: normal;
  margin-left: 4px;
}
.fct-cart-drawer-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid #c6bea9;
  border-radius: 4px;
  color: #4a5c51;
  cursor: pointer;
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.fct-cart-drawer-close-button:hover {
  border-color: #1f3329;
  color: #1f3329;
}
.fct-cart-drawer-close-button svg { width: 14px; height: 14px; }

/* ---------- loader ---------- */

.fct-loader-wrap { background: rgba(244, 241, 233, 0.85) !important; }
.fct-loader-spinner { border-color: #dcd6c6 !important; border-top-color: #fadf70 !important; }

/* ---------- item list (same markup/classes as the cart page,
   scoped here instead of by page-id since the drawer is sitewide) ---------- */

.fct-cart-drawer-content-wrapper { background: #f4f1e9; }

.fct-cart-drawer-list-content {
  list-style: none;
  margin: 0;
  padding: 8px 28px 0;
  border-top: 0;
}

.fct-cart-drawer .fct-cart-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
  border-bottom: 1px solid #dcd6c6;
}

.fct-cart-drawer .fct-cart-item-info {
  display: flex;
  gap: 14px;
  min-width: 0;
}

.fct-cart-drawer .fct-cart-item-image {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 4px;
  overflow: hidden;
  background: #eae6d9;
  border: 1px solid #dcd6c6;
}
.fct-cart-drawer .fct-cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fct-cart-drawer .fct-cart-item-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #1f3329;
}
.fct-cart-drawer .fct-cart-item-title a {
  color: #1f3329;
  text-decoration: none;
}
.fct-cart-drawer .fct-cart-item-title a:hover { color: #2f6b45; }

.fct-cart-drawer .fct-cart-item-quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c6bea9;
  border-radius: 4px;
  overflow: hidden;
  width: fit-content;
  background: #fcfbf7;
}
.fct-cart-drawer .qty-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fcfbf7;
  border: 0;
  color: #4a5c51;
  cursor: pointer;
  transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.fct-cart-drawer .qty-btn:hover { background: #f7efcf; color: #1f3329; }
.fct-cart-drawer .qty-value,
.fct-cart-drawer input[data-fluent-cart-cart-list-item-quantity-input] {
  width: 34px;
  height: 28px;
  border: 0;
  border-inline: 1px solid #c6bea9;
  text-align: center;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  background: #fcfbf7;
  color: #1f3329;
}

.fct-cart-drawer .fct-cart-item-summary {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.fct-cart-drawer .fct-cart-item-total {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 14px;
  font-weight: 600;
  color: #1f3329;
}
.fct-cart-drawer .fct-cart-item-delete-button,
.fct-cart-drawer [data-fluent-cart-cart-list-item-delete-button] {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #c6bea9;
  border-radius: 4px;
  color: #5e6e64;
  cursor: pointer;
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.fct-cart-drawer .fct-cart-item-delete-button:hover,
.fct-cart-drawer [data-fluent-cart-cart-list-item-delete-button]:hover {
  border-color: #9b2c2c;
  color: #9b2c2c;
}

/* ---------- footer / total / checkout cta ---------- */

.fct-cart-drawer-footer {
  padding: 20px 28px 28px;
  border-top: 1px solid #dcd6c6;
  background: #f4f1e9;
}
.fct-cart-total-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 18px;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  color: #4a5c51;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.fct-cart-total-wrapper span:last-child {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: #1f3329;
}
.fct-cart-drawer-footer-actions .checkout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  background: #1f3329;
  color: #fadf70 !important;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.fct-cart-drawer-footer-actions .checkout-button:hover { background: #16241d; }

/* ---------- empty state ---------- */

.fct-cart-drawer [class*="empty"] {
  color: #4a5c51;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
}
