/* 
  Panda Collections - Premium Digital Marketplace
  Core Design System & Global Stylesheet
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Tokens */
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-dark: #0F172A;
  --bg-panda-charcoal: #111827;
  
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-white: #FFFFFF;
  
  --primary: #10B981;
  --primary-dark: #059669;
  --primary-light: #D1FAE5;
  --primary-glow: rgba(16, 185, 129, 0.18);
  
  --secondary: #6366F1;
  --secondary-light: #EEF2FF;
  
  --accent-gold: #F59E0B;
  --accent-red: #EF4444;
  --accent-blue: #3B82F6;
  
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 36px -8px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 12px 28px -6px rgba(16, 185, 129, 0.25);
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Typography */
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Layout */
  --container-max: 1280px;
  --header-height: 80px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-subtitle {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.25rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0.75rem auto 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-white);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
  background-color: var(--bg-panda-charcoal);
  color: var(--text-white);
}

.btn-secondary:hover {
  background-color: #1F2937;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background-color: var(--primary-light);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 1.1rem 2.2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition-fast);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.logo-icon-svg {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10B981, #059669);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-dark);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* Category Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  z-index: 1100;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.dropdown-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.action-badge-btn {
  position: relative;
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary);
  color: var(--text-white);
  font-size: 0.7rem;
  font-weight: 700;
  width: 19px;
  height: 19px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}

/* Search Bar Input Widget */
.header-search {
  position: relative;
  width: 260px;
}

.header-search input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.6rem;
  font-size: 0.875rem;
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.header-search input:focus {
  outline: none;
  background: var(--bg-card);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.header-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
}

/* Product Card Component */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.product-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-subtle);
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-thumb img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: var(--text-white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wishlist-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.wishlist-btn:hover, .wishlist-btn.active {
  background: #FFF;
  color: var(--accent-red);
  transform: scale(1.1);
}

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

.product-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.product-title a:hover {
  color: var(--primary-dark);
}

.product-author {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-color);
}

.rating-stars {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.rating-star-icon {
  color: var(--accent-gold);
}

.rating-count {
  color: var(--text-light);
  font-weight: 400;
  font-size: 0.8rem;
}

.product-price-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.current-price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.old-price {
  font-size: 0.875rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.product-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.product-card-actions .btn {
  flex: 1;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition-fast);
  padding: 2rem;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--accent-red);
  color: var(--text-white);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 3000;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  background: var(--bg-panda-charcoal);
  color: var(--text-white);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 4px solid var(--primary);
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast.toast-error {
  border-left-color: var(--accent-red);
}

.toast.toast-warning {
  border-left-color: var(--accent-gold);
}

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

/* Forms & Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Footer */
.footer {
  background: var(--bg-panda-charcoal);
  color: var(--text-light);
  padding-top: 5rem;
  padding-bottom: 2rem;
  margin-top: 6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand p {
  margin-top: 1.2rem;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col-title {
  color: var(--text-white);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.4rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-light);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-newsletter p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form input {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
  width: 100%;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background: var(--primary);
  transform: translateY(-2px);
}
