:root {
  --studio-cart-header-offset: 86px;
}

.studio-cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482400;
  background: rgba(20, 28, 22, .52);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}

.studio-cart-drawer-backdrop.is-below-header {
  top: var(--studio-cart-header-offset);
}

.studio-cart-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.studio-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2147482500;
  display: flex;
  flex-direction: column;
  width: min(440px, 100vw);
  height: 100vh;
  height: 100dvh;
  color: #263128;
  background: #fff;
  box-shadow: -18px 0 48px rgba(20, 35, 24, .18);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform .26s ease, visibility .26s ease;
}

.studio-cart-drawer.is-below-header {
  top: var(--studio-cart-header-offset);
  height: calc(100vh - var(--studio-cart-header-offset));
  height: calc(100dvh - var(--studio-cart-header-offset));
}

.studio-cart-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

html.studio-cart-drawer-open,
html.studio-cart-drawer-open body {
  overflow: hidden;
}

.studio-cart-drawer__header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px 18px 14px 22px;
  border-bottom: 1px solid #e4e9e5;
}

.studio-cart-drawer__title-wrap {
  min-width: 0;
}

.studio-cart-drawer__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: #218838;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.studio-cart-drawer__title {
  margin: 0;
  color: #1f2c23;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.studio-cart-drawer__close {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #dfe6e1;
  border-radius: 50%;
  color: #263128;
  background: #fff;
  font: 400 29px/1 Arial, sans-serif;
  cursor: pointer;
}

.studio-cart-drawer__close:hover {
  color: #fff;
  border-color: #263128;
  background: #263128;
}

.studio-cart-drawer__close:focus-visible,
.studio-cart-drawer button:focus-visible,
.studio-cart-drawer a:focus-visible {
  outline: 2px solid #218838;
  outline-offset: 2px;
}

.studio-cart-drawer__notice {
  flex: 0 0 auto;
  min-height: 0;
  padding: 0 22px;
  color: #176d2a;
  background: #eef7f0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  opacity: 0;
  overflow: hidden;
  transition: min-height .18s ease, padding .18s ease, opacity .18s ease;
}

.studio-cart-drawer__notice.is-visible {
  min-height: 42px;
  padding-top: 11px;
  padding-bottom: 11px;
  opacity: 1;
}

.studio-cart-drawer__notice.is-error {
  color: #8b2525;
  background: #fff0f0;
}

.studio-cart-drawer__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b8c4bb transparent;
}

.studio-cart-drawer__loading,
.studio-cart-drawer__empty,
.studio-cart-drawer__error {
  display: flex;
  min-height: 360px;
  padding: 42px 28px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.studio-cart-drawer__spinner {
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border: 3px solid #dfe8e1;
  border-top-color: #218838;
  border-radius: 50%;
  animation: studio-cart-spin .8s linear infinite;
}

@keyframes studio-cart-spin {
  to { transform: rotate(360deg); }
}

.studio-cart-drawer__empty-icon {
  display: inline-flex;
  width: 70px;
  height: 70px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid #dfe7e1;
  border-radius: 50%;
  color: #218838;
  background: #f5f9f6;
}

.studio-cart-drawer__empty h3,
.studio-cart-drawer__error h3 {
  margin: 0 0 8px;
  color: #263128;
  font-size: 19px;
  line-height: 1.3;
}

.studio-cart-drawer__empty p,
.studio-cart-drawer__error p,
.studio-cart-drawer__loading p {
  max-width: 290px;
  margin: 0;
  color: #667069;
  font-size: 14px;
  line-height: 1.55;
}

.studio-cart-drawer__empty button,
.studio-cart-drawer__error button {
  min-height: 44px;
  margin-top: 20px;
  padding: 10px 20px;
  border: 1px solid #263128;
  border-radius: 6px;
  color: #fff;
  background: #263128;
  font-weight: 800;
  cursor: pointer;
}

.studio-cart-drawer__items {
  margin: 0;
  padding: 0 22px;
  list-style: none;
}

.studio-cart-drawer__item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid #e8ece9;
}

.studio-cart-drawer__image-link {
  display: block;
  width: 88px;
  height: 88px;
  border: 1px solid #e1e7e3;
  border-radius: 6px;
  background: #f8faf8;
  overflow: hidden;
}

.studio-cart-drawer__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.studio-cart-drawer__item-main {
  min-width: 0;
}

.studio-cart-drawer__item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.studio-cart-drawer__item-name {
  display: -webkit-box;
  min-width: 0;
  color: #263128;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.studio-cart-drawer__item-name:hover {
  color: #218838;
}

.studio-cart-drawer__remove {
  flex: 0 0 auto;
  padding: 2px 0;
  border: 0;
  color: #8a3b3b;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.studio-cart-drawer__meta {
  display: block;
  margin-top: 5px;
  color: #69736c;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.studio-cart-drawer__promotion {
  display: block;
  margin-top: 5px;
  color: #176d2a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.studio-cart-drawer__item-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
}

