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

:root {
  --bg: #f3f2ec;
  --ink: #16191c;
  --muted: #59616a;
  --panel: #ffffff;
  --panel-soft: #f7f8fb;
  --line: #e2e5ed;
  --brand: #0f4c81;
  --brand-strong: #0a355a;
  --warm: #ff7a3d;
  --shadow: 0 12px 34px rgba(10, 32, 58, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Sora", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 12% -14%, #ffffff 0%, transparent 39%),
    radial-gradient(circle at 100% 0%, #ffe9dd 0%, transparent 35%),
    linear-gradient(180deg, #f7f5ee 0%, var(--bg) 100%);
  min-height: 100vh;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
.brand {
  font-family: "Manrope", "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
}

.site-header {
  width: min(1180px, 94vw);
  margin: 1rem auto 0;
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(10, 32, 58, 0.08);
  position: sticky;
  top: 0.55rem;
  z-index: 20;
}

.brand {
  text-decoration: none;
  color: var(--brand-strong);
  font-size: 1.36rem;
  font-weight: 800;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: #2d3d4f;
  padding: 0.42rem 0.68rem;
  border-radius: 0.6rem;
  font-size: 0.92rem;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  background: #e8edf4;
  color: #0f2f4f;
  transform: translateY(-1px);
}

.cart-link {
  text-decoration: none;
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(120deg, var(--brand), #145f9f);
  padding: 0.45rem 0.82rem;
  border-radius: 0.75rem;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.account-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: #1a3249;
  background: #e8edf4;
  border: 1px solid #d1dbe8;
  padding: 0.45rem 0.78rem;
  border-radius: 0.75rem;
}

.account-link:hover {
  background: #dfe7f2;
}

.admin-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: #fff;
  background: #1f3e59;
  border: 1px solid #153148;
  padding: 0.45rem 0.74rem;
  border-radius: 0.75rem;
}

.admin-link:hover {
  background: #1a344a;
}

#cart-count {
  min-width: 1.4rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--warm);
  color: #fff;
  padding: 0.1rem 0.35rem;
}

main,
.section,
.hero,
.site-footer {
  width: min(1100px, 92vw);
  margin-left: auto;
  margin-right: auto;
}

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

.hero-copy {
  padding: 1.4rem 1.2rem 1.2rem;
  border-radius: 1.15rem;
  background: linear-gradient(150deg, #fefefe 20%, #f3f7fd 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: #5e6e7e;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3.35rem);
  line-height: 1.06;
}

.hero p {
  color: var(--muted);
  max-width: 56ch;
}

.hero-actions {
  margin-top: 1.15rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.hero-panel {
  border-radius: 1.15rem;
  border: 1px solid #d9e4f3;
  background:
    radial-gradient(circle at 0% 0%, #f1f6ff 0%, transparent 45%),
    linear-gradient(180deg, #fafdff 0%, #edf4fb 100%);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  margin: 0;
}

.hero-panel ul {
  margin: 0.75rem 0;
  padding-left: 1.2rem;
  color: #2f465d;
  line-height: 1.65;
}

.hero-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.hero-metrics div {
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #dbe8f7;
  padding: 0.7rem;
}

.hero-metrics strong {
  font-size: 1.2rem;
  display: block;
}

.hero-metrics span {
  color: #56718b;
  font-size: 0.85rem;
}

.btn {
  border: none;
  border-radius: 0.8rem;
  padding: 0.72rem 1.06rem;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-weight: 600;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-dark {
  color: #fff;
  background: linear-gradient(120deg, var(--brand), #0e5b9a);
  box-shadow: 0 8px 20px rgba(12, 72, 121, 0.28);
}

.btn-light {
  color: #1f2a35;
  background: linear-gradient(120deg, #f4e8d4, #ffeddc);
}

.section {
  padding: 0.8rem 0 2rem;
}

.section h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header a {
  text-decoration: none;
  color: var(--brand);
  font-weight: 600;
}

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

.highlights article {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
  border-radius: 0.95rem;
  padding: 1rem;
}

.highlights h3 {
  margin: 0;
}

.highlights p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.product-card {
  border-radius: 1rem;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  animation: riseIn 0.55s ease both;
}

.product-card:nth-child(2) { animation-delay: 0.08s; }
.product-card:nth-child(3) { animation-delay: 0.16s; }
.product-card:nth-child(4) { animation-delay: 0.24s; }

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(10, 32, 58, 0.2);
}

.product-card img {
  width: 100%;
  height: 176px;
  object-fit: cover;
}

.product-card-content {
  padding: 0.95rem;
}

.product-card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.product-card p {
  margin: 0.5rem 0;
  min-height: 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.price {
  font-weight: 800;
  color: #0f2f4f;
  margin-bottom: 0.7rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
}

.card-actions button,
.card-actions a {
  flex: 1;
  text-align: center;
  padding: 0.58rem;
  border-radius: 0.62rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: transform 0.18s ease;
}

.card-actions button {
  background: #1d252e;
  color: #fff;
}

.card-actions a {
  background: #e8edf4;
  color: #1a2a3b;
}

.card-actions button:hover,
.card-actions a:hover {
  transform: translateY(-1px);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.15rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.product-layout img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.8rem;
}

.spec-list {
  padding-left: 1.1rem;
  color: #2f3f50;
}

.builder {
  width: min(700px, 100%);
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fd 100%);
  border: 1px solid #d9e4f3;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1.1rem;
  display: grid;
  gap: 0.65rem;
}

.builder label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #35495c;
  margin-top: 0.2rem;
}

.builder select {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #cfdbeb;
  border-radius: 0.65rem;
  background: #fff;
  color: #213243;
  font-family: inherit;
}

.total {
  font-size: 1.04rem;
}

#cart-items {
  display: grid;
  gap: 0.75rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.85rem;
  border-radius: 0.8rem;
}

.cart-item button {
  border: none;
  background: #e9eef5;
  color: #243446;
  border-radius: 0.55rem;
  padding: 0.45rem 0.75rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cart-summary {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.muted {
  color: var(--muted);
}

.center {
  text-align: center;
  padding-top: 4rem;
}

.prose {
  max-width: 65ch;
}

.site-footer {
  margin-top: 1.8rem;
  margin-bottom: 1.8rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: #405466;
}

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

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: start;
    top: 0.35rem;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .header-actions {
    width: 100%;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 2.8rem;
  }

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

  .product-layout {
    grid-template-columns: 1fr;
  }
}

.payment-input {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #cfdbeb;
  border-radius: 0.65rem;
  background: #fff;
  color: #213243;
  font-family: inherit;
}

.account-form {
  display: grid;
  gap: 0.65rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.auth-tab {
  border: 1px solid #cfdbeb;
  background: #eff4fa;
  color: #213243;
  border-radius: 0.65rem;
  padding: 0.6rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.active {
  background: #1f3e59;
  color: #fff;
  border-color: #1f3e59;
}

.auth-panel {
  margin-top: 0.2rem;
}

.account-current {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.75rem;
}
