.cart-box {
  position: fixed;
  top: 80px;
  right: -1000px;
  width: 100%; /* fluid */
  max-width: 1000px; /* cap on large screens */
  /* ensure it never exceeds viewport width */
  box-sizing: border-box;
  /* Previously height:100vh; caused bottom clipping when offset by top */
  bottom: 0; /* stretch to bottom so effective height = viewport - top */
  height: auto; /* allow natural height between top & bottom */
  max-height: none; /* remove artificial cap */
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}
.cart-box.open {
  right: 0;
}
.cart-box .cart-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%; /* match new dynamic height */
  overflow: hidden;
}
.cart-box .cart-content #cart-list-view {
  flex: 1;
  display: flex;
  min-height: 0; /* allow flex child to shrink */
}
.cart-box .cart-content .cart-header {
  flex: 0 0 auto;
  background: #faf7f5;
  border-bottom: 1px solid #ccc;
  z-index: 2;
}
.cart-box .cart-content .cart-list-scrollable {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto; /* scroll lives here so header can be sticky */
  overscroll-behavior: contain; /* prevent body scroll chaining */
  -webkit-overflow-scrolling: touch;
  /* Show visible scrollbar */
  scrollbar-width: auto; /* Firefox */
  -ms-overflow-style: auto; /* IE 10+ */
}
.cart-box .cart-content .cart-list-scrollable::-webkit-scrollbar { /* WebKit */
  width: 10px;
  height: 10px;
  display: block;
}
.cart-box .cart-content .cart-list-scrollable::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
}
.cart-box .cart-content .cart-list-scrollable::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
}
.cart-box .cart-content .cart-checkout-section {
  padding: 20px;
  border-top: 1px solid #eee;
  background: #f8f9fa;
}
.cart-box .cart-content .cart-checkout-section .cart-checkout-btn {
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
}

@media (max-width: 1240px) {
  .cart-box {
    top: 68px; /* bottom:0 already set -> new height = 100vh - 68px */
  }
}
.cart-header {
  position: sticky; /* ensure it sticks within scroll container */
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #faf7f5;
  border-bottom: 1px solid #ccc;
  flex-wrap: wrap;
  height: unset;
  padding: 8px;
  gap: 16px;
  text-align: center;
}
.cart-header > * {
  flex: 0 0 auto;
}
.cart-header .deadline {
  font-size: 14px;
  margin-right: 6px;
  background: var(--secondary-colorful);
  color: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 350px;
  padding: 10px 16px;
  height: 55px;
}
.cart-header .deadline.calm {
  background: var(--success);
}
.cart-header .deadline span {
  flex: 1;
  line-height: 1.2;
  word-wrap: break-word;
}
.cart-header .deadline strong {
  font-size: 32px;
  font-weight: bold;
  line-height: 1;
  white-space: nowrap;
}
.cart-header .cart-summary {
  font-size: 14px;
  margin-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  padding: 10px 16px;
  height: 55px;
}
.cart-header .cart-summary strong {
  font-weight: bold;
  line-height: 1.2;
}
.cart-header .cart-summary span {
  line-height: 1;
}
.cart-header .checkout-btn {
  background: var(--primary);
  color: white;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 4px;
  display: inline-block;
  height: 55px;
}
.cart-header .cart-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  color: #666;
}
.cart-header .cart-close-btn:hover {
  color: #333;
}