.studio-cart-drawer__quantity {
  display: grid;
  grid-template-columns: 34px 38px 34px;
  width: 106px;
  height: 36px;
  border: 1px solid #cfd8d1;
  border-radius: 6px;
  overflow: hidden;
}

.studio-cart-drawer__quantity button,
.studio-cart-drawer__quantity output {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 34px;
  padding: 0;
  border: 0;
  color: #263128;
  background: #fff;
  font-size: 16px;
  font-weight: 800;
}

.studio-cart-drawer__quantity button {
  cursor: pointer;
}

.studio-cart-drawer__quantity button:hover:not(:disabled) {
  color: #176d2a;
  background: #eef6f0;
}

.studio-cart-drawer__quantity button:disabled,
.studio-cart-drawer__remove:disabled {
  cursor: wait;
  opacity: .45;
}

.studio-cart-drawer__price {
  flex: 0 0 auto;
  color: #1f2c23;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  text-align: right;
}

.studio-cart-drawer__price del {
  display: block;
  margin-bottom: 2px;
  color: #7c847e;
  font-size: 11px;
  font-weight: 500;
}

.studio-cart-drawer__recommendations {
  padding: 20px 22px 24px;
  border-top: 1px solid #e3e9e5;
  background: #f7faf8;
}

.studio-cart-drawer__recommendations h3 {
  margin: 0 0 12px;
  color: #1f2c23;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.studio-cart-drawer__recommendation-list {
  display: grid;
  gap: 9px;
}

.studio-cart-drawer__recommendation {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 82px;
  padding: 7px;
  border: 1px solid #dce5df;
  border-radius: 6px;
  color: #263128;
  background: #fff;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.studio-cart-drawer__recommendation:hover {
  border-color: #9db8a5;
  color: #263128;
  box-shadow: 0 6px 18px rgba(31, 54, 37, .08);
}

.studio-cart-drawer__recommendation-image {
  display: block;
  width: 68px;
  height: 68px;
  border-radius: 5px;
  background: #f4f7f5;
  object-fit: contain;
}

.studio-cart-drawer__recommendation-copy {
  display: block;
  min-width: 0;
}

.studio-cart-drawer__recommendation-copy strong {
  display: -webkit-box;
  color: #263128;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.studio-cart-drawer__recommendation-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
  margin-top: 5px;
}

.studio-cart-drawer__recommendation-price del {
  color: #7b847d;
  font-size: 10px;
}

.studio-cart-drawer__recommendation-price b {
  color: #176d2a;
  font-size: 13px;
}

.studio-cart-drawer__recommendation-copy small {
  display: block;
  margin-top: 2px;
  color: #176d2a;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
}

.studio-cart-drawer__footer {
  flex: 0 0 auto;
  padding: 18px 22px max(20px, env(safe-area-inset-bottom));
  border-top: 1px solid #dfe6e1;
  background: #fff;
  box-shadow: 0 -12px 28px rgba(26, 43, 31, .07);
}

.studio-cart-drawer__summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #263128;
  font-size: 15px;
  font-weight: 700;
}

.studio-cart-drawer__summary-row strong {
  font-size: 20px;
  font-weight: 900;
}

.studio-cart-drawer__saving {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  color: #176d2a;
  font-size: 12px;
  font-weight: 700;
}

.studio-cart-drawer__shipping {
  margin: 8px 0 15px;
  color: #687169;
  font-size: 12px;
  line-height: 1.4;
}

.studio-cart-drawer__checkout,
.studio-cart-drawer__continue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.studio-cart-drawer__checkout {
  border: 1px solid #218838;
  color: #fff;
  background: #218838;
}

.studio-cart-drawer__checkout:hover {
  color: #fff;
  border-color: #176d2a;
  background: #176d2a;
}

.studio-cart-drawer__checkout[aria-disabled="true"] {
  color: #727a74;
  border-color: #d9dfda;
  background: #edf0ed;
  pointer-events: none;
}

.studio-cart-drawer__continue {
  min-height: 42px;
  margin-top: 7px;
  border: 0;
  color: #263128;
  background: transparent;
  cursor: pointer;
}

.studio-cart-drawer__continue:hover {
  color: #176d2a;
  text-decoration: underline;
}

@media (max-width: 767px) {
  :root {
    --studio-cart-header-offset: 98px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  :root {
    --studio-cart-header-offset: 110px;
  }
}

@media (max-width: 575px) {
  .studio-cart-drawer {
    width: 100%;
  }

  .studio-cart-drawer__header {
    min-height: 68px;
    padding: 11px 12px 11px 17px;
  }

  .studio-cart-drawer__title {
    font-size: 20px;
  }

  .studio-cart-drawer__items {
    padding: 0 16px;
  }

  .studio-cart-drawer__item {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    padding: 17px 0;
  }

  .studio-cart-drawer__image-link {
    width: 76px;
    height: 76px;
  }

  .studio-cart-drawer__footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .studio-cart-drawer__recommendations {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-cart-drawer,
  .studio-cart-drawer-backdrop,
  .studio-cart-drawer__notice {
    transition: none;
  }

  .studio-cart-drawer__spinner {
    animation-duration: 1.6s;
  }
}
