/* ER Custom Stitch Embroidery – theme drawn from the logo (dusty rose, blush, cream). */

:root {
  --brand: #9c5866;
  --brand-hover: #874a57;
  --brand-deep: #6f3a47;
  --brand-rgb: 156, 88, 102;
  --blush: #f3dedc;
  --blush-strong: #e8c1c0;
  --petal: #fbeeec;
  --cream: #fcf7f4;
  --ink: #3b2a2e;
  --muted: #7a6468;
  --line: #ecdcd9;
  --thread-gold: #c9a45c;

  --bs-body-font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--cream);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--line);
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: var(--brand-rgb);
  --bs-link-hover-color: var(--brand-deep);
  --bs-link-hover-color-rgb: 111, 58, 71;
  --bs-primary: var(--brand);
  --bs-primary-rgb: var(--brand-rgb);
  --bs-primary-bg-subtle: var(--blush);
  --bs-primary-border-subtle: var(--blush-strong);
  --bs-primary-text-emphasis: var(--brand-deep);
  --bs-focus-ring-color: rgba(var(--brand-rgb), .3);
  --bs-border-radius: .6rem;
  --bs-border-radius-lg: .9rem;
}

html { font-size: 15px; }
@media (min-width: 768px) { html { font-size: 16px; } }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
}

.site-main { flex: 1 0 auto; }

h1, h2, h3, h4, .display-font {
  font-family: "Lora", Georgia, serif;
  font-weight: 600;
  color: var(--brand-deep);
  letter-spacing: -.01em;
}

.text-brand { color: var(--brand) !important; }
.font-sans { font-family: var(--bs-body-font-family) !important; }
.min-w-0 { min-width: 0; }

/* MVC renders an empty validation summary when there are no errors; don't show an empty alert. */
.validation-summary-valid { display: none; }
.validation-summary-errors ul { margin-bottom: 0; padding-left: 1.1rem; }
.bg-petal { background: var(--petal) !important; }
.bg-blush { background: var(--blush) !important; }

/* ---------- Buttons & forms ---------- */

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-hover);
  --bs-btn-hover-border-color: var(--brand-hover);
  --bs-btn-active-bg: var(--brand-deep);
  --bs-btn-active-border-color: var(--brand-deep);
  --bs-btn-disabled-bg: #c7a2aa;
  --bs-btn-disabled-border-color: #c7a2aa;
  --bs-btn-focus-shadow-rgb: var(--brand-rgb);
  font-weight: 600;
}

.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand-deep);
  --bs-btn-active-border-color: var(--brand-deep);
  --bs-btn-focus-shadow-rgb: var(--brand-rgb);
  font-weight: 600;
}

.btn-soft {
  --bs-btn-color: var(--brand-deep);
  --bs-btn-bg: var(--blush);
  --bs-btn-border-color: var(--blush);
  --bs-btn-hover-color: var(--brand-deep);
  --bs-btn-hover-bg: var(--blush-strong);
  --bs-btn-hover-border-color: var(--blush-strong);
  --bs-btn-active-bg: var(--blush-strong);
  font-weight: 600;
}

.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .25);
}

.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-control, .form-select { background-color: #fff; }
.form-label { font-weight: 600; }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.page-link { color: var(--brand); }
.active > .page-link, .page-link.active { background-color: var(--brand); border-color: var(--brand); }

/* ---------- Header ---------- */

.env-banner {
  background: #fff3cd;
  color: #664d03;
  border-bottom: 1px solid #ffe69c;
  font-size: .88rem;
  text-align: center;
  padding: .35rem 1rem;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.site-header .navbar { padding-block: .55rem; }

.brand { display: flex; align-items: center; gap: .6rem; margin-right: 1.5rem; }
.brand img { flex: none; }
.brand-name {
  font-family: "Lora", Georgia, serif;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.05;
  color: var(--brand-deep);
}
.brand-name small {
  display: block;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
}
.brand-er { font-style: italic; }

.site-header .nav-link {
  color: var(--ink);
  font-weight: 600;
  padding-inline: .8rem !important;
  border-radius: 999px;
}
.site-header .nav-link:hover, .site-header .nav-link:focus-visible { color: var(--brand); }
.site-header .nav-link.active { color: var(--brand-deep); background: var(--petal); }

.navbar-toggler { border: 0; font-size: 1.6rem; color: var(--brand-deep); }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .25); }

