:root {
  --primary: #9d4edd;
  --primary-hover: #7b2cbf;
  --secondary: #ff9a9e;
  --text-dark: #2b2d42;
  --text-light: #8d99ae;
  --bg-gradient: linear-gradient(135deg, #f6f8fd 0%, #f1f6f9 100%);
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }

body { background: var(--bg-gradient); color: var(--text-dark); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }

/* Navbar */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 5%; background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border); position: sticky; top: 0; z-index: 100; box-shadow: var(--glass-shadow);
}
.logo { font-size: 1.8rem; font-weight: 700; color: var(--primary); cursor: pointer; display: flex; align-items: center; gap: 8px;}
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 500; transition: color 0.3s; position: relative;}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.hidden { display: none !important; }

/* Main Container */
#app-container { flex-grow: 1; padding: 2rem 5%; }

/* Buttons & Inputs */
.btn {
  background: var(--primary); color: white; border: none; padding: 0.8rem 1.5rem;
  border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(157, 78, 221, 0.4); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

.input-group { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.input-group label { font-weight: 500; font-size: 0.9rem; }
.input-field {
  width: 100%; padding: 0.8rem 1rem; border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1); background: rgba(255,255,255,0.9); outline: none; transition: 0.3s; font-family: inherit;
}
.input-field:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.1); }

/* Glass Cards */
.glass-card { background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); border-radius: 16px; padding: 2rem; }

/* Products Grid */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; margin-top: 1rem; }
.product-card {
  background: var(--glass-bg); border-radius: 16px; overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); cursor: pointer; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 12px 40px rgba(31,38,135,0.15); }
.product-img { width: 100%; height: 260px; object-fit: cover; }
.product-info { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.product-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.5rem; }
.product-price { font-size: 1.4rem; color: var(--primary); font-weight: 700; margin-bottom: 1rem; }
.product-category { font-size: 0.75rem; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; font-weight: 600; }
.product-rating { color: #f39c12; margin-bottom: 1rem; font-size: 0.9rem;}
.add-to-cart-btn { margin-top: auto; width: 100%; }

/* Filters */
.filter-bar { display: flex; gap: 1rem; margin-bottom: 2rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.search-bar { display: flex; gap: 0.5rem; flex: 1; min-width: 250px; max-width: 400px; }
.category-filters { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 0.5rem; scrollbar-width: none; }
.category-filters::-webkit-scrollbar { display: none; }
.cat-pill { padding: 0.5rem 1rem; background: rgba(255,255,255,0.8); border-radius: 20px; cursor: pointer; transition: 0.3s; border: 1px solid rgba(0,0,0,0.05); white-space: nowrap; font-size: 0.9rem;}
.cat-pill:hover, .cat-pill.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 10px rgba(157, 78, 221, 0.2);}

/* Hero Section */
.hero { display: flex; align-items: center; justify-content: space-between; padding: 4rem 3rem; background: var(--glass-bg); border-radius: 24px; margin-bottom: 3rem; position: relative; overflow: hidden; border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); gap: 2rem; flex-wrap: wrap;}
.hero-content { flex: 1; min-width: 300px; z-index: 2; }
.hero h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 1rem; color: var(--text-dark); }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.2rem; color: var(--text-light); margin-bottom: 2rem; line-height: 1.6;}
.hero-image { flex: 1; min-width: 300px; border-radius: 16px; box-shadow: var(--glass-shadow); object-fit: cover; max-height: 400px; }

/* Auth Pages */
.auth-container { display: flex; justify-content: center; align-items: center; padding: 4rem 0; }
.auth-form { width: 100%; max-width: 420px; text-align: center; }
.auth-form h2 { color: var(--primary); font-size: 2rem; margin-bottom: 1.5rem; }
.auth-switch { margin-top: 1.5rem; font-size: 0.95rem; }
.auth-switch a { color: var(--primary); font-weight: 600; cursor: pointer; text-decoration: none;}

/* Toasts */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--text-dark); color: white; padding: 1rem 1.5rem; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); animation: slideIn 0.3s ease forwards; display: flex; align-items: center; gap: 10px; font-weight: 500;}
.toast.success { background: #27ae60; }
.toast.error { background: #e74c3c; }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Footer */
footer { background: var(--glass-bg); backdrop-filter: blur(12px); border-top: 1px solid var(--glass-border); padding: 3rem 5% 1rem; margin-top: auto; }
.footer-content { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 2rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-dark); text-decoration: none; font-weight: 500; }
.footer-bottom { text-align: center; color: var(--text-light); border-top: 1px solid rgba(0,0,0,0.05); padding-top: 1rem; font-size: 0.9rem;}

/* General utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.section-title { font-size: 2rem; margin-bottom: 1.5rem; color: var(--text-dark); border-bottom: 2px solid var(--primary); display: inline-block; padding-bottom: 0.5rem;}
