:root {
  --tea-green: #ccd5aeff;
  --beige: #e9edc9ff;
  --cornsilk: #fefae0ff;
  --papaya-whip: #faedcdff;
  --light-bronze: #d4a373ff;
  --deep-forest: #2c3b2eff;
  --espresso-brown: #825C3F;
  --soft-charcoal: #3a3c38ff;
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Reset & Typography */
html {
  box-sizing: border-box;
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

html::-webkit-scrollbar {
  display: none;
}

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

/* Custom Text Selection Highlight */
::selection {
  background-color: var(--espresso-brown);
  color: var(--cornsilk);
}

::-moz-selection {
  background-color: var(--espresso-brown);
  color: var(--cornsilk);
}

body {
  font: 100%/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--cornsilk);
  color: var(--soft-charcoal);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* Hide scrollbar for IE, Edge and Firefox */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
  display: none;
}

/* Custom Scroll Indicator: Top Reading Progress Bar */
.custom-scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--espresso-brown);
  transform-origin: 0 50%;
  animation: scroll-progress-top linear auto both;
  animation-timeline: scroll();
  z-index: 99999;
  pointer-events: none;
}

@keyframes scroll-progress-top {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--deep-forest);
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
  margin-bottom: 2rem;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-optical-sizing: auto;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

a {
  color: var(--deep-forest);
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
  color: var(--espresso-brown);
}

/* Layout Classes */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background-color: rgba(204, 213, 174, 0.7);
  /* translucent tea-green */
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.site-header-top,
.site-header-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  gap: 1rem;
}

.site-header-bottom {
  border-top: 1px solid rgba(44, 59, 46, 0.15);
  padding: 0;
  align-items: stretch;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--deep-forest);
}

.site-logo img {
  max-height: 48px;
  width: auto;
}

.header-icons {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.header-icon {
  color: var(--deep-forest);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease, transform 0.2s ease;
}

.header-icon svg {
  width: 100%;
  height: 100%;
}

.header-icon:hover {
  color: var(--espresso-brown);
  transform: scale(1.05);
}

.header-icon:active {
  transform: scale(0.92);
  transition: transform 100ms ease-out;
}

.category-dropdown {
  position: relative;
  display: flex;
  align-items: stretch;
}

.category-btn {
  background: none;
  border: none;
  font-weight: 500;
  font-size: 1.1rem;
  font-family: inherit;
  color: var(--deep-forest);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 0;
}

.category-btn:hover,
.category-dropdown.is-active .category-btn {
  color: var(--espresso-brown);
  background-color: transparent;
}

.category-content {
  display: none;
  position: absolute;
  background-color: var(--cornsilk);
  min-width: 240px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 100;
  border-radius: 4px;
  border: 1px solid var(--light-bronze);
  top: 100%;
  left: 0;
  margin-top: 0;
}

.category-dropdown:hover .category-content,
.category-dropdown.is-active .category-content {
  display: block;
}

.category-content a {
  color: var(--soft-charcoal);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(212, 163, 115, 0.2);
}

.category-content a:last-child {
  border-bottom: none;
}

.category-content a:hover {
  background-color: var(--beige);
  color: var(--deep-forest);
}

/* Horizontal Categories on Desktop */
@media (min-width: 769px) {
  .category-dropdown {
    width: 100%;
  }

  .category-btn {
    display: none;
  }

  .category-content {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: transparent;
    box-shadow: none;
    border: none;
    justify-content: center;
    gap: 2.5rem;
    width: 100%;
  }

  .category-content a {
    padding: 10px 0;
    border: none;
    font-size: 1.05rem;
    font-weight: 500;
    position: relative;
  }

  .category-content a:hover {
    background-color: transparent;
    color: var(--espresso-brown);
  }

  .category-content a::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--espresso-brown);
    transition: width 0.3s ease;
  }

  .category-content a:hover::after {
    width: 100%;
  }

  .site-header-bottom {
    border-top: 1px solid rgba(44, 59, 46, 0.15);

  }
}

.search-bar {
  display: flex;
  align-items: center;
  position: relative;
  width: 28px;
  /* Same width as header-icon */
  transition: width 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  margin: 0;
}

.search-bar.is-expanded {
  width: 200px;
}

