/* ==========================================================================
   Makhmal — Footer
   ========================================================================== */

.mk-footer {
  position: relative;
  margin-top: 10px;
  padding-top: 46px;
  background: var(--mk-color-bg-soft);
  border-top: 1px solid var(--mk-color-border);
  overflow: hidden;
}

/* ⚠ THIS is what made the contact column look faded — not its text colour.
   Measured: the lilac blob's box (plus its 80px blur bleed) reached 26px into
   that column, laying a lavender wash behind the title and the first rows, so
   identical text read as greyed out. The blobs stay, but they are pulled off
   the text and softened; keep them clear of the grid if their size changes. */
.mk-footer__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.38;
  pointer-events: none;
}

.mk-footer__blob--1 {
  width: 300px;
  height: 300px;
  top: -260px;
  inset-inline-end: 8%;
  background: var(--mk-tint-lilac);
}

.mk-footer__blob--2 {
  width: 260px;
  height: 260px;
  bottom: -230px;
  inset-inline-start: 6%;
  background: var(--mk-tint-blue);
}

.mk-footer__paw {
  position: absolute;
  height: auto;
  color: var(--mk-tint-shade);
  opacity: 0.45;
  pointer-events: none;
}

.mk-footer__paw--1 { width: 40px; top: 26px; inset-inline-start: 4%; rotate: -18deg; }
.mk-footer__paw--2 { width: 26px; bottom: 74px; inset-inline-end: 3%; rotate: 16deg; }

.mk-footer .mk-container {
  position: relative;
  z-index: 1;
}

/* ---- Top grid ---- */
.mk-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 28px;
  padding-bottom: 34px;
}

.mk-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* qualified with the parent + the tag itself so this outranks WooCommerce's
   own ".woocommerce img { height:auto }" (only present on WC pages, i.e.
   body.woocommerce) — see makhmal-header.css for the full explanation */
.mk-footer__brand img.mk-footer__logo {
  height: 42px;
  width: auto;
}

.mk-footer__brand-title {
  font-size: var(--mk-fs-base);
  font-weight: 700;
  color: var(--mk-color-text);
  margin-top: -2px;
}

/* a longer paragraph than the columns beside it: smaller type and a wider
   measure keep the footer from growing into a second page */
.mk-footer__about {
  font-size: var(--mk-fs-xs);
  line-height: 2.2;
  color: var(--mk-color-text-soft);
  max-width: 48ch;
  text-align: justify;
}

.mk-footer__about-heart {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  color: var(--mk-color-accent-2);
}

.mk-footer__socials {
  display: flex;
  gap: 9px;
  margin-top: 2px;
}

.mk-footer__social {
  --mk-social-c: var(--mk-color-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mk-color-surface);
  border: 1px solid var(--mk-color-border);
  color: var(--mk-color-text-soft);
  transition: background var(--mk-transition), color var(--mk-transition),
              border-color var(--mk-transition), transform var(--mk-transition);
}

.mk-footer__social svg {
  width: 18px;
  height: 18px;
}

.mk-footer__social:hover {
  background: var(--mk-social-c);
  border-color: transparent;
  color: #fff;
  transform: translateY(-3px);
}

.mk-footer__social--insta { --mk-social-c: var(--mk-magenta); }
.mk-footer__social--tg { --mk-social-c: var(--mk-pastel-sky); }
.mk-footer__social--wa { --mk-social-c: var(--mk-pastel-mint); }

/* ---- Link columns ---- */
.mk-footer__col-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mk-font-heading);
  font-size: var(--mk-fs-sm);
  font-weight: 700;
  color: var(--mk-color-text);
  margin-bottom: 14px;
}

.mk-footer__col-title svg {
  width: 15px;
  height: 15px;
  color: var(--mk-color-accent);
}

.mk-footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* the link columns and the contact column share ONE colour token on purpose:
   they used to differ by a shade, which read as the contact column being
   disabled */
.mk-footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--mk-fs-sm);
  color: var(--mk-color-text);
  transition: color var(--mk-transition), transform var(--mk-transition);
}

.mk-footer__links a::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mk-color-border);
  transition: background var(--mk-transition);
}

.mk-footer__links a:hover {
  color: var(--mk-color-primary);
  transform: translateX(-4px);
}

.mk-footer__links a:hover::before {
  background: var(--mk-color-accent-2);
}

/* ---- Contact column ---- */
.mk-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* The two static rows here (hours, address) are spans, not links, so they
   carry no hover and no bullet — next to three columns of links that reads
   as a greyed-out, disabled column. The colour is the same variable the
   link columns use; stepping it one shade darker is what actually makes the
   column look equally alive. */
