﻿/* Colbcast — modern theme */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Outfit:wght@500;600;700&display=swap');

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-muted: #eef1f6;
  --text: #1a2332;
  --text-muted: #5c6b7f;
  --text-soft: #8b9aaf;
  --border: #dde3ec;
  --border-strong: #c5ced9;
  --primary: #1e4d6b;
  --primary-hover: #163d56;
  --accent: #c75b2a;
  --accent-hover: #a84a22;
  --accent-soft: #fef3ed;
  --success: #0d7a5c;
  --danger: #b42318;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(26, 35, 50, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 35, 50, 0.08);
  --shadow-lg: 0 16px 40px rgba(26, 35, 50, 0.1);
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', var(--font-body);
  --header-h: 4rem;
  --transition: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--accent);
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* —— Header —— */
header,
header.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.site-header__wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: var(--header-h);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.site-header__wrap .main-nav {
  margin-left: auto;
}

header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

header h1 a {
  color: var(--primary);
  text-decoration: none;
}

header h1 a:hover {
  color: var(--accent);
  text-decoration: none;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

header nav a {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

header nav a:hover {
  color: var(--primary);
  background: var(--surface-muted);
  text-decoration: none;
}

#user-status a,
header nav #user-status a {
  color: var(--accent);
  font-weight: 600;
}

#user-status a:hover {
  color: var(--accent-hover);
  background: var(--accent-soft);
}

/* Simple nav (category / shop pages) */
header > nav:not(:has(ul)) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  min-height: var(--header-h);
}

header > nav:not(:has(ul)) a {
  padding: 0.45rem 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

header > nav:not(:has(ul)) a:hover {
  color: var(--primary);
  background: var(--surface-muted);
  text-decoration: none;
}

header > nav:not(:has(ul)) #user-status {
  margin-left: auto;
}