.search-input {
  opacity: 0;
  width: 100%;
  padding: 0.65rem 3rem 0.65rem 1.25rem;
  border: 1px solid var(--light-bronze);
  border-radius: 30px;
  outline: none;
  font-family: inherit;
  background-color: var(--cornsilk);
  transition: opacity 0.3s ease;
  pointer-events: none;
  position: absolute;
  right: 0;
}

.search-bar.is-expanded .search-input {
  opacity: 1;
  pointer-events: auto;
}

.search-btn {
  background: transparent;
  color: var(--deep-forest);
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 6px;
  z-index: 10;
}

.search-btn:hover {
  color: var(--espresso-brown);
  background-color: transparent !important;
}

@media (max-width: 600px) {

  .site-header-top {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
  }

  .brand-text {
    display: none;
  }

  .site-header-bottom {
    flex-direction: column;
    justify-content: center;
  }
}

/* Main Content */
.site-main {
  flex: 1;
  padding: 40px 0;
}

/* Footer */
.site-footer {
  background-color: var(--beige);
  padding: 20px 0;
  text-align: center;
  color: var(--espresso-brown);
  margin-top: auto;
}

/* Buttons */
button,
.btn {
  display: inline-block;
  background-color: var(--deep-forest);
  color: var(--cornsilk);
  border: none;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border-radius: 4px;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.3s ease;
}

button:hover,
.btn:hover {
  background-color: var(--espresso-brown);
  color: var(--cornsilk);
}

button:active,
.btn:active {
  transform: scale(0.97);
  transition: transform 100ms ease-out;
}

button:disabled,
.btn:disabled {
  background-color: var(--light-bronze);
  cursor: not-allowed;
}

/* Grid & Cards (Homepage & Product Listing) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
}

.product-card {
  border: 1px solid var(--light-bronze);
  padding: 1.5rem;
  border-radius: 8px;
  background-color: var(--beige);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(44, 59, 46, 0.12);
}

.product-card:hover .btn {
  background-color: var(--espresso-brown);
  color: var(--cornsilk);
}

.product-card:active {
  transform: scale(0.98);
  transition: transform 100ms ease-out, box-shadow 100ms ease-out;
  box-shadow: 0 2px 8px rgba(44, 59, 46, 0.08);
}

.product-card-img-wrapper {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
  background-color: var(--tea-green);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.product-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.product-card .price {
  margin: 0 0 1rem 0;
  color: var(--soft-charcoal);
  font-weight: bold;
}

.product-card .btn {
  margin-top: auto;
  width: 100%;
}

/* Product Detail Page */
.product-detail-layout {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.product-gallery-column {
  flex: 1 1 400px;
}

.product-info-column {
  flex: 1 1 300px;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.main-product-image {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--light-bronze);
}

.thumbnail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 1rem;
}

.gallery-thumbnail {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--light-bronze);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
  border-color: var(--espresso-brown);
}

.add-to-cart-container {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.qty-selector {
  width: 70px;
  height: 44px;
  border: 1px solid var(--light-bronze);
  border-radius: 4px;
  padding: 0 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  text-align: center;
  background: white;
  color: var(--soft-charcoal);
  box-sizing: border-box;
}

.checkout-btn {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.qty-selector:focus {
  outline: none;
  border-color: var(--espresso-brown);
}

.promo-codes-container {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--light-bronze);
  line-height: 1.3;
}

.promo-codes-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.promo-codes-list {
  padding-left: 1.25rem;
  margin: 0;
}

.promo-codes-list li {
  margin-bottom: 0.15rem;
}

.promo-code {
  cursor: pointer;
  color: var(--light-bronze);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.promo-code:hover {
  color: var(--espresso-brown);
}

.promo-btn {
  background-color: var(--sage-green);
  color: var(--espresso-brown);
  border: 1px solid var(--light-bronze);
  font-weight: 500;
}

.promo-btn:hover {
  background-color: var(--light-bronze);
}

.product-description,
.product-features,
.size-guide-section {
  margin-top: 2rem;
  line-height: 1.6;
}

.size-guide-section {
  background-color: var(--beige);
  border: 1px solid var(--light-bronze);
  border-radius: 8px;
  padding: 1.5rem;
}

.product-features ul,
.size-guide-section ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.product-features li,
.size-guide-section li {
  margin-bottom: 0.5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2rem;
  color: var(--soft-charcoal);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--deep-forest);
}

.breadcrumb a:hover {
  color: var(--espresso-brown);
  text-decoration: underline;
}

.product-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--espresso-brown);
  margin-bottom: 1.5rem;
}

