:root {
  /* Colors */
  --color-bg: #0a0f1c;
  --color-surface: #111827;
  --color-surface-transparent: rgba(17, 24, 39, 0.7);
  --color-primary: #3b82f6;
  --color-primary-dark: #2563eb;
  --color-accent: #f59e0b;
  --color-text: #f3f4f6;
  --color-text-muted: #9ca3af;
  --color-border: #374151;

  /* Typography */
  --font-main: 'Inter', sans-serif;

  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --glass-bg: rgba(17, 24, 39, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Typography */
h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
}

.text-gradient {
  background: linear-gradient(to right, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  margin-left: var(--spacing-md);
}

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-bottom: var(--glass-border);
  padding: var(--spacing-md) 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
}

.logo .highlight {
  color: var(--color-primary);
}

.nav-list {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-list a:not(.btn-primary):hover {
  color: var(--color-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-text);
  margin: 5px 0;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  /* Header height */
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #1f2937 0%, #0a0f1c 100%);
  z-index: -1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233b82f6' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Sections */
.section {
  padding: var(--spacing-xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
  font-weight: 600;
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.about-card {
  background: var(--color-surface);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: transform 0.3s ease;
}

.about-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-primary);
}

.about-card .icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
  max-width: 100%;
}

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  flex-direction: column;
  height: 100%;
}

/* Reduce spacing for product actions */
.product-actions {
  margin-top: auto;
  /* push to bottom of card */
  display: flex;
  flex-direction: column;
  /* stack size selector then buttons */
  gap: var(--spacing-sm);
}

.product-actions button {
  font-size: 0.75rem;
  flex: 1;
  width: 100%;
}

.product-image {
  height: 150px;
  width: 100%;
  object-fit: cover;
  background-color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-img::after {
  content: 'Product Image';
  color: var(--color-text-muted);
}

.product-info {
  padding: var(--spacing-sm);
  flex: 1 1 auto;
  overflow-y: auto;
}

.product-info h3 {
  margin-bottom: var(--spacing-sm);
}

.product-info p {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  margin-bottom: var(--spacing-sm);
}

/* Contact */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.contact-info {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.info-item h4 {
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.map-container {
  min-height: 300px;
}

/* Footer */
.footer {
  background: var(--color-surface);
  padding: var(--spacing-lg) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-muted);
  margin-top: var(--spacing-xl);
}

/* Responsive */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .nav {
    display: none;
    position: fixed;
    top: 70px;
    /* Below header */
    left: 0;
    width: 100%;
    background: var(--color-surface);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .nav.active {
    display: block;
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-list {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }

  .mobile-menu-btn {
    display: block;
    z-index: 1001;
  }

  .mobile-menu-btn span {
    background-color: white;
  }

  .checkout-container {
    padding-top: 100px;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }
}

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

  .hero-title {
    font-size: 2rem;
  }

  .header .logo {
    font-size: 1.2rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: var(--color-surface);
  margin: auto;
  padding: 2rem;
  border: 1px solid var(--color-border);
  width: 90%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  position: relative;
  box-shadow: var(--shadow-lg);
}

.close-modal {
  color: var(--color-text-muted);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 1.5rem;
  top: 1rem;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--color-primary);
  text-decoration: none;
  cursor: pointer;
}

.order-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.order-total {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  margin-bottom: 2rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--color-surface);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 300px;
  animation: slideIn 0.3s ease-out forwards;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
  border: 1px solid var(--color-border);
}

.toast.success {
  border-left-color: #10b981;
}

.toast.error {
  border-left-color: #ef4444;
}

.toast.info {
  border-left-color: var(--color-primary);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}