.header-simple {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-simple {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
}

.nav-simple a {
  padding: 0.45rem 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-simple a:hover {
  color: var(--primary);
  background: var(--surface-muted);
}

/* —— Main layout —— */
main.container,
.category-main {
  padding: 2.5rem 1.5rem 3.5rem;
}

main.container h1,
.category-main h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

main > h1:first-child {
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0;
  max-width: 1140px;
  font-size: 2rem;
}

main > .product-grid#product-grid {
  max-width: 1140px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
}

/* —— Hero —— */
.hero {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(145deg, var(--primary) 0%, #2a6f8f 55%, #3d8fad 100%);
  color: #fff;
}

.hero h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: #fff;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 auto 1.75rem;
  max-width: 32rem;
  font-size: 1.1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

.hero .btn {
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.hero .btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* —— Sections —— */
.featured {
  padding: 3.5rem 0;
}

.featured > .container > h2,
.newsletter h2 {
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.featured > .container > h2::after,
.newsletter h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  margin: 0.75rem auto 1.75rem;
  background: var(--accent);
  border-radius: 2px;
}

/* —— Product grid & cards —— */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.product-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 200px;
  object-fit: contain;
  margin: 0 auto 1rem;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.product-card h3,
.product-card h4 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.product-card p,
.product-card .price {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
}

.product-card .badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.55rem;
  margin-bottom: 0.75rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
}

.product-card > a:not(.btn),
.product-card a[href*='product.html'] {
  display: inline-block;
  margin: 0 0.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: background var(--transition), border-color var(--transition);
}

.product-card > a:not(.btn):hover,
.product-card a[href*='product.html']:hover {
  background: var(--surface-muted);
  border-color: var(--primary);
  color: var(--primary);
}

.product-card > button,
.product-card button[onclick*='addToCart'] {
  display: inline-block;
  margin: 0.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.product-card > button:hover,
.product-card button[onclick*='addToCart']:hover {
  background: var(--accent-hover);
}

.product-card .btn {
  margin-top: auto;
}

/* —— Buttons —— */
.btn {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-small {
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
}

/* —— Newsletter —— */
.newsletter {
  padding: 3.5rem 0;
  text-align: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.newsletter p {
  margin: 0 auto 1.5rem;
  max-width: 28rem;
  color: var(--text-muted);
}

.newsletter form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter input[type='email'] {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.newsletter input[type='email']:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 77, 107, 0.12);
}

/* —— Footer —— */
footer {
  padding: 2.5rem 0;
  margin-top: auto;
  background: var(--text);
  color: rgba(255, 255, 255, 0.85);
}

footer p {
  text-align: center;
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
}

footer nav ul,
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

footer nav a,
.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

footer nav a:hover,
.footer-links a:hover {
  color: #fff;
  text-decoration: none;
}

/* —— Page header —— */
.page-header {
  padding: 2.5rem 0;
  text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.page-header h2 {
  margin: 0 0 0.5rem;
}

.page-header p {
  margin: 0 auto;
  max-width: 36rem;
  color: var(--text-muted);
}

/* —— Shop —— */
.shop-page {
  padding: 2.5rem 0 3.5rem;
}

.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}

.filters {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.filters h3 {
  margin: 1.25rem 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.filters h3:first-child {
  margin-top: 0;
}

.filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.filter-list li {
  margin-bottom: 0.25rem;
}

.filter-list a {
  display: block;
  padding: 0.4rem 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  transition: color var(--transition), background var(--transition);
}

.filter-list a:hover {
  color: var(--primary);
  background: var(--surface-muted);
  text-decoration: none;
}

.filters label {
  display: block;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.filters select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
}

.shop-layout > section > h1 {
  margin-top: 0;
  font-size: 2rem;
}

.shop-intro {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.filter-list a.active,
.filter-list li.active a {
  color: var(--primary);
  font-weight: 600;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
}

.shop-layout > .product-grid,
.shop-layout section .product-grid {
  margin-top: 0;
}

/* —— Product detail —— */
main > .product-detail.container,
.product-detail.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  padding: 2.5rem 1.5rem 3rem;
  align-items: start;
  max-width: 1140px;
  margin: 0 auto;
}

.product-images #main-image,
#main-image {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.product-info h1,
.product-info h2 {
  margin-top: 0;
  font-size: 1.85rem;
}

#product-price,
.product-info .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 1rem;
}

.product-info .sku,
#product-sku {
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

#product-description,
.product-info .description {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
}

#add-to-cart,
#add-to-cart-form .btn {
  margin-top: 0.5rem;
}

#add-to-cart-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#add-to-cart-form label {
  font-weight: 600;
  color: var(--text-muted);
}

#add-to-cart-form input[type='number'] {
  width: 4.5rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
}

.product-info .note {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin: 1rem 0 0;
}

.related-products {
  padding: 0 1.5rem 3rem;
  max-width: 1140px;
  margin: 0 auto;
}

.related-products h3 {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 1.35rem;
}

/* —— Cart & checkout —— */
.cart-page {
  padding: 2.5rem 1.5rem 3.5rem;
  max-width: 720px;
}

.checkout-page {
  padding: 2.5rem 1.5rem 5rem;
  max-width: 1100px;
  padding-bottom: calc(3rem + env(safe-area-inset-bottom));
}

.cart-page h1,
.checkout-page h1 {
  margin: 0 0 1.5rem;
  font-size: 2rem;
}

.cart-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  padding: 0.35rem;
}

.cart-item-info {
  flex: 1;
  min-width: 140px;
}

.cart-item-name,
.cart-item span:first-child {
  font-weight: 600;
  color: var(--text);
}

.cart-item-price {
  font-weight: 700;
  color: var(--primary);
}

.cart-item button {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--danger);
  background: transparent;
  border: 1px solid rgba(180, 35, 24, 0.35);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.cart-item button:hover {
  background: rgba(180, 35, 24, 0.08);
}

.cart-total,
#cart-total,
#checkout-total {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.cart-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.checkout-item:last-child {
  border-bottom: none;
}

#checkout-items {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.checkout-form,
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-width: 440px;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.checkout-form label,
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.checkout-form input,
.checkout-form textarea,
.contact-form input,
.contact-form textarea {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.checkout-form input:focus,
.checkout-form textarea:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 77, 107, 0.12);
}