/* Tabs */
.page-separator {
  border: 0;
  height: 1px;
  background: var(--light-bronze);
  opacity: 0.5;
  margin: 3rem 0;
}

.tabs-container {
  max-width: 1200px;
  margin: 0 auto;
}

.tabs-header {
  display: flex;
  gap: 2rem;
  border-bottom: 2px solid var(--light-bronze);
  margin-bottom: 2rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 1rem 0;
  font-size: 1.2rem;
  font-family: var(--font-heading);
  color: var(--soft-charcoal);
  cursor: pointer;
  position: relative;
  top: 2px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--espresso-brown);
  background-color: transparent;
}

.tab-btn.active {
  color: var(--espresso-brown);
  border-bottom-color: var(--deep-forest);
  font-weight: 600;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.variant-btn {
  background-color: var(--beige);
  color: var(--espresso-brown);
  border: 1px solid var(--espresso-brown);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.variant-btn.selected {
  background-color: var(--tea-green);
  color: var(--deep-forest);
  border-color: var(--deep-forest);
}

/* Cart Page */
.cart-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem;
  border: 1px solid var(--light-bronze);
  border-radius: 8px;
  background-color: var(--beige);
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cart-item-img-link {
  flex: 0 0 100px;
}

.cart-item-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--light-bronze);
}

.cart-item-details {
  flex: 1;
  min-width: 200px;
}

.cart-item-details h3 {
  margin: 0;
  font-size: 1.25rem;
}

.cart-item-details p {
  margin: 0.5rem 0 0 0;
  color: var(--soft-charcoal);
}

.cart-item-actions {
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-price {
  margin: 0;
  font-weight: bold;
  font-size: 1.25rem;
}

.cart-item-controls {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
}

.cart-qty {
  width: 60px;
  padding: 0.4rem;
  border: 1px solid var(--light-bronze);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.remove-btn {
  background-color: #d9534f;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
}

.remove-btn:hover {
  background-color: #c9302c;
}

.cart-extras {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.cart-notes,
.cart-discount {
  flex: 1 1 300px;
}

.cart-summary {
  margin-top: 3rem;
  text-align: right;
  border-top: 2px solid var(--tea-green);
  padding-top: 1.5rem;
}

.cart-summary h3 {
  font-size: 1.75rem;
}

.checkout-btn {
  font-size: 1.25rem;
  padding: 1rem 2.5rem;
}

/* Forms & Admin Dashboard (Apple Design System) */
.admin-dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-title {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
  color: var(--deep-forest);
}

.admin-subtitle {
  color: var(--soft-charcoal);
  font-size: 1.05rem;
  margin: 0;
}

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

/* Button Variants */
.btn-primary {
  background-color: var(--deep-forest);
  color: var(--cornsilk);
}

.btn-secondary {
  background-color: var(--tea-green);
  color: var(--deep-forest);
  border: 1px solid rgba(44, 59, 46, 0.2);
}

.btn-secondary:hover {
  background-color: var(--espresso-brown);
  color: var(--cornsilk);
}

.btn-outline {
  background-color: transparent;
  color: var(--deep-forest);
  border: 1px solid var(--light-bronze);
}

.btn-outline:hover {
  background-color: var(--beige);
  color: var(--deep-forest);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Metrics Overview */
.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.admin-metric-card {
  background: rgba(233, 237, 201, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(44, 59, 46, 0.12);
  border-radius: 14px;
  padding: 1.15rem 1.4rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(44, 59, 46, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  user-select: none;
  position: relative;
  gap: 1rem;
}

.admin-metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--deep-forest);
  background: rgba(233, 237, 201, 0.95);
  box-shadow: 0 8px 24px rgba(44, 59, 46, 0.12);
}

.admin-metric-card:active {
  transform: translateY(-1px) scale(0.99);
}

.admin-metric-card.active {
  border-color: var(--deep-forest);
  background: var(--cornsilk);
  box-shadow: 0 0 0 3px rgba(44, 59, 46, 0.15), 0 8px 20px rgba(44, 59, 46, 0.1);
}

.admin-metric-card.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 4px;
  background: var(--deep-forest);
  border-radius: 4px 4px 0 0;
}

.metric-label {
  font-size: 0.98rem;
  color: var(--deep-forest);
  font-weight: 600;
  white-space: nowrap;
}

.metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--deep-forest);
  line-height: 1;
}

/* Catalog Filter Bar & Breadcrumbs */
.catalog-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--beige);
  border: 1px solid var(--light-bronze);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  animation: slideDown 0.25s ease-out;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.crumb-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--deep-forest);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.crumb-btn:hover {
  background: rgba(44, 59, 46, 0.08);
  text-decoration: underline;
}