.account-name {
  display: inline-block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.cart-link { position: relative; font-size: 1.25rem; }
.cart-link .bi { vertical-align: -.1em; }
.cart-count {
  position: absolute;
  top: .1rem;
  left: 1.7rem;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.2rem;
  text-align: center;
}

/* Phones and tablets: the cart beside the menu button, always in view. */
.header-actions { gap: .15rem; }
.cart-link-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.45rem;
  color: var(--brand-deep);
  border-radius: 999px;
}
.cart-link-compact:hover, .cart-link-compact:focus-visible { color: var(--brand); background: var(--petal); }
.cart-link-compact .cart-count { top: .1rem; left: auto; right: -.1rem; box-shadow: 0 0 0 2px #fff; }
@media (max-width: 380px) {
  .brand { gap: .4rem; margin-right: .5rem; }
  .brand img { width: 38px; height: auto; }
  .brand-name { font-size: 1.05rem; }
}

.dropdown-item:active { background: var(--brand); }

/* Sign in / create account */
.auth-card { max-width: 28rem; padding-block: 1rem 2rem; }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}
.social-btn .bi { font-size: 1.2rem; line-height: 1; }
/* Brand colours from Google's and Facebook's button guidelines */
.social-google { background: #fff; color: #1f1f1f; border: 1px solid #747775; }
.social-google:hover, .social-google:focus-visible { background: #f2f2f2; color: #1f1f1f; border-color: #747775; }
.social-facebook { background: #1877f2; color: #fff; border: 1px solid #1877f2; }
.social-facebook:hover, .social-facebook:focus-visible { background: #166fe5; color: #fff; border-color: #166fe5; }

/* Show/hide password (site.js adds the eye button to every password field) */
.password-field { position: relative; }
.password-field > .form-control, .has-password-reveal > .form-control { padding-right: 2.75rem; }
.password-field > .form-control-sm { padding-right: 2.25rem; }
.password-reveal {
  position: absolute;
  top: 50%;
  right: .3rem;
  z-index: 5;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .3rem .45rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  line-height: 1;
}
.password-reveal:hover, .password-reveal:focus-visible { color: var(--brand-deep); background: var(--petal); }
.password-reveal:focus-visible { outline: 2px solid rgba(var(--brand-rgb), .45); outline-offset: 1px; }
.password-reveal[aria-pressed="true"] { color: var(--brand); }
.password-field > .form-control-sm + .password-reveal { padding: .15rem .35rem; font-size: .85rem; }
/* Edge has its own reveal button; one is enough. */
.has-reveal::-ms-reveal, .has-reveal::-ms-clear { display: none; }

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(232, 193, 192, .55), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(243, 222, 220, .9), transparent 50%),
    var(--petal);
  border-bottom: 1px solid var(--line);
  padding: 3rem 0;
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.15; }
.hero .lead { color: var(--muted); max-width: 34rem; }
.hero-logo { width: min(100%, 380px); height: auto; filter: drop-shadow(0 12px 24px rgba(111, 58, 71, .12)); }

/* Dashed "stitch" divider used for section accents */
.stitch {
  border: 0;
  border-top: 2px dashed var(--blush-strong);
  opacity: 1;
  margin: 2.5rem 0;
}

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .4rem;
}

/* ---------- Cards ---------- */

.card {
  --bs-card-border-color: var(--line);
  --bs-card-cap-bg: var(--petal);
  border-radius: var(--bs-border-radius-lg);
}

.product-card {
  height: 100%;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover, .product-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 .75rem 1.5rem rgba(111, 58, 71, .08);
}
.product-card .card-title a { color: var(--ink); text-decoration: none; }
.product-card .card-title a::after { content: ""; position: absolute; inset: 0; }
.product-card .price { font-weight: 700; color: var(--brand-deep); }

.product-media {
  aspect-ratio: 1 / 1;
  background: var(--petal);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media.placeholder-media img { width: 45%; height: auto; object-fit: contain; opacity: .55; }

.product-media-lg { border-radius: var(--bs-border-radius-lg); border: 1px solid var(--line); }

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--blush);
  color: var(--brand-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex: none;
}

.step-number {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 2px dashed var(--brand);
  color: var(--brand-deep);
  font-family: "Lora", Georgia, serif;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.price-table td, .price-table th { padding-block: .55rem; }
.price-table .amount { font-weight: 700; color: var(--brand-deep); white-space: nowrap; }

/* ---------- Category chips ---------- */

.chip-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: .35rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--blush-strong);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
}
.chip:hover { border-color: var(--brand); color: var(--brand-deep); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Contact page ---------- */

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}
.topic-option {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  height: 100%;
  padding: .75rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--bs-border-radius-lg);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.topic-option i { font-size: 1.25rem; color: var(--brand); margin-bottom: .15rem; }
