:root {
  --bg: #f7f3ee;
  --fg: #3b2b1a;
  --accent: #b58b5a;
  --muted: #74675b;
  --card: #ffffff;
  --border: #e3d9cf;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --serif: "Playfair Display", "Georgia", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #9a7247; text-decoration: none; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.brand-name {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.5px;
}

.brand-tagline {
  color: var(--muted);
  font-size: 14px;
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.cart-link:hover {
  background: var(--bg);
  border-color: var(--accent);
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1001;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle:hover {
  background: var(--bg);
  border-color: var(--accent);
}

.mobile-menu-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hamburger icon */
.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fg);
  position: relative;
  transition: background 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fg);
  position: absolute;
  transition: transform 0.3s ease;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  top: 8px;
}

/* Animated hamburger when active */
.mobile-menu-toggle.is-active .hamburger-icon {
  background: transparent;
}

.mobile-menu-toggle.is-active .hamburger-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-menu-toggle.is-active .hamburger-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

.site-nav {
  display: flex;
  gap: 18px;
  padding: 12px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 9999;
}

.site-nav a,
.site-nav .nav-item > a {
  font-weight: 600;
  color: var(--fg);
  transition: color 0.2s;
  position: relative;
  cursor: pointer;
  display: inline-block;
  line-height: 1.5;
  padding: 0;
  margin: 0;
  vertical-align: middle;
}

.site-nav a:hover,
.site-nav .nav-item:hover > a {
  color: var(--accent);
}

.site-nav a::after,
.site-nav .nav-item > a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s;
}

.site-nav a:hover::after,
.site-nav .nav-item:hover > a::after {
  width: 100%;
}

/* Dropdown navigation */
.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  line-height: 1.5;
}

.nav-dropdown {
  display: none;
  position: fixed;
  padding-top: 8px;
  z-index: 10000;
}

