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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;

  --secondary: #ec4899;
  --secondary-dark: #db2777;
  --secondary-light: #f472b6;

  --accent: #14b8a6;
  --accent-dark: #0d9488;
  --accent-light: #2dd4bf;

  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --surface-strong: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow:
    0 10px 15px -3px rgba(15, 23, 42, 0.1),
    0 4px 6px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg:
    0 20px 25px -5px rgba(15, 23, 42, 0.1),
    0 10px 10px -5px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

body.theme-dark {
  --primary: #818cf8;
  --primary-dark: #6366f1;
  --primary-light: #a5b4fc;

  --secondary: #f472b6;
  --secondary-dark: #ec4899;
  --secondary-light: #fbcfe8;

  --accent: #2dd4bf;
  --accent-dark: #14b8a6;
  --accent-light: #5eead4;

  --bg: #0f172a;
  --surface: #1e293b;
  --surface-alt: #0f172a;
  --surface-strong: #334155;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg:
    0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  line-height: 1.6;
  letter-spacing: -0.3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", "Inter", sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

h3 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary);
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.client-shell {
  position: relative;
  overflow: hidden;
}

.client-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(248, 250, 252, 0.9), rgba(248, 250, 252, 0.9)),
    url("https://images.unsplash.com/photo-1556740738-b6a63e27c4df?auto=format&fit=crop&w=1920&q=80");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body.theme-dark .client-shell::before {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9)),
    url("https://images.unsplash.com/photo-1556740738-b6a63e27c4df?auto=format&fit=crop&w=1920&q=80");
}

.client-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 12% 12%, rgba(20, 184, 166, 0.16), transparent 40%),
    radial-gradient(circle at 88% 88%, rgba(99, 102, 241, 0.2), transparent 42%);
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 2rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

body.theme-dark .site-header {
  background: rgba(30, 41, 59, 0.95);
}

.site-header:hover {
  box-shadow: var(--shadow);
}

.brand {
  flex-shrink: 0;
}

.brand a {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s ease;
  display: block;
}

.brand a:hover {
  transform: scale(1.05);
}

.site-nav {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.45s ease;
}

body.theme-dark .site-nav {
  background: rgba(15, 23, 42, 0.65);
}

.nav-link {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  color: var(--text-secondary);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary);
  opacity: 0.1;
  transition: left 0.3s ease;
  z-index: -1;
}

.nav-link:hover::before {
  left: 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  transform: translateY(-1px);
  background: rgba(99, 102, 241, 0.12);
}

.nav-link.active {
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-self: end;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--primary);
  color: white;
  transform: rotate(180deg);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.8rem;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
  gap: 0.5rem;
}

.button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.button:active::before {
  width: 300px;
  height: 300px;
}

.button {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  box-shadow: var(--shadow-sm);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.button-secondary {
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.button-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.button-accent {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-dark) 100%
  );
  color: white;
}

.button-accent:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.button-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

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

.mobile-menu-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  animation: slideDown 0.3s ease;
}

.mobile-nav.hidden {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-content {
  flex: 1;
  padding: 3rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
  animation: fadeIn 0.8s ease 0.1s both;
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-content {
  animation: slideInLeft 0.8s ease 0.2s both;
}

.hero-visual {
  animation: slideInRight 0.8s ease 0.3s both;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.4)),
    url("https://images.unsplash.com/photo-1515169067868-5387ec356754?auto=format&fit=crop&w=1200&q=80");
  background-size: cover;
  background-position: center;
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--border);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border-radius: 50px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1) 0%,
    rgba(236, 72, 153, 0.1) 100%
  );
  border: 1px solid var(--primary-light);
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.quick-features {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.feature-card {
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--secondary),
    var(--accent)
  );
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}

.feature-card h3 {
  color: var(--text);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  animation: fadeIn 0.6s ease 0.2s both;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.15) 0%,
    transparent 70%
  );
  transition: all 0.3s ease;
}

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

.product-card:hover::before {
  top: -25%;
  right: -25%;
}

.product-card h3 {
  margin: 0;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.product-card p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

.product-card .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.product-card .badge {
  margin-top: auto;
  width: fit-content;
}

.product-card form {
  display: grid;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.product-card input[type="number"] {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 600;
  transition: all 0.2s ease;
}

.product-card input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.section {
  padding: 3rem 2rem;
  margin: 2rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.6s ease;
}

.section h2 {
  margin-top: 0;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

.section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--secondary),
    var(--accent)
  );
  border-radius: 2px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.contact-panel,
.checkout-panel,
.summary-panel {
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  transform: translateY(-1px);
}

.form-group textarea {
  min-height: 160px;
  resize: vertical;
}

.table-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table-list th {
  padding: 1rem 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--primary);
  background: var(--surface-alt);
}

.table-list td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.table-list tr:hover td {
  background: var(--surface-alt);
  color: var(--text);
}

.table-list td:last-child {
  text-align: right;
}

.alert {
  padding: 1.2rem 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--accent);
  background: rgba(20, 184, 166, 0.1);
  color: var(--text);
  margin-bottom: 1.5rem;
  animation: slideInLeft 0.3s ease;
}

.alert.error {
  border-left-color: var(--secondary);
  background: rgba(236, 72, 153, 0.1);
}

.alert.success {
  border-left-color: var(--accent);
  background: rgba(20, 184, 166, 0.1);
}

.site-footer {
  padding: 2.5rem;
  display: grid;
  align-items: start;
  gap: 2rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: auto;
}

.footer-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem;
}

.footer-grid h4 {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.footer-grid p {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: all 0.3s ease;
  position: relative;
}

.footer-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

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

.footer-links a:hover::after {
  width: 100%;
}

.admin-card {
  padding: 2rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.admin-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -40px;
  right: 20px;
  font-size: 6rem;
  color: var(--primary);
  opacity: 0.1;
}

.testimonial-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.testimonial-rating {
  color: #fbbf24;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.testimonial-author {
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.testimonial-role {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

@media (max-width: 1024px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .site-nav {
    display: none;
  }

  .site-header {
    grid-template-columns: 1fr auto auto;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: 2rem 1.5rem;
  }

  .site-header {
    padding: 1rem;
  }

  .site-footer {
    padding: 2rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .section {
    padding: 1.5rem;
  }

  .table-list {
    font-size: 0.85rem;
  }

  .table-list th,
  .table-list td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .page-content {
    padding: 1.5rem 1rem;
  }

  .site-header {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .theme-toggle,
  .button {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
  }

  .mobile-nav {
    padding: 0.75rem 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .quick-features,
  .products-grid {
    gap: 1rem;
  }

  .feature-card,
  .product-card {
    padding: 1rem;
  }
}
