/* ============================================================
   The Cookie Distillery — site styles
   Warm cream + espresso-brown distillery theme.
   ============================================================ */

:root {
  --cream: #fbf0da;
  --cream-panel: #f4e6c8;
  --cream-deep: #efdcb6;
  --espresso: #3b2616;
  --brown: #5a3d28;
  --brown-soft: #6b513a;
  --tan-btn: #9c7e57;
  --tan-btn-hover: #856743;
  --terracotta: #e0795b;
  --terracotta-hover: #cf6646;
  --accent-link: #8a6d3b;
  --border: #e3d4b3;
  --white: #ffffff;
  --max: 1120px;
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Libre Baskerville', Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--espresso);
  background: var(--cream);
  line-height: 1.6;
  font-size: 17px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-link);
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  color: var(--espresso);
  font-weight: 700;
  line-height: 1.2;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border: none;
  border-radius: 2px;
  padding: 13px 26px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn-tan {
  background: var(--tan-btn);
  color: #fff;
}
.btn-tan:hover {
  background: var(--tan-btn-hover);
}

.btn-cta {
  background: var(--terracotta);
  color: #fff;
}
.btn-cta:hover {
  background: var(--terracotta-hover);
}

.btn-outline {
  background: transparent;
  color: var(--brown);
  border: 1px solid var(--brown);
}
.btn-outline:hover {
  background: var(--brown);
  color: #fff;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

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

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid #f0e7d4;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  max-width: 1240px;
  margin: 0 auto;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 0 0 auto;
}
.brand img {
  height: 56px;
  width: auto;
}

.social-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.social-row a {
  color: var(--espresso);
  display: inline-flex;
}
.social-row svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.social-row a:hover {
  color: var(--tan-btn);
}

.main-nav {
  margin-left: auto;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 38px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-family: var(--font-head);
  text-decoration: none;
  color: var(--espresso);
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover {
  color: var(--tan-btn);
}
.main-nav a.active {
  border-bottom-color: var(--espresso);
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--espresso);
  text-decoration: none;
  margin-left: 26px;
}
.cart-link svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--terracotta);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--espresso);
  margin: 5px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--white);
  margin-top: auto;
  padding: 40px 20px 30px;
  text-align: center;
  border-top: 1px solid #f0e7d4;
}
.footer-social {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-bottom: 22px;
}
.footer-social a {
  color: var(--espresso);
}
.footer-social svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}
.footer-social a:hover {
  color: var(--tan-btn);
}
.footer-text {
  font-size: 0.85rem;
  color: var(--brown-soft);
  max-width: 640px;
  margin: 0 auto;
}
.footer-text p {
  margin: 6px 0;
}

/* ---------- Home ---------- */
.hero {
  background: url('../assets/bg-texture.jpg') center/cover no-repeat;
  padding: 46px 20px 56px;
}
.hero-label {
  max-width: 1020px;
  margin: 0 auto;
  background: var(--cream-panel);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}
.hero-label img {
  width: 100%;
  height: auto;
}

.intro {
  background: var(--cream-panel);
  padding: 40px 20px 10px;
  text-align: center;
}
.intro h2 {
  letter-spacing: 0.04em;
  font-size: 1.5rem;
  margin: 0 0 18px;
}
.intro p {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.08rem;
}
.home-photos {
  background: var(--cream-panel);
  padding: 26px 20px 50px;
}
.home-photos img {
  max-width: 1020px;
  margin: 0 auto;
  width: 100%;
}

/* ---------- About / Ingredients composite pages ---------- */
.composite {
  padding: 0;
  background: var(--cream-panel);
}
.composite img {
  width: 100%;
  max-width: 1359px;
  margin: 0 auto;
  height: auto;
}
.composite-text {
  max-width: 820px;
  margin: 0 auto;
  padding: 30px 20px 50px;
}
.composite-text h1 {
  text-align: center;
}

/* ---------- Order gallery ---------- */
.page-head {
  padding: 30px 20px 0;
  text-align: center;
}
.special-note {
  text-align: center;
  font-size: 0.92rem;
  color: var(--brown-soft);
  padding: 18px 20px 6px;
  max-width: 760px;
  margin: 0 auto;
}
.special-note p {
  margin: 2px 0;
}

.gallery-toolbar {
  max-width: var(--max);
  margin: 16px auto 0;
  padding: 0 20px;
  display: flex;
  justify-content: flex-end;
}
.sort-select {
  font-family: var(--font-body);
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 2px;
  color: var(--espresso);
}

.product-grid {
  max-width: var(--max);
  margin: 20px auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.product-card {
  background: #fff;
  border: 1px solid #efe4cd;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.product-card .thumb {
  aspect-ratio: 1 / 1;
  background: var(--cream-deep);
  overflow: hidden;
}
.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card .body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.product-card .title {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--espresso);
  text-decoration: none;
  line-height: 1.35;
}
.product-card .title:hover {
  color: var(--tan-btn);
}
.product-card hr {
  border: none;
  border-top: 1px solid var(--border);
  width: 28px;
  margin: 2px 0;
}
.product-card .price {
  font-size: 1rem;
}
.product-card .spacer {
  flex: 1;
}