.crumb-sep {
  color: var(--soft-charcoal);
  font-size: 1.1rem;
  opacity: 0.6;
}

.crumb-target {
  font-weight: 700;
  color: var(--deep-forest);
  padding: 0.25rem 0.5rem;
  background: var(--cornsilk);
  border-radius: 6px;
  border: 1px solid rgba(44, 59, 46, 0.15);
}

.crumb-count-badge {
  background: var(--deep-forest);
  color: var(--cornsilk);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
}

.btn-clear-filter {
  background: var(--cornsilk);
  border: 1px solid var(--light-bronze);
  color: var(--soft-charcoal);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear-filter:hover {
  background: #f8d7da;
  color: #721c24;
  border-color: #f5c6cb;
}

/* Category Browser Grid View */
.category-browser-view {
  background: rgba(254, 250, 224, 0.95);
  border: 1px solid var(--light-bronze);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-browser-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(44, 59, 46, 0.1);
  padding-bottom: 0.75rem;
}

.category-browser-title {
  margin: 0;
  font-size: 1.25rem;
  color: var(--deep-forest);
  font-weight: 700;
}

.category-browser-sub {
  margin: 0.25rem 0 0 0;
  font-size: 0.9rem;
  color: var(--soft-charcoal);
}

.category-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.admin-category-card {
  background: var(--cornsilk);
  border: 1px solid rgba(44, 59, 46, 0.15);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.admin-category-card:hover {
  transform: translateY(-3px);
  border-color: var(--deep-forest);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(44, 59, 46, 0.1);
}

.cat-card-thumbnail {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--tea-green);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(44, 59, 46, 0.1);
  flex-shrink: 0;
}

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

.cat-card-placeholder {
  font-size: 1.5rem;
}

.cat-card-body {
  flex: 1;
  min-width: 0;
}

.cat-card-name {
  margin: 0 0 0.35rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--deep-forest);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.cat-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.cat-pill.total-pill {
  background: var(--tea-green);
  color: var(--deep-forest);
}

.cat-sub-meta {
  font-size: 0.75rem;
  color: var(--soft-charcoal);
}

.cat-card-arrow {
  font-size: 1.2rem;
  color: var(--soft-charcoal);
  transition: transform 0.2s ease, color 0.2s ease;
}

.admin-category-card:hover .cat-card-arrow {
  transform: translateX(3px);
  color: var(--deep-forest);
}

.clickable-badge {
  cursor: pointer;
  transition: all 0.2s ease;
}

.clickable-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(44, 59, 46, 0.15);
  filter: brightness(0.95);
}

/* Tab Navigation */
.admin-tabs-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid rgba(44, 59, 46, 0.1);
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--soft-charcoal);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.admin-tab-btn:hover {
  background-color: rgba(204, 213, 174, 0.4);
  color: var(--deep-forest);
}

.admin-tab-btn.active {
  background-color: var(--deep-forest);
  color: var(--cornsilk);
  box-shadow: 0 2px 8px rgba(44, 59, 46, 0.15);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
  animation: fadeInTab 0.25s ease-out;
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Admin Card Container */
.admin-card {
  background: rgba(254, 250, 224, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(44, 59, 46, 0.15);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 30px rgba(44, 59, 46, 0.05);
  margin-bottom: 3rem;
}

.admin-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--deep-forest);
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.admin-card-desc {
  color: var(--soft-charcoal);
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Alert Notification */
.admin-alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-weight: 500;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Inventory Toolbar & Table */
.inventory-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.inventory-search-wrap {
  flex: 1;
  max-width: 400px;
}

.search-filter {
  background-color: var(--cornsilk);
  border-radius: 20px;
  padding: 0.6rem 1.25rem;
}

.admin-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(44, 59, 46, 0.12);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--cornsilk);
  font-size: 0.95rem;
}

.admin-table th {
  background-color: var(--beige);
  color: var(--deep-forest);
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(44, 59, 46, 0.15);
}

.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(44, 59, 46, 0.08);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background-color: rgba(233, 237, 201, 0.35);
}

