:root {
  --bg: #faf7fb;
  --panel: #f7f1f8;
  --panel-2: #f1edf5;
  --text: #423748;
  --muted: #8a7b92;
  --accent: #caa0bf;
  --accent-2: #b4a6cc;
  --line: #e6deeb;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: Inter, sans-serif;
  color: var(--text);
  background: radial-gradient(1000px 600px at 15% 0%, #f8f1fb 0, var(--bg) 58%);
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

.hero {
  border-bottom: 1px solid var(--line);
  padding-bottom: 2rem;
}

.nav {
  padding: 1.1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand__home-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand h1 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.brand p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.brand__logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgb(167 60 202 / 45%);
}

.cart-btn,
.cta,
.checkout,
.filters button {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  transition: 0.25s ease;
}

.back-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #e8e2ee;
  color: #5a4d62;
  border-radius: 12px;
  padding: 0.65rem 0.95rem;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid #ddd5e8;
}

.back-btn::before {
  content: "←";
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.85;
}

.back-btn:hover {
  background: #ddd4e8;
  color: #423748;
}

.admin-link {
  text-decoration: none;
  background: #ece6f2;
  color: #5a4d62;
  border-radius: 12px;
  padding: 0.65rem 1rem;
  font-weight: 600;
}

.install-btn {
  display: none;
}

.install-btn.visible {
  display: inline-block;
}

.admin-link:hover {
  background: #e3dce9;
}

.cart-btn {
  background: #ece8f0;
  color: #5a4d62;
  padding: 0.65rem 1rem;
  font-weight: 600;
}

.cart-btn span {
  margin-left: 0.35rem;
  color: var(--accent);
}

.hero__content {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.5rem;
  padding-top: 1.6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: #9a748d;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.hero__text h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3.7vw, 2.8rem);
  line-height: 1.14;
}

.hero__text p {
  color: var(--muted);
  max-width: 58ch;
}

.cta {
  display: inline-block;
  margin-top: 0.55rem;
  text-decoration: none;
  padding: 0.74rem 1.15rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgb(177 74 221 / 30%);
}

.hero__card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.35rem;
  background: linear-gradient(180deg, #fff7fd, #f6edff);
}

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

.hero__card h3 {
  margin: 0.9rem 0 0.35rem;
  font-size: 1.9rem;
}

.highlights {
  margin: 2.2rem auto;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.highlights article {
  background: #fff9fd;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem;
}

.highlights h3 {
  margin: 0;
  font-size: 1.05rem;
}

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

.catalog {
  margin: 2.2rem auto 3rem;
}

.section-head {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 1.6rem;
}

.filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.filters button {
  background: #eee8f3;
  color: #66596f;
  padding: 0.55rem 0.85rem;
}

.filters button.active,
.filters button:hover {
  background: #e2d9ea;
  color: #4f4356;
}

.grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.95rem;
}

.card {
  background: #fff9fd;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card__cover {
  height: 150px;
  background: linear-gradient(150deg, #ffe9f7, #eee5ff);
  display: grid;
  place-items: center;
  font-size: 2.1rem;
}

.card__body {
  padding: 0.9rem;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  color: #73647f;
  background: #eee7f3;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
}

.card h3 {
  margin: 0.5rem 0 0.35rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 2.7em;
}

.card__foot {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.card__prices {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.price {
  font-weight: 700;
}

.price-label {
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--muted);
}

.price-wholesale {
  font-size: 0.76rem;
  color: #6b5d78;
  line-height: 1.35;
  font-weight: 600;
}

.add {
  border: 0;
  border-radius: 10px;
  background: #e7dfed;
  color: #554b5c;
  padding: 0.45rem 0.68rem;
  cursor: pointer;
}

.add:hover {
  background: #dbd2e2;
}

.add--done {
  background: linear-gradient(130deg, #b8e0c4, #9dd4aa) !important;
  color: #2d4a35 !important;
  transform: scale(1.05);
  transition: transform 0.2s ease, background 0.2s ease;
}

@keyframes cart-btn-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgb(202 160 191 / 55%);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 10px rgb(202 160 191 / 0%);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgb(202 160 191 / 0%);
  }
}

.cart-btn--pulse {
  animation: cart-btn-pulse 0.55s ease;
}

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(120%);
  max-width: min(92vw, 360px);
  padding: 0.85rem 1.25rem;
  background: #3d2947;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgb(61 41 71 / 35%);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.3s ease;
}

.cart-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.cart {
  position: fixed;
  top: 0;
  right: -360px;
  width: min(360px, 100%);
  height: 100vh;
  background: #fff8fe;
  border-left: 1px solid var(--line);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.cart.open {
  right: 0;
}

.cart__head,
.cart__foot {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.cart__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart__head h3 {
  margin: 0;
}

.cart__head button {
  border: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eadff0;
  color: #5a4d62;
  cursor: pointer;
}

.cart__items {
  flex: 1;
  overflow: auto;
  padding: 0.8rem 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0.65rem;
  margin-bottom: 0.6rem;
  gap: 0.75rem;
}

.cart-item__main {
  flex: 1;
  min-width: 0;
}

.cart-item__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.cart-item b {
  display: block;
  font-size: 0.92rem;
}

.cart-item__unit {
  display: block;
  color: var(--muted);
  margin-top: 0.2rem;
}

.cart-item__unit--opt {
  color: #4a8a5c;
  font-weight: 600;
}

.cart-item__qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.cart-item__qty button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: #eadff0;
  color: #5a4d62;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.cart-qty-input {
  width: 4.25rem;
  min-width: 2.75rem;
  max-width: 6.5rem;
  height: 28px;
  padding: 0 0.25rem;
  border: 1px solid #d8c8e2;
  border-radius: 8px;
  background: #fff;
  color: #3d3542;
  text-align: center;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  box-sizing: border-box;
}

.cart-qty-input:focus {
  outline: 2px solid #cabed8;
  border-color: #cabed8;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.cart-qty-input[type="number"] {
  appearance: textfield;
}

.cart-item__sum {
  font-size: 0.95rem;
}

.cart-item__remove {
  border: 0;
  border-radius: 8px;
  background: #eadff0;
  color: #5a4d62;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  font-size: 0.82rem;
}

.cart-wholesale-hint {
  margin: 0;
  padding: 0 1rem 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.checkout {
  width: 100%;
  margin-top: 0.6rem;
  color: #ffffff;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  font-weight: 600;
  padding: 0.7rem;
}

.cart__foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.4rem;
}

.cart__foot p {
  margin: 0 0 0.2rem;
}

.cart__foot label {
  color: #6a5f72;
  font-size: 0.85rem;
}

.cart__foot input {
  border: 1px solid #ddd4e4;
  background: #fff;
  color: #514758;
  border-radius: 9px;
  padding: 0.58rem 0.62rem;
  font: inherit;
}

.cart__foot input:focus {
  outline: 2px solid #cabed8;
  border-color: #cabed8;
}

.checkout-status {
  min-height: 1.1rem;
  color: #8f6f82;
  font-size: 0.85rem;
}

.checkout-status.success {
  color: #5ea46e;
}

/* Admin */
.admin-main {
  padding: 1.5rem 0 2rem;
}

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

.admin-top h2 {
  margin: 0;
}

.admin-metrics {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  margin-bottom: 1rem;
}

.metric {
  background: #fff9fd;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.84rem;
}

.metric b {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.2rem;
}

.orders {
  display: grid;
  gap: 0.8rem;
}

.order-card {
  background: #fff9fd;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem;
}

.order-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.order-head strong {
  font-size: 1.05rem;
}

.order-meta {
  color: #7a6288;
  font-size: 0.88rem;
}

.order-products {
  margin: 0.65rem 0;
  padding-left: 1rem;
  color: #5f496f;
}

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

.order-actions select,
.order-actions button {
  border: 1px solid #dec9ef;
  background: #f5ebff;
  color: #553f64;
  border-radius: 9px;
  padding: 0.45rem 0.55rem;
  font: inherit;
}

.order-actions button {
  cursor: pointer;
}

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

.hidden {
  display: none !important;
}

.login-card {
  max-width: 460px;
  margin: 2rem auto;
  background: #fff9fd;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.login-card h2 {
  margin: 0;
}

.login-card p {
  color: var(--muted);
}

.login-form,
.product-form {
  display: grid;
  gap: 0.45rem;
}

.login-form input,
.product-form input,
.product-form select,
.product-form textarea {
  border: 1px solid #ddd4e4;
  background: #fff;
  color: #514758;
  border-radius: 9px;
  padding: 0.58rem 0.62rem;
  font: inherit;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.login-form input:focus,
.product-form input:focus,
.product-form select:focus,
.product-form textarea:focus {
  outline: 2px solid #cabed8;
  border-color: #cabed8;
}

.product-admin {
  display: grid;
  grid-template-columns: minmax(0, min(100%, 400px)) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  width: 100%;
  min-width: 0;
}

.product-form {
  background: #fff9fd;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  align-self: start;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.product-list {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  width: 100%;
}

.product-image-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.product-image-preview img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.product-form input[type="file"] {
  padding: 0.4rem 0;
  width: 100%;
  max-width: 100%;
  font-size: 0.82rem;
}

.wholesale-fieldset {
  border: 1px dashed #d4c8de;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  margin: 0.25rem 0;
  min-width: 0;
  max-width: 100%;
}

.wholesale-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.field-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.wholesale-grid {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.wholesale-pair--row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
  min-width: 0;
}

.wholesale-remove {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 8px;
  background: #eadff0;
  color: #5a4d62;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.wholesale-remove:hover {
  background: #ddd2e6;
}

.wholesale-remove.hidden {
  visibility: hidden;
  pointer-events: none;
}

.wholesale-add-btn {
  margin-top: 0.5rem;
  width: 100%;
  border: 1px dashed #c9b8d4;
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  background: #fff;
  color: #5a4d62;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.wholesale-add-btn:hover:not(:disabled) {
  background: #f7f0fb;
  border-color: #b5a0c4;
}

.wholesale-add-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.order-meta--wholesale {
  color: #6b5a7a !important;
  font-weight: 500;
}

.card__cover--photo {
  padding: 0;
  overflow: hidden;
  background: #f5eef8;
}

.card__cover--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  vertical-align: middle;
  margin-right: 0.35rem;
}

/* Link hub */
.links-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.links-card {
  width: min(560px, 100%);
  background: linear-gradient(180deg, #fff8fe, #f4ecff);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.2rem;
}

.links-brand {
  text-align: center;
}

.links-brand .brand__logo {
  margin-inline: auto;
}

.links-brand h1 {
  margin: 0.75rem 0 0.35rem;
  letter-spacing: 0.05em;
}

.links-brand p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.links-address-panel {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgb(220 240 255 / 55%) 0%, rgb(200 228 248 / 40%) 100%);
  border: 1px solid rgb(170 205 232 / 45%);
}

.links-address-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-decoration: none;
  text-align: center;
  padding: 0.95rem 1rem;
  border-radius: 10px;
  background: #4a7eb8;
  color: #fff;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgb(74 126 184 / 28%);
}

.links-address-cta:hover {
  background: #3d6ea8;
  color: #fff;
}

.links-address-cta__title {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.links-address-cta__addr {
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0.95;
  line-height: 1.35;
}

.links-list {
  display: grid;
  gap: 0.7rem;
}

.links-btn {
  text-decoration: none;
  border-radius: 12px;
  padding: 0.82rem 1rem;
  text-align: center;
  font-weight: 600;
  color: #5c5262;
  background: #f0ebf4;
  border: 1px solid #ddd5e3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.links-btn:hover {
  background: #e6e0eb;
}

.links-btn--primary {
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  border: 0;
  color: #fff;
}

.links-btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  font-size: 1.05rem;
}

.brand__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ef8dc4;
  box-shadow: 0 8px 20px rgb(239 141 196 / 35%);
}

.links-card .install-btn.visible {
  width: 100%;
  margin-top: 0.8rem;
}

.admin-entry {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.78rem;
}

.admin-entry a {
  color: var(--muted);
  text-decoration: none;
}

.admin-entry a:hover {
  text-decoration: underline;
  color: #73647f;
}

@media (max-width: 840px) {
  .hero__content {
    grid-template-columns: 1fr;
  }

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

  .admin-metrics {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1024px) {
  .product-admin {
    grid-template-columns: 1fr;
  }
}