/* quantity stepper */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 2px;
  width: 100%;
  justify-content: space-between;
  background: #fff;
}
.qty button {
  border: none;
  background: none;
  font-size: 1.3rem;
  width: 42px;
  height: 42px;
  cursor: pointer;
  color: var(--brown);
  line-height: 1;
}
.qty button[disabled] {
  color: #c9bda3;
  cursor: not-allowed;
}
.qty input {
  width: 50px;
  text-align: center;
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  background: transparent;
  color: var(--espresso);
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.field-select {
  width: 100%;
  font-family: var(--font-body);
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
  color: var(--espresso);
}

/* ---------- Product detail ---------- */
.breadcrumb {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 20px 0;
  font-size: 0.85rem;
  color: var(--brown-soft);
}
.breadcrumb a {
  color: var(--brown-soft);
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}

.product-detail {
  max-width: var(--max);
  margin: 18px auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.gallery .main-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--cream-deep);
  border: 1px solid #efe4cd;
}
.gallery .thumbs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.gallery .thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 1px solid var(--border);
  cursor: pointer;
}
.gallery .thumbs img.active {
  border-color: var(--terracotta);
}

.detail-info h1 {
  font-size: 1.7rem;
  margin: 0 0 12px;
}
.detail-info .price {
  font-size: 1.15rem;
  margin-bottom: 22px;
}
.field-group {
  margin-bottom: 18px;
}
.field-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--brown);
}
.field-group .req {
  color: var(--terracotta);
}
.field-group textarea {
  width: 100%;
  min-height: 84px;
  font-family: var(--font-body);
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  resize: vertical;
}
.field-group .counter {
  text-align: right;
  font-size: 0.72rem;
  color: #b8893c;
}
.detail-info .qty-row {
  margin: 18px 0;
  max-width: 150px;
}
.detail-desc {
  margin-top: 30px;
  white-space: pre-line;
  color: var(--brown);
  font-size: 0.98rem;
}
.field-error {
  color: var(--terracotta);
  font-size: 0.85rem;
  margin: 6px 0;
  min-height: 1em;
}

/* ---------- Cart ---------- */
.cart-wrap {
  max-width: 900px;
  margin: 30px auto 70px;
  padding: 0 20px;
}
.cart-wrap h1 {
  text-align: center;
  margin-bottom: 24px;
}
.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.cart-item img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border: 1px solid var(--border);
}
.cart-item .ci-name {
  font-size: 1rem;
}
.cart-item .ci-detail {
  font-size: 0.8rem;
  color: var(--brown-soft);
  white-space: pre-line;
  margin-top: 4px;
}
.cart-item .ci-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.cart-item .qty {
  width: 120px;
}
.ci-remove {
  background: none;
  border: none;
  color: var(--brown-soft);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
}
.cart-summary {
  margin-top: 26px;
  text-align: right;
}
.cart-summary .total {
  font-size: 1.25rem;
  font-family: var(--font-head);
  margin-bottom: 6px;
}
.cart-summary .note {
  font-size: 0.8rem;
  color: var(--brown-soft);
  margin-bottom: 18px;
}
.cart-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.cart-empty {
  text-align: center;
  padding: 50px 0;
  color: var(--brown-soft);
}
.checkout-error {
  color: var(--terracotta);
  text-align: right;
  margin-top: 12px;
  min-height: 1em;
}
/* Shown when a saved cart contained a product the store no longer sells. */
.cart-notice {
  background: var(--cream-panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--terracotta);
  color: var(--brown);
  padding: 12px 16px;
  margin-bottom: 22px;
  font-size: 0.9rem;
  border-radius: 3px;
}

/* ---------- Simple message pages ---------- */
.message-page {
  max-width: 640px;
  margin: 70px auto;
  padding: 0 20px;
  text-align: center;
}
.message-page h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}
.message-page p {
  color: var(--brown);
  margin-bottom: 14px;
}
.mock-badge {
  display: inline-block;
  background: #fff3cd;
  border: 1px solid #e0c97a;
  color: #7a5b13;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 3px;
  margin-bottom: 20px;
}

/* ---------- Checkout ---------- */
.checkout-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 20px 70px;
}
.checkout-page h1 {
  text-align: center;
  margin-bottom: 30px;
}
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.co-step {
  margin-bottom: 32px;
}
.co-step h2 {
  font-size: 1.15rem;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.co-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  flex: 1 1 0;
  min-width: 0;
}
.co-field label {
  font-size: 0.85rem;
  color: var(--brown-soft);
}
.co-field label span {
  color: var(--terracotta);
}
.co-field input,
.co-field select {
  font-family: inherit;
  font-size: 1rem;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--white);
  color: var(--espresso);
  width: 100%;
}
.co-field input:focus-visible,
.co-field select:focus-visible {
  outline: 2px solid var(--tan-btn);
  outline-offset: 1px;
}
.co-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.co-field-sm {
  flex: 0 1 110px;
}
.co-hint {
  font-size: 0.82rem;
  color: var(--brown-soft);
  margin: 8px 0 0;
}
.co-secure {
  text-align: center;
  margin-top: 12px;
}