.checkout-form textarea,
.contact-form textarea {
  min-height: 100px;
  resize: vertical;
}

/* —— Info pages —— */
.info-page,
.page-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
}

.info-page h1,
.page-main h2 {
  margin-top: 0;
  font-size: 2rem;
}

.info-page h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.15rem;
  color: var(--primary);
}

.info-page p,
.info-page li {
  color: var(--text-muted);
}

.info-page a {
  color: var(--primary);
  font-weight: 500;
}

.info-page a:hover {
  color: var(--accent);
}

.info-page ul {
  padding-left: 1.35rem;
}

.contact-msg {
  margin-top: 1rem;
  color: var(--text-muted);
}

.contact-social {
  margin: 2rem 0 2.5rem;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.contact-social h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--text);
}

.contact-social-note {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.social-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 6.5rem;
  padding: 1rem 1.15rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg);
  text-align: center;
  cursor: default;
}

.social-link img {
  display: block;
  width: 2rem;
  height: 2rem;
}

.social-link__name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.social-link__soon {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.empty-msg {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}

/* —— Auth pages —— */
.auth-body {
  background: linear-gradient(160deg, var(--bg) 0%, #e8eef5 45%, var(--accent-soft) 100%);
  min-height: 100vh;
}

.auth-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-lg);
}

.auth-card--enter {
  animation: authCardIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authCardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  animation: authFadeUp 0.5s 0.1s ease both;
}

.auth-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.85rem;
  text-align: center;
  animation: authFadeUp 0.5s 0.15s ease both;
}

.auth-subtitle {
  margin: 0 0 1.75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  animation: authFadeUp 0.5s 0.2s ease both;
}

@keyframes authFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-form {
  animation: authFadeUp 0.55s 0.28s ease both;
}

.auth-label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-label span {
  transition: color 0.2s ease;
}

.auth-label:focus-within span {
  color: var(--primary);
}

.auth-label input {
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.auth-label input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 77, 107, 0.12);
  transform: translateY(-1px);
}

.password-block {
  margin-bottom: 0.5rem;
}

.password-strength {
  margin: 0.5rem 0 0.75rem;
}

.password-strength-bar {
  height: 8px;
  background: var(--surface-muted);
  border-radius: 999px;
  overflow: hidden;
}

.password-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.35s ease;
}

.password-strength-bar.strength-weak .password-strength-fill {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.password-strength-bar.strength-fair .password-strength-fill {
  background: linear-gradient(90deg, #e67e22, #d35400);
}

.password-strength-bar.strength-good .password-strength-fill {
  background: linear-gradient(90deg, #3498db, #2980b9);
}

.password-strength-bar.strength-strong .password-strength-fill {
  background: linear-gradient(90deg, #27ae60, #1e8449);
  box-shadow: 0 0 12px rgba(39, 174, 96, 0.45);
}

.password-strength-label {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.strength-strong + .password-strength-label,
.password-strength-bar.strength-strong ~ .password-strength-label {
  color: var(--success);
}

.password-rules {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.password-rules li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0;
  font-size: 0.875rem;
  color: var(--text-soft);
  transition: color 0.25s ease, transform 0.25s ease;
}

.password-rules li.rule-met {
  color: var(--success);
  transform: translateX(4px);
}

.rule-icon {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--border-strong);
  border-radius: 4px;
  position: relative;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.password-rules li.rule-met .rule-icon {
  border-color: var(--success);
  background: var(--success);
  transform: scale(1.08);
}

.password-rules li.rule-met .rule-icon::after {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.05rem;
  width: 0.35rem;
  height: 0.6rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  animation: tickPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes tickPop {
  from {
    opacity: 0;
    transform: rotate(45deg) scale(0);
  }
  to {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
}

.confirm-hint {
  margin: -0.5rem 0 1rem;
  font-size: 0.85rem;
  min-height: 1.25rem;
  transition: color 0.2s ease;
}

.confirm-hint.confirm-ok {
  color: var(--success);
  animation: authFadeUp 0.3s ease;
}

.confirm-hint.confirm-bad {
  color: var(--danger);
}

.username-hint {
  margin: -0.5rem 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.2rem;
  transition: color 0.25s ease;
}

.username-hint--ok {
  color: var(--success);
}

.username-hint--bad {
  color: var(--danger);
}

.username-hint--checking {
  color: var(--primary);
}

#register-username.username-ok {
  border-color: var(--success);
}

#register-username.username-bad {
  border-color: var(--danger);
}

#register-username.username-checking {
  border-color: var(--primary);
}

.cars-captcha {
  margin: 1.25rem 0 1.5rem;
  padding: 1.25rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--surface-muted) 0%, var(--accent-soft) 100%);
  animation: captchaPulse 4s ease-in-out infinite;
}

@keyframes captchaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(199, 91, 42, 0); }
  50% { box-shadow: 0 0 0 6px rgba(199, 91, 42, 0.08); }
}

