/* Shop & account pages (cart, checkout, orders, sign up / log in) */
:root {
  --sh-ink: #16121f;
  --sh-muted: #5a5268;
  --sh-plum: #665290;
  --sh-deep: #2a1f41;
  --sh-mist: #f3f0f8;
  --sh-paper: #faf8fc;
  --sh-line: rgba(102, 82, 144, 0.16);
  --sh-danger: #b42318;
  --sh-danger-bg: #fef3f2;
  --sh-success: #067647;
  --sh-success-bg: #ecfdf3;
}

.sh-page {
  background: var(--sh-paper);
  color: var(--sh-ink);
  min-height: 70vh;
  padding: 130px 0 90px;
}

.sh-container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.sh-container--narrow {
  width: min(760px, 92%);
}

.sh-container--tight {
  width: min(460px, 92%);
}

/* Cards & layout */
.sh-card {
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 14px 36px rgba(42, 31, 65, 0.06);
}

.sh-card h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  color: var(--sh-deep);
}

.sh-card-head {
  margin-bottom: 22px;
}

.sh-card-head h1,
.sh-page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--sh-deep);
}

.sh-card-head p,
.sh-page-head p {
  margin: 0;
  color: var(--sh-muted);
  line-height: 1.8;
}

.sh-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.sh-card-title h2 {
  margin: 0;
}

.sh-card-foot {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--sh-line);
  text-align: center;
  color: var(--sh-muted);
}

.sh-card-foot a,
.sh-link-small {
  color: var(--sh-plum);
  font-weight: 700;
  text-decoration: none;
}

.sh-card-foot a:hover,
.sh-link-small:hover {
  text-decoration: underline;
}

.sh-link-small {
  font-size: 0.92rem;
}

.sh-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.sh-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

@media (min-width: 900px) {
  .sh-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

.sh-stack {
  display: grid;
  gap: 24px;
}

/* Buttons */
.sh-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sh-btn-primary {
  background: linear-gradient(135deg, var(--sh-deep), var(--sh-plum));
  color: #fff;
  box-shadow: 0 10px 24px rgba(102, 82, 144, 0.28);
}

.sh-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(102, 82, 144, 0.36);
}

.sh-btn-ghost {
  background: transparent;
  color: var(--sh-deep);
  border-color: var(--sh-line);
}

.sh-btn-ghost:hover {
  background: var(--sh-mist);
}

.sh-btn-block {
  width: 100%;
}

.sh-btn-text {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--sh-plum);
  cursor: pointer;
}

.sh-btn-text:disabled {
  color: var(--sh-muted);
  cursor: default;
}

.sh-btn:focus-visible,
.sh-btn-text:focus-visible,
.sh-remove:focus-visible {
  outline: 2px solid #ba98f3;
  outline-offset: 3px;
}

.sh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Forms */
.sh-form {
  display: grid;
  gap: 16px;
}

.sh-grid-2 {
  display: grid;
  gap: 16px;
  align-items: start;
}

@media (min-width: 640px) {
  .sh-grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .sh-grid-2 .sh-field:has(textarea) {
    grid-column: 1 / -1;
  }
}

.sh-field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.sh-field label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--sh-deep);
}

.sh-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1.5px solid var(--sh-line);
  border-radius: 12px;
  background: #fff;
  color: var(--sh-ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sh-input[dir="ltr"] {
  text-align: left;
}

.sh-input::placeholder {
  color: #a39cb0;
}

.sh-input:focus {
  outline: none;
  border-color: var(--sh-plum);
  box-shadow: 0 0 0 3px rgba(102, 82, 144, 0.15);
}

textarea.sh-input {
  resize: vertical;
  line-height: 1.8;
}

.sh-code-input {
  text-align: center !important;
  font-size: 1.6rem;
  letter-spacing: 0.5em;
  font-weight: 700;
}

.has-error .sh-input {
  border-color: var(--sh-danger);
}

.sh-help {
  color: var(--sh-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.sh-error {
  margin: 0;
  color: var(--sh-danger);
  font-size: 0.88rem;
}

.sh-optional {
  color: var(--sh-muted);
  font-weight: 400;
  font-size: 0.85rem;
}

.sh-alert {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--sh-danger-bg);
  color: var(--sh-danger);
  font-weight: 700;
}

.sh-company {
  border: 1px dashed var(--sh-line);
  border-radius: 16px;
  padding: 14px 18px;
  background: var(--sh-paper);
}

.sh-company summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--sh-deep);
}

.sh-company[open] summary {
  margin-bottom: 16px;
}

.sh-resend {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  margin-top: 18px;
  color: var(--sh-muted);
  font-size: 0.9rem;
}

/* Messages */
.sh-messages {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.sh-message {
  margin: 0;
  padding: 14px 18px;
  border-radius: 14px;
  line-height: 1.8;
  background: var(--sh-mist);
  color: var(--sh-deep);
  border: 1px solid var(--sh-line);
}

.sh-message--success {
  background: var(--sh-success-bg);
  color: var(--sh-success);
  border-color: rgba(6, 118, 71, 0.2);
}

.sh-message--error {
  background: var(--sh-danger-bg);
  color: var(--sh-danger);
  border-color: rgba(180, 35, 24, 0.2);
}

/* Cart */
.sh-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sh-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--sh-line);
}

