:root {
  --primary: #815a3f;
  /* Brown */
  --secondary: #ffcab4;
  /* Peach */
  --accent: #815a3f;
  /* Brown Accent */
  --bg-color: #ffffff;
  /* Pure White */
  --text-dark: #333333;
  /* Brown */
  --text-light: #fff6e8;
  --glass-bg: rgba(255, 246, 232, 0.8);
  --glass-border: rgba(129, 90, 63, 0.2);
  --shadow: 0 8px 32px 0 rgba(129, 90, 63, 0.15);
  --border-radius: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

body {
  background: var(--bg-color);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 700;
  color: var(--accent);
}

/* Layout */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-container img {
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.logo-container img:hover {
  transform: rotate(10deg) scale(1.1);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  margin-left: 20px;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Buttons */
.btn {
  background: linear-gradient(45deg, var(--primary), var(--accent));
  color: var(--text-light);
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(129, 90, 63, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(129, 90, 63, 0.3);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--accent);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--text-light);
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Glassmorphism Cards */
.glass-card {
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  padding: 30px;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.product-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 15px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.product-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  background: #fafafa;
}

.product-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-weight: 600;
}

.product-desc-teaser {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 15px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.product-price {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.add-to-cart-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.add-to-cart-btn:hover {
  background: #6a4933;
}

.badge {
  position: absolute;
  top: 25px;
  right: 25px;
  background: #fdcbb4;
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Admin Dashboard Specific */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 80px);
  /* Minus navbar */
}

.sidebar {
  width: 250px;
  background: var(--glass-bg);
  padding: 20px;
  border-right: 1px solid var(--glass-border);
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 15px;
}

.sidebar-menu a {
  display: block;
  padding: 12px 20px;
  border-radius: 15px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  transition: all 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: var(--primary);
  color: #fff;
}

.admin-content {
  flex: 1;
  padding: 30px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  text-align: center;
}

.stat-card i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-dark);
}

.stat-label {
  color: #666;
  font-size: 0.9rem;
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.data-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.data-table tr:hover {
  background: #fdf5f6;
}

.product-img-mini {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 12px;
  font-size: 1rem;
  transition: border-color 0.3s;
  background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
}

/* Scanner Section */
.scanner-area {
  border: 2px dashed var(--primary);
  border-radius: var(--border-radius);
  padding: 40px;
  text-align: center;
  background: rgba(255, 202, 180, 0.2);
  margin-bottom: 30px;
  cursor: pointer;
  transition: background 0.3s;
}

.scanner-area:hover,
.scanner-area.dragover {
  background: rgba(255, 202, 180, 0.4);
}

.scanner-icon {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 15px;
}

/* Loading Overlay */
#loader {
  display: none;
  text-align: center;
  margin: 20px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--secondary);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Animations */
.animate-pop {
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* =========================================
   HERO SECTION REDESIGN (Dark Elegant Theme)
   ========================================= */

.hero-wrapper {
  background-color: #fff6e7;
  color: var(--text-dark);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 30px 30px;
  display: flex;
  flex-direction: column;
}

/* Hero Navbar */
.hero-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 5%;
  position: relative;
  z-index: 10;
}

.hero-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--secondary);
  /* Peach (#ffcab4) */
  letter-spacing: 2px;
}

.hero-logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
  display: block;
}

.hero-nav-links {
  display: flex;
  gap: 30px;
}

.hero-nav-links a {
  text-decoration: none;
  color: #888;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  padding-bottom: 5px;
}

.hero-nav-links a:hover,
.hero-nav-links a.active {
  color: var(--primary);
}

.hero-nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
}

.hero-nav-icons {
  display: flex;
  align-items: center;
  gap: 25px;
}

.hero-nav-icons a {
  color: var(--primary);
  font-size: 1.2rem;
  transition: color 0.3s;
}

.hero-nav-icons a:hover {
  color: var(--accent);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: var(--secondary);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

/* Hero Layout */
.hero-content {
  flex: 1;
  display: flex;
  padding: 0 8%;
  position: relative;
  z-index: 5;
}

.hero-bg-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: auto;
  transform: translateY(-50%);
  z-index: -1;
  pointer-events: none;
}

.hero-left {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-main-image-wrapper {
  position: relative;
  width: 450px;
  height: 600px;
}

/* The glowing thin border ring */
.hero-main-image-wrapper::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  border: 1px solid var(--primary);
  border-radius: 250px 250px 150px 150px;
  z-index: -1;
}

.hero-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 250px 250px 150px 150px;
  /* Arched shape */
  background-color: #e5e0e8;
  /* Soft lilac backdrop */
}

/* Floating Elements */
.floating-badge {
  position: absolute;
}

.size-badge {
  bottom: 80px;
  left: -40px;
  background-color: var(--secondary);
  color: var(--primary);
  padding: 20px 15px;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.badge-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.badge-value {
  font-size: 1.2rem;
  font-weight: 700;
}

.typographic-circle {
  top: 50%;
  right: -50px;
  transform: translateY(-50%);
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.typographic-circle svg {
  animation: spinSlowly 10s linear infinite;
}

@keyframes spinSlowly {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.circle-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 4px;
  fill: var(--primary);
}

.right-arrow-accent {
  position: absolute;
  color: var(--primary);
  font-size: 1.5rem;
  transform: rotate(45deg);
}

/* Hero Right Side Text */
.hero-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 5%;
  position: relative;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  line-height: 1.1;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 20px;
}

.title-divider {
  width: 60px;
  height: 2px;
  background-color: var(--primary);
  margin-bottom: 30px;
}

.hero-price-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 60px;
}

