/* Storefront footer v2 — explicit CSS Grid, mobile-first marketplace layout */
.site-footer {
  --footer-nav-clearance: calc(var(--mobile-nav-height, 66px) + 20px + env(safe-area-inset-bottom, 0px));
  margin-top: 4px;
  padding: 10px 0 0;
  border-top: 1px solid rgba(18, 33, 39, 0.07);
  background: linear-gradient(180deg, #f9fffc 0%, #f0faf6 100%);
}

.site-footer .footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 8px;
  grid-template-areas:
    "brand brand"
    "links contact"
    "newsletter newsletter"
    "copyright copyright";
  align-items: start;
}

.site-footer .footer-brand {
  grid-area: brand;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.site-footer .footer-brand__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-footer .footer-logo-link {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}

.site-footer .footer-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}

.site-footer .footer-brand__name {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--home-text, #122127);
}

.site-footer .footer-brand__desc {
  margin: 0;
  color: var(--home-muted, #66767b);
  font-size: 0.72rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.site-footer .footer-panel {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.site-footer .footer-panel--links {
  grid-area: links;
}

.site-footer .footer-panel--contact {
  grid-area: contact;
}

.site-footer .footer-panel__title {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--home-text, #122127);
}

/* Quick links — compact column */
.site-footer .footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 3px;
}

.site-footer .footer-links a {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(18, 33, 39, 0.06);
  color: var(--home-muted, #66767b);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus-visible {
  color: var(--home-primary-deep, #008f72);
  border-color: rgba(0, 184, 148, 0.22);
  background: #ffffff;
}

/* Contact clickable cards */
.site-footer .footer-contact-cards {
  display: grid;
  gap: 4px;
}

.site-footer .footer-touch-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 0;
  padding: 6px 7px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(18, 33, 39, 0.08);
  box-shadow: 0 2px 8px rgba(8, 45, 36, 0.04);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.site-footer .footer-touch-card:hover,
.site-footer .footer-touch-card:focus-visible {
  border-color: rgba(0, 184, 148, 0.3);
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.12);
}

.site-footer .footer-touch-card:active {
  transform: scale(0.98);
}

.site-footer .footer-touch-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.72rem;
}

.site-footer .footer-touch-card__icon--phone {
  background: rgba(0, 184, 148, 0.12);
  color: var(--home-primary-deep, #008f72);
}

.site-footer .footer-touch-card__icon--whatsapp {
  background: rgba(37, 211, 102, 0.14);
  color: #1fa855;
}

.site-footer .footer-touch-card__icon--email {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.site-footer .footer-touch-card__icon--location {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
}

.site-footer .footer-touch-card__copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.site-footer .footer-touch-card__label {
  color: var(--home-muted, #66767b);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.site-footer .footer-touch-card__value {
  color: var(--home-text, #122127);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Newsletter */
.site-footer .footer-newsletter {
  grid-area: newsletter;
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(18, 33, 39, 0.06);
  min-width: 0;
}

.site-footer .footer-newsletter__copy,
.site-footer .footer-newsletter__note {
  margin: 0;
  color: var(--home-muted, #66767b);
  font-size: 0.7rem;
  line-height: 1.3;
}

.site-footer .footer-newsletter__form {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.site-footer .footer-newsletter__form input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(18, 33, 39, 0.1);
  border-radius: 8px;
  background: #ffffff;
  color: var(--home-text, #122127);
  font-size: 0.78rem;
}

.site-footer .footer-newsletter__form input:focus {
  outline: none;
  border-color: rgba(0, 184, 148, 0.35);
  box-shadow: 0 0 0 2px rgba(0, 184, 148, 0.1);
}

.site-footer .footer-newsletter__form button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--home-primary, #00b894), var(--home-primary-deep, #008f72));
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.site-footer .footer-newsletter__note.is-success {
  color: var(--home-primary-deep, #008f72);
}

/* Copyright */
.site-footer .footer-bottom {
  grid-area: copyright;
  margin: 0;
  padding: 6px 0 var(--footer-nav-clearance);
  border-top: 1px solid rgba(18, 33, 39, 0.06);
}

.site-footer .footer-bottom p {
  margin: 0;
  color: var(--home-muted, #66767b);
  font-size: 0.68rem;
  line-height: 1.25;
  text-align: center;
}

/* Neutralize legacy footer markup if present */
.site-footer .footer-grid,
.site-footer .footer-card,
.site-footer .footer-columns,
.site-footer .footer-contact-list,
.site-footer .footer-links-list,
.site-footer .footer-subscribe {
  display: contents;
}

.site-footer .footer-eyebrow {
  display: none;
}

/* Desktop — DO NOT MODIFY */
@media (min-width: 1025px) {
  .site-footer {
    padding-top: 14px;
  }

  .site-footer .footer-shell {
    grid-template-columns: 1.2fr 0.75fr 1fr 1fr;
    grid-template-areas:
      "brand links contact newsletter"
      "copyright copyright copyright copyright";
    column-gap: 18px;
    row-gap: 10px;
  }

  .site-footer .footer-brand__desc {
    -webkit-line-clamp: 3;
    font-size: 0.78rem;
  }

  .site-footer .footer-links a {
    min-height: 34px;
    font-size: 0.8rem;
  }

  .site-footer .footer-touch-card__value {
    font-size: 0.74rem;
  }

  .site-footer .footer-newsletter {
    align-self: stretch;
  }

  .site-footer .footer-newsletter__form {
    flex-direction: column;
  }

  .site-footer .footer-newsletter__form button {
    width: 100%;
  }

  .site-footer .footer-bottom {
    padding-bottom: 12px;
  }

  .site-footer .footer-bottom p {
    text-align: left;
  }
}

/* ==========================================================================
   MOBILE & TABLET ONLY (max-width: 1024px)
   Desktop rules above are untouched.
   ========================================================================== */
@media (max-width: 1024px) {
  .site-footer {
    --footer-nav-clearance: calc(var(--mobile-nav-height, 66px) + 20px + env(safe-area-inset-bottom, 0px));
    margin-top: 2px;
    padding: 8px 0 0;
  }

  .site-footer .footer-shell {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 6px;
    grid-template-areas:
      "brand brand"
      "links contact"
      "newsletter newsletter"
      "copyright copyright";
    align-items: start;
  }

  /* Legacy wrapper: side-by-side columns when footer-columns exists */
  .site-footer .footer-columns {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
    align-items: start;
    min-width: 0;
  }

  .site-footer .footer-brand {
    grid-area: brand;
    gap: 3px;
  }

  .site-footer .footer-panel {
    gap: 4px;
    min-width: 0;
    width: 100%;
  }

  .site-footer .footer-panel--links {
    grid-area: links;
  }

  .site-footer .footer-panel--contact {
    grid-area: contact;
  }

  .site-footer .footer-panel__title {
    font-size: 0.68rem;
    margin-bottom: 1px;
  }

  .site-footer .footer-brand__name {
    font-size: 0.84rem;
  }

  .site-footer .footer-brand__desc {
    font-size: 0.7rem;
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }

  .site-footer .footer-links {
    gap: 3px;
  }

  .site-footer .footer-links a {
    display: flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 7px;
    font-size: 0.72rem;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(18, 33, 39, 0.08);
    box-sizing: border-box;
    width: 100%;
  }

  .site-footer .footer-contact-cards {
    display: grid;
    gap: 4px;
    width: 100%;
  }

  .site-footer .footer-touch-card {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 40px;
    padding: 7px 8px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid rgba(18, 33, 39, 0.1);
    box-shadow: 0 2px 6px rgba(8, 45, 36, 0.06);
    box-sizing: border-box;
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .site-footer .footer-touch-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    font-size: 0.75rem;
  }

  .site-footer .footer-touch-card__copy {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .site-footer .footer-touch-card__label {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--home-muted, #66767b);
  }

  .site-footer .footer-touch-card__value {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--home-text, #122127);
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .site-footer .footer-newsletter {
    grid-area: newsletter;
    gap: 5px;
    padding: 7px 9px;
    border-radius: 10px;
  }

  .site-footer .footer-newsletter__copy,
  .site-footer .footer-newsletter__note {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .site-footer .footer-newsletter__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  .site-footer .footer-newsletter__form input {
    min-width: 0;
    width: 100%;
    min-height: 36px;
    padding: 0 9px;
    font-size: 0.76rem;
    box-sizing: border-box;
  }

  .site-footer .footer-newsletter__form button {
    min-height: 36px;
    padding: 0 11px;
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .site-footer .footer-bottom {
    grid-area: copyright;
    padding: 5px 0 var(--footer-nav-clearance);
  }

  .site-footer .footer-bottom p {
    font-size: 0.66rem;
    text-align: center;
  }

  body.details-page .site-footer .footer-bottom {
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }
}

/* Small phones: 320px–480px */
@media (max-width: 480px) {
  .site-footer .footer-shell {
    column-gap: 6px;
    row-gap: 5px;
  }

  .site-footer .footer-columns {
    column-gap: 6px;
  }

  .site-footer .footer-logo {
    width: 30px;
    height: 30px;
  }

  .site-footer .footer-brand__name {
    font-size: 0.8rem;
  }

  .site-footer .footer-brand__desc {
    font-size: 0.66rem;
  }

  .site-footer .footer-panel__title {
    font-size: 0.64rem;
  }

  .site-footer .footer-links a {
    min-height: 30px;
    padding: 4px 6px;
    font-size: 0.68rem;
  }

  .site-footer .footer-touch-card {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 5px;
    min-height: 38px;
    padding: 6px;
  }

  .site-footer .footer-touch-card__icon {
    width: 26px;
    height: 26px;
    font-size: 0.68rem;
  }

  .site-footer .footer-touch-card__label {
    font-size: 0.56rem;
  }

  .site-footer .footer-touch-card__value {
    font-size: 0.62rem;
  }

  .site-footer .footer-newsletter {
    padding: 6px 8px;
  }

  .site-footer .footer-newsletter__form {
    gap: 5px;
  }

  .site-footer .footer-newsletter__form input {
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .site-footer .footer-newsletter__form button {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.68rem;
  }
}

/* Large phones: 481px–767px */
@media (min-width: 481px) and (max-width: 767px) {
  .site-footer .footer-shell {
    column-gap: 10px;
    row-gap: 7px;
  }

  .site-footer .footer-columns {
    column-gap: 10px;
  }

  .site-footer .footer-links a {
    min-height: 34px;
    font-size: 0.74rem;
  }

  .site-footer .footer-touch-card {
    min-height: 42px;
    padding: 8px 9px;
  }

  .site-footer .footer-touch-card__value {
    font-size: 0.7rem;
  }

  .site-footer .footer-newsletter__form input,
  .site-footer .footer-newsletter__form button {
    min-height: 38px;
  }
}

/* Tablets: 768px–1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .site-footer {
    padding-top: 10px;
  }

  .site-footer .footer-shell {
    column-gap: 14px;
    row-gap: 8px;
  }

  .site-footer .footer-columns {
    column-gap: 14px;
  }

  .site-footer .footer-brand__desc {
    font-size: 0.74rem;
  }

  .site-footer .footer-panel__title {
    font-size: 0.72rem;
  }

  .site-footer .footer-links a {
    min-height: 36px;
    padding: 6px 9px;
    font-size: 0.78rem;
  }

  .site-footer .footer-touch-card {
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 11px;
  }

  .site-footer .footer-touch-card__icon {
    width: 32px;
    height: 32px;
    font-size: 0.78rem;
  }

  .site-footer .footer-touch-card__label {
    font-size: 0.62rem;
  }

  .site-footer .footer-touch-card__value {
    font-size: 0.74rem;
  }

  .site-footer .footer-newsletter {
    padding: 9px 11px;
  }

  .site-footer .footer-newsletter__form input,
  .site-footer .footer-newsletter__form button {
    min-height: 40px;
    font-size: 0.8rem;
  }

  .site-footer .footer-bottom p {
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer .footer-touch-card {
    transition: none;
  }
}
