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

#sidecart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  visibility: hidden;
  z-index: 9998;
  transition: opacity .25s ease, visibility .25s ease;
}

#sidecart-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* =========================================================
   SIDECART WRAPPER
========================================================= */

#sidecart {
  position: fixed;
  top: 0;
  right: -430px;

  width: 420px;
  max-width: 92vw;

  height: 100vh;
  height: 100dvh;

  background: #fff;

  z-index: 9999;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  transition: right .25s ease;

  box-shadow: -12px 0 35px rgba(0,0,0,.18);
}

#sidecart.open {
  right: 0;
}

body.cart-open {
  overflow: hidden;
}

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

.sidecart-header {
  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 16px 18px;

  border-bottom: 1px solid #eee;

  background: #fff;

  z-index: 2;
}

.sidecart-header strong {
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

#close-sidecart {
  border: 0;
  background: none;

  padding: 0;

  font-size: 30px;
  line-height: 1;

  cursor: pointer;
  color: #111;
}

/* =========================================================
   CONTENT
========================================================= */

#sidecart-content {
  flex: 1 1 auto;

  min-height: 0;

  display: flex;
  flex-direction: column;

  overflow: hidden;
}

/* =========================================================
   MAIN SCROLL
   CTA + prodotti + shipping bar
========================================================= */

.sidecart-main-scroll {
  flex: 1 1 auto;

  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;

  background: #fff;
}

/* =========================================================
   CTA
========================================================= */

.fcs-threshold-cta-wrap {
  padding: 14px 16px 0;
}

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

.sidecart-items {
  display: flex;
  flex-direction: column;

  padding: 10px 16px 14px;

  overflow: visible !important;
}

.sidecart-item {
  display: grid;
  grid-template-columns: 24px 60px 1fr;

  gap: 10px;
  align-items: center;

  padding: 11px 0;

  border-bottom: 1px solid #eee;
}

.sidecart-item:last-child {
  border-bottom: 0;
}

/* =========================================================
   REMOVE BUTTON
========================================================= */

.sidecart-remove {
  width: 22px;
  height: 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #f1f1f1;
  color: #111;

  font-size: 18px;
  line-height: 1;
  font-weight: 600;

  text-decoration: none;
}

.sidecart-remove:hover {
  background: #111;
  color: #fff;
  text-decoration: none;
}

.sidecart-remove.is-loading,
.sidecart-remove-disabled {
  pointer-events: none;
  opacity: .45;
}

/* =========================================================
   IMAGE
========================================================= */

.sidecart-item-img,
.sidecart-item-img img {
  width: 60px;
  height: 60px;
}

.sidecart-item-img {
  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  border-radius: 8px;

  background: #f7f7f7;
}

.sidecart-item-img img {
  display: block;
  object-fit: cover;
}

/* =========================================================
   INFO
========================================================= */

.sidecart-item-info {
  min-width: 0;
}

.sidecart-item-title {
  margin-bottom: 7px;

  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;

  color: #111;
}

.sidecart-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 8px;

  font-size: 12px;
  color: #333;
}

.sidecart-prices {
  display: flex;
  align-items: center;
  gap: 6px;

  flex-wrap: wrap;
}

.sidecart-item-price-old {
  font-size: 12px;
  text-decoration: line-through;
  opacity: .55;
}

.sidecart-item-price {
  font-weight: 700;
  color: #C9A14A;
}

.sidecart-item-qty {
  white-space: nowrap;
  color: #666;
}

/* =========================================================
   FREE SHIPPING BAR
========================================================= */

#sidecart-free-shipping {
  padding: 0 16px 16px;
}

#sidecart-free-shipping:empty {
  display: none;
}

#sidecart-free-shipping .free-shipping-bar {
  margin: 0;
  padding: 12px;

  border-radius: 12px;

  box-shadow: none;

  font-size: 12px;
}

#sidecart-free-shipping .free-shipping-bar strong {
  display: block;

  margin-bottom: 4px;

  font-size: 14px;
}

#sidecart-free-shipping .fcs-benefit {
  font-size: 12px;
  line-height: 1.25;
}

#sidecart-free-shipping .fcs-progress {
  height: 7px;

  margin: 8px 0 6px;
}

#sidecart-free-shipping .fcs-small {
  font-size: 11px;
  line-height: 1.3;
}

#sidecart-free-shipping .fcs-alert {
  display: none;
}

#sidecart-free-shipping .fcs-sidecart-details {
  margin-top: 8px;
}

#sidecart-free-shipping .fcs-sidecart-details summary {
  cursor: pointer;

  font-size: 11px;
  font-weight: 700;

  list-style: none;

  color: #111;
}

#sidecart-free-shipping .fcs-sidecart-details summary::-webkit-details-marker {
  display: none;
}

#sidecart-free-shipping .fcs-sidecart-details summary::after {
  content: '+';
  float: right;
}

#sidecart-free-shipping .fcs-sidecart-details[open] summary::after {
  content: '−';
}

#sidecart-free-shipping .fcs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 6px;

  margin-top: 8px;
}

#sidecart-free-shipping .fcs-pill {
  padding: 7px;

  border-radius: 8px;
}

#sidecart-free-shipping .fcs-pill span {
  font-size: 10px;
}

#sidecart-free-shipping .fcs-pill b {
  font-size: 12px;
}

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

.sidecart-footer {
  flex: 0 0 auto;

  padding: 14px 16px 16px;

  border-top: 1px solid #eee;

  background: #fff;

  box-shadow: 0 -8px 18px rgba(0,0,0,.04);
}

.sidecart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 10px;

  font-size: 16px;
}

.sidecart-btn {
  display: block;

  margin-top: 8px;
  padding: 12px 14px;

  border-radius: 8px;

  text-align: center;
  text-decoration: none;

  font-weight: 700;
}

.sidecart-btn:hover {
  text-decoration: none;
}

.sidecart-btn-light {
background: transparent;
    border: 1px solid #d4af37;
    color: #d4af37;
        transition: all .25s ease;
}

.sidecart-btn-light:hover {
    background-color: #f6f6f6;
    border: 1px solid #C9A14A;
    color: #C9A14A;
}

.sidecart-btn-dark {
    background: #d4af37;
    color: #fff;
    transition: all .25s ease;
}

.sidecart-btn-dark:hover {
    background: #C9A14A;
    color: #fff !important;
}

/* =========================================================
   STATES
========================================================= */

.sidecart-empty,
.sidecart-loading,
.sidecart-error {
  margin: 0;
  padding: 30px 16px;

  text-align: center;

  color: #333;
}

.sidecart-error {
  color: #b00020;
}

/* =========================================================
   CART PAGE
========================================================= */

body#cart #_desktop_cart a,
body#cart #_mobile_cart a {
  cursor: default !important;
  pointer-events: none;
}

/* =========================================================
   MODAL
========================================================= */

.modal-backdrop {
  z-index: 999998 !important;
  opacity: .65 !important;
}

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

@media (max-width: 480px) {

  #sidecart {
    width: 94vw;
    max-width: 94vw;
  }

  .sidecart-header {
    padding: 14px 15px;
  }

  .fcs-threshold-cta-wrap {
    padding: 12px 12px 0;
  }

  .sidecart-items {
    padding: 8px 12px 12px;
  }

  .sidecart-item {
    grid-template-columns: 22px 54px 1fr;
    gap: 8px;
  }

  .sidecart-item-img,
  .sidecart-item-img img {
    width: 54px;
    height: 54px;
  }

  #sidecart-free-shipping {
    padding: 0 12px 12px;
  }

  .sidecart-footer {
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  }

}