/* ---------- GENERAL STYLE IMPROVEMENTS ---------- */
/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Selection styling */
::selection {
  background: rgba(0,102,210,0.2);
  color: #000;
}

::-moz-selection {
  background: rgba(0,102,210,0.2);
  color: #000;
}

/* Focus outline for accessibility */
*:focus {
  outline: 2px solid #0064d2;
  outline-offset: 2px;
}

/* Disable focus outline for mouse users */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Custom focus for keyboard users */
*:focus-visible {
  outline: 2px solid #0064d2;
  outline-offset: 2px;
}

/* Marketplace-style design tokens */
:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface-muted: #f7f8fa;
  --border: #e4e6eb;
  --text: #050505;
  --text-muted: #65676b;
  --primary: #1877f2;
  --primary-hover: #166fe5;
  --success: #31a24c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* Improved typography */
body {
  font-family: 'Noto Sans Georgian', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Paragraph styling - compact */
p {
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

/* Improved heading hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: #2c3e50;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.75rem 0;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.95rem; }
h6 { font-size: 0.9rem; }

/* Improved link styling */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* Improved list styling */
ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Improved form styling */
input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Improved button styling */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
}

/* Improved table styling */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

/* Improved image styling */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Improved code styling */
code {
  background: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

pre {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  line-height: 1.5;
}

/* Improved blockquote styling */
blockquote {
  border-left: 4px solid #0064d2;
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background: #f8f9fa;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

/* Improved horizontal rule */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #dee2e6, transparent);
  margin: 2rem 0;
}

/* ---------- SHOP LAYOUT STYLES ---------- */

/* Top bar */
.top-bar {
  background: var(--surface);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.top-bar-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-sizing: border-box;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

.top-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  position: relative;
}

.top-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.top-nav a:hover {
  background: #eef0f3;
  text-decoration: none;
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  position: relative;
}

.cart-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.cart-text {
  line-height: 1;
}

.cart-count {
  line-height: 1;
  display: inline-block;
  min-width: 2rem;
  text-align: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

@keyframes cartBounce {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.3) rotate(-15deg);
  }
  50% {
    transform: scale(1.2) rotate(15deg);
  }
  75% {
    transform: scale(1.1) rotate(-5deg);
  }
}

@keyframes cartShake {
  0% {
    background-color: rgba(255,255,255,0.1);
    color: white;
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
  5% {
    background-color: rgba(40, 167, 69, 0.4);
    color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
  }
  10% {
    background-color: rgba(40, 167, 69, 0.5);
    color: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.4);
  }
  15% {
    background-color: rgba(40, 167, 69, 0.45);
    color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.35);
  }
  20% {
    background-color: rgba(40, 167, 69, 0.5);
    color: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.4);
  }
  25% {
    background-color: rgba(40, 167, 69, 0.45);
    color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
  }
  30% {
    background-color: rgba(40, 167, 69, 0.4);
    color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
  }
  35%, 50% {
    background-color: rgba(40, 167, 69, 0.5);
    color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
  }
  60% {
    background-color: rgba(40, 167, 69, 0.4);
    color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
  }
  70% {
    background-color: rgba(40, 167, 69, 0.3);
    color: #28a745;
    box-shadow: 0 0 0 1px rgba(40, 167, 69, 0.15);
  }
  80% {
    background-color: rgba(40, 167, 69, 0.2);
    color: #fff;
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
  90% {
    background-color: rgba(255,255,255,0.15);
    color: #fff;
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
  100% {
    background-color: rgba(255,255,255,0.1);
    color: white;
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

/* Search form */
.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  flex: 1;
  max-width: 520px;
  margin: 0 1rem;
}

.search-form input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  background: var(--surface-muted);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.search-form input:focus {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.15);
  outline: none;
}

.search-form button {
  padding: 0.65rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.2s ease;
  font-size: 0.85rem;
}

.search-form button:hover {
  background: var(--primary-hover);
}

/* Autocomplete */
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.autocomplete-list.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.autocomplete-item {
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease, color 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.autocomplete-item-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--surface-muted);
}

.autocomplete-item-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 600;
}

