@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

.stpdtf-uploader {
  --stpdtf-ink: #0b1f2a;
  --stpdtf-muted: #6c7a86;
  --stpdtf-sky: #e9f6fb;
  --stpdtf-ocean: #1cc8d5;
  --stpdtf-ocean-dark: #0fa4b0;
  --stpdtf-sun: #f8c31a;
  --stpdtf-card: #ffffff;
  --stpdtf-border: #d8e6ee;
  --stpdtf-shadow: 0 24px 60px rgba(11, 31, 42, 0.08);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--stpdtf-ink);
  background: radial-gradient(circle at top left, #f5fbfe 0, #f0fafc 40%, #ffffff 100%);
  padding: 48px 24px;
  border-radius: 28px;
  box-shadow: var(--stpdtf-shadow);
}

.stpdtf-hero {
  text-align: center;
  margin-bottom: 32px;
}

.stpdtf-kicker {
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--stpdtf-muted);
  margin: 0 0 10px;
}

.stpdtf-hero h2 {
  font-size: clamp(28px, 4vw, 48px);
  margin: 0 0 16px;
  font-family: var(--stpdtf-title-font, "Space Grotesk", "Segoe UI", sans-serif);
  font-size: var(--stpdtf-title-size, clamp(28px, 4vw, 48px));
}

.stpdtf-toggle {
  display: inline-flex;
  gap: 8px;
  background: #ffffff;
  border-radius: 999px;
  padding: 6px;
  box-shadow: inset 0 0 0 1px var(--stpdtf-border);
}

.stpdtf-pill {
  border: none;
  border-radius: 999px;
  padding: 10px 26px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--stpdtf-ink);
}

.stpdtf-pill.is-active {
  background: var(--stpdtf-ocean);
  color: #ffffff;
}

.stpdtf-sub {
  margin-top: 12px;
  color: var(--stpdtf-muted);
  font-family: var(--stpdtf-desc-font, "Space Grotesk", "Segoe UI", sans-serif);
  font-size: var(--stpdtf-desc-size, 16px);
}

.stpdtf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.7fr);
  gap: 24px;
  align-items: start;
}

.stpdtf-list {
  display: grid;
  gap: 20px;
  min-height: 280px;
}

.stpdtf-list[data-empty="true"] {
  background: repeating-linear-gradient(
    135deg,
    rgba(28, 200, 213, 0.08),
    rgba(28, 200, 213, 0.08) 14px,
    rgba(255, 255, 255, 0.5) 14px,
    rgba(255, 255, 255, 0.5) 28px
  );
  border: 1px dashed var(--stpdtf-border);
  border-radius: 20px;
  display: grid;
  place-items: center;
}

.stpdtf-list[data-empty="false"] .stpdtf-empty {
  display: none;
}

.stpdtf-empty {
  text-align: center;
  color: var(--stpdtf-muted);
}

.stpdtf-dropzone {
  border: 2px dashed var(--stpdtf-border);
  border-radius: 24px;
  padding: 36px;
  text-align: center;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.stpdtf-dropzone.is-dragging {
  border-color: var(--stpdtf-ocean);
  box-shadow: 0 12px 32px rgba(28, 200, 213, 0.2);
}

.stpdtf-drop-title {
  font-size: 18px;
  margin: 0;
}

.stpdtf-drop-sub {
  color: var(--stpdtf-muted);
  margin: 0;
}

.stpdtf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--stpdtf-sun);
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  position: relative;
  line-height: 1;
}

.stpdtf-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.stpdtf-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  background: var(--stpdtf-card);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--stpdtf-shadow);
  border: 1px solid var(--stpdtf-border);
}

.stpdtf-card[data-invalid="true"] {
  border-color: #f4a9a9;
  box-shadow: 0 18px 40px rgba(244, 169, 169, 0.3);
}

.stpdtf-thumb {
  background: #f3f5f7;
  border-radius: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.stpdtf-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stpdtf-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.stpdtf-name {
  font-weight: 600;
  margin: 0;
}

.stpdtf-size-note {
  margin: 4px 0 0;
  color: var(--stpdtf-muted);
  font-size: 12px;
}

.stpdtf-remove {
  border: none;
  background: #f4f6f8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
}

.stpdtf-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.stpdtf-fields label {
  font-size: 12px;
  color: var(--stpdtf-muted);
  display: grid;
  gap: 6px;
}

.stpdtf-fields input[type="number"] {
  border-radius: 12px;
  border: 1px solid var(--stpdtf-border);
  padding: 8px 10px;
  font-size: 14px;
}

.stpdtf-text-field {
  margin: 6px 0 14px;
}

.stpdtf-text-field label {
  font-size: 12px;
  color: var(--stpdtf-muted);
  display: grid;
  gap: 6px;
}

.stpdtf-text-field textarea {
  width: 100%;
  min-height: 72px;
  border-radius: 12px;
  border: 1px solid var(--stpdtf-border);
  padding: 10px 12px;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
}

.stpdtf-text-meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--stpdtf-muted);
}

.stpdtf-lock {
  align-items: center;
  justify-content: center;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid var(--stpdtf-border);
  padding: 8px;
  text-align: center;
  font-weight: 500;
}

.stpdtf-line {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 12px;
}

.stpdtf-qty {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f8fafb;
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid var(--stpdtf-border);
  font-size: 13px;
}

