/* ============================================================
   LogicBot — shop.css
   ============================================================ */

/* Shop Layout */
.shop-section { padding-top: 48px; }

.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

/* Filters Sidebar */
.shop-filters {
  position: sticky;
  top: calc(var(--nav-height) + 20px);
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.filter-block { margin-bottom: 28px; }
.filter-block:last-child { margin-bottom: 0; }

.filter-heading {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  background: none;
  -webkit-text-fill-color: var(--text-muted);
}

.filter-cats { display: flex; flex-direction: column; gap: 4px; }

.filter-cat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  text-align: left;
  font-family: var(--font-body);
}

.filter-cat-btn:hover {
  background: rgba(0,194,255,0.06);
  color: var(--text-primary);
  border-color: var(--accent-border);
}

.filter-cat-btn.active {
  background: rgba(0,194,255,0.12);
  color: var(--accent);
  border-color: var(--accent-border);
  font-weight: 600;
}

.filter-count {
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  padding: 2px 7px;
  font-size: 11px;
  color: var(--text-muted);
}

.filter-eco-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.eco-tag {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  transition: var(--transition-fast);
  font-family: var(--font-body);
}

.eco-tag:hover, .eco-tag.active {
  background: rgba(0,194,255,0.12);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* Price Range */
.price-range-wrap { display: flex; flex-direction: column; gap: 8px; }

.price-range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.price-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* Toolbar */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.shop-result-count {
  font-size: 14px;
  color: var(--text-secondary);
}

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

/* Product Card */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  border-color: rgba(0,194,255,0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.product-card.featured {
  border-color: rgba(0,229,160,0.4);
}

.product-img-wrap {
  height: 180px;
  background: linear-gradient(135deg, rgba(0,194,255,0.08) 0%, rgba(0,102,255,0.12) 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-emoji { font-size: 64px; line-height: 1; }

.product-badge-wrap {
  position: absolute;
  top: 12px; left: 12px;
  display: flex; flex-direction: column; gap: 4px;
}

.product-eco-tags {
  position: absolute;
  bottom: 8px; right: 8px;
  display: flex; gap: 4px;
}

.eco-mini {
  background: rgba(8,13,26,0.85);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 10px;
  backdrop-filter: blur(6px);
}

.product-body { padding: 20px; }

.product-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.product-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-stars {
  font-size: 12px;
  color: #fbbf24;
  margin-bottom: 4px;
}

.product-reviews { font-size: 11px; color: var(--text-muted); }

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.product-price {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--success);
}

.product-price-old {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 4px;
}

.add-cart-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  background: rgba(0,194,255,0.12);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-full);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: var(--transition-fast);
  cursor: pointer;
}

.add-cart-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
  transform: scale(1.05);
}

.add-cart-btn.added {
  background: rgba(0,229,160,0.15);
  border-color: rgba(0,229,160,0.4);
  color: var(--success);
}

/* Cart Trigger Badge */
.cart-trigger {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -6px; right: -8px;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  font-family: var(--font-heading);
  transition: transform 0.2s;
}

.cart-badge.bump { animation: bump 0.3s ease; }

@keyframes bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* Cart Sidebar */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
}

.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-sidebar {
  position: fixed;
  top: 0; right: -420px; bottom: 0;
  width: 400px;
  background: var(--bg-surface);
  border-left: 1px solid var(--glass-border);
  z-index: 1101;
  display: flex; flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
}

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

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

.cart-header h3 {
  font-size: 1rem; font-weight: 700;
  background: none; -webkit-text-fill-color: var(--text-primary);
}

.cart-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition-fast);
}

.cart-close:hover {
  background: rgba(248,113,113,0.15);
  border-color: rgba(248,113,113,0.3);
  color: #f87171;
}

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

.cart-empty { text-align: center; padding: 48px 0; color: var(--text-muted); }

.cart-items { display: flex; flex-direction: column; gap: 12px; }

.cart-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px;
}

.cart-item-icon { font-size: 28px; flex-shrink: 0; }

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.cart-item-price { font-size: 13px; color: var(--success); font-weight: 700; margin-top: 2px; }

.cart-item-remove {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.cart-item-remove:hover {
  background: rgba(248,113,113,0.1);
  border-color: rgba(248,113,113,0.2);
  color: #f87171;
}

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

.cart-total {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; font-weight: 600; color: var(--text-primary);
}

.cart-total strong { font-size: 1.4rem; color: var(--success); font-family: var(--font-heading); }

/* Responsive */
@media (max-width: 1024px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-filters { position: static; display: none; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .products-grid { grid-template-columns: 1fr; }
  .cart-sidebar { width: 100%; right: -100%; }
}