.table-thumbnail {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--tea-green);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(44, 59, 46, 0.1);
}

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

.no-thumb {
  font-size: 0.7rem;
  color: var(--deep-forest);
  text-align: center;
}

.product-title-cell {
  color: var(--deep-forest);
  font-size: 1rem;
  display: block;
}

.product-slug-cell {
  font-size: 0.8rem;
  color: #777;
  font-family: monospace;
}

.price-cell {
  font-weight: 700;
  color: var(--espresso-brown);
}

.sku-cell {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--soft-charcoal);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-category {
  background-color: rgba(204, 213, 174, 0.6);
  color: var(--deep-forest);
}

.badge-type.digital {
  background-color: rgba(212, 163, 115, 0.25);
  color: var(--espresso-brown);
}

.badge-type.physical {
  background-color: rgba(44, 59, 46, 0.15);
  color: var(--deep-forest);
}

.table-btn-group {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.action-link {
  background: var(--cornsilk);
  border: 1px solid var(--light-bronze);
  color: var(--deep-forest);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.action-link:hover {
  background-color: var(--deep-forest);
  color: var(--cornsilk);
}

.delete-link:hover {
  background-color: #d9534f;
  border-color: #d9534f;
  color: #fff;
}

/* Forms */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--deep-forest);
}

.form-label.required::after {
  content: ' *';
  color: #d9534f;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(44, 59, 46, 0.2);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background-color: var(--cornsilk);
  color: var(--soft-charcoal);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-textarea {
  resize: vertical;
  min-height: 130px;
  max-width: 100%;
  line-height: 1.55;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--deep-forest);
  box-shadow: 0 0 0 3px rgba(44, 59, 46, 0.1);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* CSV Dropzone */
.bulk-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.csv-dropzone {
  border: 2px dashed var(--light-bronze);
  border-radius: 12px;
  background: rgba(233, 237, 201, 0.4);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.csv-dropzone:hover,
.csv-dropzone.dragover {
  border-color: var(--deep-forest);
  background-color: rgba(204, 213, 174, 0.6);
  transform: scale(1.005);
}

.dropzone-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.csv-dropzone h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
  color: var(--deep-forest);
}

.csv-dropzone p {
  color: var(--soft-charcoal);
  margin: 0;
  font-size: 0.95rem;
}

.preview-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  background: var(--beige);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--light-bronze);
}

.preview-table-container {
  max-height: 450px;
  overflow-y: auto;
}

/* Modal Overlay */
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-modal {
  background: var(--cornsilk);
  border: 1px solid var(--light-bronze);
  border-radius: 16px;
  width: min(92vw, 840px);
  max-width: 840px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  padding: 2.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(44, 59, 46, 0.1);
  padding-bottom: 0.75rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--deep-forest);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--soft-charcoal);
  padding: 0.25rem 0.5rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Profile Page */
.profile-layout {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.profile-card {
  flex: 1 1 300px;
  padding: 2rem;
  border: 1px solid var(--light-bronze);
  border-radius: 8px;
  background-color: var(--beige);
  height: max-content;
  text-align: center;
}

.profile-avatar {
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: block;
  margin: 0 auto 1.5rem auto;
  border: 3px solid var(--tea-green);
}

.profile-orders {
  flex: 2 1 500px;
}

.order-card {
  border: 1px solid var(--light-bronze);
  border-radius: 8px;
  padding: 1.5rem;
  background-color: var(--cornsilk);
  margin-bottom: 1rem;
}

.order-card p {
  margin: 0 0 0.5rem 0;
}

.order-card p:last-child {
  margin-bottom: 0;
}

/* Apple Design: Reduced Motion & Accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .product-card:hover,
  .product-card:active,
  button:active,
  .btn:active,
  .header-icon:active,
  .header-icon:hover {
    transform: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background-color: var(--tea-green);
    backdrop-filter: none;
  }
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--soft-charcoal);
  background-color: var(--beige);
  border-radius: 8px;
  border: 1px dashed var(--light-bronze);
}

/* Search Popover */
.search-popover {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  width: 350px;
  background: rgba(254, 250, 224, 0.85);
  /* cornsilk translucent */
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(44, 59, 46, 0.15);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 1001;
}

@media (max-width: 768px) {
  .search-popover {
    position: fixed;
    top: 56px;
    left: 10px;
    right: 10px;
    width: auto;
  }
}

/* Change the color for normally typed text */
input,
textarea,
select {
  color: #2c3b2e;
}

/* Keep the same color when the browser autofills the input */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 50px #fefae0 inset !important;
  -webkit-text-fill-color: #2c3b2e !important;
  /* Updated to your exact hex code */
  transition: background-color 5000s ease-in-out 0s;
}

