:root {
  --ink: #241f21;
  --muted: #6e6267;
  --paper: #fffaf7;
  --surface: #ffffff;
  --line: #eaded8;
  --berry: #bd3f5d;
  --berry-dark: #84263c;
  --mint: #d5f2df;
  --gold: #d9a72e;
  --gold-light: #ffe28a;
  --gold-deep: #b67b16;
  --blue: #b8dcff;
  --shadow: 0 14px 40px rgba(92, 55, 42, .12);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 224, 233, .12), rgba(255, 250, 247, .24)),
    url("/assets/pink-bows-bracelets-bg.png") top center / min(1780px, 180vw) auto fixed no-repeat,
    #ffdbe5;
  line-height: 1.5;
}
main { flex: 1; }
a { color: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px clamp(18px, 5vw, 64px);
  background: rgba(255, 245, 249, .7);
  border-bottom: 0;
  backdrop-filter: none;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  text-decoration: none;
  font-size: 1.1rem;
}
.brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(190, 63, 93, .2);
}
nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: .95rem; }
nav a { text-decoration: none; color: var(--muted); }
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: auto;
  padding: 30px clamp(18px, 5vw, 64px);
  background: rgba(255, 226, 138, .88);
  color: #3a2430;
  border-top: 2px solid rgba(182, 123, 22, .28);
}
.site-footer p {
  margin: 6px 0 0;
  color: #694455;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-brand img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(190, 63, 93, .18);
}
.site-footer nav a {
  color: #3a2430;
  font-weight: 800;
}
.hero {
  min-height: 520px;
  display: grid;
  align-items: center;
  padding: 54px clamp(18px, 6vw, 80px);
  background: transparent;
}
.page-banner {
  padding: 46px clamp(18px, 5vw, 64px) 18px;
}
.page-banner > div {
  max-width: 880px;
  margin: 0 auto;
  padding: 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(255, 255, 255, .58);
  backdrop-filter: blur(18px) saturate(1.18);
  box-shadow: var(--shadow);
}
.page-banner h1 {
  margin-bottom: 0;
}
.cart-section {
  padding-top: 18px;
}
.cart-panel {
  margin-top: 0;
  overflow-x: auto;
}
.cart-panel .actions {
  width: 100%;
  padding: 0 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cart-panel .actions .button {
  width: 100%;
}
.cart-panel .actions .secondary-button {
  width: 100%;
}
.empty-cart {
  text-align: center;
  justify-items: center;
}
.empty-cart img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 26px rgba(190, 63, 93, .18);
}
.empty-cart p {
  max-width: 420px;
  margin: 0 auto;
  color: var(--muted);
}
.cart-panel .line-item {
  grid-template-columns: 88px minmax(0, 1fr) minmax(72px, auto) minmax(96px, auto) auto;
  align-items: center;
  column-gap: 18px;
  margin-bottom: 12px;
  padding: 0 12px 0 0;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 8px;
  background: rgba(255, 255, 255, .48);
  overflow: hidden;
}
.cart-panel .line-item p {
  margin: 4px 0 0;
}
.cart-item-image {
  align-self: stretch;
  width: 88px;
  height: auto;
  min-height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 0;
  background: linear-gradient(135deg, #fff, #ffe9f0 48%, #fff1bf);
  color: var(--berry-dark);
  font-size: .72rem;
  font-weight: 900;
  text-align: center;
}
.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-panel .cart-item-info {
  grid-column: auto;
}
.cart-panel .remove-button {
  min-width: 96px;
  padding-inline: 12px;
  white-space: nowrap;
}
.cart-panel .line-item > strong {
  justify-self: end;
  white-space: nowrap;
}
.hero > div {
  max-width: 720px;
  padding: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .58);
  border: 1px solid rgba(255, 255, 255, .62);
  backdrop-filter: blur(18px) saturate(1.16);
  box-shadow: var(--shadow);
}
.hero h1 {
  background: linear-gradient(90deg, #5b2a86, #e93f8f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 10px 26px rgba(155, 93, 229, .12);
}
.eyebrow {
  color: var(--berry-dark);
  font-weight: 800;
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: 0;
}
h1 { font-size: clamp(2.2rem, 7vw, 5.8rem); line-height: .95; margin: 0 0 18px; }
h2 { font-size: 1.65rem; margin: 0 0 12px; }
h3 { margin: 14px 0 4px; }
.button, .secondary-button, .small-button, .danger-button, .remove-button {
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}
.button, .small-button, .remove-button {
  position: relative;
  overflow: hidden;
  background: var(--gold-light);
  color: #3a2430;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 18px rgba(182, 123, 22, .22);
}
.button::after, .small-button::after, .remove-button::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -70%;
  width: 55%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .68), transparent);
  transition: left .55s ease;
  pointer-events: none;
}
.button:hover::after, .small-button:hover::after, .remove-button:hover::after {
  left: 118%;
}
.button, .small-button, .remove-button {
  transition: transform .18s ease, box-shadow .18s ease;
}
.button:hover, .small-button:hover, .remove-button:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 12px 24px rgba(182, 123, 22, .28);
}
.secondary-button { background: var(--mint); color: var(--ink); }
.danger-button { background: #9f1d31; color: white; }
.small-button { min-height: 36px; padding: 8px 12px; }
button:disabled { opacity: .55; cursor: not-allowed; }
.section, .admin-shell { padding: 42px clamp(18px, 5vw, 64px); }
.narrow { max-width: 880px; margin: 0 auto; }
.center { text-align: center; }
.section-heading, .admin-top, .actions, .product-row, .total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.product-grid, .admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
  gap: 14px;
}
.view-more {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 28px auto 0;
  grid-column: 1 / -1;
}
.view-more .button {
  width: auto;
  min-width: 220px;
  text-align: center;
}
.product-card, .admin-card, .panel, .notice {
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .56);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.18);
  padding: 18px;
}
.product-card {
  padding: 12px;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 79, 163, .34);
  box-shadow: 0 22px 48px rgba(92, 55, 42, .16);
}
.product-card .product-image {
  aspect-ratio: 1;
  width: calc(100% - 12px);
  max-width: none;
  margin: 0 6px;
}
.product-card h3 {
  font-size: .98rem;
  line-height: 1.2;
}
.product-card p {
  font-size: .86rem;
  margin: 4px 0 10px;
}
.product-card .product-row {
  margin-top: auto;
}
.product-card strong {
  font-size: .95rem;
}
.product-image, .detail-image {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff, #ffe9f0 48%, #fff1bf);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  font-weight: 900;
  color: var(--berry-dark);
}
.product-image img, .detail-image img, .thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-detail {
  padding: 42px clamp(18px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(260px, 520px) minmax(260px, 1fr);
  gap: 36px;
  align-items: center;
}
.price { font-size: 1.4rem; font-weight: 850; }
.pill {
  background: var(--gold);
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: .8rem;
  font-weight: 850;
}
.flash, .notice {
  margin: 16px clamp(18px, 5vw, 64px);
  background: var(--mint);
  border: 1px solid #9bd7ae;
  border-radius: 8px;
  padding: 12px 16px;
}
form.stack, .panel { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 750; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  background: white;
}
.form-grid { display: grid; grid-template-columns: 1.4fr .6fr 1fr; gap: 12px; }
.line-item, .table-row {
  display: grid;
  grid-template-columns: 1fr 84px auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.table-row {
  grid-template-columns: 1fr 1.4fr .8fr auto;
  text-decoration: none;
}
pre {
  white-space: pre-wrap;
  background: #fff6ec;
  padding: 12px;
  border-radius: 8px;
}
.admin-section { margin-top: 34px; }
.checks { display: grid; gap: 8px; }
.checks label { display: flex; align-items: center; gap: 10px; }
.checks input { width: auto; }
.danger { border-color: #efb1bc; background: #fff4f5; }

@media (max-width: 720px) {
  .site-header, .section-heading, .admin-top, .actions, .product-row, .total-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .cart-panel .total-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }
  .cart-panel .total-row strong {
    margin-left: auto;
    white-space: nowrap;
  }
  .cart-panel .actions {
    grid-template-columns: 1fr;
  }
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .footer-brand {
    align-items: flex-start;
  }
  .product-detail, .form-grid { grid-template-columns: 1fr; }
  .line-item, .table-row { grid-template-columns: 1fr; }
  .cart-panel .line-item {
    grid-template-columns: 76px minmax(0, 1fr) minmax(96px, auto);
    column-gap: 22px;
    row-gap: 12px;
    padding: 0 10px 0 0;
  }
  .cart-panel .cart-item-image {
    grid-row: 1 / 3;
  }
  .cart-panel .cart-item-info {
    grid-column: 2 / -1;
  }
  .cart-panel .line-item > .cart-qty {
    grid-column: 2;
  }
  .cart-panel .line-item > strong {
    grid-column: 3;
    display: none;
  }
  h1 { font-size: 2.45rem; }
  .hero {
    min-height: auto;
    padding-top: 24px;
    padding-bottom: 34px;
  }
  .hero > div {
    padding: 20px;
  }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-card .product-image { width: calc(100% - 10px); margin: 0 5px; }
}

@media (min-width: 1180px) {
  .home-product-grid {
    grid-template-columns: repeat(6, minmax(150px, 190px));
    justify-content: center;
  }
  .home-product-grid .view-more {
    grid-column: 1 / -1;
  }
}
