:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f4efe7;
  --line: #e8dfd3;
  --text: #1f2937;
  --muted: hsl(220, 9%, 46%);
  --brand: #edbdbb;
  --brand-rgb: 237, 189, 187;
  --brand-dark: #edbdbb;
  --danger: #dc2626;
  --success: #15803d;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

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

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 8px;
}

@media (max-width: 992px) {
  .container {
    padding: 0 6px;
  }
}

.narrow {
  max-width: 820px;
  margin: 0 auto;
}

.site-header,
.site-footer,
.card,
.hero-card,
.product-card,
.category-card,
.success-card,
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner,
.footer-grid,
.hero-grid,
.section-head,
.product-meta,
.summary-line,
.admin-topbar,
.hero-actions,
.table-actions,
.inline-form,
.product-actions,
.qty-controls,
.cart-item,
.checkout-layout,
.cart-layout {
  display: flex;
  gap: 32px;
}

@media (max-width: 992px) {
  .checkout-layout {
    flex-direction: column-reverse;
  }
  .cart-layout {
    flex-direction: column;
  }
}

.breadcrumb {
  margin-bottom: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--brand);
}

.qty-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.qty-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text);
  transition: background 0.2s;
}

.qty-btn:hover {
  background: var(--surface-soft);
}

.qty-selector input {
  width: 50px;
  text-align: center;
  border: none;
  background: none;
  font-weight: 700;
  font-size: 16px;
  pointer-events: none;
  padding: 0;
  margin: 0;
}

.header-inner,
.section-head,
.admin-topbar {
  align-items: center;
  justify-content: space-between;
}

.header-inner {
  padding: 18px 0;
}

.brand,
.brand-mark,
.main-nav,
.hero-grid,
.product-grid,
.category-grid,
.footer-grid,
.admin-grid,
.stats-grid {
  display: grid;
}

.brand {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 48px;
  width: auto;
}

.brand small,
.muted,
.site-footer p,
.site-footer a,
.product-card small,
.filters input,
.filters select,
.field input,
.field textarea,
.field select {
  color: var(--muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 48px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

[data-auth-links] {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
  transition: color 0.3s;
  display: inline-block;
}

[data-auth-links] a + a {
  margin-left: 8px;
}

.nav-links a:hover {
  color: var(--brand);
}

.nav-links a.admin-link {
  color: var(--brand-dark);
  background: #fdf2f8;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn, .cart-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  border-radius: 12px;
  color: var(--text);
  transition: all 0.2s;
  cursor: pointer;
}

.icon-btn:hover, .cart-link:hover {
  background: #f8fafc;
  color: var(--brand);
}

.cart-link svg, .icon-btn svg {
  stroke-width: 2.5;
}

.cart-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  line-height: 1;
}

/* Hamburger Icon Styles */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  border-radius: 12px;
  transition: all 0.2s;
}

.hamburger:hover {
  background: #f8fafc;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile Navigation */
@media (max-width: 992px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 100px 32px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    gap: 32px;
    align-items: flex-start;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 20px;
    width: 100%;
  }

  [data-auth-links] {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  /* Hamburger Animation */
  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .main-nav {
    gap: 12px;
  }
}

.page-shell {
  min-height: calc(100vh - 180px);
}

.section {
  padding: 56px 0;
}

.section-muted {
  background: #ffffff;
}

.hero {
  padding: 64px 0 32px;
}

.breadcrumb {
  margin-bottom: 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--brand);
}

.back-link::before {
  content: '←';
}

.hero-grid {
  grid-template-columns: 1.15fr 0.55fr;
  align-items: center;
  position: relative;
}

.checkout-layout,
.product-detail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  position: relative;
}

/* Slideshow Styles */
.hero-slideshow {
  position: relative;
  overflow: hidden;
  height: 100%;
  border-radius: var(--radius);
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
}

.hero-slide.active {
  opacity: 1;
  position: relative;
}

.hero-content {
  flex: 1;
}

.hero-visual {
  flex: 1;
  height: 100%;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
}

