/* Shop-Layout: Sidebar links + Grid rechts */
.shop-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}

.shop-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: sticky;
  top: 100px;
}

.shop-sidebar h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.shop-sidebar ul { list-style: none; padding: 0; margin: 0; }

.shop-sidebar li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}

.shop-sidebar li a:hover,
.shop-sidebar li a.active {
  color: var(--accent);
}

.shop-sidebar li a .cat-icon { font-size: 16px; }

/* Product Grid */
.shop-content h1 {
  font-size: 24px;
  margin-bottom: 24px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 180, 216, 0.1);
}

.product-card .image {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.product-card .info { padding: 16px; }

.product-card .info .category {
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.product-card .info h3 {
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.product-card .info .desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .info .price {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.product-card .info .stock {
  font-size: 12px;
  margin-top: 4px;
}

.product-card .info .stock.in-stock { color: var(--success); }
.product-card .info .stock.out-of-stock { color: var(--danger); }

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -380px;
  width: 380px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open { right: 0; }

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

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

.cart-header h3 { margin: 0; font-size: 18px; }

.cart-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
}

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

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child { border-bottom: none; }

.cart-item .item-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.cart-item .item-info { flex: 1; }
.cart-item .item-info h4 { font-size: 14px; margin-bottom: 4px; }
.cart-item .item-info .item-price { color: var(--accent); font-weight: 600; font-size: 14px; }

.cart-item .item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.cart-item .item-qty button {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item .item-qty span { font-size: 14px; min-width: 20px; text-align: center; }

.cart-item .item-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 12px;
  padding: 0 4px;
}

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

.cart-total {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
}

/* Product Detail Page */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-top: 100px;
}

.product-detail .image {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

.product-detail .info h1 { font-size: 28px; margin-bottom: 8px; }
.product-detail .info .category { color: var(--accent); font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; display: block; }
.product-detail .info .price { font-size: 32px; font-weight: 700; color: var(--accent); margin-bottom: 20px; }
.product-detail .info .description { color: var(--text-secondary); font-size: 15px; line-height: 1.7; margin-bottom: 24px; }
.product-detail .info .qty-selector { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.product-detail .info .qty-selector button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); cursor: pointer; font-size: 18px; }
.product-detail .info .qty-selector span { font-size: 18px; min-width: 40px; text-align: center; }
.product-detail .info .btn { width: 100%; }

/* Mobile */
@media (max-width: 1023px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-sidebar { position: static; }
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
  .product-detail { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
  .cart-sidebar { width: 100%; right: -100%; }
  .product-detail .image { min-height: 250px; font-size: 50px; }
}