.topic-name { font-weight: 700; line-height: 1.25; }
.topic-hint { font-size: .85rem; color: var(--muted); line-height: 1.3; }
.topic-option:hover { border-color: var(--blush-strong); }
.btn-check:checked + .topic-option {
  border-color: var(--brand);
  background: var(--petal);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.btn-check:focus-visible + .topic-option { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 359.98px) {
  .topic-grid { grid-template-columns: 1fr; }
}

.contact-list a { overflow-wrap: anywhere; }

/* Spam trap: off-screen for people and screen readers, still there for scripts. */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Product page ---------- */

.option-panel {
  border: 1px solid var(--line);
  border-radius: var(--bs-border-radius-lg);
  background: #fff;
  padding: 1.25rem;
}
.option-panel + .option-panel { margin-top: 1rem; }

.embroidery-toggle {
  background: var(--petal);
  border: 1px dashed var(--brand);
  border-radius: var(--bs-border-radius-lg);
  padding: .9rem 1.1rem;
}

.price-summary {
  background: var(--petal);
  border-radius: var(--bs-border-radius-lg);
  padding: 1rem 1.25rem;
}
.price-summary .total { font-family: "Lora", Georgia, serif; font-size: 1.6rem; font-weight: 700; color: var(--brand-deep); }

.design-choice { border: 1px solid var(--line); border-radius: var(--bs-border-radius); padding: .75rem 1rem; background: #fff; }

.design-modes { display: flex; flex-wrap: wrap; gap: .4rem; }
.design-modes .btn { border-radius: 999px; }

.thread-swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .25);
  vertical-align: -.15em;
}