/* Desktop dropdown - ensure block layout */
@media (min-width: 769px) {
  .nav-dropdown {
    display: none;
  }

  .nav-item:hover .nav-dropdown,
  .nav-item.is-open .nav-dropdown {
    display: flex;
    flex-direction: column;
  }
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-dropdown a {
  display: block;
  padding: 12px 16px;
  font-weight: 500;
  background: var(--card);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  line-height: 1.5;
  min-width: 200px;
  white-space: nowrap;
}

.nav-dropdown a:first-child {
  border-top: 1px solid var(--border);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.nav-dropdown a:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.nav-dropdown a::after {
  display: none;
}

.nav-dropdown a:hover {
  background: var(--bg);
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 32px 24px;
  align-items: center;
}

.hero-card {
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero h1 {
  font-family: var(--serif);
  margin: 0 0 12px;
  font-size: 32px;
}

.hero p {
  margin: 0 0 18px;
  color: var(--muted);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.1s;
  font-size: 15px;
}

.btn:hover {
  background: #9a7247;
  transform: translateY(-1px);
  color: #fff;
}

.btn.secondary {
  background: #fff;
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn.secondary:hover {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--fg);
}

.section {
  padding: 32px 24px;
}

.section-title {
  font-family: var(--serif);
  font-size: 24px;
  margin: 0 0 16px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #f0e8e0;
  /* Improve image loading performance */
  loading: lazy;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price {
  font-weight: 700;
  color: var(--accent);
}

.muted { color: var(--muted); }

.layout {
  max-width: 1100px;
  margin: 0 auto;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 100%;
}

label {
  display: block;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}

input, textarea, select {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 2px solid var(--border);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.5;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(181, 139, 90, 0.1);
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="file"] {
  padding: 10px 14px;
  cursor: pointer;
  border-style: dashed;
}

input[type="file"]:hover {
  border-color: var(--accent);
  background: var(--bg);
}

textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
}

select {
  cursor: pointer;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233b2b1a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

select[multiple] {
  background-image: none;
  padding-right: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: -10px;
  margin-bottom: 6px;
}

.form-container {
  max-width: 800px;
  margin: 0 auto;
}

.form-container-narrow {
  max-width: 500px;
  margin: 0 auto;
}

.site-footer {
  margin-top: 48px;
  padding: 48px 24px 24px;
  color: var(--muted);
  background: var(--card);
  border-top: 1px solid var(--border);
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-section h3 {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--fg);
  margin: 0 0 12px;
}

.footer-section p {
  margin: 0;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.social-links a {
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
  display: inline-block;
}

.social-links a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.admin-shell {
  max-width: 1200px;
  margin: 24px auto;
  background: var(--card);
  padding: 40px 56px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Add left/right margin on smaller desktop screens */
@media (max-width: 1280px) {
  .admin-shell {
    margin: 24px 20px;
  }
}

.admin-shell h2 {
  margin-top: 0;
  margin-bottom: 24px;
  font-family: var(--serif);
  color: var(--fg);
}

.admin-shell form {
  max-width: 900px;
}

/* Better spacing for form elements */
.admin-shell form > div,
.admin-shell form > label {
  margin-bottom: 20px;
}

.admin-shell .form-grid {
  margin-bottom: 20px;
}

/* Buttons in admin should not be full width on desktop */
@media (min-width: 769px) {
  .admin-shell .btn {
    width: auto;
    min-width: 140px;
  }
}

/* Admin menu toggle button (hamburger) */
.admin-menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1001;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
}

.admin-menu-toggle:hover {
  background: var(--bg);
  border-color: var(--accent);
}

.admin-menu-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.admin-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.admin-nav a {
  padding: 8px 14px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  font-size: 14px;
  white-space: nowrap;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.admin-nav a:hover {
  background: var(--accent);
  color: #fff;
}

.admin-nav a:active {
  transform: scale(0.98);
}

.admin-nav a.admin-nav-active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-header h2 {
  margin: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.table thead {
  background: var(--bg);
}

.table thead th {
  font-weight: 600;
  color: var(--fg);
  padding: 14px 16px;
}

.table th, .table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

/* Better spacing for admin tables */
.admin-shell .table {
  margin-top: 20px;
}

/* Admin table enhancements */
.admin-table tbody tr {
  transition: background 0.15s;
}

.admin-table tbody tr:hover {
  background: var(--bg);
}

/* Product thumbnails in tables */
.product-thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9f9;
}

.product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumbnail-placeholder {
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-title {
  font-weight: 500;
  color: var(--fg);
  line-height: 1.4;
}

/* Stock badges */
.stock-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  min-width: 40px;
}

.stock-badge.in-stock {
  background: #d4edda;
  color: #155724;
}

.stock-badge.out-of-stock {
  background: #f8d7da;
  color: #721c24;
}

/* Market table styling */
.market-title {
  font-weight: 500;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: 2px;
}

.market-subtitle {
  font-size: 13px;
  color: var(--muted);
}

.market-date {
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 2px;
}

.market-time {
  font-size: 13px;
  color: var(--muted);
}

.market-location {
  font-size: 13px;
  color: var(--muted);
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.status-active {
  background: #d4edda;
  color: #155724;
}

.status-badge.status-draft {
  background: #fff3cd;
  color: #856404;
}

.alert {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.alert.success {
  background: #e6f4ea;
  color: #0f5132;
  border: 1px solid #c3e6cb;
}

.alert.error {
  background: #fcebea;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.pill {
  display: inline-block;
  padding: 4px 8px;
  background: #f1e8de;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

/* ========================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ======================================== */

/* Touch Target Improvements - Ensure all interactive elements are 48x48px minimum */
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-link {
  min-height: 48px;
  min-width: 48px;
}

.site-nav > a,
.site-nav .nav-item {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-nav > a {
  padding: 8px 12px;
}

.site-nav .nav-item > a {
  padding: 8px 12px;
}

/* Improved mobile navigation */
.site-nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.site-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Better tap highlighting */
a, button, .btn {
  -webkit-tap-highlight-color: rgba(181, 139, 90, 0.2);
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Improve readability */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling for better UX */
html {
  scroll-behavior: smooth;
}

/* Optimize for mobile performance */
* {
  -webkit-overflow-scrolling: touch;
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Mobile Responsiveness - Tablet and below */
@media (max-width: 768px) {
  /* Header adjustments */
  .site-header {
    padding: 12px 16px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .brand {
    flex: 1;
    min-width: 0; /* Allow text truncation if needed */
  }

  .brand-logo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
  }

  .brand-name {
    font-size: 18px;
    letter-spacing: 0.3px;
  }

  .brand-tagline {
    font-size: 12px;
  }

  .header-actions {
    flex-shrink: 0;
  }

  /* Show hamburger menu */
  .mobile-menu-toggle {
    display: flex;
  }

  /* Navigation adjustments - Mobile drawer */
  .site-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    flex-direction: column;
    gap: 0;
    padding: 80px 0 24px;
    background: var(--card);
    border-left: 1px solid var(--border);
    border-bottom: none;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
  }

  .site-nav.is-open {
    right: 0;
  }

  .site-nav a,
  .site-nav .nav-item > a {
    font-size: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    white-space: normal;
    display: block;
  }

  .site-nav a:hover,
  .site-nav .nav-item > a:hover {
    background: var(--bg);
  }

  .site-nav a::after,
  .site-nav .nav-item > a::after {
    display: none;
  }

  /* Mobile dropdown - expand inline */
  .nav-item {
    display: block;
  }

  .nav-dropdown {
    position: static;
    display: none;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg);
  }

  .nav-item.is-open .nav-dropdown {
    display: block;
  }

  .nav-dropdown a {
    padding: 12px 24px 12px 40px;
    font-size: 15px;
  }

  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
  }

  /* Overlay background when menu is open */
  body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    animation: fadeIn 0.3s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* Content padding - more generous for easier scrolling */
  .hero {
    padding: 24px 16px;
    gap: 20px;
  }

  .section {
    padding: 28px 16px;
  }

  /* Grid adjustments */
  .two-col {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Card adjustments - better image sizing */
  .card {
    transition: transform 0.2s;
  }

  .card:active {
    transform: scale(0.98);
  }

  .card img {
    height: 200px;
  }

  .card-body {
    padding: 16px;
  }

  /* Hero typography */
  .hero h1 {
    font-size: 28px;
    line-height: 1.3;
  }

  .hero p {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Admin shell */
  .admin-shell {
    margin: 20px 16px;
    padding: 32px 24px;
    border-radius: 8px;
  }

  .admin-shell form {
    max-width: 100%;
  }

  .admin-shell h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  /* Keep full-width buttons on mobile for easier tapping */
  .admin-shell .btn {
    width: 100%;
  }

  /* Show admin hamburger menu on mobile */
  .admin-menu-toggle {
    display: flex;
  }

  /* Admin navigation - Mobile drawer style */
  .admin-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    flex-direction: column;
    gap: 0;
    padding: 80px 0 24px;
    margin: 0;
    background: var(--card);
    border-right: 1px solid var(--border);
    border-bottom: none;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
  }

  .admin-nav.is-open {
    left: 0;
  }

  .admin-nav a {
    font-size: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    white-space: normal;
    display: block;
    min-height: auto;
  }

  .admin-nav a:hover {
    background: var(--bg);
  }

  .admin-nav a.admin-nav-active {
    background: var(--accent);
    color: #fff;
    border-left: 4px solid #9a7247;
  }

  /* Prevent body scroll when admin menu is open */
  body.admin-menu-open {
    overflow: hidden;
  }

  /* Overlay background when admin menu is open */
  body.admin-menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    animation: fadeIn 0.3s ease;
  }

  /* Tables - make scrollable with better UX */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
  }

  .table {
    min-width: 600px;
  }

  .table th,
  .table td {
    padding: 12px 10px;
    font-size: 14px;
  }

  /* Footer adjustments */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-section h3 {
    font-size: 17px;
    margin-bottom: 14px;
  }

  .site-footer {
    padding: 40px 16px 20px;
  }

  /* Form improvements for mobile */
  input, textarea, select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 14px;
  }

  .btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    min-height: 52px;
  }

  /* Hero actions */
  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* Improved spacing for section titles */
  .section-title {
    font-size: 22px;
    margin-bottom: 18px;
  }
}

/* Small mobile devices - Enhanced experience */
@media (max-width: 480px) {
  .site-header {
    padding: 10px 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-tagline {
    font-size: 11px;
  }

  /* Hide cart text on very small screens */
  .cart-link span {
    display: none;
  }

  .cart-link {
    padding: 12px;
    min-width: 48px;
    justify-content: center;
  }

  /* Simpler navigation for small screens */
  .site-nav {
    padding: 8px 12px;
    gap: 4px;
  }

  .site-nav a {
    font-size: 14px;
    padding: 10px 12px;
  }

  /* Content adjustments */
  .hero {
    padding: 20px 12px;
    gap: 16px;
  }

  .section {
    padding: 24px 12px;
  }

  .section-title {
    font-size: 20px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card img {
    height: 220px;
  }

  .hero h1 {
    font-size: 24px;
    line-height: 1.3;
  }

  .hero p {
    font-size: 15px;
  }

  /* Footer center alignment */
  .footer-content {
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .site-footer {
    padding: 32px 12px 16px;
  }

  /* Larger touch targets for better usability */
  .btn {
    min-height: 54px;
    font-size: 16px;
  }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .site-header {
    flex-direction: row;
    align-items: center;
  }

  .header-actions {
    margin-top: 0;
  }
}

/* Tablet optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }

  .layout {
    max-width: 95%;
  }

  .hero {
    padding: 28px 20px;
  }

  .section {
    padding: 32px 20px;
  }
}

/* Large tablets and small desktops */
@media (min-width: 769px) and (max-width: 1024px) {
  .site-header {
    padding: 16px 20px;
  }

  .site-nav {
    padding: 12px 20px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* Ensure menu toggle is hidden on desktop */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none !important;
  }

  .site-nav {
    position: static !important;
    width: auto !important;
    height: auto !important;
    flex-direction: row !important;
    padding: 12px 24px !important;
    border-left: none !important;
    box-shadow: none !important;
  }

  .admin-menu-toggle {
    display: none !important;
  }

  .admin-nav {
    position: static !important;
    width: auto !important;
    height: auto !important;
    flex-direction: row !important;
    padding-bottom: 16px !important;
    border-right: none !important;
    box-shadow: none !important;
    left: auto !important;
  }
}

/* ============================================
   Order Confirmation Page Styles
   ============================================ */

.order-confirmation {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.confirmation-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(181, 139, 90, 0.1) 0%, rgba(181, 139, 90, 0.05) 100%);
  border-radius: var(--radius);
}

.confirmation-icon {
  color: #22c55e;
  margin: 0 auto 1rem;
  animation: checkmark-pop 0.6s ease-out;
}

@keyframes checkmark-pop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.confirmation-header h1 {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--fg);
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.confirmation-subtitle {
  font-size: 1.25rem;
  color: var(--muted);
  margin: 0 0 0.75rem 0;
}

.confirmation-email {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

.order-summary-card {
  box-shadow: var(--shadow);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.order-header h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  margin: 0 0 0.5rem 0;
  color: var(--fg);
}

.status-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-paid {
  background: #dcfce7;
  color: #166534;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-fulfilled {
  background: #dbeafe;
  color: #1e40af;
}

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

.detail-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 0.875rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.detail-content p {
  margin: 0.5rem 0;
  line-height: 1.6;
  color: var(--fg);
}

.detail-content strong {
  color: var(--muted);
  font-weight: 600;
  margin-right: 0.5rem;
}

.order-items-section {
  margin-top: 2.5rem;
}

.order-items-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 1.25rem 0;
}

.items-table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.order-items-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
}

.order-items-table thead {
  background: var(--bg);
}

.order-items-table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

.order-items-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.order-items-table tbody tr:last-child td {
  border-bottom: none;
}

.order-items-table tbody tr:hover {
  background: rgba(181, 139, 90, 0.03);
}

.item-name {
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 0.25rem;
}

.item-sku {
  font-size: 0.875rem;
  color: var(--muted);
}

.item-total {
  font-weight: 600;
  color: var(--accent);
}

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

.text-right {
  text-align: right;
}

.order-totals {
  background: var(--bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  font-size: 1rem;
}

.total-row span:first-child {
  color: var(--muted);
  font-weight: 500;
}

.total-row span:last-child {
  color: var(--fg);
  font-weight: 600;
}

.total-final {
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
  font-size: 1.25rem;
  font-weight: 700;
}

.total-final span:first-child {
  color: var(--fg);
  font-family: var(--serif);
}

.total-final span:last-child {
  color: var(--accent);
  font-size: 1.5rem;
}

.confirmation-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.btn-primary {
  background: var(--accent);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn-primary:hover {
  background: #9a7247;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(181, 139, 90, 0.3);
  color: white;
}

.btn-secondary {
  background: white;
  color: var(--accent);
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  border: 2px solid var(--accent);
  transition: all 0.2s;
  cursor: pointer;
  text-align: center;
}

.btn-secondary:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .confirmation-header h1 {
    font-size: 2rem;
  }

  .confirmation-subtitle {
    font-size: 1.125rem;
  }

  .order-details-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .confirmation-actions {
    flex-direction: column;
  }

  .confirmation-actions .btn-primary,
  .confirmation-actions .btn-secondary {
    width: 100%;
  }

  .order-items-table th,
  .order-items-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }

  .total-final {
    font-size: 1.125rem;
  }

  .total-final span:last-child {
    font-size: 1.25rem;
  }
}