/* Delivery method radios */
.co-methods {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.co-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--white);
  cursor: pointer;
}
.co-method:has(input:checked) {
  border-color: var(--tan-btn);
  box-shadow: inset 0 0 0 1px var(--tan-btn);
}
.co-method input {
  flex: none;
  width: 18px;
  height: 18px;
  accent-color: var(--tan-btn);
}
.co-method-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.co-method-label {
  font-weight: 700;
}
.co-method-detail {
  font-size: 0.82rem;
  color: var(--brown-soft);
}
.co-method-price {
  font-family: var(--font-head);
  white-space: nowrap;
}

/* Order summary panel */
.checkout-summary {
  background: var(--cream-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 22px;
  position: sticky;
  top: 20px;
}
.checkout-summary h2 {
  font-size: 1.1rem;
  margin: 0 0 16px;
}
.cs-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.9rem;
  margin-bottom: 9px;
}
.cs-qty {
  color: var(--brown-soft);
}
.cs-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}
.cs-total {
  font-family: var(--font-head);
  font-size: 1.15rem;
}

/* ---------- Admin: orders ---------- */
.admin-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px 20px 70px;
}
.admin-gate {
  max-width: 420px;
  margin: 40px auto;
  text-align: center;
}
.admin-gate #google-button {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
.admin-error {
  color: var(--terracotta);
  font-size: 0.9rem;
  margin: 10px 0;
  min-height: 1em;
}
.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.admin-bar h1 {
  margin: 0;
}
.admin-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-who {
  font-size: 0.85rem;
  color: var(--brown-soft);
}
.btn-sm {
  padding: 7px 14px;
  font-size: 0.85rem;
}
.admin-controls {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.admin-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 7px 15px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--brown);
  border-radius: 999px;
  cursor: pointer;
}
.chip.is-active {
  background: var(--tan-btn);
  border-color: var(--tan-btn);
  color: var(--white);
}
.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-actions input[type='search'] {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  min-width: 220px;
}
.admin-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.stat {
  background: var(--cream-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 130px;
}
.stat-num {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--brown-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-empty {
  color: var(--brown-soft);
  text-align: center;
  padding: 40px 0;
}

/* Order rows */
.order-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-bottom: 10px;
}
.order-card > summary {
  display: grid;
  grid-template-columns: 100px 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.order-card > summary::-webkit-details-marker {
  display: none;
}
.order-card > summary:focus-visible {
  outline: 2px solid var(--tan-btn);
  outline-offset: -2px;
}
.oc-ref {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 700;
}
.oc-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oc-when {
  font-size: 0.82rem;
  color: var(--brown-soft);
  white-space: nowrap;
}
.oc-total {
  font-family: var(--font-head);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-paid {
  background: #e2eddc;
  color: #3f5c33;
}
.badge-pending {
  background: #f6e5c8;
  color: #8a6320;
}
.badge-failed {
  background: #f4ddd5;
  color: #9c4326;
}
.order-body {
  border-top: 1px solid var(--border);
  padding: 18px 16px;
}
.order-body h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brown-soft);
  margin: 0 0 8px;
}
.od-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin-bottom: 20px;
}
.od-line {
  font-size: 0.92rem;
  line-height: 1.5;
}
.order-items {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.order-items li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dotted var(--border);
  font-size: 0.92rem;
}
.oi-note {
  color: var(--brown-soft);
  font-size: 0.82rem;
}
.oi-price {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.od-totals {
  max-width: 280px;
  margin-left: auto;
  font-size: 0.9rem;
}
.od-totals div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 3px 0;
}
.od-grand {
  font-family: var(--font-head);
  font-size: 1.05rem;
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 8px !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-detail {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
  }
  .main-nav.open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    align-items: center;
  }
  .main-nav li {
    width: 100%;
    text-align: center;
  }
  .main-nav a {
    display: block;
    padding: 12px 0;
  }
  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }
  .cart-link {
    margin-left: 12px;
    order: 3;
  }
  /* Order rows stack on phones; the grid columns would crush at this width. */
  .order-card > summary {
    grid-template-columns: 1fr auto;
    row-gap: 6px;
  }
  .oc-when {
    grid-column: 1 / -1;
    order: 3;
  }
  .oc-total {
    order: 4;
    text-align: right;
  }
  .admin-actions input[type='search'] {
    min-width: 0;
    flex: 1 1 100%;
  }
  /* Summary above the form on phones, so the total is visible immediately. */
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .checkout-summary {
    position: static;
    order: -1;
  }
}

@media (max-width: 480px) {
  .co-row {
    gap: 10px;
  }
  /* City takes its own line so it isn't crushed to a few characters; State
     and ZIP then split the line below it. */
  .co-field-city {
    flex: 1 1 100%;
  }
  .co-field-sm {
    flex: 1 1 calc(50% - 5px);
  }
  .checkout-page {
    padding: 26px 16px 60px;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  body {
    font-size: 16px;
  }
}
