:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #ec4899;
  --bg-color: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
}

[data-theme="dark"] {
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --bg-color: #0f172a;
  --surface: #1e293b;
  --surface-hover: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Glassmorphism utility */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-bar {
  flex: 1;
  max-width: 600px;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.5rem 0.25rem 1.5rem;
  transition: border-color 0.3s;
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-main);
  font-size: 0.95rem;
}

.search-bar button {
  background: var(--primary);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.search-bar button:hover {
  background: var(--primary-hover);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 1.2rem;
  color: var(--text-main);
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--primary);
}

.badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  height: 18px;
  min-width: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 1rem;
  width: 220px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 101;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  border-radius: 8px;
  transition: background 0.2s;
  font-size: 0.95rem;
  font-weight: 500;
}

.dropdown-item:hover {
  background: var(--surface-hover);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

.category-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0.75rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
}

.category-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
}

.category-nav a:hover {
  color: var(--primary);
}

.mobile-search {
  display: none;
  padding: 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.mobile-search input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-color);
  color: var(--text-main);
  outline: none;
}

/* Main Content */
.main-content {
  margin-top: 140px; /* Space for navbar */
  min-height: calc(100vh - 140px - 300px);
}

/* Utilities */
.hidden { display: none !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-block { width: 100%; }

/* Form inputs */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-main);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Layouts */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Loader */
.loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50vh;
}
.loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-bottom-color: var(--primary);
  border-radius: 50%;
  animation: rotation 1s linear infinite;
}
@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding-top: 3rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-col h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.footer-col p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: var(--primary);
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}
.newsletter-form input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-main);
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container { padding: 1rem; }
  .search-bar { display: none; }
  .mobile-search { display: block; }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: 1fr; }
  .main-content { margin-top: 120px; }
  .category-nav { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .grid-cols-2 { grid-template-columns: 1fr; }
  .grid-cols-4 { grid-template-columns: 1fr; }
}

/* Product Cards */
.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.product-img-wrapper {
  position: relative;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  overflow: hidden;
  background: #fff;
}

.product-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  transition: transform 0.5s;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
  z-index: 2;
}

.wishlist-btn:hover, .wishlist-btn.active {
  color: var(--danger);
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--danger);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
}

.product-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--warning);
}

.rating-count {
  color: var(--text-muted);
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  margin-top: auto;
}

.price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.original-price {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
}