.price-strikethrough {
  color: #a0a5b1;
  text-decoration: line-through;
  font-size: 1.1rem;
  font-weight: 500;
  margin-left: 10px;
}

.price-active {
  color: #ffc107;
  font-size: 2.5rem;
  font-weight: 700;
}

.price-action-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-btn-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.hero-btn-icon:hover {
  border-color: #fff;
}

.hero-btn-icon.btn-white {
  background: #fff;
  color: #1a1f2c;
  border-color: #fff;
}

.hero-btn-icon.btn-white:hover {
  background: #f0f0f0;
}

/* Secondary Graphic right bottom */
.hero-secondary-image-wrapper {
  position: absolute;
  bottom: -40px;
  right: 10%;
  width: 180px;
  height: 250px;
}

.hero-secondary-image-wrapper::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 1px solid var(--primary);
  border-radius: 100px 100px 100px 100px;
  z-index: -1;
}

.hero-secondary-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 100px;
  background-color: #e5d1ae;
  /* Sandy backdrop */
}

.hover-arrow {
  position: absolute;
  bottom: 20px;
  right: -25px;
  background: var(--primary);
  color: var(--bg-color);
  transform: rotate(45deg);
}

.secondary-image-label {
  position: absolute;
  bottom: -70px;
  right: 10%;
  width: 180px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.label-line {
  width: 20px;
  height: 1px;
  background-color: var(--primary);
}

/* Bottom Thumbnails */
.hero-bottom-thumbnails {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 30px;
}

.hero-thumb-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.hero-thumb {
  width: 80px;
  height: 80px;
  border-radius: 40px 40px 10px 10px;
  background-color: #fff;
  padding: 10px;
  transition: transform 0.3s;
}

.hero-thumb-wrapper.active .hero-thumb {
  background-color: #e5e0e8;
  height: 100px;
  transform: translateY(-20px);
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px 30px 5px 5px;
}

.thumb-label {
  opacity: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  margin-top: -10px;
  transition: opacity 0.3s;
}

.hero-thumb-wrapper.active .thumb-label {
  opacity: 1;
}

/* =========================================
   TOP CATEGORIES SECTION
   ========================================= */

.category-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.cat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(129, 90, 63, 0.1);
  padding: 20px 30px;
  border-radius: 20px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 130px;
  box-shadow: 0 10px 20px rgba(129, 90, 63, 0.05);
}

.cat-pill i {
  font-size: 2.2rem;
  margin-bottom: 15px;
  color: var(--secondary);
  transition: transform 0.3s;
}

.cat-pill:hover {
  transform: translateY(-8px);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 15px 30px rgba(129, 90, 63, 0.2);
  border-color: var(--primary);
}

.cat-pill:hover i {
  color: var(--secondary);
  transform: scale(1.1);
}

/* =========================================
   MOBILE RESPONSIVENESS (PWA APP FEEL)
   ========================================= */
@media (max-width: 768px) {

  /* Navbar: Hide text links, keep only logo and icons */
  .hero-nav-links {
    display: none !important;
  }

  .hero-navbar {
    padding: 15px 20px;
    justify-content: space-between;
  }

  /* Hero Section: Stack Vertically */
  .hero-content {
    flex-direction: column;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    gap: 60px;
  }

  .hero-title {
    font-size: 3rem;
    line-height: 1.1;
  }

  .hero-desc-block {
    margin: 0 auto 30px auto !important;
  }

  /* Shrink the main image wrapper to fit phone width */
  .hero-main-image-wrapper {
    width: 100%;
    max-width: 300px;
    height: 400px;
    margin: 0 auto;
  }

  .hero-bottom-thumbnails {
    bottom: -20px;
  }

  /* Categories: Horizontal Swipe Scroll */
  .category-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 10px 20px;
    gap: 15px;
    /* Hide scrollbar but keep functionality */
    -ms-overflow-style: none;
    scrollbar-width: none;
    border-radius: 20px;
  }

  .category-row::-webkit-scrollbar {
    display: none;
  }

  .cat-pill {
    flex: 0 0 auto;
    min-width: 110px;
    padding: 15px 20px;
  }

  .cat-pill i {
    font-size: 1.8rem;
  }

  /* Products: 2 Items per row */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 10px;
  }

  .product-card {
    padding: 10px;
  }

  .product-title {
    font-size: 1rem;
  }

  .product-price {
    font-size: 1.1rem;
  }

  /* Admin Panel Fixes */
  .admin-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    min-height: auto;
    padding: 20px;
  }

  .sidebar-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .sidebar-menu li {
    margin-bottom: 0;
  }

  .sidebar-menu a {
    padding: 10px 15px;
    border-radius: 20px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  /* Global Container Adjustments */
  .container {
    width: 100%;
    padding: 0 15px;
  }
}