.scroller::-webkit-scrollbar {
  display: none;
}

/* Hides scrollbar for Chrome, Safari and Opera */

.scroller {
  -ms-overflow-style: none;
  /* Hides scrollbar for IE and Edge */
  scrollbar-width: none;
  /* Hides scrollbar for Firefox */
}

.search-popover-content {
  max-height: 400px;
  overflow-y: auto;
}

.popover-result-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  border-bottom: 1px solid rgba(44, 59, 46, 0.05);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.popover-result-item:hover {
  background-color: rgba(44, 59, 46, 0.05);
}

.popover-result-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--tea-green);
}

.popover-result-info {
  flex: 1;
  min-width: 0;
}

.popover-result-title {
  color: var(--deep-forest);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.popover-result-price {
  color: var(--espresso-brown);
  font-size: 0.85rem;
  font-weight: 500;
}

.popover-no-results {
  padding: 20px;
  text-align: center;
  color: var(--soft-charcoal);
  font-size: 0.95rem;
}

.search-popover-footer {
  display: block;
  text-align: center;
  padding: 12px;
  background: var(--tea-green);
  color: var(--deep-forest);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.search-popover-footer:hover {
  background-color: #b8c499;
}

/* Search Page Layout */
.search-page-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.search-sidebar {
  flex: 0 0 240px;
  background: var(--beige);
  padding: 1.5rem;
  border-radius: 12px;
  position: sticky;
  top: 100px;
  margin-top: 1.25rem;
}

.search-sidebar h3 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  border-bottom: 2px solid var(--light-bronze);
  padding-bottom: 0.5rem;
}

.filter-group {
  margin-bottom: 1.25rem;
}

.filter-label {
  display: block;
  font-weight: 600;
  color: var(--deep-forest);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.filter-select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--light-bronze);
  border-radius: 6px;
  background-color: var(--cornsilk);
  font-family: inherit;
  color: var(--soft-charcoal);
}

.filter-submit {
  width: 100%;
  margin-top: 1rem;
}

.search-results {
  flex: 1;
}

.search-header {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.search-header-text h1 {
  margin-bottom: 0.25rem;
}

.search-header-text p {
  color: var(--soft-charcoal);
  margin: 0;
}

.search-sort-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-sort-group .filter-label {
  margin-bottom: 0;
  white-space: nowrap;
}

.search-sort-group .filter-select {
  width: auto;
  min-width: 150px;
}

/* Mobile Filter Modal Elements (Hidden on Desktop) */
.mobile-filter-trigger {
  display: none;
}

.mobile-filter-actions {
  display: none;
}

.close-modal-btn {
  display: none;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--light-bronze);
  padding-bottom: 0.5rem;
}

.search-sidebar h3 {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}

/* Mobile Layout (< 1024px) */
@media (max-width: 1024px) {
  .search-page-layout {
    flex-direction: column;
  }

  .search-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Overlay */
  .filter-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 2000;
  }

  .filter-modal-overlay.is-open {
    display: block;
  }

  /* Sidebar transforms into Modal */
  .search-sidebar {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 2001;
    margin: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  }

  .search-sidebar.is-open {
    display: block;
  }

  /* Close Button */
  .close-modal-btn {
    display: block;
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--soft-charcoal);
    cursor: pointer;
    padding: 0;
  }

  /* Mobile Actions */
  .mobile-filter-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid var(--light-bronze);
    padding-top: 1.5rem;
  }

  .mobile-filter-actions .btn {
    flex: 1;
  }

  .mobile-filter-actions .filter-submit {
    margin-top: 0;
  }

  .btn-outline {
    background: transparent;
    color: var(--deep-forest);
    border: 1px solid var(--deep-forest);
  }

  /* Trigger Button */
  .mobile-filter-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    padding: 0;
    background: var(--deep-forest);
    color: var(--cornsilk);
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 20px rgba(44, 59, 46, 0.4);
    cursor: pointer;
    z-index: 1000;
  }

  .mobile-filter-trigger svg {
    width: 32px;
    height: 32px;
  }

  .mobile-filter-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #d9534f;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--cornsilk);
  }
}