.stpdtf-qty input {
  width: 64px;
  border: none;
  background: transparent;
  font-weight: 600;
}

.stpdtf-summary {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 24px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--stpdtf-border);
}

.stpdtf-total-label {
  margin: 0;
  color: var(--stpdtf-muted);
}

.stpdtf-total-value {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 700;
}

.stpdtf-total-note {
  margin: 6px 0 0;
  color: var(--stpdtf-muted);
  font-size: 13px;
}

.stpdtf-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.stpdtf-primary {
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--stpdtf-ocean);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.stpdtf-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stpdtf-secondary {
  text-decoration: none;
  color: var(--stpdtf-ocean-dark);
  font-weight: 600;
}

.stpdtf-cart-link {
  position: relative;
  padding-right: 28px;
}

.stpdtf-cart-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff4d3a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(255, 77, 58, 0.35);
}

.stpdtf-status {
  margin-top: 14px;
  font-size: 14px;
  color: var(--stpdtf-muted);
}

.stpdtf-status.is-success {
  animation: stpdtf-pop 0.45s ease-out;
}

.stpdtf-status.is-success::after {
  content: "✔";
  margin-left: 6px;
  color: #1e8449;
  font-weight: 700;
}

.stpdtf-warning {
  margin: 0 0 12px;
  color: #c0392b;
  font-size: 12px;
}

.stpdtf-status[data-type="error"] {
  color: #c0392b;
}

.stpdtf-status[data-type="success"] {
  color: #1e8449;
  font-weight: 600;
}

.stpdtf-info-alert {
  margin-top: 16px;
  padding: 14px 18px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 12px;
  font-size: 14px;
  color: #856404;
}

.stpdtf-info-alert p {
  margin: 0;
}

.stpdtf-info-alert strong {
  color: #664d03;
}

.stpdtf-size-guide {
  margin-top: 14px;
  border: 1px solid #e2e2e2;
  border-radius: 12px;
  background: #fff;
  padding: 0;
  overflow: hidden;
}

.stpdtf-size-guide summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-weight: 700;
  color: #222;
  background: #f7f7f7;
  transition: background 0.2s ease, color 0.2s ease;
}

.stpdtf-size-guide summary::-webkit-details-marker {
  display: none;
}

.stpdtf-size-guide[open] summary {
  border-bottom: 1px solid #e6e6e6;
  background: #f1f1f1;
}

.stpdtf-size-guide-toggle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
}

.stpdtf-size-guide summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  margin-left: 10px;
}

.stpdtf-size-guide[open] summary::after {
  transform: rotate(45deg);
}

.stpdtf-size-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.stpdtf-size-guide[open] .stpdtf-size-body {
  max-height: 2000px;
  opacity: 1;
}

.stpdtf-uploader .stpdtf-size-head {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.6fr;
  gap: 0;
  padding: 10px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #fafafa;
  color: #666;
  border-bottom: 1px solid #eee;
}

.stpdtf-uploader .stpdtf-size-list {
  display: flex;
  flex-direction: column;
}

.stpdtf-uploader .stpdtf-size-item {
  border-bottom: 1px solid #eee;
}

.stpdtf-uploader .stpdtf-size-item summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.6fr;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-weight: 600;
  background: #fff;
  transition: background 0.2s ease;
}

.stpdtf-uploader .stpdtf-size-item summary::-webkit-details-marker {
  display: none;
}

.stpdtf-uploader .stpdtf-size-item summary:hover {
  background: #f9f9f9;
}

.stpdtf-uploader .stpdtf-size-label {
  text-align: left;
}

.stpdtf-uploader .stpdtf-size-measure {
  text-align: center;
  font-weight: 700;
  color: #1f4f6d;
}

.stpdtf-uploader .stpdtf-size-icon {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.stpdtf-uploader .stpdtf-size-icon svg {
  width: 56px;
  height: auto;
  color: #444;
}

.stpdtf-uploader .stpdtf-size-item-body {
  padding: 0 16px 14px;
  color: #555;
  font-size: 13px;
  line-height: 1.5;
}

.stpdtf-uploader .stpdtf-size-item[open] summary {
  background: #f6f6f6;
}

.stpdtf-uploader .stpdtf-size-item:last-child {
  border-bottom: 0;
}

.stpdtf-uploader .stpdtf-size-item:not([open]) .stpdtf-size-item-body {
  display: none;
}

.stpdtf-uploader .stpdtf-size-item[open] .stpdtf-size-item-body {
  display: block;
}

@media (max-width: 720px) {
  .stpdtf-uploader .stpdtf-size-head {
    display: none;
  }
  .stpdtf-uploader .stpdtf-size-item summary {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .stpdtf-uploader .stpdtf-size-label {
    grid-column: 1 / 2;
  }
  .stpdtf-uploader .stpdtf-size-measure {
    grid-column: 1 / 2;
    text-align: left;
  }
  .stpdtf-uploader .stpdtf-size-icon {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
  }
  .stpdtf-uploader .stpdtf-size-item-body {
    padding: 0 16px 14px;
  }
}

@keyframes stpdtf-pop {
  0% {
    transform: translateY(6px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 960px) {
  .stpdtf-grid {
    grid-template-columns: 1fr;
  }

  .stpdtf-card {
    grid-template-columns: 1fr;
  }

  .stpdtf-fields {
    grid-template-columns: 1fr;
  }

  .stpdtf-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}