.autocomplete-price-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.autocomplete-original-price {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: normal;
}

.autocomplete-discounted-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: #d11a2a;
}

.autocomplete-item-price {
  font-size: 0.8125rem;
  color: var(--text);
  font-weight: 700;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: var(--surface-muted);
}

.autocomplete-item:hover .autocomplete-item-text,
.autocomplete-item.active .autocomplete-item-text {
  color: var(--text);
}

.autocomplete-item.active {
  border-left: 3px solid var(--primary);
  padding-left: calc(0.85rem - 3px);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

/* Shop container */
.shop-container {
  display: flex;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  gap: 1.5rem;
  padding: 1.5rem;
  min-height: calc(100vh - 80px);
  width: 100%;
  box-sizing: border-box;
}

/* Desktop only utility */
.desktop-only {
  display: block;
}

/* Categories sidebar */
/* --- BEAUTIFUL CATEGORY SIDEBAR --- */
.categories-sidebar {
  width: 280px;
  flex: 0 0 280px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  height: fit-content;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
  box-sizing: border-box;
  align-self: flex-start;
}
.categories-sidebar:hover {
  box-shadow: var(--shadow-md);
}
.categories-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.categories-sidebar h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  flex: 1;
  text-align: center;
  letter-spacing: 0.3px;
}

.back-button-in-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--surface-muted);
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.back-button-in-menu:hover {
  background: #eef0f3;
  color: var(--primary);
  border-color: var(--primary);
  text-decoration: none;
}

.back-button-in-menu .back-arrow {
  font-size: 1.25rem;
  font-weight: bold;
  line-height: 1;
}
.price-filter-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.price-filter-section h4 {
  margin: 0 0 0.75rem 0;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.price-filter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.price-inputs-wrapper {
  display: flex;
  gap: 0.375rem;
  align-items: center;
  justify-content: center;
}

.price-input {
  flex: 0 1 auto;
  width: calc(50% - 0.1875rem);
  max-width: 100px;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
  height: 2rem;
  appearance: textfield;
  -moz-appearance: textfield;
  background: var(--surface-muted);
}

.price-input::-webkit-outer-spin-button,
.price-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.price-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.12);
  outline: none;
  background: var(--surface);
}

.price-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
  font-size: 0.75rem;
}

/* Features Filter Section */
.features-filter-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.features-filter-section h4 {
  margin: 0 0 0.75rem 0;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.features-filter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-filter-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-filter-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.feature-filter-label strong {
  color: var(--text);
  font-weight: 600;
}

.feature-select,
.feature-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  background: var(--surface);
}

.feature-select:focus,
.feature-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.12);
  outline: none;
}

.feature-input::placeholder {
  color: #6c757d;
  opacity: 0.7;
  font-size: 0.75rem;
}

/* Feature Tags (Pills/Badges) */
.feature-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.feature-tag {
  padding: 0.5rem 0.875rem;
  border: 2px solid #dee2e6;
  border-radius: 20px;
  background: #fff;
  color: #495057;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  white-space: nowrap;
  position: relative;
}

.feature-tag:hover {
  border-color: #28a745;
  background: #f0fff4;
  color: #28a745;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
}

.feature-tag.selected {
  background: #28a745;
  border-color: #28a745;
  border-width: 2px;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
  font-weight: 700;
}

.feature-tag.selected::before {
  content: '✓ ';
  font-weight: bold;
  margin-right: 0.25rem;
}

.feature-tag.selected:hover {
  background: #218838;
  border-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.5);
  font-weight: 700;
}

.cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cat-list > li:first-child {
  text-align: center;
  margin-bottom: 1rem;
}
.cat-list > li:first-child a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0.625rem 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--surface-muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid var(--border);
}
.cat-list > li:first-child a:hover {
  background: #eef0f3;
  color: var(--primary);
  text-decoration: none;
}
.cat-list > li:first-child a.active-cat {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.cat-item {
  margin-bottom: 0.3rem;
  position: relative;
}
.cat-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8125rem;
  background: transparent;
  transition: color 0.2s ease;
  border: none;
}
.cat-item a:hover {
  background: transparent;
  color: var(--primary);
  text-decoration: none;
}
.cat-item a.active-cat {
  background: transparent;
  color: var(--primary);
  font-weight: 600;
}
.cat-item a.active-cat .category-count {
  color: var(--primary);
}
.category-count {
  background: transparent;
  color: var(--text-muted);
  padding: 0;
  font-size: 0.7rem;
  font-weight: 500;
  margin-left: auto;
  transition: color 0.2s ease;
  display: inline-block;
}
.cat-item a:hover .category-count {
  color: var(--primary);
}
.cat-item a.active-cat .category-count {
  color: var(--primary);
  font-weight: 600;
}
/* Toggle button */
.toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  margin-right: 0.6rem;
  cursor: pointer;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--primary);
  font-weight: bold;
  font-size: 1.2rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  user-select: none;
  border: 1px solid var(--border);
  box-shadow: none;
}
.toggle-btn.open {
  transform: rotate(90deg);
  background: var(--primary);
  color: #fff;
}
.toggle-btn:hover {
  background: #eef0f3;
  color: var(--primary);
}
/* Subcategories */
.subcat-list {
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0 0;
  padding-left: 0;
  position: relative;
}
.subcat-item {
  margin-bottom: 0.25rem;
  position: relative;
}
.subcat-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  background: transparent;
  transition: color 0.2s ease;
  border: none;
  text-decoration: none;
  margin-left: 1rem;
}
.subcat-item a:hover {
  color: var(--primary);
  background: transparent;
}
.subcat-item a.active-cat {
  background: transparent;
  color: var(--primary);
  font-weight: 600;
}
.subcat-item a.active-cat .category-count {
  color: var(--primary);
}
.subcat-item a .category-count {
  font-size: 0.7rem;
  padding: 0;
  background: transparent;
  color: var(--text-muted);
}
.subcat-item a:hover .category-count {
  color: var(--primary);
}
/* Sub-subcategories */
.subsubcat-list {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0 0;
  padding-left: 0;
  position: relative;
}
.subsubcat-list li {
  margin-bottom: 0.2rem;
}
.subsubcat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  background: transparent;
  transition: color 0.2s ease;
  border: none;
  text-decoration: none;
  margin-left: 1.5rem;
}
.subsubcat-list li a:hover {
  color: var(--primary);
  background: transparent;
}
.subsubcat-list li a.active-cat {
  background: transparent;
  color: var(--primary);
  font-weight: 600;
}
.subsubcat-list li a.active-cat .category-count {
  color: var(--primary);
}
.subsubcat-list li a .category-count {
  font-size: 0.65rem;
  padding: 0;
  background: transparent;
  color: var(--text-muted);
}
.subsubcat-list li a:hover .category-count {
  color: var(--primary);
}

/* Main area */
.main-area {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* Back button section */
.back-button-section {
  margin-bottom: 1rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: var(--surface-muted);
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.back-button:hover {
  background: #eef0f3;
  color: var(--primary);
  border-color: var(--primary);
  text-decoration: none;
}

.back-arrow {
  font-size: 1.125rem;
  font-weight: bold;
  line-height: 1;
}

.back-text {
  line-height: 1;
}

/* Sorting section */
.sorting-section {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.sorting-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.sorting-form label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sorting-form select {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--surface);
  transition: all 0.2s ease;
  cursor: pointer;
}

.sorting-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.12);
}

.sorting-form select:hover {
  border-color: var(--primary);
}

.reset-link {
  padding: 0.55rem 1rem;
  background: var(--surface-muted);
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.2s ease;
  display: inline-block;
  border: 1px solid var(--border);
}

.reset-link:hover {
  background: #eef0f3;
  text-decoration: none;
}

/* Filter summary */
.filter-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-summary-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0;
}

.filter-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.filter-total {
  background: var(--surface-muted);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6c757d;
  transition: color 0.2s ease;
}

.filter-tag:hover {
  color: #495057;
}

.filter-icon {
  font-style: normal;
  font-size: 0.9rem;
}

.search-tag,
.price-tag,
.sort-tag,
.category-tag {
  color: #6c757d;
}