.cars-captcha legend {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  padding: 0 0.25rem;
}

.captcha-emoji {
  margin: 0;
  text-align: center;
  font-size: 1.75rem;
  animation: flagWave 2s ease-in-out infinite;
}

@keyframes flagWave {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

.captcha-prompt {
  margin: 0.5rem 0 1rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  line-height: 1.45;
}

.captcha-label {
  margin-bottom: 0.75rem;
}

#captcha-answer.captcha-ok {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(13, 122, 92, 0.15);
}

#captcha-answer.captcha-bad {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

.btn-ghost:hover {
  background: var(--surface-muted);
  color: var(--primary);
  transform: none;
}

.btn-register,
.btn-login {
  width: 100%;
  margin-top: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-register:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-register.btn-ready:not(:disabled) {
  animation: btnReady 0.5s ease;
}

@keyframes btnReady {
  0% { transform: scale(1); }
  40% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.btn-register:not(:disabled):hover,
.btn-login:hover {
  box-shadow: 0 6px 20px rgba(199, 91, 42, 0.35);
}

.auth-footer-link {
  text-align: center;
  color: var(--text-muted);
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

.form-error {
  color: var(--danger);
  margin-top: 0.75rem;
  font-size: 0.9rem;
  text-align: center;
  animation: authFadeUp 0.35s ease;
}

#user-status,
#nav-register {
  display: list-item;
}

header nav #login-link,
header nav #register-link {
  font-weight: 600;
}

#nav-register a {
  color: var(--primary);
}

/* —— Responsive —— */
@media (max-width: 768px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  main > .product-detail.container,
  .product-detail.container {
    grid-template-columns: 1fr;
  }

  header nav ul {
    gap: 0.15rem;
  }

  header nav a {
    padding: 0.4rem 0.55rem;
    font-size: 0.875rem;
  }

  .hero {
    padding: 3rem 0;
  }

  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .category-chips {
    justify-content: flex-start;
  }
}

/* —— Motion & polish —— */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .page-enter,
  .auth-card--enter,
  .hero-badge {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 0.5rem;
}

.page-enter {
  animation: pageEnter 0.55s ease both;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-badge {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  animation: heroBadge 0.8s ease 0.2s both;
}

@keyframes heroBadge {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.btn-hero {
  animation: heroCta 0.6s ease 0.35s both;
}

@keyframes heroCta {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-strip {
  padding: 2rem 0 0.5rem;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition);
}

.chip:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.chip--accent {
  background: var(--accent-soft);
  border-color: rgba(199, 91, 42, 0.35);
  color: var(--accent-hover);
}

.trust-strip {
  padding: 2.5rem 0;
  background: linear-gradient(180deg, transparent, var(--surface-muted));
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}

.trust-item {
  text-align: center;
  padding: 1.25rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.trust-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.trust-item span {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.35rem;
}

.trust-item p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.25rem;
  padding: 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  vertical-align: middle;
}

.cart-badge--pop {
  animation: badgePop 0.35s ease;
}

@keyframes badgePop {
  50% {
    transform: scale(1.15);
  }
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: min(360px, calc(100vw - 2rem));
  padding: 0.85rem 1.1rem;
  font-weight: 500;
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.85rem;
  background: var(--success);
  border-radius: 50%;
}

.cart-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
}

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: box-shadow var(--transition);
}