/* Approximates thread on fabric; light threads switch to a dark "fabric" so they stay visible. */
/* Thread colors: Richword's chart, a group of swatches per series (two columns when there's room, like the chart). */
.thread-picker { container-type: inline-size; min-width: 0; }
.thread-groups { display: grid; gap: .55rem 1.25rem; }
@container (min-width: 26rem) {
  .thread-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.thread-group-name { font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin-bottom: .2rem; }
.thread-swatches { display: flex; flex-wrap: wrap; gap: .35rem; }
.thread-chip {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: .4rem;
  background: var(--thread);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
  cursor: pointer;
  transition: transform .1s ease;
}
.thread-chip:hover { transform: scale(1.12); }
.btn-check:checked + .thread-chip { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.btn-check:focus-visible + .thread-chip { outline: 2px solid var(--brand-deep); outline-offset: 4px; }
.btn-check:disabled + .thread-chip { cursor: default; }

.lettering-preview {
  min-height: 5.5rem;
  padding: 1rem;
  border-radius: var(--bs-border-radius);
  background: repeating-linear-gradient(45deg, #ece6e1 0 2px, #e6dfd9 2px 4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  word-break: break-word;
}
.lettering-preview.dark-fabric { background: repeating-linear-gradient(45deg, #3a3236 0 2px, #342c30 2px 4px); }
.lettering-preview .line { font-size: 1.9rem; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.stitch-preview img { display: block; max-width: 100%; max-height: 220px; height: auto; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18)); }
.text-preview-thumb { max-width: 220px; max-height: 70px; padding: .25rem .5rem; border-radius: .4rem;
  background: repeating-linear-gradient(45deg, #ece6e1 0 2px, #e6dfd9 2px 4px); }

/* Several embroideries on one item: each placement with its own design. */
.embroidery-entry + .embroidery-entry { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px dashed var(--line); }

/* ---------- Cart & orders ---------- */

.cart-line { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-thumb {
  width: 84px;
  height: 84px;
  border-radius: var(--bs-border-radius);
  background: var(--petal);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb.placeholder-media img { width: 60%; height: auto; opacity: .55; }
.cart-thumb .bi { font-size: 2rem; color: var(--brand); }
.qty-input { width: 5rem; }

.summary-card { position: sticky; top: 6rem; }

/* "or pay with" between card checkout and PayPal's buttons */
.or-divider { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
.summary-row.total { font-size: 1.2rem; font-weight: 700; color: var(--brand-deep); border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .75rem; }

.file-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  max-width: 100%;
  padding: .15rem .6rem;
  border-radius: 999px;
  background: var(--petal);
  font-size: .85rem;
}
.file-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status-badge { font-weight: 700; letter-spacing: .02em; }
.status-PendingPayment { background: #f1ece4; color: #6b5b3e; }
.status-Paid { background: #e3eefc; color: #1f4f8a; }
.status-InProduction { background: #fdf0d9; color: #7a4d06; }
.status-ReadyForPickup { background: #e2f3ea; color: #1d6440; }
.status-Shipped { background: #e7e4f8; color: #45308f; }
.status-Completed { background: #dff2e5; color: #1d5c34; }
.status-Cancelled { background: #eee; color: #555; }

/* ---------- Footer ---------- */

.site-footer {
  flex-shrink: 0;
  margin-top: 3rem;
  padding: 2.5rem 0 1.5rem;
  background: #fff;
  border-top: 1px solid var(--line);
}
.footer-brand { font-family: "Lora", Georgia, serif; font-weight: 600; color: var(--brand-deep); font-size: 1.1rem; }
.footer-heading { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); font-family: inherit; font-weight: 700; }
.footer-links li { padding: .15rem 0; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { color: var(--brand); text-decoration: underline; }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--petal);
  color: var(--brand-deep);
  font-size: 1.05rem;
  text-decoration: none;
}
.social-links a:hover, .social-links a:focus-visible { background: var(--brand); color: #fff; }

.faq .accordion-button { font-weight: 600; color: var(--ink); background: #fff; }
.faq .accordion-button:not(.collapsed) { color: var(--brand-deep); background: var(--petal); box-shadow: none; }
.faq .accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .25); }
.faq .accordion-item { border-color: var(--line); }

.footer-bottom { margin-top: 2rem; padding-top: 1rem; border-top: 1px dashed var(--line); color: var(--muted); font-size: .88rem; }

/* ---------- Admin ---------- */

.admin-nav .nav-link {
  color: var(--ink);
  border-radius: var(--bs-border-radius);
  font-weight: 600;
  padding: .5rem .8rem;
}
.admin-nav .nav-link:hover { background: var(--petal); color: var(--brand-deep); }
.admin-nav .nav-link.active { background: var(--brand); color: #fff; }
.admin-nav .nav-link .bi { width: 1.4rem; display: inline-block; }

.stat-card .stat-value { font-family: "Lora", Georgia, serif; font-size: 2rem; font-weight: 700; color: var(--brand-deep); line-height: 1.1; }
.stat-card .stat-label { color: var(--muted); font-weight: 600; font-size: .9rem; }

.table { --bs-table-bg: transparent; }
.table > thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--bs-border-radius-lg); overflow: hidden; }
.table-card .table { margin-bottom: 0; }
.table-card .table > :not(caption) > * > * { padding: .7rem 1rem; }

.variant-row, .option-row { background: #fff; }
.thumb-sm { width: 48px; height: 48px; object-fit: cover; border-radius: .4rem; background: var(--petal); }
