/**
 * CoreDigify Smart Cart — floating cart button + slide-in panel with a
 * free-shipping progress bar. All markup is built by smartcart.js; the
 * accent colour comes through --cdsc-primary (set from module config).
 */

:root {
  --cdsc-primary: #315d46;
}

/* ===============================
   FLOATING TRIGGER BUTTON
   =============================== */

#cdsc-trigger {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147482000;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--cdsc-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 35px rgba(30, 65, 45, .28);
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

#cdsc-trigger:hover {
  transform: translateY(-2px);
  filter: brightness(.88);
  box-shadow: 0 16px 40px rgba(30, 65, 45, .34);
}

/* The AI consultant bubble (#cdgf-ai-widget) sits fixed at bottom-right
   20px too — when it is on the page, the cart button slides left so the
   two never overlap. Class added by smartcart.js. */
#cdsc-trigger.cdsc-avoid-ai {
  right: 96px;
}

#cdsc-trigger .cdsc-cart-icon {
  font-size: 20px;
}

#cdsc-count {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--cdsc-primary);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

/* ===============================
   OVERLAY
   =============================== */

#cdsc-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  background: rgba(8, 15, 11, .46);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(3px);
  transition: opacity .25s ease, visibility .25s ease;
}

#cdsc-overlay.cdsc-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ===============================
   PANEL
   =============================== */

#cdsc-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2147483000;
  width: min(440px, 100%);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  color: #17221b;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: -20px 0 70px rgba(0, 0, 0, .18);
  transform: translateX(105%);
  transition: transform .34s cubic-bezier(.22, .8, .25, 1);
}

#cdsc-panel.cdsc-active {
  transform: translateX(0);
}

/* ===============================
   HEADER
   =============================== */

.cdsc-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid #edf0ed;
}

.cdsc-title-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
}

.cdsc-title-icon {
  font-size: 25px;
}

.cdsc-title {
  margin: 0;
  color: #17221b;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 850;
}

.cdsc-subtitle {
  margin-top: 3px;
  color: #77817a;
  font-size: 12px;
  line-height: 1.3;
}

#cdsc-close {
  appearance: none;
  width: 40px;
  height: 40px;
  border: 1px solid #e5e9e6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #17221b;
  background: #f8faf8;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

/* ===============================
   FREE SHIPPING BOX
   =============================== */

.cdsc-ship-box {
  flex-shrink: 0;
  margin: 15px 18px 5px;
  padding: 15px;
  border: 1px solid #e1ebe4;
  border-radius: 15px;
  background: linear-gradient(135deg, #f6fbf7, #eef6f0);
}

#cdsc-ship-message {
  margin-bottom: 10px;
  color: var(--cdsc-primary);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 750;
}

.cdsc-ship-progress {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8df;
}

#cdsc-ship-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cdsc-primary), #4d8062);
  transition: width .4s ease;
}

.cdsc-ship-limit {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: #849087;
  font-size: 10px;
  font-weight: 700;
}

/* ===============================
   PRODUCTS
   =============================== */

#cdsc-products {
  flex: 1;
  overflow-y: auto;
  padding: 10px 18px 20px;
}

.cdsc-product {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 13px;
  padding: 14px 0;
  border-bottom: 1px solid #edf0ed;
}

.cdsc-product-image {
  width: 74px;
  height: 74px;
  overflow: hidden;
  border-radius: 12px;
  background: #f2f5f2;
}

.cdsc-product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cdsc-product-image .cdsc-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.cdsc-product-info {
  min-width: 0;
}

.cdsc-product-name {
  margin: 1px 0 6px;
  color: #1c2720;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 750;
}

.cdsc-product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cdsc-product-qty {
  color: #808a83;
  font-size: 12px;
}

.cdsc-product-price {
  color: var(--cdsc-primary);
  font-size: 14px;
  font-weight: 850;
}

/* ===============================
   EMPTY CART
   =============================== */

.cdsc-empty {
  padding: 55px 20px;
  text-align: center;
  color: #6f7972;
}

.cdsc-empty-icon {
  margin-bottom: 12px;
  font-size: 43px;
}

.cdsc-empty-title {
  margin-bottom: 5px;
  color: #223027;
  font-size: 17px;
  font-weight: 800;
}

/* ===============================
   FOOTER / CHECKOUT
   =============================== */

.cdsc-footer {
  flex-shrink: 0;
  padding: 18px 20px 20px;
  border-top: 1px solid #e8ece9;
  background: #fff;
  box-shadow: 0 -8px 25px rgba(30, 50, 37, .045);
}

.cdsc-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cdsc-total-label {
  color: #667068;
  font-size: 13px;
  font-weight: 650;
}

#cdsc-total {
  color: #17221b;
  font-size: 22px;
  font-weight: 900;
}

#cdsc-checkout {
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border: 0;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--cdsc-primary);
  font-size: 15px;
  font-weight: 850;
  transition: filter .2s ease, transform .2s ease;
}

#cdsc-checkout:hover {
  color: #fff !important;
  filter: brightness(.85);
  transform: translateY(-1px);
}

#cdsc-cart-link {
  width: 100%;
  margin-top: 9px;
  display: block;
  text-align: center;
  text-decoration: none !important;
  color: #657168 !important;
  font-size: 12px;
  font-weight: 700;
}

/* ===============================
   MOBILE
   =============================== */

@media (max-width: 600px) {
  #cdsc-trigger {
    right: 13px;
    bottom: 14px;
    min-height: 50px;
    padding: 9px 15px;
  }

  #cdsc-trigger.cdsc-avoid-ai {
    right: 88px;
  }

  #cdsc-panel {
    width: 100%;
  }

  .cdsc-header {
    padding: 17px 16px;
  }

  .cdsc-ship-box {
    margin-left: 13px;
    margin-right: 13px;
  }

  #cdsc-products {
    padding-left: 14px;
    padding-right: 14px;
  }

  .cdsc-footer {
    padding: 15px 15px max(16px, env(safe-area-inset-bottom));
  }
}
