/* ===== SUPERSITE BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Styles */
body.dark-theme {
  background-color: #0f172a;
  color: #f1f5f9;
}

body.light-theme {
  background-color: #f8fafc;
  color: #1e293b;
}

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

/* ===== COMPONENT DISMISS BUTTON ===== */
.component-dismiss-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-component-id]:hover .component-dismiss-btn,
.component-dismiss-btn:focus {
  opacity: 1;
  transform: scale(1.1);
}

.component-dismiss-btn:hover {
  background: rgba(220, 38, 38, 1);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
}

.component-dismiss-btn:active {
  transform: scale(0.95);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* ===== COMPONENT SHELF ===== */
.component-shelf {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border-top: 2px solid rgba(148, 163, 184, 0.3);
  padding: 12px 20px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  z-index: 50;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.component-shelf.has-items {
  transform: translateY(0);
}

.shelf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.shelf-title {
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shelf-count {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.shelf-items {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 0;
}

.shelf-items::-webkit-scrollbar {
  height: 6px;
}

.shelf-items::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 3px;
}

.shelf-items::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 3px;
}

.shelf-item {
  flex-shrink: 0;
  width: 140px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.shelf-item:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.shelf-item-label {
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shelf-item-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.shelf-restore-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.9);
  color: white;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.shelf-item:hover .shelf-restore-btn {
  opacity: 1;
}

/* ===== COMPARE BAR ===== */
.compare-bar {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
  z-index: 60;
  cursor: pointer;
  transition: all 0.3s ease;
  display: none;
}

.compare-bar.active {
  display: block;
  animation: slideInUp 0.4s ease;
}

.compare-bar:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.6);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.compare-count {
  font-weight: 700;
  font-size: 18px;
  margin-right: 8px;
}

/* ===== PRODUCT COMPARE CHECKBOX ===== */
.product-compare-checkbox {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
}

.product-compare-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #3b82f6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .theme-toggle {
    bottom: 80px;
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .component-shelf {
    padding: 8px 12px;
  }
  
  .shelf-item {
    width: 120px;
  }
  
  .compare-bar {
    bottom: 70px;
    right: 12px;
    padding: 12px 16px;
    font-size: 14px;
  }
}