/* Products grid */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  padding: 0;
}

.product {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.product:hover {
  box-shadow: var(--shadow-md);
}

.product-card-features {
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.product-card-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.feature-name-small {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.feature-value-small {
  color: var(--text);
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* Product Image Slider */
.product-image-wrapper {
  position: relative;
  width: 100%;
  height: 210px;
  cursor: pointer;
  margin-bottom: 0.6rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  z-index: 1;
  background: var(--surface-muted);
}

.product-image-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.product-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.product-slide.active {
  opacity: 1;
  pointer-events: auto;
}


/* Slider Controls */
.product-slider-controls {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}


/* Arrow buttons - left and right sides, vertically centered */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) !important;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none !important;
  line-height: 1;
  pointer-events: auto;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  z-index: 10;
  will-change: auto;
  margin: 0;
  padding: 0;
}

.slider-prev {
  left: 10px !important;
  right: auto !important;
}

.slider-next {
  right: 10px !important;
  left: auto !important;
}


.slider-arrow:active {
  opacity: 0.8;
}

/* Dots - bottom center */
.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 12px;
  border-radius: 20px;
  pointer-events: auto;
  opacity: 1;
  transition: all 0.3s ease;
}


.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.slider-dot.active {
  background: white;
  width: 10px;
  height: 10px;
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

/* Legacy support for products without slider */
.product img:not(.product-slide) {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.product:hover img:not(.product-slide) {
  transform: none;
}

.product h2 {
  margin: 0 0 0.375rem 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.35;
  font-weight: 600;
}

.product .price-container {
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product .price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.product .original-price {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: normal;
}

.product .discounted-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #d11a2a;
}

.product .discount-badge {
  background: #d11a2a;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  line-height: 1;
}

/* Cart page discount styles */
.cart-price-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cart-original-price {
  font-size: 0.85rem;
  color: #999;
  text-decoration: line-through;
  font-weight: normal;
}

.cart-discounted-price {
  font-size: 1rem;
  font-weight: 700;
  color: #d11a2a;
}

.cart-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* Checkout page discount styles */
.summary-price-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.checkout-original-price {
  font-size: 0.85rem;
  color: #999;
  text-decoration: line-through;
  font-weight: normal;
}

.checkout-discounted-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #d11a2a;
}

/* Order success page discount styles */
.order-original-price {
  font-size: 0.85rem;
  color: #999;
  text-decoration: line-through;
  font-weight: normal;
  margin-right: 0.5rem;
}

.order-discounted-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #d11a2a;
}

.add-to-cart-form {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.add-to-cart-form button {
  padding: 0.7rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.add-to-cart-form button:hover {
  background: var(--primary-hover);
  box-shadow: 0 1px 4px rgba(24, 119, 242, 0.3);
}

.add-to-cart-form button:active {
  box-shadow: none;
}

.add-to-cart-form .cart-icon-btn {
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.add-to-cart-form button:hover .cart-icon-btn {
  transform: scale(1.02);
}

.add-to-cart-form .cart-text-btn {
  display: inline-block;
}

.details-btn {
  padding: 0.75rem 1rem;
  background: #0064d2;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.details-btn:hover {
  background: #0053b3;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ---------- ADMIN PANEL STYLES ---------- */

/* Admin container */
.admin-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  gap: 1.5rem;
  padding: 1.5rem 1.5rem 2.5rem;
  min-height: calc(100vh - 72px);
}

/* Admin sidebar */
.sidebar {
  width: 260px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: 88px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 12px;
  margin-bottom: 0.35rem;
  transition: background 0.2s ease, color 0.2s ease;
  font-weight: 600;
  border: 1px solid transparent;
}

.sidebar a:hover {
  background: var(--surface-muted);
  color: var(--text);
  text-decoration: none;
  border-color: var(--border);
}

.sidebar a.active {
  background: rgba(24, 119, 242, 0.12);
  color: var(--primary);
  font-weight: 700;
  border-color: rgba(24, 119, 242, 0.35);
}

/* Admin content */
.admin-content {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.admin-content h2 {
  margin: 0 0 1.5rem 0;
  color: var(--text);
  font-size: 1.4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

/* Admin forms */
.add-form,
.edit-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.add-form h3,
.edit-form h3 {
  margin: 0 0 1.5rem 0;
  color: var(--text);
  font-size: 1.1rem;
}

.add-form label,
.edit-form label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--text);
}

.add-form input,
.edit-form input,
.add-form select,
.edit-form select {
  width: 100%;
  max-width: 400px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
  background: var(--surface);
  color: var(--text);
}

.add-form input:focus,
.edit-form input:focus,
.add-form select:focus,
.edit-form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15);
  outline: none;
}

.add-form button,
.edit-form button {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  margin-right: 0.75rem;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.add-form button:hover,
.edit-form button:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-sm);
}

/* Admin tables */
table.admin {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

table.admin th {
  background: var(--surface-muted);
  color: var(--text);
  padding: 1.25rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.9rem;
}

table.admin td {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.admin tr:hover {
  background: var(--surface-muted);
}

table.admin td.actions {
  white-space: nowrap;
}

table.admin td.actions form {
  display: inline;
}

/* Admin buttons */
.btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
  display: inline-block;
  background: var(--surface);
  color: var(--text);
}

/* Bulk actions */
.bulk-actions {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bulk-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.select-all-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  user-select: none;
}

.select-all-checkbox {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #dee2e6;
  border-radius: 4px;
  background: white;
  position: relative;
  transition: all 0.3s ease;
}

.select-all-checkbox:checked + .checkmark {
  background: #0064d2;
  border-color: #0064d2;
}

.select-all-checkbox:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.bulk-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.bulk-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.bulk-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-icon {
  font-size: 1rem;
}

/* Checkbox column */
.checkbox-column {
  width: 50px;
  text-align: center;
}

.header-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.product-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Product row hover effect */
.product-row {
  transition: background 0.3s ease;
}

.product-row:hover {
  background: rgba(0,100,210,0.05) !important;
}

.product-row.selected {
  background: rgba(0,100,210,0.1) !important;
  border-left: 4px solid #0064d2;
}

.btn-edit {
  background: #17a2b8;
  color: white;
}

.btn-edit:hover {
  background: #138496;
  text-decoration: none;
}

.btn-delete {
  background: #dc3545;
  color: white;
}

.btn-delete:hover {
  background: #c82333;
  text-decoration: none;
}

/* Category chips */
.subcat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.subcat-chip {
  display: inline-block;
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 16px;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  font-size: 0.85rem;
  color: #1976d2;
  position: relative;
  transition: all 0.3s ease;
}

.subcat-chip:hover {
  background: #bbdefb;
  transform: translateY(-1px);
}

.subcat-chip button {
  border: none;
  background: #f44336;
  color: white;
  font-weight: bold;
  cursor: pointer;
  padding: 0.1rem 0.4rem;
  border-radius: 50%;
  margin-left: 0.5rem;
  font-size: 0.7rem;
  line-height: 1;
  transition: all 0.3s ease;
}

.subcat-chip button:hover {
  background: #d32f2f;
  transform: scale(1.1);
}

.subsubcat-list {
  list-style: none;
  margin: 0.5rem 0 0 0;
  padding: 0;
}

.subsubcat-chip {
  display: inline-block;
  background: #f3e5f5;
  border: 1px solid #e1bee7;
  border-radius: 12px;
  padding: 0.4rem 0.8rem;
  margin: 0.15rem;
  font-size: 0.8rem;
  color: #7b1fa2;
  transition: all 0.3s ease;
}

.subsubcat-chip:hover {
  background: #e1bee7;
  transform: translateY(-1px);
}

.subsubcat-chip button {
  border: none;
  background: #f44336;
  color: white;
  font-weight: bold;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: 50%;
  margin-left: 0.4rem;
  font-size: 0.65rem;
  line-height: 1;
  transition: all 0.3s ease;
}

.subsubcat-chip button:hover {
  background: #d32f2f;
  transform: scale(1.1);
}

.subcat-add-form,
.subsubcat-add-form {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.subcat-add-form input,
.subsubcat-add-form input {
  padding: 0.4rem 0.8rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 0.8rem;
  flex: 1;
  min-width: 150px;
}

.subcat-add-form button,
.subsubcat-add-form button {
  padding: 0.4rem 0.8rem;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

.subcat-add-form button:hover,
.subsubcat-add-form button:hover {
  background: #218838;
  transform: scale(1.05);
}

/* Mobile Categories Menu Button */
.mobile-categories-btn {
  display: none;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  align-items: center;
  gap: 0.5rem;
}

.mobile-categories-btn:hover {
  background: #eef0f3;
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-categories-btn.active {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--primary);
}

.mobile-categories-btn .menu-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.mobile-categories-btn .menu-icon span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-categories-btn.active .menu-icon span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-categories-btn.active .menu-icon span:nth-child(2) {
  opacity: 0;
}

.mobile-categories-btn.active .menu-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Categories Overlay */
.mobile-categories-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-categories-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-categories-menu {
  display: none;
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  max-width: 350px;
  height: 100vh;
  background: var(--surface);
  box-shadow: 4px 0 20px rgba(0,0,0,0.12);
  z-index: 1999;
  overflow-y: auto;
  transition: left 0.2s ease;
  padding: 1.25rem;
}

.mobile-categories-menu.active {
  left: 0;
}

.mobile-categories-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.mobile-categories-menu-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  text-align: center;
}

.mobile-back-btn {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
}

.mobile-categories-close {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  line-height: 1;
}

.mobile-categories-close:hover {
  background: #eef0f3;
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-categories-menu .categories-sidebar {
  position: static;
  width: 100%;
  flex: 1 1 auto;
  padding: 0;
  box-shadow: none;
  border: none;
  background: transparent;
  height: auto;
  border-radius: 0;
  top: auto;
  box-sizing: border-box;
}

.mobile-categories-menu .cat-list {
  padding: 0;
}

.mobile-categories-menu .cat-item {
  margin-bottom: 0.75rem;
}

.mobile-categories-menu .cat-item a {
  padding: 1rem 1.25rem;
  font-size: 1rem;
}

/* Prevent body scroll when mobile menu is open */
body.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Responsive design */
@media (max-width: 1200px) {
  .shop-container,
  .admin-container {
    flex-direction: column;
  }
  
  .categories-sidebar.desktop-only {
    display: none !important;
  }
  
  .main-area,
  .admin-content {
    order: 1;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .top-bar-wrapper {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem;
  }
  
  .top-bar-wrapper > .logo {
    order: 1;
  }
  
  .mobile-categories-btn {
    display: flex;
    order: 2;
  }
  
  .search-form {
    order: 3;
    margin: 0;
    max-width: 100%;
    width: 100%;
  }
  
  .top-nav {
    order: 4;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    justify-content: flex-start;
  }
  
  .top-nav a {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
  
  .categories-sidebar.desktop-only {
    display: none !important;
  }
  
  .mobile-categories-menu {
    display: block;
  }
  
  .shop-container,
  .admin-container {
    padding: 1rem;
    gap: 1.5rem;
  }
  
  .back-button-section {
    margin-bottom: 0.875rem;
  }
  
  .back-button {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
  }
  
  .back-arrow {
    font-size: 1.25rem;
  }
  
  .price-inputs-wrapper {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .price-input {
    width: 100%;
  }
  
  .filters-form {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .products {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
  }
  
  .slider-arrow {
    width: 32px;
    height: 32px;
    font-size: 18px;
    opacity: 1; /* Always visible on mobile */
  }
  
  .slider-prev {
    left: 8px;
  }
  
  .slider-next {
    right: 8px;
  }
  
  .slider-dots {
    opacity: 1; /* Always visible on mobile */
    bottom: 8px;
    padding: 4px 10px;
  }
  
  .slider-dot {
    width: 6px;
    height: 6px;
  }
  
  .slider-dot.active {
    width: 8px;
    height: 8px;
  }
  
  .add-form,
  .edit-form {
    padding: 1.5rem;
  }
  
  table.admin {
    font-size: 0.85rem;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  table.admin th,
  table.admin td {
    padding: 0.75rem 0.5rem;
  }
  
  .filter-summary {
    padding: 1rem;
    flex-direction: row;
    gap: 0.75rem;
  }
  
  .filter-summary-header {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
  
  .filter-tags {
    gap: 0.5rem;
  }
  
  .filter-tag {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  .cat-item a {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
  
  .subcat-item a {
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
  }
  
  .subsubcat-list li a {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .top-bar-wrapper {
    padding: 0.625rem;
  }
  
  .logo {
    font-size: 1.3rem;
  }
  
  .mobile-categories-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.85rem;
  }
  
  .search-form {
    margin-top: 0.5rem;
  }
  
  .search-form input {
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }
  
  .search-form button {
    padding: 0.7rem 1.25rem;
    font-size: 0.85rem;
  }
  
  .shop-container,
  .admin-container {
    padding: 0.75rem;
    gap: 1rem;
  }
  
  .products {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .product {
    padding: 1.25rem;
  }
  
  .product img {
    height: 180px;
  }
  
  .product h2 {
    font-size: 1.05rem;
  }
  
  .product .price {
    font-size: 1.2rem;
  }
  
  .filter-summary {
    padding: 0.875rem;
  }
  
  .filter-tags {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .filter-tag {
    justify-content: center;
    width: 100%;
  }
  
  .mobile-categories-menu {
    width: 90%;
    padding: 1.25rem;
  }
  
  .mobile-categories-menu-header h3 {
    font-size: 1.35rem;
  }
  
  .cat-item a {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }
  
  .subcat-item a {
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
  }
  
  .subsubcat-list li a {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: #0064d2; }
.text-secondary { color: #6c757d; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-info { color: #17a2b8; }

.bg-primary { background-color: #0064d2; }
.bg-secondary { background-color: #6c757d; }
.bg-success { background-color: #28a745; }
.bg-danger { background-color: #dc3545; }
.bg-warning { background-color: #ffc107; }
.bg-info { background-color: #17a2b8; }

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-content-center { justify-content: center; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }

.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 1rem; }
.m-4 { margin: 1.5rem; }
.m-5 { margin: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.rounded { border-radius: 0.375rem; }
.rounded-sm { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }

.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); } 

/* Admin panel: Marketplace-like theme */
body.admin-panel {
  background: var(--bg);
  color: var(--text);
}

.admin-panel .admin-container {
  max-width: 1400px;
  gap: 1.5rem;
  padding: 1.5rem 1.5rem 2.5rem;
}

.admin-panel .sidebar,
.admin-panel .admin-content {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.admin-panel .admin-content {
  padding: 1.75rem;
}

.admin-panel .admin-page-title {
  margin: 0 0 1.75rem 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-panel .admin-section-title {
  margin: 0 0 1rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.admin-panel .stats-container,
.admin-panel .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-panel .stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-panel .stat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.admin-panel .stat-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.admin-panel .stat-card .stat-value {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.admin-panel .stat-card.revenue { border-left: 4px solid #f5576c; }
.admin-panel .stat-card.pending { border-left: 4px solid #fcb69f; }
.admin-panel .stat-card.processing { border-left: 4px solid #6ec6ff; }
.admin-panel .stat-card.today { border-left: 4px solid #fecfef; }
.admin-panel .stat-card.orders { border-left: 4px solid #f5576c; }
.admin-panel .stat-card.users { border-left: 4px solid #00c2ff; }
.admin-panel .stat-card.products { border-left: 4px solid #38f9d7; }
.admin-panel .stat-card.subcategories { border-left: 4px solid #f5576c; }
.admin-panel .stat-card.subsubcategories { border-left: 4px solid #00c2ff; }

.admin-panel .btn {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease, border 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  background: var(--surface);
  color: var(--text);
}

.admin-panel .btn:hover {
  box-shadow: var(--shadow-sm);
}

.admin-panel .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.admin-panel .btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.admin-panel .btn-secondary {
  background: var(--surface-muted);
  border-color: var(--border);
  color: var(--text);
}

.admin-panel .btn-success {
  background: #31a24c;
  border-color: #31a24c;
  color: #fff;
}

.admin-panel .btn-danger {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

.admin-panel .btn-warning {
  background: #ffc107;
  border-color: #ffc107;
  color: #212529;
}

.admin-panel .btn-info {
  background: #17a2b8;
  border-color: #17a2b8;
  color: #fff;
}

.admin-panel .btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.admin-panel table.admin,
.admin-panel .features-table,
.admin-panel .items-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-panel table.admin th,
.admin-panel .features-table th,
.admin-panel .items-table th {
  background: var(--surface-muted);
  color: var(--text);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.admin-panel table.admin td,
.admin-panel .features-table td,
.admin-panel .items-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-panel table.admin tr:hover,
.admin-panel .features-table tbody tr:hover,
.admin-panel .items-table tbody tr:hover {
  background: var(--surface-muted);
}

.admin-panel .form-group label,
.admin-panel .filter-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.admin-panel .form-group input,
.admin-panel .form-group select,
.admin-panel .form-group textarea,
.admin-panel .filter-group input,
.admin-panel .filter-group select,
.admin-panel .status-select,
.admin-panel .search-input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-panel .form-group input:focus,
.admin-panel .form-group select:focus,
.admin-panel .form-group textarea:focus,
.admin-panel .filter-group input:focus,
.admin-panel .filter-group select:focus,
.admin-panel .status-select:focus,
.admin-panel .search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.12);
}

.admin-panel .filters-section,
.admin-panel .settings-section,
.admin-panel .category-selector,
.admin-panel .order-summary,
.admin-panel .info-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.admin-panel .tabs-container {
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.admin-panel .tab-btn {
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.admin-panel .tab-btn:hover {
  color: var(--primary);
}

.admin-panel .tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.admin-panel .alert,
.admin-panel .message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
  font-weight: 500;
}

.admin-panel .alert-success,
.admin-panel .message.success {
  background: #e6f4ea;
  color: #207544;
  border-color: #c3e6cb;
}

.admin-panel .alert-error,
.admin-panel .message.error {
  background: #fdecea;
  color: #b71c1c;
  border-color: #f5c6cb;
}

.admin-panel .empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-muted);
}

.admin-panel .empty-state-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.admin-panel .status-badge {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
  text-transform: uppercase;
}

.admin-panel .status-pending { background: #fff3cd; color: #856404; }
.admin-panel .status-processing { background: #cce5ff; color: #004085; }
.admin-panel .status-shipped { background: #d1ecf1; color: #0c5460; }
.admin-panel .status-completed { background: #d4edda; color: #155724; }
.admin-panel .status-cancelled { background: #f8d7da; color: #721c24; }

.admin-panel .dashboard-card,
.admin-panel .template-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.admin-panel .admin-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.admin-panel .recent-item {
  display: flex;
  align-items: center;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-panel .recent-item:hover {
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.admin-panel .quick-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-panel .quick-action-btn {
  background: var(--primary);
  color: #fff;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-panel .quick-action-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.admin-panel .dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.admin-panel .recent-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-right: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.admin-panel .admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.admin-panel .admin-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.admin-panel .admin-section-spacing {
  margin-top: 1.5rem;
}

.admin-panel .header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-panel .admin-action-row {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-panel .add-form-accent {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-color: #90caf9;
}

.admin-panel .subcat-section-success {
  margin-top: 0.5rem;
  border-left-color: #28a745;
}

.admin-panel .chip-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.admin-panel .btn-edit-chip,
.admin-panel .btn-delete-chip {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: background 0.2s ease;
}

.admin-panel .btn-edit-chip {
  color: var(--primary);
}

.admin-panel .btn-edit-chip:hover {
  background: #e3f2fd;
}

.admin-panel .btn-delete-chip {
  color: #dc3545;
}

.admin-panel .btn-delete-chip:hover {
  background: #fdecea;
}

.admin-panel .search-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.admin-panel .category-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.admin-panel .category-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-panel .subcat-section {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
}

.admin-panel .tabs {
  display: flex;
  gap: 1rem;
}

.admin-panel .subcat-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

.admin-panel .actions-cell {
  white-space: nowrap;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}