/* ==========================================================================
   Make My Theme — footer.css
   Variant B (main site) + Variant B · Sub-site footer.
   Lifted from Design Handover/Make My - Footer Variations.html with responsive
   rules added per spec §6.
   ========================================================================== */

/* ── Shared footer chrome ──────────────────────────────────────────────── */

.ft {
    /* Grow the side padding on wide viewports so the content aligns with
       --container-max (matching the header), while keeping section
       backgrounds edge-to-edge. Mobile override below pins this to 20px. */
    --ft-pad-x: max(56px, calc((100% - var(--container-max)) / 2));
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--paper);
    margin-top: auto;
}
.ft a { color: inherit; text-decoration: none; }
.ft a:hover { color: var(--accent); }

.ft__linklist { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ft__linklist a { display: inline-flex; align-items: center; gap: 8px; }
.ft__linklist svg { display: inline-block; flex-shrink: 0; }
.ft__link { font-size: var(--fs-14); color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; transition: color .14s ease; }
.ft__link:hover { color: var(--ink); }

/* ── Variant B — Shipping Manifest (main site) ─────────────────────────── */

.ftB { background: var(--paper-soft); }

.ftB__top {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--sp-10);
    padding: 40px var(--ft-pad-x) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    align-items: end;
}
.ftB__title {
    font-size: clamp(var(--fs-28), 3.2vw, 40px);
    line-height: 1;
    letter-spacing: -0.02em;
    font-weight: 500;
    margin: 0;
    max-width: 18ch;
    color: var(--ink);
}
.ftB__title em { font-style: normal; color: var(--accent); }

.ftB__contact { display: grid; gap: 14px; }
.ftB__contact-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: var(--fs-13);
    align-items: baseline;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--rule);
}
.ftB__contact-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ftB__contact-row span:first-child { color: var(--ink-muted); font-size: var(--fs-11); letter-spacing: 0.08em; text-transform: uppercase; }
.ftB__contact-row span:last-child { color: var(--ink); }

.ftB__table {
    padding: 0 var(--ft-pad-x);
    border-bottom: 1px solid var(--rule);
}
.ftB__table-row {
    display: grid;
    grid-template-columns: 28px 1.6fr 1.8fr auto auto;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
    align-items: center;
    transition: background .14s ease;
}
.ftB__table-row:last-child { border-bottom: 0; }
.ftB__table-row:hover { background: color-mix(in oklch, var(--ink) 3%, transparent); }
.ftB__idx { font-family: var(--font-mono); font-size: var(--fs-11); color: var(--ink-muted); letter-spacing: 0.04em; }
.ftB__dot { width: 10px; height: 10px; border-radius: 2px; background: var(--row-accent, var(--accent)); display: inline-block; }
.ftB__prod-name { font-size: var(--fs-18); font-weight: 500; letter-spacing: -0.012em; display: flex; align-items: center; gap: 12px; }
.ftB__prod-desc { font-size: var(--fs-13); color: var(--ink-soft); }
.ftB__lead { font-family: var(--font-mono); font-size: var(--fs-12); color: var(--ink-muted); letter-spacing: 0.03em; }
.ftB__lead strong { color: var(--ink); font-weight: 500; }
.ftB__cta {
    font-family: var(--font-mono); font-size: var(--fs-11); letter-spacing: 0.12em; text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 8px; color: var(--ink);
}
.ftB__cta::after { content: "→"; transition: translate .14s ease; }
.ftB__table-row:hover .ftB__cta::after { translate: 4px 0; }

.ftB__mid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-8);
    padding: 28px var(--ft-pad-x);
    border-bottom: 1px solid var(--rule);
}
.ftB__mid h4 { margin: 0 0 14px; font-family: var(--font-sans); font-size: var(--fs-11); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }

.ftB__bottom {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 20px var(--ft-pad-x);
    font-family: var(--font-mono);
    font-size: var(--fs-11);
    letter-spacing: 0.06em;
    color: var(--ink-muted);
    text-transform: uppercase;
}
.ftB__addr { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.ftB__addr li:not(:last-child)::after { content: "·"; margin-left: 18px; color: var(--ink-faint); }

/* ── Variant B · Sub-site — hero + siblings rail ───────────────────────── */

.ftBS__hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--sp-8);
    align-items: end;
    padding: 32px var(--ft-pad-x) 24px;
    border-bottom: 1px solid var(--rule);
}
.ftBS__mark {
    display: inline-flex; align-items: center; gap: 14px;
    font-size: clamp(var(--fs-28), 3vw, var(--fs-48));
    font-weight: 500; letter-spacing: -0.022em; line-height: 1;
}
.ftBS__mark .chip {
    width: 14px; height: 14px; border-radius: 3px; background: var(--accent);
}
.ftBS__tag {
    font-size: var(--fs-14); color: var(--ink-soft); max-width: 42ch; line-height: 1.5;
    padding-left: var(--sp-6); border-left: 1px solid var(--rule);
}
a.ftBS__hero-cta {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--ink); color: var(--paper);
    padding: 10px 16px; border-radius: var(--r-sm, 4px);
    font-family: var(--font-mono); font-size: var(--fs-11);
    letter-spacing: 0.12em; text-transform: uppercase;
    transition: background .14s ease;
}
a.ftBS__hero-cta:hover { background: var(--accent); color: var(--paper); }
a.ftBS__hero-cta::after { content: "→"; transition: translate .14s ease; }
a.ftBS__hero-cta:hover::after { translate: 4px 0; }

.ftBS__siblings {
    padding: 18px var(--ft-pad-x) 0;
    border-bottom: 1px solid var(--rule);
}
.ftBS__siblings-label {
    display: block; font-family: var(--font-mono); font-size: var(--fs-11);
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted);
    margin-bottom: 10px;
}
.ftBS__siblings-row {
    display: grid;
    /* Auto-fit fits as many siblings on one row as the viewport allows.
       Minmax floor keeps cells legible; below ~180px content per cell,
       items wrap to additional rows. The network sibling list is dynamic
       (driven by makemy_get_network_siblings()), so column count must
       adapt — don't hardcode a count here. */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0;
}
.ftBS__sib {
    display: flex; align-items: center; gap: 10px;
    /* Uniform padding so wrapped items in a second row align with row 1.
       border-top on every cell forms the top rule and the divider between
       wrapped rows; border-right divides cells within a row. */
    padding: 14px 18px;
    border-top: 1px solid var(--rule);
    border-right: 1px solid var(--rule);
    align-self: stretch;
    font-size: var(--fs-14);
    color: var(--ink);
    transition: background .14s ease;
}
.ftBS__sib:last-child { border-right: 0; }
.ftBS__sib:hover { background: color-mix(in oklch, var(--ink) 3%, transparent); }
.ftBS__sib .dot { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; background: var(--row-accent, var(--accent)); }
.ftBS__sib .arr { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-11); color: var(--ink-muted); letter-spacing: 0.04em; transition: translate .14s ease; }
.ftBS__sib:hover .arr { color: var(--ink); translate: 4px 0; }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 1023px) {
    .ftB__top { grid-template-columns: 1fr; gap: var(--sp-6); padding-top: 40px; padding-bottom: 24px; }
    .ftB__mid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
    .ftBS__hero { grid-template-columns: 1fr; gap: var(--sp-4); }
    .ftBS__tag { border-left: 0; padding-left: 0; }
    /* .ftBS__siblings-row: auto-fit + per-cell borders handle tablet widths
       automatically — no nth-child overrides needed here. */
}

@media (max-width: 767px) {
    .ft { --ft-pad-x: 20px; }
    .ftB__table-row {
        grid-template-columns: 28px 1fr;
        grid-template-areas:
            "idx name"
            "desc desc"
            "lead cta";
        gap: 6px 12px;
        padding: 16px 0;
    }
    .ftB__idx       { grid-area: idx; }
    .ftB__prod-name { grid-area: name; }
    .ftB__prod-desc { grid-area: desc; }
    .ftB__lead      { grid-area: lead; }
    .ftB__cta       { grid-area: cta; justify-self: end; }

    .ftB__mid { grid-template-columns: 1fr; gap: var(--sp-6); padding: 32px var(--ft-pad-x); }
    .ftB__bottom { grid-template-columns: 1fr; gap: 12px; padding: 16px var(--ft-pad-x); text-align: center; }
    .ftB__addr { justify-content: center; }

    .ftBS__siblings-row { grid-template-columns: 1fr; }
    .ftBS__sib { border-right: 0; padding: 14px 0; }
}
