.customizer {
  width: min(600px, calc(100% - 32px));
  max-height: min(820px, calc(100svh - 32px));
  overflow-y: auto;
  padding: 24px 28px;
  border: 1px solid rgba(110, 82, 62, 0.18);
  border-radius: 14px;
}

.cart-drawer {
  display: block;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cart-drawer .drawer-head {
  position: sticky;
  top: -30px;
  z-index: 2;
  margin: -30px -30px 0;
  padding: 28px 30px 20px;
  background: rgba(255, 250, 241, 0.96);
  backdrop-filter: blur(12px);
}

.cart-items {
  min-height: 96px;
  overflow: visible;
  padding: 18px 0 8px;
}

.cart-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}

.cart-line-image {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  object-fit: cover;
}

.cart-line-copy {
  min-width: 0;
}

.cart-line .remove {
  align-self: start;
  padding: 4px 0 4px 8px;
}

.cart-foot {
  padding-bottom: 24px;
}

.checkout-form {
  border-radius: 10px;
}

.customizer .drawer-head {
  margin-bottom: 12px;
}

.customizer .drawer-head h2 {
  font-size: 31px;
}

.customizer-product {
  margin-bottom: 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.color-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 3px 0 5px;
}

.color-choices button {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #51463f;
  background: #fffdf8;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.color-choices button:hover,
.color-choices button.selected {
  border-color: var(--red);
  background: #fff5e9;
  box-shadow: inset 0 0 0 1px rgba(207, 63, 47, 0.12);
}

.color-dot {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1px solid rgba(43, 34, 29, 0.16);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.color-red { --swatch: #d94737; }
.color-orange { --swatch: #ef7d32; }
.color-yellow { --swatch: #f4c943; }
.color-green { --swatch: #65a86e; }
.color-blue { --swatch: #4b83c5; }
.color-purple { --swatch: #8765b8; }
.color-pink { --swatch: #e98baf; }
.color-black { --swatch: #292624; }
.color-white { --swatch: #fffdf8; }

.size-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
}

.size-options legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
}

.size-options label {
  display: flex;
  min-height: 61px;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  cursor: pointer;
}

.size-options label.selected {
  border-color: var(--red);
  background: #fff5e9;
  box-shadow: inset 0 0 0 1px rgba(207, 63, 47, 0.12);
}

.size-options input {
  margin: 2px 0 0;
  accent-color: var(--red);
}

.size-options span {
  display: grid;
  gap: 3px;
}

.size-options strong {
  font-size: 11px;
}

.size-options small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.35;
}

.size-price-note {
  margin: 2px 0 6px;
  padding: 10px 12px;
  border-left: 3px solid var(--red);
  color: #664a3e;
  background: #f4ddca;
  font-size: 10px;
  line-height: 1.45;
}

.customizer form {
  gap: 6px;
}

.customizer textarea {
  min-height: 62px;
}

.customizer .button {
  margin-top: 6px;
}

@media (max-width: 520px) {
  .customizer {
    max-height: calc(100svh - 20px);
    padding: 22px 18px;
  }

  .color-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .size-options {
    grid-template-columns: 1fr;
  }

  .size-options label {
    min-height: 0;
  }

  .cart-drawer .drawer-head {
    top: -22px;
    margin: -22px -18px 0;
    padding: 22px 18px 17px;
  }

  .cart-line {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .cart-line-image {
    width: 58px;
    height: 58px;
  }
}