.view-all {
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-all:hover {
  text-decoration: underline;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toast {
  background: var(--surface);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(120%);
  animation: slideIn 0.3s forwards;
  min-width: 300px;
  color: var(--text-main);
}

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }

@keyframes slideIn {
  to { transform: translateX(0); }
}

@keyframes slideOut {
  to { transform: translateX(120%); opacity: 0; }
}

/* Auth Pages */
.auth-container {
  max-width: 450px;
  margin: 4rem auto;
  padding: 2.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: var(--text-muted);
}

.google-btn {
  background: white;
  color: #333;
  border: 1px solid #ddd;
  margin-top: 1rem;
}
.google-btn img {
  width: 20px;
}
.google-btn:hover {
  background: #f1f1f1;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.auth-divider span {
  padding: 0 10px;
  font-size: 0.9rem;
}

 / *   A l l   M e n u   S i d e b a r   S t y l e s   * / 
 . a l l - m e n u - b t n   { 
         b a c k g r o u n d :   t r a n s p a r e n t ; 
         b o r d e r :   n o n e ; 
         c o l o r :   v a r ( - - t e x t - m a i n ) ; 
         f o n t - f a m i l y :   i n h e r i t ; 
         f o n t - s i z e :   0 . 9 5 r e m ; 
         f o n t - w e i g h t :   6 0 0 ; 
         c u r s o r :   p o i n t e r ; 
         d i s p l a y :   f l e x ; 
         a l i g n - i t e m s :   c e n t e r ; 
         g a p :   0 . 5 r e m ; 
         p a d d i n g :   0 . 5 r e m   1 r e m ; 
         b o r d e r - r a d i u s :   4 p x ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ; 
 } 
 . a l l - m e n u - b t n : h o v e r   { 
         b a c k g r o u n d :   v a r ( - - b g - c o l o r ) ; 
 } 
 . a l l - m e n u - o v e r l a y   { 
         p o s i t i o n :   f i x e d ; 
         t o p :   0 ; 
         l e f t :   0 ; 
         w i d t h :   1 0 0 v w ; 
         h e i g h t :   1 0 0 v h ; 
         b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 5 ) ; 
         z - i n d e x :   1 0 0 0 ; 
         o p a c i t y :   1 ; 
         t r a n s i t i o n :   o p a c i t y   0 . 3 s   e a s e ; 
 } 
 . a l l - m e n u - o v e r l a y . h i d d e n   { 
         o p a c i t y :   0 ; 
         p o i n t e r - e v e n t s :   n o n e ; 
 } 
 . a l l - m e n u - s i d e b a r   { 
         p o s i t i o n :   f i x e d ; 
         t o p :   0 ; 
         l e f t :   - 3 5 0 p x ; 
         w i d t h :   3 5 0 p x ; 
         m a x - w i d t h :   8 5 v w ; 
         h e i g h t :   1 0 0 v h ; 
         b a c k g r o u n d :   v a r ( - - s u r f a c e ) ; 
         z - i n d e x :   1 0 0 1 ; 
         t r a n s i t i o n :   l e f t   0 . 3 s   e a s e ; 
         d i s p l a y :   f l e x ; 
         f l e x - d i r e c t i o n :   c o l u m n ; 
         b o x - s h a d o w :   2 p x   0   1 0 p x   r g b a ( 0 , 0 , 0 , 0 . 1 ) ; 
 } 
 . a l l - m e n u - s i d e b a r . o p e n   { 
         l e f t :   0 ; 
 } 
 . a l l - m e n u - h e a d e r   { 
         b a c k g r o u n d :   v a r ( - - p r i m a r y ) ; 
         c o l o r :   w h i t e ; 
         p a d d i n g :   1 . 2 5 r e m   1 . 5 r e m ; 
         f o n t - s i z e :   1 . 2 5 r e m ; 
         f o n t - w e i g h t :   7 0 0 ; 
         d i s p l a y :   f l e x ; 
         j u s t i f y - c o n t e n t :   s p a c e - b e t w e e n ; 
         a l i g n - i t e m s :   c e n t e r ; 
 } 
 . a l l - m e n u - h e a d e r   b u t t o n   { 
         b a c k g r o u n d :   t r a n s p a r e n t ; 
         b o r d e r :   n o n e ; 
         c o l o r :   w h i t e ; 
         f o n t - s i z e :   1 . 5 r e m ; 
         c u r s o r :   p o i n t e r ; 
 } 
 . a l l - m e n u - c o n t e n t   { 
         p a d d i n g :   1 r e m   0 ; 
         o v e r f l o w - y :   a u t o ; 
         f l e x :   1 ; 
 } 
 . a l l - m e n u - c o n t e n t   h 3   { 
         p a d d i n g :   0 . 7 5 r e m   1 . 5 r e m ; 
         f o n t - s i z e :   1 . 1 r e m ; 
         f o n t - w e i g h t :   7 0 0 ; 
         c o l o r :   v a r ( - - t e x t - m a i n ) ; 
 } 
 . a l l - m e n u - c o n t e n t   a   { 
         d i s p l a y :   b l o c k ; 
         p a d d i n g :   0 . 7 5 r e m   1 . 5 r e m ; 
         c o l o r :   v a r ( - - t e x t - m u t e d ) ; 
         f o n t - s i z e :   0 . 9 5 r e m ; 
         t r a n s i t i o n :   b a c k g r o u n d   0 . 2 s ,   c o l o r   0 . 2 s ; 
 } 
 . a l l - m e n u - c o n t e n t   a : h o v e r   { 
         b a c k g r o u n d :   v a r ( - - b g - c o l o r ) ; 
         c o l o r :   v a r ( - - p r i m a r y ) ; 
 } 
 . a l l - m e n u - c o n t e n t   h r   { 
         b o r d e r :   n o n e ; 
         b o r d e r - t o p :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
         m a r g i n :   0 . 5 r e m   0 ; 
 } 
 
 
 