.cart-item:hover {
  box-shadow: var(--shadow-sm);
}

.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cart-item-name {
  font-weight: 600;
}

.cart-item-price {
  color: var(--text-muted);
}

.btn-disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cart-checkout-wrap {
  margin-top: 0.5rem;
}

.cart-checkout-wrap .btn {
  width: 100%;
  max-width: 320px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.checkout-details .checkout-panel__title {
  border-bottom: 1px solid var(--border);
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.checkout-total-line {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1rem;
}

.checkout-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1rem;
}

.checkout-header {
  margin-bottom: 1.5rem;
}

.checkout-header h1 {
  margin: 0 0 0.35rem;
}

.checkout-guest-note {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
  line-height: 1.5;
}

.checkout-line {
  color: var(--text);
  font-weight: 600;
  margin: 0.35rem 0;
}

.checkout-discount {
  color: var(--success);
}

.checkout-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.checkout-panel__title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
}

.checkout-panel__body {
  padding: 1.25rem;
}

.checkout-items-list {
  margin-bottom: 1rem;
}

.checkout-totals {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.checkout-total-line {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0.75rem 0 0;
}

.checkout-page .reveal {
  opacity: 1;
  transform: none;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  max-width: none;
  background: transparent;
  border: none;
  box-shadow: none;
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkout-address-group {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkout-address-group > .checkout-field__label {
  margin-bottom: 0.25rem;
}

.checkout-address-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 560px) {
  .checkout-address-row {
    grid-template-columns: 1fr;
  }
}

.checkout-field__label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0;
}

.checkout-field__label h3 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.checkout-optional {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-soft);
}

.checkout-field__box {
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.15rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.checkout-field__box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 77, 107, 0.12);
}

.checkout-field__box input,
.checkout-field__box textarea {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  box-sizing: border-box;
}

.checkout-field__box input::placeholder,
.checkout-field__box textarea::placeholder {
  color: var(--text-soft);
}

.checkout-field__box textarea {
  min-height: 6rem;
  resize: vertical;
  line-height: 1.5;
}

.checkout-field__box--row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.35rem;
}

.checkout-field__box--row input {
  flex: 1;
}

.checkout-field__box--row .btn {
  flex-shrink: 0;
  align-self: center;
  margin: 0.25rem;
}

.checkout-field__hint {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--success);
  font-weight: 600;
}

.checkout-payment-box {
  padding: 1rem 1.1rem;
  background: var(--accent-soft);
  border-color: rgba(199, 91, 42, 0.25);
}

.checkout-payment-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

.checkout-error {
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--danger);
  background: #fde8e6;
  border: 1px solid rgba(180, 35, 24, 0.25);
  border-radius: var(--radius-md);
}

.checkout-submit-btn {
  width: 100%;
  margin-top: 0.25rem;
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.checkout-item-name {
  color: var(--text);
  font-weight: 600;
}

.checkout-item-price {
  color: var(--primary);
  font-weight: 700;
}

.admin-product-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.admin-product-row__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-product-row__info span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.admin-form-status {
  margin-top: 0.75rem;
  color: var(--neon-amber);
  font-weight: 600;
}

.admin-product-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-danger {
  color: #fff;
  background: var(--danger);
  border: 1px solid var(--danger);
}

.btn-danger:hover {
  background: #922018;
  color: #fff;
}

#account-panel {
  min-height: 12rem;
}

.account-card {
  max-width: 480px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.account-orders {
  max-width: 720px;
  margin: 2rem auto 0;
}

.account-orders h2 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.account-details {
  margin: 1.25rem 0;
}

.account-details dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  margin-top: 0.75rem;
}

