:root {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --bg-color: #f3f4f6;
  --text-color: #1f2937;
  --card-bg: #ffffff;
  --border-color: #e5e7eb;
}

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

body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background-color: var(--card-bg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
}

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

.cart-summary {
  font-weight: bold;
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.hero p {
  color: #6b7280;
  font-size: 1.2rem;
}

/* Layout */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding-bottom: 3rem;
}

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

/* Product Grid */
#product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: #e5e7eb;
}

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

.product-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.product-info .price {
  font-weight: bold;
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  margin-top: auto;
}

.product-info button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.product-info button:hover {
  background-color: var(--secondary-color);
}

/* Cart Sidebar */
.cart-sidebar {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  height: fit-content;
  position: sticky;
  top: 90px;
}

.cart-sidebar h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

#cart-items {
  list-style: none;
  margin-bottom: 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.empty-msg {
  color: #9ca3af;
  font-style: italic;
}

.cart-footer .total {
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.checkout-btn {
  width: 100%;
  background-color: #10b981;
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}

.checkout-btn:hover {
  background-color: #059669;
}

/* Footer */
footer {
  background-color: var(--text-color);
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: auto;
}
