/* File: assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  /* Light Theme Colors - Matching Logo */
  --primary: #0066FF; /* Vibrant Blue */
  --primary-hover: #0052CC;
  --bg-color: #F8FAFC; 
  --surface-color: #FFFFFF;
  --text-main: #0F172A; 
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  --accent: #00D2FF; /* Cyan Accent */
  --danger: #EF4444;
  --card-shadow: 0 10px 30px rgba(0, 102, 255, 0.1);
  --hover-shadow: 0 15px 35px rgba(0, 102, 255, 0.2);
  --radius: 20px; 
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dark {
  /* Dark Theme Colors */
  --primary: #3B82F6; 
  --primary-hover: #60A5FA;
  --bg-color: #0B1120; 
  --surface-color: #1E293B; 
  --text-main: #F8FAFC; 
  --text-muted: #94A3B8; 
  --border-color: #334155;
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --hover-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; }

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  gap: 0.5rem;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Header / Navbar */
header {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: var(--transition);
}

.theme-toggle:hover {
  background-color: var(--border-color);
  color: var(--text-main);
}

/* Hero Section */
.hero {
  padding: 5rem 0;
  text-align: center;
  background: linear-gradient(135deg, rgba(79,70,229,0.1) 0%, rgba(249,250,251,0) 100%);
}

.hero h1 {
  font-size: 3.5rem;
  background: -webkit-linear-gradient(45deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Section Title */
.section-title {
  text-align: center;
  margin: 4rem 0 2rem;
}

/* Cards Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background-color: var(--surface-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

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

.product-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: auto;
  margin-bottom: 1rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Loader */
.loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.loader {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Footer */
footer {
  background-color: var(--surface-color);
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  align-items: flex-start;
}

.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text-main); cursor: pointer; }

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .mobile-menu-btn { display: block; }
  .navbar { height: auto; min-height: 70px; padding: 0.5rem 0; flex-wrap: wrap; position: relative; }
  .nav-links { 
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    width: 100%; 
    background-color: var(--surface-color); 
    flex-direction: column; 
    padding: 1rem; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
    z-index: 1000; 
    border-radius: 0 0 10px 10px;
  }
  .nav-links.active { display: flex; }
  .logo { font-size: 1.1rem; white-space: normal; }
  .hero-btns { flex-direction: column; width: 100%; }
  .hero-btns .btn { width: 100%; }
}

/* Details Page */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.detail-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
}

@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
}

/* Filters */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--border-color) 25%, var(--bg-color) 50%, var(--border-color) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

.dark .skeleton {
  background: linear-gradient(90deg, var(--border-color) 25%, var(--surface-color) 50%, var(--border-color) 75%);
  background-size: 200% 100%;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skeleton-img {
  width: 100%;
  height: 200px;
  border-radius: var(--radius);
}

.skeleton-text {
  height: 20px;
  width: 80%;
}

.skeleton-text.short {
  width: 50%;
}

/* Glassmorphism Header */
header {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.dark header {
  background-color: rgba(38, 38, 53, 0.85);
}

/* Global Search Bar in Navbar */
.nav-search {
  display: flex;
  align-items: center;
  background: var(--bg-color);
  border-radius: 20px;
  padding: 0.3rem 1rem;
  border: 1px solid var(--border-color);
  margin: 0 1rem;
}
.nav-search input {
  border: none;
  background: transparent;
  outline: none;
  padding: 0.2rem;
  color: var(--text-main);
}
.nav-search i {
  color: var(--text-muted);
}

/* Shopping Cart Icon & Badge */
.cart-icon-wrapper {
  position: relative;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--text-main);
}
.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Shopping Cart Sidebar */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cart-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--surface-color);
  z-index: 100;
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}
.cart-sidebar.active {
  right: 0;
}
.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}
.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cart-item {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}
.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
}
.cart-item-info {
  flex-grow: 1;
}
.cart-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.cart-item-price {
  color: var(--primary);
  font-weight: bold;
}
.cart-item-remove {
  color: var(--danger);
  cursor: pointer;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  display: inline-block;
}
.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--surface-color);
  color: var(--text-main);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--primary);
  transform: translateX(120%);
  animation: slideIn 0.3s forwards, fadeOut 0.3s forwards 2.7s;
}
@keyframes slideIn {
  to { transform: translateX(0); }
}
@keyframes fadeOut {
  to { opacity: 0; visibility: hidden; }
}

/* Trust Badges Footer */
.trust-badges {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.trust-badge {
  background: var(--bg-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
}
