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

:root {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Header */
.header {
  background-color: transparent;
  padding: 32px 0;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  gap: 24px;
  align-items: center;
}

.cart-button {
  background: none;
  border: none;
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px 16px;
  position: relative;
  transition: opacity 0.2s;
  font-weight: 500;
}

.cart-button:hover {
  opacity: 0.6;
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--text-primary);
  color: var(--bg-secondary);
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero */
.hero {
  padding: 120px 0 100px;
  text-align: center;
}

.hero-title {
  font-size: 48px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin: 0 auto;
}

.highlight {
  background-color: var(--text-primary);
  color: var(--bg-secondary);
  padding: 0 16px;
  display: inline-block;
  transform: rotate(-2deg);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 40px 0 80px;
}

.product-card {
  background-color: var(--bg-secondary);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

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

.product-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f8f8;
}

.product-icon {
  font-size: 48px;
}

.product-info {
  padding: 20px 24px 8px;
}

.product-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.product-category {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}

.product-price {
  padding: 0 24px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.modal {
  background-color: var(--bg-secondary);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 32px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 60px;
}

.modal-image {
  aspect-ratio: 1;
}

.product-placeholder.large {
  height: 100%;
}

.product-icon.large {
  font-size: 80px;
}

.modal-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-info h2 {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 8px;
}

.modal-category {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.modal-price {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 24px;
}

.modal-description {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.preview-btn,
.buy-now-btn {
  flex: 1;
  border: none;
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.preview-btn {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.preview-btn:hover {
  background-color: var(--bg-primary);
}

.buy-now-btn {
  background-color: var(--text-primary);
  color: var(--bg-secondary);
}

.buy-now-btn:hover {
  opacity: 0.85;
}

/* Cart Sidebar */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 300;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100vh;
  background-color: var(--bg-secondary);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.cart-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.cart-close:hover {
  color: var(--text-primary);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.empty-cart {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 0;
  font-size: 14px;
}

.cart-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.cart-item-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

.remove-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex-shrink: 0;
}

.remove-btn:hover {
  color: var(--text-primary);
}

.cart-footer {
  padding: 24px;
  border-top: 1px solid var(--border-color);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 500;
}

.total-price {
  font-size: 20px;
}

.checkout-btn {
  width: 100%;
  background-color: var(--text-primary);
  color: var(--bg-secondary);
  border: none;
  padding: 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  letter-spacing: 0.5px;
}

.checkout-btn:hover {
  opacity: 0.85;
}

/* Footer */
.footer {
  padding: 60px 0 40px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  border-top: 1px solid var(--border-color);
  margin-top: 80px;
}

.footer a {
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer a:hover {
  opacity: 0.7;
}

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

  .modal-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .header-content {
    padding: 0 20px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero {
    padding: 80px 0 60px;
  }

  .hero-title {
    font-size: 32px;
  }

  .highlight {
    padding: 0 12px;
  }

  .cart-sidebar {
    width: 100%;
  }

  .modal-content {
    padding: 40px 24px;
  }

  .modal-overlay {
    padding: 20px;
  }

  .modal-info h2 {
    font-size: 24px;
  }

  .modal-price {
    font-size: 20px;
  }
}

/* Alpine.js transitions */
[x-cloak] {
  display: none !important;
}
