:root {
  --bg: #0c0f12;
  --panel: #141a20;
  --panel-2: #1a2229;
  --text: #e8eaed;
  --muted: #8b9aab;
  --accent: #6e8597;
  --accent-2: #5a7285;
  --line: #2a3540;
  --surface: #161c22;
  --surface-2: #1c252e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 700px at 20% 0%, #1a2832 0, var(--bg) 55%);
}

.brand h1,
.hero__text h2,
.section-head h2,
.links-brand h1,
.hero__card h3,
.admin-top h2,
.login-card h2,
.cart__head h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
}

.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: var(--surface-2);
  color: var(--text);
  border-radius: 12px;
  padding: 0.65rem 0.95rem;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--line);
}

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

.back-btn:hover {
  background: #243038;
  color: #fff;
}

.admin-link {
  text-decoration: none;
  background: var(--surface-2);
  color: var(--text);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  border: 1px solid var(--line);
}

.install-btn {
  display: none;
}

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

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

.cart-btn {
  background: var(--surface-2);
  color: var(--text);
  padding: 0.65rem 1rem;
  font-weight: 600;
  border: 1px solid var(--line);
}

.cart-btn span {
  margin-left: 0.35rem;
  color: #a8bcc9;
}

.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: #a8bcc9;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.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(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 10px 28px rgb(110 133 151 / 28%);
}

.hero__card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.35rem;
  background: linear-gradient(165deg, var(--surface) 0%, #1e2a33 100%);
}

.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: var(--surface);
  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);
}

.site-contact-footer {
  margin: 2rem auto 3.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 1100px;
}

.site-contact-footer__title {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

.site-contact-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.1rem;
  align-items: center;
}

.site-contact-footer__links a {
  color: #a8bdd0;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
}

.site-contact-footer__links a:hover {
  color: #c5d8e8;
  text-decoration: underline;
}

.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: var(--surface-2);
  color: var(--muted);
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
}

.filters button.active,
.filters button:hover {
  background: #2a3d4a;
  color: #fff;
}

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

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

.card__cover {
  height: 150px;
  background: linear-gradient(150deg, #243038 0%, #1a2832 100%);
  display: grid;
  place-items: center;
  font-size: 2.1rem;
}

.card__body {
  padding: 0.9rem;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  color: #c5d0d8;
  background: var(--surface-2);
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.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-label {
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--muted);
}

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

.price {
  font-weight: 700;
}

.add {
  border: 0;
  border-radius: 10px;
  background: #2a3d4a;
  color: #e8eaed;
  padding: 0.45rem 0.68rem;
  cursor: pointer;
}

.add:hover {
  background: var(--accent);
  color: #fff;
}

.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(110 133 151 / 45%);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 10px rgb(110 133 151 / 0%);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgb(110 133 151 / 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: #1e2a33;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgb(0 0 0 / 45%);
  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: var(--panel);
  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: var(--surface-2);
  color: var(--text);
  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: #7cb89a;
  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: var(--surface-2);
  color: var(--text);
  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 var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  text-align: center;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  box-sizing: border-box;
}

.cart-qty-input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.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: var(--surface-2);
  color: var(--text);
  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: var(--muted);
  font-size: 0.85rem;
}

.cart__foot input {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 9px;
  padding: 0.58rem 0.62rem;
  font: inherit;
}

.cart__foot input:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.checkout-status {
  min-height: 1.1rem;
  color: #a8bcc9;
  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: var(--surface);
  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: var(--surface);
  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: var(--muted);
  font-size: 0.88rem;
}

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

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

.order-actions select,
.order-actions button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  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: var(--surface);
  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 var(--line);
  background: var(--surface-2);
  color: var(--text);
  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 var(--accent);
  border-color: var(--accent);
}

.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: var(--surface);
  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 var(--line);
  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: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.wholesale-remove:hover {
  background: #2a3540;
}

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

.wholesale-add-btn {
  margin-top: 0.5rem;
  width: 100%;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.wholesale-add-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: #c5d8e8;
}

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

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

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

.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, #161c22 0%, #1a252e 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.2rem;
  box-shadow: 0 20px 50px rgb(0 0 0 / 35%);
}

.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(180 220 235 / 18%) 0%, rgb(140 190 215 / 12%) 100%);
  border: 1px solid rgb(130 175 200 / 25%);
}

.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: #3d6ea8;
  color: #fff;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgb(61 110 168 / 35%);
}

.links-address-cta:hover {
  background: #35629a;
  color: #fff;
}

.links-address-cta__title {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: "DM Sans", system-ui, sans-serif;
}

.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: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.links-btn:hover {
  background: #243038;
  border-color: var(--accent);
}

.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 var(--accent);
  box-shadow: 0 8px 24px rgb(110 133 151 / 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: #c5d0d8;
}

@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;
  }
}
