:root {
  --purple: #64159a;
  --purple-dark: #3b0d5f;
  --pink: #e72c86;
  --ink: #211a27;
  --muted: #6f6875;
  --line: #e8e1ed;
  --soft: #f8f4fb;
  --card: #ffffff;
  --shadow: 0 24px 70px rgba(47, 22, 68, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}

button, input, textarea, select { font: inherit; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand img {
  width: min(260px, 44vw);
  height: auto;
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.main-nav a:hover { color: var(--purple); }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--purple);
}

.cart-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  cursor: pointer;
  font-weight: 800;
}

.cart-button span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  margin-left: 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--purple);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 42px;
  align-items: center;
  min-height: 680px;
  padding: clamp(56px, 8vw, 120px) clamp(20px, 6vw, 88px);
  background:
    radial-gradient(circle at 15% 12%, rgba(231, 44, 134, 0.17), transparent 31%),
    radial-gradient(circle at 82% 20%, rgba(100, 21, 154, 0.18), transparent 28%),
    linear-gradient(135deg, #fff 0%, #fbf6ff 58%, #fff2f8 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--pink);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1, .section-heading h2, .contact-section h2 {
  margin: 0;
  color: var(--purple-dark);
  line-height: 1.02;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(3rem, 7vw, 6.8rem);
}

.hero-text {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.7;
}

.hero-actions, .checkout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--purple);
  border-color: var(--line);
}

.btn-ghost {
  background: transparent;
  color: var(--purple);
  border-color: var(--line);
}

.hero-panel { display: grid; gap: 18px; }

.hero-card {
  padding: 26px;
  border: 1px solid rgba(100, 21, 154, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.hero-card span { color: var(--pink); font-weight: 900; }

.hero-card strong {
  display: block;
  margin: 8px 0;
  color: var(--purple-dark);
  font-size: 1.35rem;
}

.hero-card p { margin: 0; color: var(--muted); }

.showcase, .catalog-section, .services-section, .workflow, .admin-section, .contact-section {
  padding: 80px clamp(20px, 6vw, 88px);
}

.showcase {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
  background: #fff;
}

.showcase-card {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
  box-shadow: var(--shadow);
}

.showcase-card.large { grid-row: span 2; min-height: 586px; }

.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-card div {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

.showcase-card span {
  color: var(--pink);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.showcase-card h2, .showcase-card h3 {
  margin: 6px 0 0;
  color: var(--purple-dark);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-heading h2 { font-size: clamp(2rem, 4vw, 4rem); }

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) 1fr;
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
}

.search-box span, .admin-form label, .checkout-form label {
  display: grid;
  gap: 8px;
  color: var(--purple-dark);
  font-weight: 800;
}

.search-box input, .admin-form input, .admin-form select, .admin-form textarea, .checkout-form input, .checkout-form select, .checkout-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  background: #fff;
}

.category-filter { display: flex; flex-wrap: wrap; gap: 10px; }

.filter {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--purple);
  cursor: pointer;
  font-weight: 800;
}

.filter.active { color: #fff; background: var(--purple); }

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

.product-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 14px 42px rgba(47, 22, 68, 0.08);
}

.product-media {
  aspect-ratio: 4 / 3;
  background: var(--soft);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.product-tag {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--purple);
  background: var(--soft);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-info h3, .product-info p { margin: 0; }
.product-info p { color: var(--muted); line-height: 1.55; }

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price {
  color: var(--purple-dark);
  font-size: 1.3rem;
  font-weight: 950;
}

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

.service-grid article, .timeline div {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.service-grid strong, .timeline strong {
  color: var(--purple-dark);
  font-size: 1.1rem;
}

.service-grid p, .timeline p {
  color: var(--muted);
  line-height: 1.6;
}

.workflow, .admin-section { background: var(--soft); }

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

.timeline span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  font-weight: 900;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-form .full { grid-column: 1 / -1; }

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
}

.contact-section h2, .contact-section .eyebrow { color: #fff; }
.contact-section p { max-width: 650px; color: rgba(255, 255, 255, 0.82); }

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.cart-drawer.open { pointer-events: auto; }

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 10, 33, 0.38);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cart-drawer.open .cart-backdrop { opacity: 1; }

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: block;
  overflow-y: auto;
  width: min(460px, 100%);
  height: 100%;
  padding: 24px;
  background: #fff;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.16);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.cart-drawer.open .cart-panel { transform: translateX(0); }

.cart-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.cart-header h2 {
  margin: 0;
  color: var(--purple-dark);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}

.cart-items {
  overflow: auto;
  padding: 18px 0;
}

.empty-cart {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: var(--muted);
  text-align: center;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item h3, .cart-item p { margin: 0; }
.cart-item h3 { font-size: 0.95rem; }
.cart-item p { color: var(--muted); font-size: 0.9rem; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-control button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.remove-item {
  border: 0;
  background: transparent;
  color: var(--pink);
  cursor: pointer;
  font-weight: 900;
}

.checkout-form {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cart-summary {
  display: grid;
  gap: 8px;
  padding: 18px 0;
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
}

.cart-summary strong { color: var(--purple-dark); }
.cart-summary small { color: var(--muted); }
.checkout-actions { margin-top: 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  width: min(420px, calc(100% - 40px));
  padding: 14px 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--purple-dark);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 6vw, 88px);
  color: #fff;
  background: #13081d;
}

.site-footer p { margin: 0; color: rgba(255, 255, 255, 0.78); }

@media (max-width: 1020px) {
  .hero, .showcase, .catalog-toolbar, .contact-section { grid-template-columns: 1fr; }
  .showcase-card.large { grid-row: auto; min-height: 320px; }
  .product-grid, .service-grid, .timeline, .admin-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .site-header { flex-wrap: wrap; }
  .menu-toggle { display: block; margin-left: auto; }
  .main-nav { display: none; width: 100%; margin-left: 0; padding-top: 16px; }
  .main-nav.open { display: grid; }
  .cart-button { width: 100%; }
  .hero { min-height: auto; }
  .product-grid, .service-grid, .timeline, .admin-form { grid-template-columns: 1fr; }
  .hero-actions, .checkout-actions, .contact-section, .site-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .btn { width: 100%; }
}

[hidden] { display: none !important; }
button:disabled { opacity: .55; cursor: wait; }
.admin-page { max-width: 1100px; margin: auto; padding: 28px; }
.admin-page section { margin: 24px 0; padding: 24px; border: 1px solid var(--line); border-radius: 16px; }
.admin-page label { display: grid; gap: 8px; margin: 10px 0; }
.admin-page input,.admin-page select,.admin-page textarea { padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.admin-list { display: grid; gap: 16px; }
.admin-list article { border-bottom: 1px solid var(--line); padding: 16px 0; overflow-wrap: anywhere; }
.admin-list button { margin: 5px; }
.admin-message { white-space: pre-wrap; color: var(--purple-dark); }
.order-result { padding: 20px; background: var(--soft); overflow-wrap: anywhere; }
.order-result p { margin-bottom: 14px; }