.sh-line:first-child {
  padding-top: 0;
}

.sh-line:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sh-line-media {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--sh-deep), var(--sh-plum));
  color: #fff;
  font-weight: 800;
  font-size: 1.5rem;
  text-decoration: none;
}

.sh-line-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sh-line-info {
  display: grid;
  gap: 4px;
}

.sh-line-name {
  font-weight: 700;
  color: var(--sh-deep);
  text-decoration: none;
}

.sh-line-unit {
  color: var(--sh-muted);
  font-size: 0.9rem;
}

.sh-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sh-qty .sh-input {
  width: 72px;
  padding: 8px 10px;
  text-align: center;
}

.sh-line-total {
  white-space: nowrap;
  color: var(--sh-deep);
}

.sh-line-total small {
  font-weight: 400;
  color: var(--sh-muted);
}

.sh-remove {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--sh-line);
  background: #fff;
  color: var(--sh-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.sh-remove:hover {
  background: var(--sh-danger-bg);
  color: var(--sh-danger);
  border-color: rgba(180, 35, 24, 0.25);
}

@media (max-width: 640px) {
  .sh-line {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-areas:
      "media info remove"
      "media qty total";
    row-gap: 10px;
  }

  .sh-line-media { grid-area: media; width: 56px; height: 56px; }
  .sh-line-info { grid-area: info; }
  .sh-qty { grid-area: qty; }
  .sh-line-total { grid-area: total; }
  .sh-line > form:last-child { grid-area: remove; }
}

/* Summary */
.sh-summary {
  display: grid;
  gap: 16px;
}

.sh-summary h2 {
  margin: 0;
}

@media (min-width: 900px) {
  .sh-summary {
    position: sticky;
    top: 120px;
  }
}

.sh-summary-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.sh-summary-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  line-height: 1.7;
}

.sh-summary-items small {
  color: var(--sh-muted);
}

.sh-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.sh-summary-total {
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--sh-line);
  font-size: 1.05rem;
}

.sh-summary-total strong {
  font-size: 1.25rem;
  color: var(--sh-deep);
}

.sh-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--sh-mist);
  color: var(--sh-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.sh-hint {
  margin: 0;
  text-align: center;
  color: var(--sh-muted);
  font-size: 0.88rem;
}

.sh-empty {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 40px 20px;
  text-align: center;
  color: var(--sh-muted);
}

.sh-empty p {
  margin: 0;
}

/* Orders */
.sh-orders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.sh-order-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--sh-line);
  border-radius: 14px;
  color: var(--sh-ink);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.sh-order-row:hover {
  background: var(--sh-paper);
  border-color: rgba(102, 82, 144, 0.35);
}

.sh-order-id {
  font-weight: 800;
  color: var(--sh-deep);
}

.sh-order-meta {
  color: var(--sh-muted);
  font-size: 0.9rem;
}

.sh-order-total {
  white-space: nowrap;
}

@media (max-width: 640px) {
  .sh-order-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

.sh-status {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--sh-mist);
  color: var(--sh-plum);
}

.sh-status--confirmed {
  background: #eff8ff;
  color: #175cd3;
}

.sh-status--paid {
  background: var(--sh-success-bg);
  color: var(--sh-success);
}

.sh-status--cancelled {
  background: #f2f4f7;
  color: #475467;
}

.sh-details {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 18px;
  margin: 0;
}

.sh-details dt {
  color: var(--sh-muted);
}

.sh-details dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.sh-callout {
  background: linear-gradient(135deg, var(--sh-deep), var(--sh-plum));
  color: #fff;
  border: none;
}

.sh-callout h2 {
  color: #fff;
}

.sh-callout p,
.sh-prose {
  margin: 0;
  line-height: 1.9;
}

.sh-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Buy box on product pages */
.sh-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  margin: 0 0 22px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--sh-line);
  box-shadow: 0 10px 28px rgba(42, 31, 65, 0.08);
}

.sh-buy-price {
  display: grid;
  gap: 2px;
}

.sh-buy-price span {
  color: var(--sh-muted);
  font-size: 0.85rem;
}

.sh-buy-price strong {
  font-size: 1.35rem;
  color: var(--sh-deep);
}

.sh-buy-price small {
  font-size: 0.85rem;
  font-weight: 400;
}

.sh-buy--dark {
  margin: 22px 0 0;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.sh-buy--dark .sh-buy-price span {
  color: rgba(255, 255, 255, 0.7);
}

.sh-buy--dark .sh-buy-price strong {
  color: #fff;
}

.sh-buy--dark .sh-btn-primary {
  background: #fff;
  color: var(--sh-deep);
}

.sh-404-title {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--sh-deep);
}
