/* Standalone cart / ordering layer for the static copy. */

.wp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 998;
}

.wp-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.wp-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: #fff;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.16);
  transform: translateX(102%);
  transition: transform 0.28s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
  font-family: var(--font-secondary, Inter, system-ui, sans-serif);
  color: #1a1a1a;
}

.wp-drawer.is-open {
  transform: translateX(0);
}

.wp-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #ececec;
}

.wp-drawer__title {
  font-family: var(--font-primary, Syne, system-ui, sans-serif);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.wp-drawer__close {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  padding: 4px 8px;
  color: #1a1a1a;
}

.wp-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px;
}

.wp-drawer__foot {
  border-top: 1px solid #ececec;
  padding: 18px 24px 24px;
  display: grid;
  gap: 10px;
}

.wp-empty {
  padding: 48px 0;
  text-align: center;
  color: #767676;
  font-size: 15px;
}

.wp-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid #f2f2f2;
}

.wp-line__img {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  background: #f5f5f5;
}

.wp-line__title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  line-height: 1.3;
}

.wp-line__variant {
  font-size: 12px;
  color: #767676;
  margin: 0 0 8px;
}

.wp-line__price {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.wp-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  overflow: hidden;
}

.wp-qty button {
  width: 28px;
  height: 28px;
  border: 0;
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: #1a1a1a;
}

.wp-qty button:hover {
  background: #f4f4f4;
}

.wp-qty span {
  min-width: 30px;
  text-align: center;
  font-size: 13px;
}

.wp-line__remove {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 10px;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.wp-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.wp-field {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #666;
}

.wp-field input,
.wp-field textarea {
  font: inherit;
  font-size: 14px;
  color: #1a1a1a;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  padding: 9px 10px;
  width: 100%;
  box-sizing: border-box;
}

.wp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 4px;
  border: 1px solid #000;
  background: #000;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.wp-btn:hover {
  background: #1d1e20;
}

.wp-btn--wa {
  background: #25d366;
  border-color: #25d366;
  color: #06331a;
}

.wp-btn--wa:hover {
  background: #1fb757;
  border-color: #1fb757;
}

.wp-btn--ghost {
  background: #fff;
  color: #000;
}

.wp-btn--ghost:hover {
  background: #f3d8b9;
}

.wp-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.wp-note {
  font-size: 11px;
  color: #8a8a8a;
  text-align: center;
  line-height: 1.5;
  margin: 2px 0 0;
}

.wp-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: #1a1a1a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.wp-toast.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
}

.wp-hidden {
  display: none !important;
}

/* Required store fields such as "Color Selection". */
.custom-field.wp-invalid input,
.custom-field.wp-invalid textarea,
.custom-field.wp-invalid select {
  border-color: #d64545;
}

.custom-field .custom-field__error {
  color: #d64545;
  font-size: 12px;
  min-height: 1em;
}

.custom-field select.custom-field__input {
  width: 100%;
  margin: 8px 0 6px;
  padding: 10px 36px 10px 16px;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.5;
  color: var(--body-color, #1d1e20);
  background-color: #fff;
  border: 0.5px solid #dadce0;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #1d1e20 50%),
    linear-gradient(135deg, #1d1e20 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* Store page numbers. The builder stylesheet leaves them flush, and the
   buttons this script inserts need the same size as the original ones. */
.product-list__pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.product-list__pagination .pagination__button {
  min-width: 36px;
  min-height: 36px;
  margin: 0;
  padding: 4px 8px;
}
