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

#cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 2400;
}

#cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(640px, 100vw);
  height: 100dvh;
  background: #f6f2ec;
  border-left: 2px solid #000;
  box-shadow: -10px 0 24px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 2401;
  display: flex;
  flex-direction: column;
}

body.cart-drawer-open #cart-drawer-backdrop {
  opacity: 1;
  visibility: visible;
}

body.cart-drawer-open #cart-drawer {
  transform: translateX(0);
}

#cart-drawer-content {
  height: 100%;
  overflow: hidden;
  padding: 2rem;
}

.sidebar-cart-root {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sidebar-cart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.sidebar-cart-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-cart-count {
  margin: 0.35rem 0 0;
  color: #5c5c5c;
  font-size: 0.95rem;
  font-weight: 500;
}

.sidebar-cart-close-btn {
  border: none;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.sidebar-cart-item {
  border-bottom: 1px solid #d2d2d2;
  padding: 0.9rem 0;
}

.sidebar-cart-items {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.sidebar-cart-item-top {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.sidebar-cart-item-image {
  width: 140px;
  height: 140px;
  object-fit: contain;
  background: white;
  border-radius: 8px;
  border: 1px solid black;
  align-items: center;
}

.sidebar-cart-item-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-cart-item-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.sidebar-cart-item-group {
  margin: 0.2rem 0;
  color: #6c6c6c;
  font-size: 0.8rem;
}

.sidebar-edit-options {
  border: none;
  background: transparent;
  color: #5c5c5c;
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.sidebar-cart-option {
  font-size: 0.78rem;
  color: #555;
}

.sidebar-cart-option-name {
  font-weight: 600;
}

.sidebar-cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.45rem;
}

.sidebar-qty-selector {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sidebar-qty-btn,
.sidebar-qty-input,
.sidebar-add-file-btn {
  border: 1px solid #000;
  background: #fff;
  border-radius: 6px;
  box-shadow: 2px 2px 0 0 #000;
}

.sidebar-qty-btn {
  width: 34px;
  height: 34px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-qty-btn:hover {
  background: #f0f0f0;
  transform: translate(2px, 2px);
  box-shadow: none;
}

.sidebar-qty-input {
  width: 60px;
  height: 34px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
}

.sidebar-item-price-wrap {
  align-self: flex-start;
  margin-top: 0.35rem;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.sidebar-item-price-original {
  font-size: 0.82rem;
  font-weight: 600;
  color: #909090;
  text-decoration: line-through;
}

.sidebar-item-price-current {
  font-size: 1rem;
  font-weight: 700;
  color: #ff3e9a;
}

.sidebar-files {
  margin-top: 0.65rem;
}

.sidebar-files-label {
  font-size: 0.76rem;
  color: #666;
  margin-bottom: 0.4rem;
}

.sidebar-file-item {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  background: #fff;
}

.sidebar-file-name {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.sidebar-file-remove {
  border: none;
  background: transparent;
  font-size: 1rem;
  color: #777;
}

.sidebar-add-file-btn {
  padding: 0.15rem 0.55rem;
  font-size: 0.74rem;
  cursor: pointer;
}

.sidebar-remove-product {
  border: none;
  background: transparent;
  color: #5c5c5c;
  text-decoration: underline;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}

.sidebar-summary {
  color: black;
  margin-top: auto;
  flex-shrink: 0;
  border-top: 2px solid black;
  margin-left: -2rem;
  margin-right: -2rem;
  padding: 1rem 2rem 0rem;
}

.sidebar-coupon {
  margin-bottom: 0.9rem;
  border-top: 2px solid black;
  margin-left: -2rem;
  margin-right: -2rem;
  padding: 1rem 2rem 0rem;
}

.sidebar-coupon-badges {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.sidebar-coupon-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-txtcoupon {
  flex: 1;
  min-width: 0;
  height: 38px;
  border: 1px solid #000;
  border-radius: 7px;
  background: #fff;
  padding: 0 0.65rem;
  font-size: 0.85rem;
}

.sidebar-bt-coupon {
  height: 38px;
  border: 1px solid #000;
  text-transform: uppercase;
  border-radius: 7px;
  background: #fff;
  padding: 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 4px 4px 0 0 black;
}

.sidebar-bt-coupon:hover {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.sidebar-coupon-applied {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px dashed #9d9d9d;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  background: #fff;
}

.sidebar-coupon-code {
  font-size: 0.84rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-bt-remove-coupon-code {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #5c5c5c;
  padding: 0;
}

.sidebar-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
  margin-bottom: 0.45rem;
}

.sidebar-summary-title-row {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.sidebar-summary-grand {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  padding-top: 0.55rem;
  margin-top: 0.55rem;
  font-weight: 700;
}

.sidebar-summary-tax {
  color: #5c5c5c;
  font-size: 0.78rem;
}

.sidebar-summary-total {
  font-size: 1.5rem;
}

.sidebar-summary-actions {
  margin-top: 0.9rem;
}

.sidebar-view-full-cart {
  display: inline-block;
  margin-top: 0.55rem;
  color: #000;
  text-decoration: underline;
  font-size: 0.78rem;
}

.sidebar-cart-empty {
  min-height: 70%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.8rem;
}

.sidebar-cart-empty img {
  max-width: 180px;
}

.sidebar-cart-loading {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-weight: 500;
}

.checkout-btn {
  width: 100%;
  background: #ec008c;
  color: white;
  border: 2px solid black;
  border-radius: 8px;
  box-shadow: 4px 4px 0 0 black;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  font-size: 24px;
  line-height: 100%;
  letter-spacing: 0%;
  padding: 15px;
  width: 100%;
  height: 3rem;
  text-align: center;
}

.checkout-btn:hover {
    transform: translateX(4px) translateY(4px);
    color: white;
    box-shadow: none;
  }

.sidebar-cart-group {
  border-bottom: 1px solid #d2d2d2;
}

.sidebar-cart-group > .sidebar-cart-item {
  border-bottom: none;
}

.sidebar-cart-addons-group {
  border-left: 2px solid rgb(201, 200, 200);
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.sidebar-cart-item-addon {
  border-bottom: none;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  position: relative;
}

.sidebar-cart-addon-indent-bar {
  display: none; /* handled by left-border on group */
}

.sidebar-cart-addon-image {
  width: 80px !important;
  height: 80px !important;
}

.sidebar-cart-addon-name {
  font-size: 0.88rem !important;
}

@media (max-width: 768px) {
  #cart-drawer {
    width: 100vw;
    border-left: 0;
    box-shadow: none;
  }

  #cart-drawer-content {
    padding: 1rem 0.85rem 2rem;
  }

  .sidebar-summary {
    margin-left: -0.85rem;
    margin-right: -0.85rem;
    padding: 0.6rem 0.85rem 0.4rem;
  }

  .sidebar-cart-item-actions {
    flex-direction: column;
    align-items: start;
  }
}

.sidebar-design-accordion {
  margin-top: 0.5rem;
  border: 1px solid black;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.sidebar-design-accordion-header-row {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  gap: 4px;
}

.sidebar-design-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  background: white;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ec008c;
  transition: background 0.15s ease;
}

.sidebar-design-accordion-header:hover {
  background: white;
}

.sidebar-design-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sidebar-design-accordion-header.active .sidebar-design-chevron {
  transform: rotate(90deg);
}

.sidebar-design-accordion-header[aria-expanded="true"] .sidebar-design-chevron {
  transform: rotate(90deg);
  transition: transform 0.5s ease;
}

.sidebar-design-accordion-header[aria-expanded="false"] .sidebar-design-chevron {
  transform: rotate(0deg);
  transition: transform 0.5s ease;
}

.sidebar-design-accordion .collapsing {
  transition: height 0.5s ease !important;
}

.sidebar-design-modified {
  font-size: 0.65rem;
  font-weight: 400;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-design-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.sidebar-design-edit-btn {
  background: white;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.sidebar-design-edit-btn:hover {
  background: #fff5fa;
}

.sidebar-design-accordion-body {
  position: relative;
  border: none;
  border-radius: 0;
  padding: 1rem;
  background: #fff;
}

.sidebar-design-accordion-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2.5%;
  width: 95%;
  height: 1px;
  background-color: black;
}

/* View Mode */
.sidebar-design-qa {
  margin-bottom: 8px;
}

.sidebar-design-q {
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
}

.sidebar-design-a {
  font-size: 0.78rem;
  color: #555;
  margin-top: 1px;
}

.sidebar-design-attachments {
  margin-top: 8px;
}

.sidebar-design-attach-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f172a;
  display: block;
  margin-bottom: 4px;
}

.sidebar-design-attach-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  color: #ec008c;
  text-decoration: none;
  background: #fff5fa;
  border: 1px solid #fce7f3;
  border-radius: 4px;
  padding: 2px 8px;
  margin: 0 4px 4px 0;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-design-attach-link:hover {
  background: #fce7f3;
  color: #be006f;
}

/* Edit Mode */
.sidebar-design-qa-edit {
  margin-bottom: 10px;
}

.sidebar-design-q-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
  display: block;
  margin-bottom: 3px;
}

.sidebar-design-a-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 0.78rem;
  font-family: inherit;
  color: #374151;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.sidebar-design-a-input:focus {
  border-color: #ec008c;
  outline: none;
  box-shadow: 0 0 0 2px rgba(236, 0, 140, 0.1);
}

.sidebar-design-edit-attachments {
  margin-top: 10px;
}

.sidebar-design-edit-file-list {
  margin: 4px 0 6px;
}

.sidebar-design-edit-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 4px;
}

.sidebar-design-edit-file-name {
  font-size: 0.74rem;
  color: #374151;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-design-edit-file-remove {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.sidebar-design-edit-file-remove:hover {
  color: #ef4444;
}

.sidebar-design-upload-btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  background: black;
  border: 1px solid black;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sidebar-design-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.sidebar-design-save-btn {
  flex: 1;
  background: #ec008c;
  color: #fff;
  border: 1px solid #000;
  border-radius: 6px;
  padding: 6px 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 2px 2px 0 0 #000;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.sidebar-design-save-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.sidebar-design-save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sidebar-design-cancel-btn {
  flex: 1;
  background: #fff;
  color: black;
  border: 1px solid black;
  border-radius: 6px;
  padding: 6px 0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 2px 2px 0 0 black;
  transition: background 0.15s ease;
}

.sidebar-design-cancel-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* Empty state */
.sidebar-design-empty {
  text-align: center;
  padding: 4px 0;
}

.sidebar-design-fill-btn {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ec008c;
  border: 1px solid #ec008c;
  border-radius: 6px;
  padding: 4px 14px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.sidebar-design-fill-btn:hover {
  background: #fff5fa;
  color: #ec008c;
}

@media (max-width: 768px) {
  .sidebar-design-modified {
    display: none;
  }
}

.sidebar-artwork-tree {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.sidebar-artwork-pair {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-artwork-tree-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
}

.sidebar-artwork-tree-row--indented {
  padding-left: 20px;
}

.sidebar-artwork-tree-connector {
  color: #d1d5db;
  font-size: 0.75rem;
}

.sidebar-artwork-file-link {
  color: #374151;
  text-decoration: none;
}

.sidebar-artwork-file-link:hover {
  text-decoration: underline;
}

.sidebar-artwork-file-link--user {
  color: #ec008c;
}

.sidebar-artwork-empty {
  color: #9ca3af;
  font-style: italic;
  font-size: 0.78rem;
}

.sidebar-cart-switcher {
  margin-bottom: 0.9rem;
  border: 1px solid #000;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.sidebar-cart-switcher-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.6rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 600;
}

.sidebar-cart-switcher-summary::-webkit-details-marker {
  display: none;
}

.sidebar-cart-switcher-caption {
  font-size: 0.78rem;
  color: #5c5c5c;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-cart-switcher-current {
  font-size: 0.9rem;
  color: #111;
}

.sidebar-cart-switcher[open] .sidebar-cart-switcher-summary {
  border-bottom: 1px solid #000;
}

.sidebar-cart-switcher-panel {
  padding: 0.65rem 0.75rem 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.sidebar-cart-select {
  width: 100%;
  height: 38px;
  border: 1px solid #000;
  border-radius: 6px;
  background: #fff;
  padding: 0 0.5rem;
  font-size: 0.84rem;
}

.sidebar-cart-switcher-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sidebar-cart-switcher-btn {
  border: 1px solid #000;
  border-radius: 6px;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.sidebar-cart-switcher-btn-danger {
  color: #b00020;
}

