/* Cart, checkout and order pages of the storefront (templates/shop_public/*.html). Self-contained: no Tailwind,
   no icon font. Colours come from the site's style variables (render_css_variables). */
*,*::before,*::after{box-sizing:border-box}
body{margin:0;min-height:100vh;background:var(--brand-background,#fff);color:var(--brand-text,#111827);
  font-family:var(--font-font-family,system-ui),system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;line-height:1.5}
a{color:inherit}
img{max-width:100%;display:block}
.sp-header{position:sticky;top:0;z-index:50;background:var(--brand-background,#fff);border-bottom:1px solid var(--brand-border,#e5e7eb)}
.sp-wrap{max-width:72rem;margin:0 auto;padding:0 1rem}
.sp-narrow{max-width:56rem;margin:0 auto;padding:2rem 1rem}
.sp-header .sp-wrap{display:flex;align-items:center;justify-content:space-between;height:4rem}
.sp-brand{font-size:1.25rem;font-weight:700;text-decoration:none;font-family:var(--font-heading-font,inherit)}
.sp-nav{display:flex;align-items:center;gap:1.5rem}
.sp-nav a{text-decoration:none;font-weight:500;font-size:.9rem}
.sp-cart-link{position:relative;display:inline-flex}
.sp-icon{width:1.4rem;height:1.4rem}
.sp-badge{position:absolute;top:-.5rem;right:-.6rem;min-width:1.2rem;height:1.2rem;border-radius:999px;font-size:.7rem;
  display:flex;align-items:center;justify-content:center;background:var(--brand-primary,#111);color:var(--brand-secondary,#fff)}
h1.sp-title{font-size:1.9rem;font-weight:700;margin:0 0 1.5rem;font-family:var(--font-heading-font,inherit)}
.sp-card{background:var(--brand-background,#fff);border:1px solid var(--brand-border,#e5e7eb);border-radius:.75rem;overflow:hidden}
.sp-pad{padding:1.25rem 1.5rem}
.sp-alt{background:var(--brand-background-alt,#f9fafb)}
.sp-muted{color:var(--brand-text-muted,#6b7280)}
.sp-row{display:flex;align-items:center;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--brand-border,#e5e7eb)}
.sp-row:last-child{border-bottom:0}
.sp-thumb{width:4.5rem;height:4.5rem;flex-shrink:0;border-radius:.5rem;overflow:hidden;background:var(--brand-background-alt,#f3f4f6)}
.sp-thumb img{width:100%;height:100%;object-fit:cover}
.sp-grow{flex:1;min-width:0}
.sp-name{font-weight:600;text-decoration:none}
.sp-qty{display:inline-flex;align-items:center;border:1px solid var(--brand-border,#e5e7eb);border-radius:.4rem}
.sp-qty button{width:2rem;height:2rem;border:0;background:none;cursor:pointer;font-size:1rem;color:inherit}
.sp-qty span{min-width:2rem;text-align:center}
.sp-remove{border:0;background:none;cursor:pointer;color:var(--brand-error,#dc2626);font-size:.85rem}
.sp-line{display:flex;justify-content:space-between;padding:.3rem 0}
.sp-total{font-size:1.2rem;font-weight:700;border-top:1px solid var(--brand-border,#e5e7eb);margin-top:.5rem;padding-top:.75rem}
.sp-actions{display:flex;gap:1rem;flex-wrap:wrap;margin-top:1.25rem}
.sp-btn{display:inline-block;flex:1;text-align:center;padding:.85rem 1.5rem;border-radius:var(--btn-border-radius,.5rem);
  font-weight:var(--btn-font-weight,600);text-decoration:none;cursor:pointer;border:1px solid transparent;font-size:1rem}
.sp-btn-primary{background:var(--brand-primary,#111);color:var(--brand-secondary,#fff)}
.sp-btn-primary:hover{background:var(--brand-primary-hover,#333)}
.sp-btn-secondary{background:transparent;border-color:var(--brand-border,#d1d5db);color:inherit}
.sp-grid{display:grid;grid-template-columns:1fr;gap:1.5rem}
@media(min-width:900px){.sp-grid{grid-template-columns:2fr 1fr}.sp-sticky{position:sticky;top:5rem}}
.sp-form h2,.sp-card h2{font-size:1.05rem;font-weight:600;margin:0 0 1rem}
.sp-field{margin-bottom:1rem}
.sp-field label{display:block;font-size:.85rem;font-weight:500;margin-bottom:.3rem}
.sp-field input,.sp-field textarea,.sp-field select{width:100%;padding:.7rem .9rem;border:1px solid var(--brand-border,#d1d5db);border-radius:.5rem;
  font:inherit;background:var(--brand-background,#fff);color:inherit}
.sp-field select{appearance:auto;min-height:2.85rem}
.sp-two{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.sp-errors{background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;border-radius:.5rem;padding:1rem 1.25rem;margin-bottom:1.5rem}
.sp-errors ul{margin:0;padding-left:1.1rem}
.sp-note{background:#fffbeb;border:1px solid #fde68a;color:#92400e;border-radius:.75rem;padding:1.25rem 1.5rem;white-space:pre-line}
.sp-center{text-align:center}
.sp-check{width:4.5rem;height:4.5rem;border-radius:999px;background:#dcfce7;color:#16a34a;display:flex;align-items:center;
  justify-content:center;margin:0 auto 1.25rem;font-size:2rem}
.sp-footer{margin-top:4rem;background:var(--brand-background-alt,#f9fafb);color:var(--brand-text-muted,#6b7280);
  padding:2.5rem 1rem;text-align:center;font-size:.9rem}
.sp-warn{color:#b45309;font-size:.85rem;margin-top:.25rem}
