.pallet-sidebar {
  position: fixed;
  top: 0;
  right: -460px;
  width: 440px;
  max-width: 94vw;
  height: 100vh;
  background-color: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.12);
  z-index: 10061;
  overflow-y: auto;
  overflow-x: hidden;
  transition: right 0.3s ease;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.pallet-sidebar.open {
  right: 0;
}

.pallet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 10060;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pallet-overlay.show {
  display: block;
  opacity: 1;
}

body.pallet-open {
  overflow: hidden;
}

.pallet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #eee;
}

.pallet-headline {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: #222;
}

.pallet-free-freight-badge {
  display: inline-block;
  background: #16a34a;
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 700;
}

.pallet-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pallet-view-all {
  display: inline-block;
  border: 1px solid #16a34a;
  color: #16a34a;
  background: #fff;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.close-pallet {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}

.pallet-visual {
  padding: 16px 20px 8px;
  border-bottom: 1px solid #eee;
}

.pallet-limits {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  border-bottom: 1px solid #ddd;
  min-height: 269px;
}

.pallet-progress {
  width: 201px;
  flex-shrink: 0;
}

.pallet-fill-copy {
  font-size: 13px;
  font-weight: 400;
  color: #4b5563;
  margin: 0 0 10px;
  line-height: 1.3;
}

.pallet-fill-percent {
  display: inline-block;
  font-size: 39px;
  font-weight: 900;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 46px;
  color: #b09757;
}

.pallet-graphic::after {
  content: "";
  display: block;
  width: 201px;
  height: 19px;
  background: url("/assets/images/pallets/pallet.webp") no-repeat 0 0;
}

.pallet-progress-boxes {
  width: 200px;
  height: 180px;
  background: url("/assets/images/pallets/grid.webp") no-repeat 0 0;
  overflow: hidden;
  margin-left: 1px;
}

.pallet-stack {
  width: 200px;
  height: 180px;
  margin: 0 0 0 -1px;
  display: flex;
  flex-flow: row wrap-reverse;
  align-content: flex-start;
}

.pallet-block {
  width: 40px;
  height: 18px;
  background: #e5ddcc;
  border-left: 1px solid #c3bcae;
  box-sizing: border-box;
}

.pallet-block::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-top-color: rgba(255, 255, 255, 0.1);
  border-right-color: rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}

.pallet-carrier {
  display: none;
  width: 155px;
  height: auto;
  flex-shrink: 0;
  align-self: flex-end;
}

@media (min-width: 420px) {
  .pallet-carrier {
    display: block;
  }
}

.pallet-freight-status {
  margin: 10px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.pallet-freight-status.unlocked {
  color: #15803d;
  font-weight: 600;
}

.pallet-fill-warning {
  margin: 10px 0 0;
  font-size: 13px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
}

.pallet-fill-warning[hidden] {
  display: none;
}

.pallet-fill-warning p {
  margin: 0;
}

.pallet-fill-warning ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.pallet-fill-warning li {
  margin: 0.15rem 0;
}

.pallet-empty {
  margin: 12px 20px;
  background: #fef9c3;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 10px 12px;
  color: #854d0e;
  font-size: 14px;
}

.pallet-empty p {
  margin: 0;
}

.pallet-items {
  padding: 8px 20px 20px;
  flex: 1;
}

.pallet-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.pallet-item-image img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #f8fafc;
}

.pallet-item-details {
  flex: 1;
  min-width: 0;
}

.pallet-item-name {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: #1d4ed8;
}

.pallet-item-price,
.pallet-item-total {
  font-size: 14px;
  font-weight: 600;
}

.pallet-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.pallet-item-quantity button {
  width: 28px;
  height: 28px;
  border: 1px solid #ddd;
  background: #f8f9fa;
  border-radius: 4px;
  cursor: pointer;
}

.remove-pallet-item {
  border: none;
  background: #e5e7eb;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  color: #4b5563;
}

.pallet-actions {
  display: none;
  gap: 10px;
  padding: 0 20px 12px;
}

.pallet-keep-shopping,
.pallet-checkout {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.pallet-keep-shopping {
  background: #e5e7eb;
  color: #111827;
  border: none;
}

.pallet-checkout {
  background: #2563eb;
  color: #fff;
}

.pallet-summary {
  display: none;
  padding: 12px 20px 24px;
  border-top: 1px solid #eee;
}

.pallet-summary .summary-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}
