:root {
  --bg-gradient: linear-gradient(135deg, #f5faf5 0%, #ecf5f0 100%);
  --surface: #ffffff;
  --surface-muted: #f0f3ef;
  --border: rgba(32, 86, 56, 0.12);
  --accent: #2f9d66;
  --accent-dark: #1f6b47;
  --accent-soft: rgba(47, 157, 102, 0.12);
  --secondary: #f4faf7;
  --text-primary: #1f2c24;
  --text-secondary: #4f5f55;
  --text-muted: #7c8a83;
  --shadow-soft: 0 20px 45px rgba(38, 98, 68, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --transition: all 0.25s ease;
}

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

html {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  color: var(--text-primary);
}

body {
  margin: 0;
  background: var(--bg-gradient);
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.container {
  width: min(1140px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-content {
  flex: 1;
  padding-block: 2rem 4rem;
}

/* Header */
.site-header {
  background: radial-gradient(
      circle at 20% 20%,
      rgba(47, 157, 102, 0.18),
      transparent 60%
    ),
    radial-gradient(circle at 80% 10%, rgba(31, 107, 71, 0.22), transparent 65%),
    linear-gradient(135deg, #1b6b44, #244e3d);
  color: #fff;
  padding-block: 1.4rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 20px 40px rgba(12, 49, 31, 0.2);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 52px;
  width: auto;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.header-link:hover {
  background: rgba(255, 255, 255, 0.16);
}

.auth-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.header-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transition: var(--transition);
}

.header-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.header-button.login {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.header-button.login:hover {
  background: rgba(255, 255, 255, 0.32);
}

.welcome {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(12, 49, 31, 0.28);
  transition: var(--transition);
}

.cart-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(12, 49, 31, 0.32);
}

.cart-count {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.8rem;
}

.mobile-menu-toggle {
  display: none;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
}

.main-nav {
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 0;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.nav-link .nav-icon {
  font-size: 1.2rem;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* Flash messages */
.flash-messages {
  display: grid;
  gap: 0.75rem;
  margin: 0.5rem 0 2rem;
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  background: rgba(47, 157, 102, 0.09);
  color: var(--accent-dark);
  border: 1px solid rgba(47, 157, 102, 0.18);
}

.flash-error {
  background: rgba(208, 48, 80, 0.08);
  border-color: rgba(208, 48, 80, 0.16);
  color: #b91d3e;
}

.flash-info {
  background: rgba(47, 111, 157, 0.08);
  border-color: rgba(47, 111, 157, 0.16);
  color: #1f5679;
}

/* Buttons */
.primary,
.secondary,
.add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 15px 25px rgba(47, 157, 102, 0.3);
}

.primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.secondary {
  background: rgba(47, 157, 102, 0.12);
  color: var(--accent-dark);
}

.secondary:hover {
  background: rgba(47, 157, 102, 0.18);
}

.primary.wide,
.secondary.wide {
  width: 100%;
}

.primary.disabled,
.primary.disabled:hover {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.add-button {
  background: rgba(47, 157, 102, 0.12);
  color: var(--accent-dark);
  border-radius: 999px;
  padding-inline: 1.2rem;
  font-size: 0.95rem;
}

.add-button:hover {
  background: rgba(47, 157, 102, 0.22);
  color: var(--accent-dark);
}

.link-button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.link-button:hover {
  color: var(--accent-dark);
}

/* Hero section */
.hero-section {
  padding-block: 3.5rem 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: 2rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 3.2vw, 3.1rem);
  margin: 0.75rem 0 1.2rem;
  line-height: 1.2;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.hero-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 540px;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-features div {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(47, 157, 102, 0.1);
}

.hero-card {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.hero-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-card-header span {
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.hero-card-header strong {
  font-size: 1.4rem;
}

.hero-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  color: var(--text-secondary);
}

.hero-card-list li {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.hero-card-button {
  align-self: flex-start;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--surface-muted);
  font-weight: 600;
  transition: var(--transition);
}

.hero-card-button:hover {
  background: var(--accent);
  color: #fff;
}

/* Categories */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: 0 15px 35px rgba(32, 86, 56, 0.09);
  display: grid;
  gap: 1rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  border: 1px solid rgba(32, 86, 56, 0.08);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: calc(var(--radius-md) - 12px);
  border: 1px solid rgba(47, 157, 102, 0.14);
  opacity: 0;
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 45px rgba(32, 86, 56, 0.12);
}

.category-card:hover::after {
  opacity: 1;
}

.category-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.category-card-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2c24;
}

.badge {
  background: rgba(47, 157, 102, 0.12);
  color: var(--accent-dark);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  min-height: 2.1rem;
}

.category-card-desc {
  color: var(--text-secondary);
  line-height: 1.55;
  min-height: 3.6rem;
}

.category-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 0.95rem;
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 30px rgba(32, 86, 56, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(32, 86, 56, 0.12);
}

.product-card-image {
  background: #ffffff;
  display: block;
  padding: 2rem 1.5rem;
  min-height: 220px;
  display: grid;
  place-items: center;
}

.product-card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
}

.product-card-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.product-card-body p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex: 1;
}

.price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

/* Benefits */
.benefits-section {
  padding-block: 3rem 0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.benefits-grid div {
  background: rgba(47, 157, 102, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid rgba(47, 157, 102, 0.14);
  box-shadow: inset 0 0 0 1px rgba(47, 157, 102, 0.08);
}

.benefits-grid h3 {
  margin-bottom: 0.6rem;
}

/* Category page */
.category-hero {
  margin-bottom: 2.5rem;
}


.category-hero-card {
  position: relative;
  padding: 1.3rem 1.7rem 1.45rem;
  background: linear-gradient(135deg, rgba(248, 252, 249, 0.96), rgba(236, 245, 240, 0.94));
  box-shadow: 0 12px 24px rgba(18, 46, 30, 0.08);
  border: 1px solid rgba(18, 46, 30, 0.12);
  border-left: 5px solid var(--accent-color, #2f9d66);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-hero-card h1 {
  margin: 0;
  font-size: clamp(1.35rem, 1.9vw, 1.6rem);
  color: #1b392b;
  font-weight: 700;
  letter-spacing: 0.012em;
  text-transform: uppercase;
}

.category-hero-card p {
  margin: 0;
  color: #3d5145;
  line-height: 1.62;
  max-width: 760px;
}

.category-meta {
  display: inline-flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-weight: 600;
  margin-top: 0.35rem;
  background: rgba(47, 157, 102, 0.12);
  color: #236746;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(47, 157, 102, 0.25);
}

.empty-state {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Product page */
.product-page .product-layout {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.product-media {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 6rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--accent-dark);
}

.product-main-image {
  padding: 2.5rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.product-info-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1.5rem;
}

.product-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.product-short {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.product-purchase {
  display: grid;
  gap: 1rem;
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: var(--radius-md);
}

.product-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.product-buy-form {
  display: grid;
  gap: 1rem;
}

.product-buy-form label {
  font-weight: 600;
  color: var(--text-secondary);
}

.quantity-input {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(47, 157, 102, 0.12);
  margin-top: 0.4rem;
}

.quantity-input button {
  border: none;
  background: none;
  color: var(--accent-dark);
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-size: 1.1rem;
}

.quantity-input input {
  border: none;
  width: 3rem;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  appearance: textfield;
  -moz-appearance: textfield;
}

.quantity-input input::-webkit-outer-spin-button,
.quantity-input input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.quantity-input input:focus {
  outline: none;
}

.product-details section + section {
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
  margin-top: 1.2rem;
}

.product-details h2 {
  margin: 0 0 0.6rem;
}

.product-details p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.bullet-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-secondary);
}

.bullet-list li + li {
  margin-top: 0.4rem;
}

/* Forms */
.form-section {
  padding-block: 2rem;
}

.form-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-soft);
  align-items: center;
}

.form-info h1 {
  margin-bottom: 0.75rem;
}

.form-info p {
  color: var(--text-secondary);
}

.form-label {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.form-fields {
  display: grid;
  gap: 1.1rem;
}

.form-group,
.form-row {
  display: grid;
  gap: 0.45rem;
}

label {
  font-weight: 600;
  color: var(--text-secondary);
}

input,
textarea {
  background: var(--secondary);
  border: 1px solid rgba(47, 157, 102, 0.16);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font: inherit;
  color: var(--text-primary);
  transition: var(--transition);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 157, 102, 0.16);
}

.form-footnote {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-footnote a {
  color: var(--accent-dark);
  font-weight: 600;
}

/* Cart */
.cart-section {
  padding-block: 2rem;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 2rem;
  align-items: start;
}

.cart-items {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.cart-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.2rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.2rem;
  border-radius: var(--radius-sm);
  background: var(--secondary);
}

.cart-item-image {
  padding: 0.75rem;
  background: #fff;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
}

.cart-item-info p {
  color: var(--text-secondary);
  margin: 0.35rem 0;
}

.cart-item-price {
  font-weight: 600;
  color: var(--accent-dark);
}

.cart-item-quantity {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cart-item-controls {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(47, 157, 102, 0.16);
}

.quantity-control button {
  background: none;
  border: none;
  color: var(--accent-dark);
  font-size: 1rem;
  cursor: pointer;
}

.quantity-control input {
  width: 2.6rem;
  text-align: center;
  font-weight: 600;
  border: none;
  background: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.quantity-control input:focus {
  outline: none;
}

.cart-item-total {
  text-align: right;
  font-weight: 700;
}

.cart-summary {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1rem;
}

.cart-summary h2 {
  margin: 0;
}

.cart-summary dl {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.cart-summary dl div {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: var(--text-secondary);
}

.summary-note {
  background: var(--secondary);
  border-radius: var(--radius-sm);
  padding: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Checkout */
.checkout-section {
  padding-block: 2rem;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 2rem;
}

.checkout-summary {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1.2rem;
}

.checkout-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.checkout-items li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.item-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 700;
}

.checkout-note {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.checkout-form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1rem;
}

/* Orders */
.orders-section {
  padding-block: 2rem 3rem;
}

.orders-header {
  text-align: center;
  margin-bottom: 2rem;
}

.orders-header h1 {
  margin-bottom: 0.5rem;
}

.orders-header p {
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
}

.orders-list {
  display: grid;
  gap: 1.5rem;
}

.order-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 1.8rem;
  display: grid;
  gap: 1.2rem;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.order-id {
  display: inline-block;
  font-weight: 700;
  color: var(--accent-dark);
}

.order-date {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.order-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--accent-dark);
}

.order-total span {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.order-meta div {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.order-comment {
  background: rgba(47, 157, 102, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.order-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.order-items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--secondary);
}

.order-item-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.order-item-total {
  font-weight: 700;
  color: var(--accent-dark);
}

.order-repeat {
  display: flex;
  justify-content: flex-end;
}

.order-repeat button {
  margin-top: 0.75rem;
  padding-inline: 1.6rem;
}

/* Footer */
.site-footer {
  background: #143c2c;
  color: rgba(255, 255, 255, 0.86);
  padding-block: 3rem 1.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 2rem;
}

.footer-logo {
  display: block;
  max-width: 180px;
  width: 100%;
  height: auto;
  margin-bottom: 0.75rem;
}

.footer-column ul {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.78);
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fff;
  transition: var(--transition);
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  justify-content: center;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mobile-bottom-nav {
  display: none;
}

.product-add-fab {
  display: none;
}

.button-spinner {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-right-color: rgba(255, 255, 255, 0.85);
  display: inline-block;
  animation: button-spin 0.65s linear infinite;
}

@keyframes button-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.cart-count.bump {
  animation: cart-bump 0.35s ease;
}

@keyframes cart-bump {
  0%,
  100% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.22);
  }
  60% {
    transform: scale(0.9);
  }
}

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 108px);
  transform: translate(-50%, 18px);
  background: rgba(16, 57, 36, 0.92);
  color: #f2f9f5;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(16, 57, 36, 0.22);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
  pointer-events: none;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Responsive */
@media (max-width: 992px) {
  .header-top {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.75rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .hero-actions,
  .hero-features {
    justify-content: center;
  }

  .hero-card {
    max-width: 420px;
    margin-inline: auto;
  }

  .cart-layout,
  .checkout-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cart-item {
    grid-template-columns: minmax(0, 120px) minmax(0, 1fr);
    grid-template-areas:
      "image info"
      "controls controls"
      "total total";
    align-items: center;
    gap: 1.2rem;
  }

  .cart-item-image {
    grid-area: image;
    justify-self: center;
  }

  .cart-item-info {
    grid-area: info;
  }

  .cart-item-controls {
    grid-area: controls;
    justify-items: flex-start;
  }

  .cart-item-total {
    grid-area: total;
    justify-self: end;
  }

  .product-page .product-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-media {
    position: static;
  }

  .form-card,
  .checkout-form,
  .checkout-summary,
  .cart-items,
  .cart-summary,
  .product-info-panel,
  .order-card {
    padding: 1.75rem;
  }
}

@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .brand {
    justify-content: center;
  }

  .brand-logo {
    height: 44px;
  }

  .header-actions {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }

  .header-link {
    display: none;
  }

  .auth-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 460px;
    margin-inline: auto;
  }

  .auth-links a,
  .header-button,
  .welcome,
  .cart-button,
  .mobile-menu-toggle {
    flex: 1 1 45%;
    min-width: 140px;
    max-width: 220px;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: 14px;
  }

  .header-button,
  .welcome {
    font-size: 0.95rem;
  }

  .cart-button {
    order: -1;
    gap: 0.4rem;
    box-shadow: 0 12px 24px rgba(12, 49, 31, 0.18);
    max-width: 200px;
  }

  .cart-count {
    padding: 0.1rem 0.45rem;
    font-size: 0.75rem;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    flex: 0 1 110px;
    padding-inline: 0.65rem;
    font-size: 1.1rem;
  }

  .main-nav {
    position: static;
    width: 100%;
    margin-top: 0.6rem;
    border-radius: 18px;
    border: none;
    background: rgba(13, 50, 33, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 32px rgba(4, 21, 13, 0.35);
    overflow: hidden;
  }

  .main-nav .container {
    width: 100%;
    padding-inline: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    overflow-y: hidden;
    transition: max-height 0.25s ease;
  }

  .main-nav.nav-open .nav-list {
    max-height: var(--nav-max-height, 70vh);
    padding: 0.35rem 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .main-nav.nav-open .nav-list::-webkit-scrollbar {
    width: 6px;
  }

  .main-nav.nav-open .nav-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
  }

  .nav-link {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 0.9rem;
    font-size: 0.96rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .hero-features {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .hero-card {
    text-align: center;
  }

  .hero-card-button {
    align-self: center;
    width: 100%;
    justify-content: center;
  }

  .category-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .category-hero-card {
    text-align: center;
  }

  .back-to-catalog {
    justify-self: center;
  }

  .product-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .product-card-footer form {
    width: 100%;
  }

  .product-card-footer .add-button {
    width: 100%;
    justify-content: center;
  }

  .benefits-grid {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
    gap: 1.25rem;
  }

  .form-card {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .form-fields {
    text-align: left;
  }

  .cart-item {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "image"
      "info"
      "controls"
      "total";
    text-align: center;
  }

  .cart-item-info {
    text-align: center;
  }

  .cart-item-controls {
    justify-items: center;
    width: 100%;
  }

  .cart-item-total {
    justify-self: center;
  }

  .checkout-items li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .checkout-total {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .orders-section {
    padding-block: 1.5rem 2.5rem;
  }

  .order-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .order-total {
    align-items: flex-start;
  }

  .order-meta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .order-items li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .order-repeat {
    justify-content: flex-start;
  }

  .site-footer {
    text-align: center;
  }

  .footer-grid {
    justify-items: center;
  }

  .footer-column ul {
    align-items: center;
  }

  .footer-bottom .container {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .container {
    width: calc(100% - 1.6rem);
  }

  .page-content {
    padding-block: 1.8rem 3rem;
  }

  .site-header {
    padding-block: 1rem 0.5rem;
  }

  .header-top {
    gap: 0.65rem;
  }

  .header-actions {
    gap: 0.45rem;
  }

  .auth-links a,
  .header-button,
  .welcome,
  .cart-button {
    flex: 1 1 45%;
    min-width: 130px;
    max-width: 210px;
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
    border-radius: 12px;
  }

  .mobile-menu-toggle {
    flex: 0 1 90px;
    padding: 0.45rem 0.6rem;
    font-size: 1rem;
    border-radius: 12px;
  }

  .brand-logo {
    height: 40px;
  }

  .hero-section {
    padding-block: 2.5rem 1.75rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 0.98rem;
  }

  .hero-card {
    padding: 1.5rem;
  }

  .category-card,
  .product-card,
  .form-card,
  .cart-items,
  .cart-summary,
  .checkout-form,
  .checkout-summary,
  .order-card {
    padding: 1.5rem;
  }

  .product-card-image {
    min-height: auto;
    padding: 1.6rem;
  }

  .product-card-footer {
    gap: 1rem;
  }

  .cart-item {
    gap: 1.2rem;
  }

  .cart-item-controls {
    gap: 0.8rem;
  }

  .cart-item-controls form {
    width: 100%;
  }

  .quantity-control {
    width: 100%;
    justify-content: space-between;
  }

  .quantity-control input {
    flex: 1;
    max-width: 4.5rem;
  }

  .cart-item-total {
    width: 100%;
  }

  .cart-item-total strong {
    font-size: 1.3rem;
  }

  .checkout-items li {
    width: 100%;
  }

  .checkout-note,
  .summary-note {
    font-size: 0.9rem;
  }

  .footer-bottom .container {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
}

@media (max-width: 420px) {
  html {
    font-size: 15px;
  }

  .cart-label {
    display: none;
  }

  .header-actions {
    gap: 0.4rem;
  }

  .auth-links a,
  .header-button,
  .welcome,
  .cart-button {
    min-width: 120px;
    flex: 1 1 48%;
  }

  .mobile-menu-toggle {
    flex: 1 1 48%;
    padding-inline: 0.55rem;
  }

  .brand-logo {
    height: 36px;
  }

  .hero-text h1 {
    font-size: 1.85rem;
  }

  .hero-card {
    padding: 1.35rem;
  }

  .product-card-footer {
    gap: 0.75rem;
  }

  .quantity-control input {
    max-width: 3.5rem;
  }
}
