.fb-cart {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
  font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
  color: #171717;
  font-size: 15px;
  line-height: 1.45;
}

.fb-cart[hidden] {
  display: none !important;
}

.fb-cart__overlay {
  position: absolute;
  inset: 0;
  display: block !important;
  z-index: 0;
  background: rgba(16, 16, 16, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fb-cart.is-open .fb-cart__overlay {
  opacity: 1;
}

.fb-cart__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  height: 100%;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.7, 0, 0.2, 1);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.14);
}

.fb-cart.is-open .fb-cart__panel {
  transform: translateX(0);
}

.fb-cart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.12);
}

.fb-cart__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.fb-cart__close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #171717;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.fb-cart__close:hover {
  color: #c77930;
}

.fb-cart__items {
  flex: 1;
  overflow-y: auto;
  padding: 4px 24px;
}

.fb-cart__item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid rgba(23, 23, 23, 0.1);
}

.fb-cart__thumb {
  display: block;
  width: 76px;
  height: 76px;
  overflow: hidden;
  background: #f5f5f5;
}

.fb-cart__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.fb-cart__info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.fb-cart__name {
  color: #171717;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-transform: uppercase;
  text-decoration: none;
}

.fb-cart__name:hover {
  color: #c77930;
}

.fb-cart__variant {
  color: rgba(23, 23, 23, 0.55);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.fb-cart__qty {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
  width: max-content;
  border: 1px solid rgba(23, 23, 23, 0.2);
}

.fb-cart__qty button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #171717;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.fb-cart__qty button:hover {
  color: #c77930;
}

.fb-cart__qty span {
  min-width: 16px;
  text-align: center;
  font-size: 13px;
}

.fb-cart__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-top: 2px;
  white-space: nowrap;
}

.fb-cart__line-price {
  font-size: 13px;
  font-weight: 500;
}

.fb-cart__remove {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(23, 23, 23, 0.5);
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.fb-cart__remove:hover {
  color: #c77930;
}

.fb-cart__foot {
  padding: 20px 24px 28px;
  border-top: 1px solid rgba(23, 23, 23, 0.12);
  background: #fff;
}

.fb-cart__subtotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fb-cart__subtotal strong {
  font-size: 17px;
  font-weight: 500;
}

.fb-cart__note {
  margin: 10px 0 18px;
  color: rgba(23, 23, 23, 0.5);
  font-size: 12px;
}

.fb-cart__continue {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid #171717;
  color: #171717;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.fb-cart__continue:hover {
  background: #171717;
  color: #fff;
}

.fb-cart__empty {
  padding: 48px 0;
  text-align: center;
  color: rgba(23, 23, 23, 0.6);
}

.fb-cart__empty p {
  margin: 0 0 14px;
  font-size: 14px;
}

.fb-cart__empty a {
  color: #171717;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-underline-offset: 4px;
}

body.fb-cart-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .fb-cart__panel {
    width: 100%;
  }

  .fb-cart__head,
  .fb-cart__foot {
    padding-left: 18px;
    padding-right: 18px;
  }

  .fb-cart__items {
    padding-left: 18px;
    padding-right: 18px;
  }

  .fb-cart__item {
    grid-template-columns: 68px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .fb-cart__thumb {
    width: 68px;
    height: 68px;
  }
}
