
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --text: #171b2e;
  --muted: #777d91;
  --primary: #6c4df6;
  --primary-dark: #5034d4;
  --border: #e8e9f1;
  --danger: #e34c65;
  --success: #159b72;
  --shadow: 0 12px 35px rgba(30, 25, 70, .07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
  line-height: 1.6;
}


/* HEADER */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 15px 5%;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.brand b {
  color: var(--primary);
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 2px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, #8b70ff, #5234db);
  box-shadow: 0 7px 18px #6c4df644;
  font-size: 24px;
}

.search {
  display: flex;
  flex: 1;
  max-width: 400px;
  gap: 8px;
}

.search input {
  min-width: 0;
  flex: 1;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.navbtn,
.cartbtn {
  border: 0;
  background: transparent;
  color: #555b70;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  transition: .2s;
}

.navbtn:hover,
.navbtn.active {
  background: #f0edff;
  color: var(--primary);
}

.cartbtn {
  background: var(--primary);
  color: white;
}

.cartbtn:hover {
  background: var(--primary-dark);
}

#cartCount {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  margin-left: 4px;
  border-radius: 50%;
  background: white;
  color: var(--primary);
  font-size: 12px;
}

.call-order,
.footer-call {
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}


/* MAIN */

main {
  width: min(1180px, 90%);
  min-height: 70vh;
  margin: 35px auto 70px;
}

.view {
  animation: fadeUp .35s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* HERO */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  min-height: 390px;
  padding: 55px 7%;
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(120deg, #17172f, #30205d 65%, #5b3dd0);
  color: white;
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.hero .eyebrow {
  color: #c3b8ff;
}

.hero h1 {
  margin: 15px 0;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(34px, 5vw, 55px);
  line-height: 1.12;
}

.hero h1 em {
  color: #b8a7ff;
  font-style: normal;
}

.hero p:not(.eyebrow) {
  color: #d3cfe7;
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 250px;
}

.orb {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b6a3ff, #6947f0);
  filter: blur(1px);
  box-shadow: 0 0 90px #a18aff66;
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 190px;
  border: 1px solid #ffffff55;
  border-radius: 30px;
  background: #ffffff20;
  backdrop-filter: blur(12px);
  transform: rotate(-7deg);
}

.hero-card span {
  color: #ffe08a;
  font-size: 34px;
}

.hero-card b {
  font-size: 35px;
  letter-spacing: 4px;
}

.hero-card small {
  color: #e4ddff;
  letter-spacing: 3px;
}


/* BUTTONS */

.primary,
.secondary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  transition: .2s;
}

.primary {
  background: linear-gradient(135deg, #8065ff, #6041e8);
  color: white;
  box-shadow: 0 7px 18px #6c4df633;
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px #6c4df644;
}

.secondary {
  background: #f0edff;
  color: var(--primary);
}

.danger {
  background: #fff0f2;
  color: var(--danger);
}

.full {
  width: 100%;
}


/* SECTIONS */

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 45px 0 20px;
}

.section-head h2,
.view h2 {
  margin: 5px 0;
  font-family: 'Manrope', sans-serif;
  font-size: 27px;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.categories button {
  padding: 11px 17px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: white;
  color: #555b70;
  font-weight: 700;
  transition: .2s;
}

.categories button:hover,
.categories button.active {
  border-color: var(--primary);
  background: #f0edff;
  color: var(--primary);
}


/* PRODUCTS */

.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: white;
  box-shadow: 0 5px 20px rgba(30, 25, 70, .04);
  transition: .25s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.product-card img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #f0eff6;
}

.product-card h3 {
  margin: 13px 14px 5px;
  font-size: 16px;
}

.product-card p {
  margin: 6px 14px;
  color: var(--muted);
  font-size: 13px;
}

.product-card .price {
  color: var(--primary);
  font-size: 19px;
  font-weight: 800;
}

.product-card button {
  width: calc(100% - 28px);
  margin: 12px 14px 15px;
}

.loading {
  padding: 30px;
  color: var(--muted);
  text-align: center;
  background: white;
  border-radius: 16px;
}


/* PANELS AND FORMS */

.panel {
  margin: 20px 0;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 6px 22px rgba(30, 25, 70, .04);
}

.narrow {
  width: min(460px, 100%);
  margin: 30px auto;
}

.panel h3 {
  margin-top: 8px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #44495c;
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid #e1e2eb;
  border-radius: 11px;
  outline: none;
  background: white;
  color: var(--text);
  transition: .2s;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px #6c4df61c;
}

.formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.formgrid button {
  align-self: end;
}

.checkout {
  max-width: 650px;
  margin-left: auto;
}

.checkout > label {
  margin-top: 17px;
}

.checkout button {
  margin-top: 18px;
}


/* AUTH */

.tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  padding: 5px;
  border-radius: 12px;
  background: #f3f2f9;
}

.tabs button {
  flex: 1;
  padding: 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tabs button.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 2px 8px #17172f12;
}

#authForm {
  display: grid;
  gap: 16px;
}

#otpSection {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}


/* CART AND ORDERS */

#cartItems {
  display: grid;
  gap: 12px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: white;
}

.cart-item button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff0f2;
  color: var(--danger);
}

.order-card {
  margin: 12px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: white;
}


/* SELLER AND ADMIN */

#sellerTools {
  border-top: 4px solid var(--primary);
}

#sellerProducts,
#sellerOrders,
#adminSellers,
#adminProducts,
#adminOrders,
#adminUsers {
  display: grid;
  gap: 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.admin-grid > div {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #fafaff;
}


/* NOTICE */

.notice {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #eeeaff;
  color: #5034d4;
  font-weight: 700;
}

.notice.error {
  background: #fff0f2;
  color: var(--danger);
}

.notice.success {
  background: #e9f9f2;
  color: var(--success);
}


/* FOOTER */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  padding: 25px 5%;
  border-top: 1px solid var(--border);
  background: white;
  color: var(--muted);
  font-size: 13px;
}


/* RESPONSIVE */

@media (max-width: 1000px) {
  .topbar {
    flex-wrap: wrap;
  }

  .search {
    order: 3;
    max-width: none;
    flex-basis: 100%;
  }

  nav {
    justify-content: center;
  }

  .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  main {
    width: 92%;
    margin-top: 20px;
  }

  .topbar {
    padding: 12px 4%;
    gap: 12px;
  }

  nav {
    width: 100%;
    gap: 4px;
  }

  .navbtn,
  .cartbtn {
    padding: 9px;
    font-size: 12px;
  }

  .call-order {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 35px 25px;
    text-align: center;
  }

  .hero-art {
    min-height: 220px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-card img {
    height: 145px;
  }

  .product-card h3 {
    font-size: 14px;
  }

  .product-card .price {
    font-size: 16px;
  }

  .formgrid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .products {
    grid-template-columns: 1fr;
  }

  .brand {
    font-size: 17px;
  }
}