.slideshow-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.dot.active {
  background: #fff;
}

.hero-card,
.card,
.product-card,
.category-card,
.success-card,
.stat-card {
  border-radius: var(--radius);
}

.hero-card {
  overflow: hidden;
}

.hero-card img {
  height: 100%;
  min-height: 400px;
  object-fit: cover;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fdf2f8;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.25rem, 3.5vw, 3.5rem);
  line-height: 1.1;
  margin: 12px 0;
}

h2 {
  font-size: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(var(--brand-rgb), 0.3);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
}

.icon-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s;
  border-radius: 50%;
}

.icon-btn:hover {
  color: var(--brand);
  background: var(--surface-soft);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #f472b6);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-danger {
  background: #fee2e2;
  color: var(--danger);
}

.link-arrow,
.link-button {
  color: var(--brand-dark);
  font-weight: 700;
}

.link-button {
  background: none;
  border: 0;
  cursor: pointer;
}

.product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.product-card {
  position: relative;
  overflow: hidden;
  background: white;
  border-radius: 24px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-color: var(--brand);
}

.product-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-card-body,
.card,
.success-card,
.stat-card {
  padding: 22px;
}

.product-card-body h3 {
  margin: 8px 0;
}

.product-meta,
.hero-actions,
.table-actions,
.inline-form,
.qty-controls {
  flex-wrap: wrap;
  align-items: center;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  min-height: auto;
}