.account-details dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.account-loading {
  text-align: center;
  color: var(--text-muted);
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
  padding: 2.5rem 0 1.5rem;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.footer-brand p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

body.page-loaded .product-card {
  transition: transform var(--transition), box-shadow var(--transition);
}

/* —— Mobile nav —— */
.nav-toggle {
  display: none;
  flex-shrink: 0;
  margin-left: auto;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  position: relative;
  z-index: 10002;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.badge--out {
  background: #fde8e6;
  color: var(--danger);
}

.badge--low {
  background: #fff8e6;
  color: #9a6700;
}

.btn-wishlist {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.btn-wishlist.is-active {
  color: var(--danger);
  border-color: var(--danger);
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.shop-search-wrap {
  flex: 1 1 200px;
}

.shop-search-wrap input,
.shop-toolbar select {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
}

.shop-instock-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  min-height: 44px;
}

.cart-item-thumb,
.checkout-item-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  flex-shrink: 0;
}

.checkout-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.cart-qty-input {
  width: 4rem;
  min-height: 44px;
  padding: 0.35rem;
  font: inherit;
}

.cart-remove-btn {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
}

.coupon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}

.coupon-row .auth-label {
  flex: 1 1 160px;
}

.form-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.order-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  padding: 1rem;
  margin-bottom: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.order-status--paid {
  color: var(--success);
}

.reviews-section {
  padding-bottom: 3rem;
}

.review-card {
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.review-stars {
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.review-meta {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 0.5rem 0 0;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.success-card {
  max-width: 520px;
  margin: 2rem auto;
  padding: 2rem;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.success-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neon-amber);
}

.success-lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.order-ref-box {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1rem;
  background: var(--sky-mid);
  border: 1px solid var(--sky-border);
  border-radius: var(--radius-md);
}

.order-ref-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.order-ref-value {
  display: block;
  font-size: 1.05rem;
  font-family: ui-monospace, monospace;
  word-break: break-all;
  margin-bottom: 0.75rem;
  color: var(--cream);
}

.order-ref-fallback {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.order-ref-inline {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  padding: 0.15rem 0.4rem;
  background: var(--sky-mid);
  border-radius: var(--radius-sm);
}

.account-order-banner {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--accent-soft);
  border: 1px solid var(--neon-amber);
  border-radius: var(--radius-md);
  text-align: center;
}

.account-order-banner p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
}

.order-list-item--new {
  border-color: var(--neon-amber);
  background: var(--accent-soft);
}

.order-new-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--neon-amber);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  min-height: auto;
}

/* Touch-friendly controls */
.btn,
button,
input[type="submit"],
.product-card button {
  min-height: 44px;
}

/* —— Responsive breakpoints —— */
@media (max-width: 1024px) {
  .shop-layout {
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-header__wrap .main-nav {
    margin-left: 0;
  }

  body.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(26, 35, 50, 0.5);
    pointer-events: auto;
  }

  body > .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    background: #ffffff;
    padding: 1rem 1.5rem 2rem;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    transform: translateX(100%);
    transition: transform 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 99999;
    visibility: hidden;
    pointer-events: none;
    box-shadow: -8px 0 32px rgba(26, 35, 50, 0.12);
  }

  body.nav-open > .main-nav {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open header,
  body.nav-open header.site-header {
    z-index: 100000;
  }

  body.nav-open .nav-toggle {
    z-index: 100001;
  }

  body > .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  body > .main-nav a {
    display: block;
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    min-height: 48px;
  }

  .site-header__wrap {
    flex-wrap: nowrap;
  }

  header nav ul {
    flex-direction: column;
  }

  .shop-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .shop-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  main > .product-detail.container,
  .product-detail.container {
    grid-template-columns: 1fr;
  }

  .product-detail .product-images img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
  }

  .cart-item {
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
  }

  .cart-remove-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .category-chips {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .category-chips::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex-shrink: 0;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero h2 {
    font-size: 1.75rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .footer-inner {
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 64px 1fr;
  }

  .cart-item-thumb {
    width: 64px;
    height: 64px;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
  }

  h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 360px) {
  header h1 {
    font-size: 1.25rem;
  }

  .btn {
    width: 100%;
  }

  .product-card .btn,
  .product-card button {
    width: 100%;
    margin-top: 0.35rem;
  }
}
