:root {
  --bg: #f7f3ef;
  --panel: #ffffff;
  --ink: #1a1a1a;
  --muted: #5a5752;
  --line: #e7dfd6;
  --beige: #d1b08c;
  --beige-2: #c6a27d;
  --danger: #e25555;
  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 18px;
  --shadow-1: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-2: 0 14px 36px rgba(0, 0, 0, 0.12);
}

.cart-drawer__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9998;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 92vw);
  background: var(--panel);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 9999;
  box-shadow: -12px 0 30px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
}
.cart-drawer.is-open {
  transform: translateX(0);
}
.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.cart-drawer__header h3 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.2px;
  color: var(--ink);
}
.cart-drawer__close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cart-drawer__close:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.cart-drawer__close:focus {
  outline: none;
  border-color: var(--beige);
  box-shadow: 0 0 0 3px rgba(209, 176, 140, 0.25);
}

.alert-warning {
  background-color: #f7f3ef;
  text-align: center;
  font-size: larger;
}

.alert-success {
  font-size: larger;
}

#cartDrawerBody {
  padding: 24px;
  overflow-y: auto;
  background: #fff;
}

.cart-meta {
  margin-bottom: 12px;
}
.cart-meta p,
.cart-meta small {
  margin: 0;
  color: var(--muted);
  opacity: 0.9;
}

.cart-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cart-line__main {
  display: flex;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.cart-line__image {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  background: #f2eee9;
  border: 1px solid var(--line);
  flex-shrink: 0;
  box-shadow: var(--shadow-1);
}
.cart-line__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.cart-line__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cart-line__title {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-line__meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-line__remove {
  background: none;
  border: 0;
  padding: 2px 0;
  font-size: 12px;
  color: rgba(90, 87, 82, 0.85);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cart-line__remove:hover {
  color: var(--danger);
}

.cart-drawer .primary-button {
  border-radius: 40px;
}

.cart-drawer form label {
  font-family: "Playfair Display", Georgia, serif;
}
.cart-drawer form .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.cart-drawer form input,
.cart-drawer form select,
.cart-drawer form textarea {
  width: 100%;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  background-color: #f7f3ef !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.cart-drawer form input:focus,
.cart-drawer form select:focus,
.cart-drawer form textarea:focus {
  outline: none;
  border-color: var(--beige);
  box-shadow: 0 0 0 3px rgba(209, 176, 140, 0.25);
}
.cart-drawer form textarea {
  resize: none;
  min-height: 110px;
}

.cart-drawer .form-check-label {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 6px;
}

.cart-drawer .form-check-input {
  cursor: pointer;
}

/* =========================
   Drawer company switch (custom, SMALL)
   ========================= */
.cart-drawer .form-check.form-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.cart-drawer .js-company-switch {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0 !important;
  line-height: 1 !important;
  min-height: unset !important;
  width: 38px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: #f0ece6;
  position: relative;
  display: inline-block;
  cursor: pointer;
  background-image: none !important;
  box-shadow: none !important;
  outline: none !important;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cart-drawer .js-company-switch::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: left 0.15s ease;
}

.cart-drawer .js-company-switch:checked {
  background: #000 !important;
  border-color: #000;
}

.cart-drawer .js-company-switch:checked::before {
  left: calc(100% - 14px - 2px);
}

.cart-drawer .js-company-switch:focus,
.cart-drawer .js-company-switch:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.cart-drawer .company.d-none {
  display: none !important;
}

.cart-drawer .alert {
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.cart-drawer .drawer-field-errors {
  margin-top: 6px;
  color: var(--danger);
  line-height: 1.25;
}

.cart-drawer .errorlist,
.cart-drawer .errorlist li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cart-drawer .errorlist li {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 6px;
}

/* Prevent background scroll when open */
html.is-drawer-open,
html.is-drawer-open body {
  overflow: hidden;
}

@media (max-width: 420px) {
  #cartDrawerBody {
    padding: 14px;
  }
  .cart-line__image {
    width: 52px;
    height: 52px;
    border-radius: 12px;
  }
  .cart-line__title {
    font-size: 13px;
  }
}

/*# sourceMappingURL=cart-drawer.css.map */