@media (max-width: 768px) {
  .cart-header {
    gap: 5px;
  }
  .cart-header .cart-summary {
    align-items: center;
  }
}
/* Narrow layout: put deadline on its own centered line, summary + checkout below */
@media (max-width: 860px) {
  .cart-header {
    flex-wrap: wrap;
    justify-content: center;
  }
  .cart-header .deadline {
    flex: 0 0 100%;
    order: 0;
    justify-content: center;
  }
  .cart-header .cart-summary,
  .cart-header .checkout-btn {
    order: 1;
    flex: 0 0 auto; /* Don't stretch, stay side-by-side */
  }
  .cart-summary,
  .checkout-btn {
    white-space: nowrap;
  }
}
.cart-item-container {
  flex: 1 1 auto;
  min-height: 0;
  /* Allow its own scrolling if needed */
  overflow-y: auto;
  height: auto;
  max-height: none;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
  /* Show visible scrollbar for this section as well */
  scrollbar-width: auto; /* Firefox */
  -ms-overflow-style: auto; /* IE 10+ */
}
.cart-item-container::-webkit-scrollbar { /* WebKit */
  width: 10px;
  height: 10px;
  display: block;
}
.cart-item-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
}
.cart-item-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
}
.cart-item-container .order-day {
  padding: 20px;
}
.cart-item-container .order-day h2 {
  display: flex;
  align-items: center;
  font-size: 20px;
}
.cart-item-container .order-day .date {
  margin-left: 10px;
  font-weight: normal;
}
.cart-item-container .delivery-address {
  margin-top: 12px;
}
.cart-item-container .address-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-item-container .address-header label {
  font-weight: bold;
  color: var(--secondary-colorful);
}
.cart-item-container .address-header .add-address {
  font-size: 20px;
  text-decoration: none;
  color: var(--secondary-colorful);
}
.cart-item-container .address-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.cart-item-container .address-row button {
  padding: 2px;
  border: 1px solid #ccc;
  background: white;
  border-radius: 0;
}
.cart-item-container .address-row select {
  flex: 1;
  min-width: 180px;
}
.cart-item-container .address-row select option {
  font: inherit;
}
.cart-item-container .free-shipping-msg {
  color: var(--secondary-colorful);
  font-size: 14px;
  margin-top: 6px;
  text-align: end;
}
.cart-item-container .cart-items {
  margin-top: 20px;
}
.cart-item-container .cart-item {
  display: flex;
  align-items: flex-start;
  border-bottom: 1px solid #eee;
  padding: 12px 0;
  gap: 10px;
  flex-direction: column;
  position: relative;
}
.cart-item-container .cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}
.cart-item-container .cart-item .main-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.cart-item-container .cart-item .item-info {
  flex: 2;
}
.cart-item-container .cart-item .item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-item-container .cart-item .item-actions select {
  width: 100%;
}
.cart-item-container .cart-item .item-actions .portion-select {
  padding: 4px 8px;
  height: 40px;
  min-width: 120px;
  font-size: 1em;
  border: 1px solid var(--light-beige);
  box-sizing: border-box;
  display: flex;
  align-items: center;
}
.cart-item-container .cart-item .item-actions .price {
  font-weight: bold;
  width: 90px;
  min-width: 90px;
  text-align: end;
}
.cart-item-container .cart-item .quantity {
  display: flex;
  align-items: center;
  border: 1px solid var(--light-beige);
}
.cart-item-container .cart-item .quantity button {
  padding: 4px 8px;
}
.cart-item-container .cart-item .quantity input {
  width: 40px;
  text-align: center;
}
.cart-item-container .cart-item .remove {
  background: none;
  border: none;
  cursor: pointer;
}
.cart-item-container .cart-item .extra-variants-row {
  width: 100%;
  margin-left: 90px;
  padding-top: 4px;
}
.cart-item-container .cart-item .extra-variant-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
  font-size: 14px;
  gap: 8px;
  color: #777;
}
.cart-item-container .cart-item .extra-variant-item .extra-name {
  flex: 1;
}
.cart-item-container .cart-item .extra-variant-item .extra-price {
  font-weight: bold;
  color: #333;
  margin-left: 10px;
  white-space: nowrap;
  width: 90px;
  text-align: right;
}
.cart-item-container .cart-item .extra-variant-item button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-item-container .cart-item .extra-variant-item button.invisible-spacer {
  opacity: 0;
  pointer-events: none;
  cursor: default;
}
.cart-item-container .cart-item .extra-variant-item button:not(.invisible-spacer):hover {
  color: #333;
}
.cart-item-container .add-more-title {
  margin-top: 30px;
  font-size: 18px;
}
.cart-item-container .add-products {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.cart-item-container .product-card {
  border: 1px solid #eee;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
  flex: 1 1 200px;
}
.cart-item-container .product-card img {
  width: 100%;
  border-radius: 6px;
}
.cart-item-container .points {
  display: block;
  background: #f5f0e8;
  color: var(--secondary-colorful);
  padding: 4px;
  font-size: 12px;
  margin-bottom: 6px;
}
.cart-item-container .add-btn {
  background: #c07b5a;
  color: white;
  border: none;
  padding: 8px;
  margin-top: 6px;
  cursor: pointer;
}
.cart-item-container .cart-item-category {
  font-size: 0.8em;
  color: #888;
  margin-bottom: 2px;
}
@media (min-width: 769px) {
  .cart-item-container .cart-item {
    align-items: flex-start;
  }
  .cart-item-container .cart-item .main-row {
    align-items: center;
  }
  .cart-item-container .cart-item .extra-variants-row {
    margin-left: 90px;
    width: calc(100% - 90px);
  }
}
@media (max-width: 768px) {
  .cart-item-container .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .cart-item-container .cart-item .main-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    grid-template-areas: "img info" "actions actions";
    column-gap: 10px;
    row-gap: 8px;
    align-items: flex-start;
  }
  .cart-item-container .cart-item .main-row img {
    grid-area: img;
  }
  .cart-item-container .cart-item .main-row .item-info {
    grid-area: info;
    margin-bottom: 0;
  }
  .cart-item-container .cart-item .main-row .item-actions {
    grid-area: actions;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: right;
    gap: 8px;
    width: 100%;
  }
  .cart-item-container .cart-item .main-row .item-actions select {
    width: 200px;
  }
  .cart-item-container .cart-item .item-actions > * {
    flex: 0 0 auto;
  }
  .cart-item-container .cart-item .extra-variants-row {
    margin-left: 0;
  }
}
@media (max-width: 450px) {
  .cart-item-container .cart-item .main-row .item-actions select {
    width: 140px;
  }
  .cart-item-container .cart-item .main-row .item-actions .quantity input {
    width: 20px;
  }
}

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