/* ============================================================
   Sunny Spark — Shared Components
   Header, Footer, Buttons, Cards, Badges
   ============================================================ */

/* ── Header ────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(255, 251, 245, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition-base);
}

.site-header.scrolled {
  background: rgba(255, 251, 245, 0.95);
  border-bottom-color: var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--color-text);
}

.header-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-warm);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header-nav a {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--color-primary-dark);
  background: var(--color-primary-50);
}

.header-cta {
  margin-left: var(--space-4);
}

/* Mobile menu toggle */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.mobile-menu-btn:hover {
  background: var(--color-primary-50);
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  position: relative;
  transition: all var(--transition-fast);
}

.mobile-menu-btn span::before,
.mobile-menu-btn span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-menu-btn span::before { top: -7px; }
.mobile-menu-btn span::after { top: 7px; }

.mobile-menu-btn.open span { background: transparent; }
.mobile-menu-btn.open span::before { top: 0; transform: rotate(45deg); }
.mobile-menu-btn.open span::after { top: 0; transform: rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 251, 245, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  padding: var(--space-8) var(--space-6);
  flex-direction: column;
  gap: var(--space-2);
  opacity: 0;
  transform: translateY(-10px);
  transition: all var(--transition-base);
}

.mobile-nav.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav a {
  display: block;
  padding: var(--space-4) var(--space-4);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.mobile-nav a:hover {
  background: var(--color-primary-50);
  color: var(--color-primary-dark);
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .header-cta { display: none; }
  .mobile-menu-btn { display: flex; }
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-warm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px -8px rgba(245, 158, 11, 0.3);
}

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

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary-dark);
  border: 1.5px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn-dark {
  background: var(--gradient-dark);
  color: white;
}

.btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  transition: all var(--transition-base);
}

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

.card-image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.card-body {
  padding: var(--space-6);
}

.card-body h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.card-body p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

/* ── Product Card ──────────────────────────────────────── */
.product-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

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

.product-card .card-image {
  position: relative;
  aspect-ratio: 16/12;
  background: linear-gradient(135deg, var(--color-primary-50), var(--color-bg-alt));
}

.product-card .card-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-1) var(--space-3);
  background: var(--gradient-primary);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.product-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-5) var(--space-6);
}

.product-card .product-name {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
  line-height: 1.3;
}

.product-card .product-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.4;
}

.product-card .product-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.product-card .highlight-tag {
  padding: var(--space-1) var(--space-2);
  background: var(--color-primary-50);
  color: var(--color-primary-dark);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

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

.product-card .product-price {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}

.product-card .product-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: gap var(--transition-fast);
}

.product-card:hover .product-link {
  gap: var(--space-2);
}

/* ── Badge ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
}

.badge-primary {
  background: var(--color-primary-100);
  color: var(--color-primary-dark);
}

.badge-green {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* ── Stat Card ─────────────────────────────────────────── */
.stat-card {
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.stat-card .stat-number {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-2);
}

.stat-card .stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: var(--text-xl);
  color: white;
  margin-bottom: var(--space-4);
}

.footer-brand .footer-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.footer-brand p {
  color: var(--color-text-light);
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: 320px;
  margin-bottom: var(--space-6);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-light);
  font-size: var(--text-lg);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-primary);
  color: white;
}

.footer-column h4 {
  color: white;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: var(--space-5);
}

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-column a {
  color: var(--color-text-light);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ── CTA Section ───────────────────────────────────────── */
.cta-section {
  background: var(--gradient-warm);
  padding: var(--space-20) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-section h2 {
  margin-bottom: var(--space-4);
}

.cta-section p {
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Page Hero ─────────────────────────────────────────── */
.page-hero {
  padding: calc(var(--header-height) + var(--space-16)) 0 var(--space-16);
  background: var(--gradient-warm);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
}

.page-hero h1 {
  margin-bottom: var(--space-4);
  position: relative;
}

.page-hero p {
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* ── Breadcrumb ────────────────────────────────────────── */
.breadcrumb {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  justify-content: center;
}

.breadcrumb a {
  color: var(--color-text-muted);
}

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

.breadcrumb .separator {
  color: var(--color-text-light);
}

.breadcrumb .current {
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ── Filter Bar ────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-light);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.filter-bar label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.filter-btn {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-secondary);
  border: 1.5px solid var(--color-border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.filter-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ── Form Styles ───────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-card);
  color: var(--color-text);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2357534E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