/* Measured in an isolated harness: this column and the link columns compute
   to the SAME colour, size and opacity. It kept looking faded on the live
   site, so the colour is forced here — a stale cached stylesheet or a plugin
   rule is the only way the two can still differ. */
.mk-footer__contact-item,
.mk-footer__contact-item span:not(.mk-footer__contact-icon) {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--mk-fs-sm);
  color: var(--mk-color-text) !important;
  opacity: 1 !important;
  transition: color var(--mk-transition);
}

.mk-footer__contact-item span:not(.mk-footer__contact-icon) {
  display: inline;
  gap: 0;
}

.mk-footer__contact-item:hover {
  color: var(--mk-color-primary);
}

.mk-footer__contact-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mk-color-surface);
  border: 1px solid var(--mk-color-border);
  color: var(--mk-color-primary-hover);
}

.mk-footer__contact-icon svg {
  width: 16px;
  height: 16px;
}

.mk-footer__contact-num {
  font-family: var(--mk-font-heading);
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--mk-color-text);
}

/* socials on one side, the eNamad seal facing them on the other — one row,
   no longer a tall block under the icons */
.mk-footer__trustrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Trust seals (eNamad & co.). ⚠ Every seal lives in a BOX this sheet sizes:
   whatever the admin pasted (kses strips width/height/style/script first)
   can only shrink to fit — it can never push the footer wider or taller.
   --mk-trust-size is the one value the settings screen controls. */
.mk-footer__trust {
  --mk-trust-size: 52px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.mk-footer__trust-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(100%, var(--mk-trust-size));
  max-height: var(--mk-trust-size);
  overflow: hidden;
}

.mk-footer__trust-item a,
.mk-footer__trust-item div,
.mk-footer__trust-item span,
.mk-footer__trust-item p {
  display: inline-flex;
  max-width: 100%;
  margin: 0;
}

.mk-footer__trust-item img {
  display: block;
  width: auto;
  height: auto;
  max-width: var(--mk-trust-size);
  max-height: var(--mk-trust-size);
  object-fit: contain;
}

/* ---- Bottom bar ---- */
.mk-footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 16px;
  border-top: 1px solid var(--mk-color-border);
}

.mk-footer__copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--mk-fs-xs);
  color: var(--mk-color-text-muted);
}

.mk-footer__copy svg {
  width: 14px;
  height: 14px;
  color: var(--mk-color-accent-2);
}

.mk-footer__badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mk-footer__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--mk-radius-pill);
  background: var(--mk-color-surface);
  border: 1px solid var(--mk-color-border);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--mk-color-text-soft);
  white-space: nowrap;
}

.mk-footer__badge svg {
  width: 14px;
  height: 14px;
  color: var(--mk-color-primary);
}

/* ---- Back to top ---- */
.mk-totop {
  position: fixed;
  /* above every page-level element it can float over (product tabs strip,
     sticky summary), so it is never half-covered by content scrolling past */
  z-index: 120;
  bottom: 22px;
  inset-inline-start: 22px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--mk-gradient-cta);
  color: var(--mk-color-text-on-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--mk-shadow-md);
  opacity: 0;
  visibility: hidden;
  translate: 0 14px;
  transition: opacity var(--mk-transition), translate var(--mk-transition),
              visibility var(--mk-transition), box-shadow var(--mk-transition);
}

.mk-totop svg {
  width: 18px;
  height: 18px;
  rotate: 90deg;
}

.mk-totop.is-visible {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
}

.mk-totop:hover {
  box-shadow: var(--mk-shadow-lg);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991px) {
  .mk-footer {
    padding-top: 36px;
  }

  .mk-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 20px;
  }

  .mk-footer__brand {
    grid-column: 1 / -1;
  }

  .mk-footer__contact {
    grid-column: 1 / -1;
  }

  .mk-footer__paw--1,
  .mk-footer__paw--2 {
    display: none;
  }
}

@media (max-width: 620px) {
  .mk-footer__grid {
    gap: 22px 16px;
    padding-bottom: 26px;
  }

  .mk-footer__about {
    text-align: start;
  }

  .mk-footer__links a,
  .mk-footer__contact-item {
    font-size: var(--mk-fs-xs);
  }

  .mk-footer__bar {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  .mk-footer__copy {
    flex-wrap: wrap;
    justify-content: center;
    line-height: 1.9;
  }

  .mk-footer__badges {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 10px;
  }

  .mk-totop {
    bottom: 16px;
    inset-inline-start: 16px;
    width: 42px;
    height: 42px;
  }
}