.category-card:hover {
  transform: translateY(-8px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.category-image {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--surface-soft);
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover .category-image img {
  transform: scale(1.08);
}

.category-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  color: var(--text);
}

.category-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.category-explore {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filters,
.form-grid {
  display: grid;
  gap: 16px;
}

.filters {
  grid-template-columns: 2fr 1fr auto auto;
  margin-bottom: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

.field input,
.field textarea,
.filters input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  font: inherit;
  color: var(--text);
  transition: all 0.2s ease;
}

.field input:focus,
.filters input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(237, 189, 187, 0.2);
}

.field select,
.filters select,
.inline-form select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  font: inherit;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.field select:hover,
.filters select:hover,
.inline-form select:hover {
  border-color: var(--brand);
  background-color: var(--surface-soft);
}

.field select:focus,
.filters select:focus,
.inline-form select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(237, 189, 187, 0.2);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.product-detail {
  display: grid;
  gap: 32px;
  align-items: start;
}

.product-main-image {
  width: 100%;
  border-radius: var(--radius);
  min-height: 460px;
  object-fit: cover;
}

.thumb-grid {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.thumb-btn {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  width: 88px;
  height: 88px;
  padding: 0;
  background: #fff;
  cursor: pointer;
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.price {
  font-size: 2rem;
  color: var(--brand-dark);
  font-weight: 800;
}

.stock-status {
  padding: 10px 14px;
  border-radius: 12px;
  background: #fdf2f8;
  display: inline-flex;
  font-weight: 600;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.cart-summary {
    position: sticky;
    top: 120px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.cart-item {
  background: white;
  padding: 24px;
  margin-bottom: 20px;
  border-radius: 24px;
  border: 1px solid #f1f5f9;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.cart-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    border-color: var(--brand);
}

.cart-item img {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  object-fit: contain;
  background: #f8fafc;
  padding: 8px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 99px;
    width: fit-content;
}

.qty-controls button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  font-weight: 700;
  transition: all 0.2s ease;
}

.qty-controls button:hover {
    background: var(--brand);
    color: white;
}

.qty-controls span {
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.remove-item-btn {
    font-size: 13px;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 0;
}

.remove-item-btn:hover {
    color: #ef4444;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: #64748b;
    font-size: 16px;
}

.summary-line strong {
    color: #1e293b;
}

.summary-line.total {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #f1f5f9;
    font-size: 20px;
    color: #1e293b;
    font-weight: 800;
}

.checkout-layout {
  align-items: start;
}

.order-meta,
.order-tracker {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin: 24px 0;
}

.order-meta div,
.stat-card {
  border-radius: 18px;
  background: #ffffff;
  padding: 18px;
}

.order-meta span,
.stat-card span,
small {
  display: block;
  color: var(--muted);
}

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

.site-footer {
  margin-top: 64px;
  padding: 36px 0;
}

.footer-grid {
  grid-template-columns: 2fr 1fr 1fr;
}

.site-footer a,
.site-footer p {
  display: block;
  margin: 6px 0;
}

.form-error,
.form-success {
  padding: 14px 18px;
  border-radius: 16px;
  margin-bottom: 16px;
}

.form-error {
  background: #fee2e2;
  color: var(--danger);
}

.form-success {
  background: #dcfce7;
  color: var(--success);
}

.empty-state {
  padding: 42px 0;
  text-align: center;
}

.admin-body {
  background: #f8fafc;
  color: #1e293b;
}

.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: #0f172a;
  color: #fff;
  padding: 32px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-brand {
    margin-bottom: 40px;
}

.admin-brand strong {
    font-size: 20px;
    display: block;
    color: #f1f5f9;
}

.admin-brand small {
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 11px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav a {
  padding: 12px 16px;
  border-radius: 12px;
  color: #94a3b8;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    transform: translateX(4px);
}

.admin-nav a.active {
    background: var(--brand);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(var(--brand-rgb, 219, 137, 102), 0.2);
}

.admin-main {
  padding: 40px;
}

.admin-topbar {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-topbar h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.admin-topbar p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 14px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 32px;
    align-items: start;
}

.card {
    background: white;
    overflow-x: auto;
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

/* Admin Responsive Styles */
.admin-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #0f172a;
    color: #fff;
    position: sticky;
    top: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1001;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.admin-mobile-header .admin-brand {
    margin-bottom: 0;
    line-height: 1.2;
}

.admin-mobile-header .admin-brand strong {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.admin-mobile-header .admin-brand small {
    display: block;
    margin-top: -2px;
    opacity: 0.8;
}

.admin-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.admin-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.admin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .admin-mobile-header {
        display: flex;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1003;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.2);
    }

    .admin-sidebar-active .admin-sidebar {
        transform: translateX(0);
    }

    .admin-sidebar-active .admin-overlay {
        opacity: 1;
        visibility: visible;
    }

    .admin-sidebar-active .admin-hamburger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .admin-sidebar-active .admin-hamburger span:nth-child(2) {
        opacity: 0;
    }
    .admin-sidebar-active .admin-hamburger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .admin-main {
        padding: 16px;
    }

    .admin-topbar {
        margin-bottom: 24px;
    }

    .admin-topbar h1 {
        font-size: 24px;
    }

    .admin-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .data-table td, .data-table th {
        padding: 12px 16px;
        font-size: 13px;
    }
}

.card h2 {
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 700;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-full {
    grid-column: span 2;
}

.field label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.field input:not([type="checkbox"]), 
.field select, 
.field textarea {
    width: 100%;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.field input:focus, 
.field select:focus, 
.field textarea:focus {
    outline: none;
    background: white;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb, 219, 137, 102), 0.1);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}

.checkbox input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    cursor: pointer;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.data-table th {
    background: #f1f5f9;
    padding: 16px 24px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.data-table td {
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #334155;
  font-size: 15px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr {
    transition: background 0.2s ease;
}

.data-table tr:hover {
    background: #f8fafc;
}

.data-table select {
  padding: 8px 32px 8px 12px;
  font-size: 13px;
  border-radius: 8px;
  background-position: right 10px center;
  background-size: 14px;
  min-width: 140px;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-stock-in { background: #dcfce7; color: #166534; }
.badge-stock-low { background: #fef9c3; color: #854d0e; }
.badge-stock-out { background: #fee2e2; color: #991b1b; }
.badge-category { background: #f1f5f9; color: #475569; }

.table-actions {
    display: flex;
    gap: 8px;
}

.table-actions form,
.inline-form {
  display: inline-flex;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
}

.order-items-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-items-inline span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #ffffff;
}

.admin-login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #ffffff;
}

.admin-login-card {
  width: min(420px, calc(100% - 32px));
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

@media (max-width: 960px) {
  .hero-grid,
  .checkout-layout,
  .cart-layout,
  .product-detail,
  .admin-grid,
  .footer-grid,
  .filters,
  .stats-grid,
  .category-grid,
  .product-grid {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .field-full {
    grid-column: span 1 !important;
  }

  .main-nav {
    grid-auto-flow: row;
    justify-items: start;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    padding-bottom: 0;
  }

  .order-meta,
  .order-tracker {
    grid-template-columns: 1fr;
  }
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.search-overlay[hidden] {
  display: none !important;
}

.search-close {
  position: absolute;
  top: 40px;
  right: 40px;
  font-size: 48px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  opacity: 0.5;
  transition: opacity 0.3s, transform 0.3s;
}

.search-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

.search-container {
  width: min(800px, 90%);
  text-align: center;
}

.search-form input {
  width: 100%;
  border: none;
  border-bottom: 3px solid var(--line);
  background: none;
  font-size: 3rem;
  font-weight: 800;
  padding: 20px 0;
  color: var(--text);
  outline: none;
  transition: border-color 0.3s;
  text-align: center;
}

.search-form input::placeholder {
  color: var(--line);
}

.search-form input:focus {
  border-color: var(--brand);
}

.search-hint {
  margin-top: 24px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 14px;
}

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

@media (max-width: 768px) {
  .search-form input {
    font-size: 1.5rem;
  }
  .search-close {
    top: 20px;
    right: 20px;
    font-size: 32px;
  }
}

/* Sales Boosting Styles */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.trust-item svg {
  color: var(--brand);
}

/* Exit Intent Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1150;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay[hidden] {
    display: none !important;
}

.modal-content.glass {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.2);
    border-radius: 24px;
    position: relative;
    max-width: 440px;
    width: 100%;
    padding: 40px 32px;
    animation: modal-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e5e7eb;
    transform: rotate(90deg);
}

@keyframes modal-pop {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.exit-modal h2 {
    font-size: 28px;
    margin: 8px 0 16px;
    color: #111827;
}

.exit-modal p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 24px;
}

.related-section {
  margin-top: 80px;
  padding-top: 64px;
  border-top: 1px solid var(--line);
}

.related-section h2 {
  margin-bottom: 32px;
}

/* Side Cart Drawer */
.side-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1100;
  animation: fadeIn 0.3s ease;
}

.side-cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 90%);
  background: var(--bg);
  z-index: 1101;
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.side-cart[hidden], .side-overlay[hidden] {
  display: none !important;
}

.side-cart-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.side-cart-close {
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
}

.side-cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.side-cart-footer {
  padding: 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Shipping Progress Bar */
.shipping-goal {
  background: var(--surface-soft);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  text-align: center;
}

.shipping-goal p {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.progress-bar-wrap {
  height: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--brand);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Side Cart Items */
.side-cart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-cart-extra {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.side-cart-extra .eyebrow {
  display: block;
  margin-bottom: 12px;
}

.side-cart-suggestions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  align-items: center;
}

.mini-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.mini-item h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.mini-item p {
  font-size: 13px;
  color: var(--muted);
}

.mini-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.mini-qty button {
  width: 24px;
  height: 24px;
  background: var(--surface-soft);
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.remove-item-btn {
  width: 26px;
  height: 26px;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.2s, background 0.2s;
  margin-left: 2px;
}

.remove-item-btn:hover {
  color: #ef4444;
  background: #fee2e2;
}

.discount-line {
  color: #16a34a;
  font-weight: 600;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.link-button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  text-decoration: underline;
  padding: 0;
}

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


@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* Account Dashboard */
.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

@media (max-width: 992px) {
    .account-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .account-sidebar {
        position: static;
        margin-bottom: 8px;
    }

    .account-sidebar-nav {
        flex-direction: row !important;
        overflow-x: auto;
        padding-bottom: 12px;
        gap: 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }

    .account-sidebar-nav::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }

    .account-sidebar-nav a {
        white-space: nowrap;
        padding: 10px 20px !important;
        flex-shrink: 0;
    }
}
.account-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--surface);
    padding: 12px;
    border-radius: 20px;
    border: 1px solid var(--line);
}

.account-main h1 {
    font-size: 2.5rem;
    margin: 8px 0;
}

.account-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 500;
    transition: all 0.3s ease;
}

.account-sidebar-nav a:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.account-sidebar-nav a.active {
    background: var(--brand);
    color: white;
    box-shadow: 0 10px 20px rgba(var(--brand-rgb, 219, 137, 102), 0.2);
}

.account-sidebar-nav a i {
    font-size: 1.1em;
}

.account-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 600px) {
    .account-stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--surface);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.section-card {
    background: var(--surface);
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--line);
    margin-bottom: 24px;
}

.section-card-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-card h3 {
    margin-bottom: 8px;
}

.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.address-card {
    border: 1px solid var(--line);
    padding: 24px;
    border-radius: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.address-card:hover {
    border-color: var(--brand);
}

.address-card.is-default {
    border-color: var(--brand);
    background: rgba(var(--brand-rgb, 219, 137, 102), 0.05);
}

.address-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: var(--brand);
    color: white;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Modal UI */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: var(--surface);
    width: 100%;
    max-width: 500px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    padding: 32px 32px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 22px;
    margin: 0;
}

.modal-close {
    background: var(--surface-soft);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: var(--muted);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 16px 32px 40px;
}

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

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.address-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
    color: var(--text);
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb, 219, 137, 102), 0.1);
}

.form-group input::placeholder {
    color: var(--muted);
    opacity: 0.5;
}

@media (max-width: 992px) {
    .account-layout {
        grid-template-columns: 1fr;
    }
    
    .account-sidebar {
        position: static;
    }
    
    .account-sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 8px;
    }
    
    .account-sidebar-nav a {
        white-space: nowrap;
        padding: 10px 16px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  transform: translateX(-30px);
}

.reveal-right {
  transform: translateX(30px);
}

.reveal-zoom {
  transform: scale(0.95);
}

/* Staggered Delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Mobile Navigation Dock */
.mobile-dock {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 420px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    padding: 6px 4px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    justify-content: space-evenly;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 0;
    width: 25%;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dock-item span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

.dock-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.dock-item:hover, .dock-item.active {
    background: none;
    color: var(--brand);
}

.dock-item:hover svg, .dock-item.active svg {
    opacity: 1;
    transform: translateY(-1px);
}

.dock-item:hover span, .dock-item.active span {
    opacity: 1;
}

.dock-cart-icon {
    position: relative;
}

.dock-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--brand);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 4px;
    border: 2px solid #fff;
}

@media (max-width: 768px) {
    .mobile-dock {
        display: flex;
    }
    
    /* Hide site footer to prevent overlap padding if needed, or add bottom padding to body */
    body {
        padding-bottom: 100px;
    }
}

/* Ensure admin pages don't show the user dock */
.admin-body .mobile-dock {
    display: none !important;
}

/* Improved Cart Mobile Visibility */
@media (max-width: 768px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .cart-item {
        grid-template-columns: 120px 1fr;
        gap: 20px;
        padding: 20px;
        align-items: start;
    }
    
    .cart-item img {
        width: 120px;
        height: 120px;
        border-radius: 16px;
    }
    
    .cart-item h3 {
        font-size: 15px;
        line-height: 1.4;
        margin-bottom: 4px;
    }
    
    .cart-item-price {
        font-size: 16px;
        font-weight: 700;
        color: var(--brand);
    }
    
    .qty-controls {
        margin-top: 12px;
        transform: scale(0.9);
        transform-origin: left center;
    }
}

@media (max-width: 480px) {
    .cart-item {
        grid-template-columns: 100px 1fr;
        padding: 16px;
        gap: 16px;
    }
    
    .cart-item img {
        width: 100px;
        height: 100px;
    }
    
    .cart-summary {
        padding: 20px;
    }
}
