:root {
  --primary: #1a1a2e;
  --secondary: #16213e;
  --accent: #e94560;
  --accent-hover: #ff6b6b;
  --highlight: #0f3460;
  --bg: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-light: #666;
  --success: #00c896;
  --shadow: 0 10px 40px rgba(0,0,0,0.1);
  --shadow-hover: 0 20px 60px rgba(0,0,0,0.15);
  --radius: 16px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: 20px 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Site Logo */
.site-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.logo h1 {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}

.logo span {
  color: var(--accent);
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent);
}

.cart-btn {
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.cart-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(233, 69, 96, 0.4);
}

.cart-count {
  background: white;
  color: var(--accent);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--highlight) 0%, var(--secondary) 100%);
  padding: 80px 40px;
  text-align: center;
  color: white;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 30px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 40px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Filters */
.filters {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--card-bg);
  border: 2px solid transparent;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--text);
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Product Grid */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 40px 60px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}

.img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.1);
}

.badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--accent);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-sale {
  background: var(--success);
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.card-spec {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.add-to-cart {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.add-to-cart:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  background: white;
  border-radius: 20px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0,0,0,0.3);
  animation: slideUp 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
}

.modal-header h2 {
  font-size: 1.3rem;
}

.close {
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.3s;
}

.close:hover {
  transform: rotate(90deg);
}

.modal-body {
  padding: 25px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.modal-img {
  border-radius: 15px;
  overflow: hidden;
}

.modal-img img {
  width: 100%;
  height: auto;
}

.modal-details h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text);
}

.modal-details .spec {
  color: var(--text-light);
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.detail-row {
  display: flex;
  margin-bottom: 15px;
}

.detail-label {
  font-weight: 600;
  width: 100px;
  color: var(--text-light);
}

.detail-value {
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 15px;
}

.btn-primary {
  flex: 1;
  background: var(--accent);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: var(--primary);
}

.btn-call {
  background: #28a745;
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-call:hover {
  background: #218838;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -10px 0 40px rgba(0,0,0,0.2);
  z-index: 1001;
  transition: right 0.4s ease;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  font-size: 1.3rem;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 15px;
}

.cart-item-img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 5px;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  font-weight: 600;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid #eee;
}

.checkout-btn {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  padding: 18px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.checkout-btn:hover {
  background: var(--accent-hover);
}

/* Cart Overlay */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
}

.cart-overlay.active {
  display: block;
}

/* Features Section */
.features {
  background: white;
  padding: 60px 40px;
  margin-top: 40px;
}

.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.feature {
  text-align: center;
  padding: 30px;
}

.feature-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 30px;
}

.feature h3 {
  margin-bottom: 10px;
}

.feature p {
  color: var(--text-light);
}

/* Footer */
footer {
  background: var(--primary);
  color: white;
  padding: 60px 40px 30px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-section h3 {
  margin-bottom: 20px;
  color: var(--accent);
}

.footer-section p,
.footer-section a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: rgba(255,255,255,0.5);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--success);
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 1002;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 992px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .hero-stats {
    gap: 30px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 15px 20px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 15px;
  }
  
  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
  }
  
  .hero {
    padding: 44px 20px;
  }
  
  .hero h2 {
    font-size: 1.8rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .container {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  header {
    padding: 12px 16px;
  }

  .header-content {
    gap: 10px;
  }

  .logo {
    gap: 10px;
  }

  .logo h1 {
    font-size: 1.1rem;
    line-height: 1.25;
  }
  
  .site-logo {
    height: 36px;
  }

  nav {
    gap: 8px 14px;
  }

  nav a {
    font-size: 0.9rem;
  }

  .cart-btn {
    padding: 7px 12px;
  }

  .cart-count {
    width: 22px;
    height: 22px;
  }

  .filter-btn {
    min-height: 40px;
    padding: 8px 13px;
    font-size: 0.85rem;
  }

  .filters {
    margin: 24px auto;
    gap: 8px;
  }

  .hero {
    padding: 38px 18px;
  }

  .hero h2 {
    font-size: 1.7rem;
    line-height: 1.25;
    margin-bottom: 14px;
  }

  .hero p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0;
  }

  .container {
    padding: 12px 16px 40px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
  }

  .card-body {
    padding: 14px;
  }
  
  .card-title {
    font-size: 1rem;
    line-height: 1.35;
  }

  .card-spec {
    font-size: 0.85rem;
  }

  .add-to-cart {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .modal-body {
    padding: 18px;
    gap: 20px;
  }

  footer {
    padding: 40px 20px 24px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    text-align: center;
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
}