/*
 * Martfury footer presentation, using the existing Magento CMS markup.
 * No content, links, widget assignments or CMS block states are changed.
 * Spanish storefront only; the Portuguese storefront keeps its current design.
 * The logo is decorative. All existing CMS links remain real, editable links.
 */
@font-face {
    font-family: "Nissei Footer Ample";
    src: url("../fonts/amplesoft/regular/AmpleSoft.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Nissei Footer Ample";
    src: url("../fonts/amplesoft/medium/AmpleSoft-Medium.woff2") format("woff2");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

html:lang(es) .page-footer:has(#footer-widgets) {
    --nf-border: #e5e3de;
    --nf-muted: #5d6265;
    --nf-yellow: #ffcc50;
    --nf-limit: 100%;
    --nf-width: calc((100% + min(100%, var(--nf-limit))) / 2);
    margin: 0;
    padding: 0;
    border-top: 4px solid var(--nf-yellow);
    background: #fff;
    color: #050606;
    font: 400 15px/1.5 "Nissei Footer Ample", sans-serif;
}
html:lang(es) .page-footer:has(#footer-widgets) .footer.content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
}
/* Remove only the layout spacing around the existing Page Builder footer. */
html:lang(es) .page-footer [data-content-type="row"]:has(#footer-widgets),
html:lang(es) .page-footer [data-element="inner"]:has(#footer-widgets),
html:lang(es) .page-footer [data-content-type="html"]:has(#footer-widgets) {
    width: 100%;
    max-width: none;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
}
html:lang(es) .page-footer #footer-widgets,
html:lang(es) .page-footer #footer-widgets * {
    box-sizing: border-box;
}
html:lang(es) .page-footer #footer-widgets {
    margin: 0;
    padding: 0;
    color: inherit;
}
html:lang(es) .page-footer #footer-widgets a {
    color: inherit;
    text-decoration: none;
    overflow-wrap: anywhere;
}
html:lang(es) .page-footer #footer-widgets a:hover {
    color: #050606;
    text-decoration: underline;
    text-decoration-color: var(--nf-yellow);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}
html:lang(es) .page-footer #footer-widgets a:focus-visible {
    outline: 2px solid #06c;
    outline-offset: 4px;
}
html:lang(es) .page-footer #footer-widgets > .container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: 40px auto 1fr auto auto auto;
    gap: 14px 32px;
    width: var(--nf-width);
    max-width: none;
    margin-inline: auto;
    padding: 34px 12px 0;
}
/* Use the existing CMS sections as grid items, without replacing their HTML. */
html:lang(es) .page-footer #footer-widgets .footer-main,
html:lang(es) .page-footer #footer-widgets .footer-main > .row,
html:lang(es) .page-footer #footer-widgets .footer-main > .row > :has(.footer-contact),
html:lang(es) .page-footer #footer-widgets .footer-contact,
html:lang(es) .page-footer #footer-widgets .footer-contact > .textwidget {
    display: contents;
    color: inherit;
}
html:lang(es) .page-footer #footer-widgets .footer-main > .row::before {
    content: "";
    display: block;
    grid-column: 1;
    grid-row: 1;
    width: 126px;
    height: 40px;
    background: url("../images/nissei-footer-logo.webp") left top / contain no-repeat;
}
html:lang(es) .page-footer #footer-widgets .footer-main > .row > div {
    width: auto;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    float: none;
}
html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(2) {
    grid-column: 2;
    grid-row: 1 / 4;
}
html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(3) {
    grid-column: 3;
    grid-row: 1 / 4;
}
html:lang(es) .page-footer #footer-widgets .footer-main .title {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    color: inherit;
    font: 500 17px/1.4 "Nissei Footer Ample", sans-serif;
    text-transform: none;
    letter-spacing: 0;
}
html:lang(es) .page-footer #footer-widgets .footer-links-wrap {
    margin: 0;
    padding: 0;
}
html:lang(es) .page-footer #footer-widgets .footer-container {
    display: block !important;
}
html:lang(es) .page-footer #footer-widgets .footer-links {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}
html:lang(es) .page-footer #footer-widgets .footer-links li {
    margin: 0;
    padding: 0;
    font: inherit;
}
html:lang(es) .page-footer #footer-widgets .footer-contact > .title {
    grid-column: 4;
    grid-row: 1;
}
html:lang(es) .page-footer #footer-widgets .textwidget > p {
    margin: 0;
    padding: 0;
    align-self: start;
    font: 400 14px/1.5 "Nissei Footer Ample", sans-serif;
}
html:lang(es) .page-footer #footer-widgets .textwidget > p:nth-of-type(1) {
    grid-column: 4;
    grid-row: 2;
}
html:lang(es) .page-footer #footer-widgets .textwidget > p:nth-of-type(2) {
    grid-column: 4;
    grid-row: 3;
}
html:lang(es) .page-footer #footer-widgets .textwidget > br {
    display: none;
}
html:lang(es) .page-footer #footer-widgets .textwidget > p:nth-of-type(3) {
    grid-column: 1;
    grid-row: 2;
    color: var(--nf-muted);
    font-size: 13px;
}
html:lang(es) .page-footer #footer-widgets .textwidget strong {
    font-weight: 400;
}
html:lang(es) .page-footer #footer-widgets .textwidget .phone {
    color: #050606;
    font: 500 14px/1.5 "Nissei Footer Ample", sans-serif;
    white-space: nowrap;
}
html:lang(es) .page-footer #footer-widgets .textwidget > p:nth-of-type(3) a ~ br {
    display: none;
}
html:lang(es) .page-footer #footer-widgets .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
html:lang(es) .page-footer #footer-widgets .footer-main > .row > div > .social-links {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
}
/* The legacy CMS has a nested social list; do not duplicate its spacing. */
html:lang(es) .page-footer #footer-widgets .social-links .social-links {
    display: contents;
}
html:lang(es) .page-footer #footer-widgets .social-links li {
    margin: 0;
    padding: 0;
}
html:lang(es) .page-footer #footer-widgets .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 5px;
    border: 1px solid var(--nf-border);
    border-radius: 50%;
    background: #fff;
}
html:lang(es) .page-footer #footer-widgets .social-links a:hover {
    background: #faf7ef;
    border-color: var(--nf-yellow);
}
html:lang(es) .page-footer #footer-widgets .social-links img {
    display: block;
    width: 23px;
    height: 23px;
    object-fit: contain;
}
html:lang(es) .page-footer #footer-widgets .footer-quicklinks {
    grid-column: 1 / -1;
    grid-row: 4;
    margin: 16px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--nf-border);
    color: var(--nf-muted);
    font-size: 13px;
    line-height: 1.6;
}
html:lang(es) .page-footer #footer-widgets .mr-footer-links {
    margin: 0 0 4px;
    padding: 0;
    list-style: none;
}
html:lang(es) .page-footer #footer-widgets .mr-footer-links li {
    display: inline-block;
    margin: 0 8px 0 0;
    padding: 0 8px 0 0;
    font: inherit;
}
html:lang(es) .page-footer #footer-widgets .mr-footer-links li::before {
    top: 50%;
    right: 0;
    height: 11px;
    margin-top: -5.5px;
    background: var(--nf-border);
}
html:lang(es) .page-footer #footer-widgets .mr-footer-links li:last-child {
    margin-right: 0;
    padding-right: 0;
}
html:lang(es) .page-footer #footer-widgets .w-title {
    color: #050606;
    font-weight: 500;
}
/* Distributor links remain CMS-managed, laid out as a compact horizontal row. */
html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(4) {
    grid-column: 1 / -1;
    grid-row: 5;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--nf-border);
    font-size: 13px;
    line-height: 1.6;
}
html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(4) .title {
    display: inline;
    margin-right: 12px;
    font-size: 13px;
}
html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(4) .footer-container,
html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(4) .footer-links-wrap,
html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(4) .footer-links {
    display: inline !important;
}
html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(4) li {
    display: inline-block;
    margin-right: 8px;
    padding-right: 8px;
    border-right: 1px solid var(--nf-border);
    color: var(--nf-muted);
    line-height: 1;
}
html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(4) li:last-child {
    margin: 0;
    padding: 0;
    border: 0;
}
html:lang(es) .page-footer #footer-widgets .footer-copyright-vertical {
    grid-column: 1 / -1;
    grid-row: 6;
    margin: 0;
    padding: 10px 0 24px;
    border: 0;
    color: var(--nf-muted);
    font-size: 12px;
}
html:lang(es) .page-footer #footer-widgets .footer-copyright-vertical > .row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 16px 44px;
    margin: 0;
}
html:lang(es) .page-footer #footer-widgets .footer-copyright-vertical .row > div {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    float: none;
    font: inherit;
    text-align: left;
}
html:lang(es) .page-footer #footer-widgets .text-copyright {
    margin: 0 0 12px;
}
html:lang(es) .page-footer #footer-widgets .mr-payment {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
html:lang(es) .page-footer #footer-widgets .mr-payment li {
    margin: 0;
    padding: 0;
    font: inherit;
}
html:lang(es) .page-footer #footer-widgets .mr-payment img {
    display: block;
    width: 330px;
    max-width: 100%;
    height: auto;
}
html:lang(es) .page-footer:has(#footer-widgets) .wrp-developer {
    margin: 0 !important;
    padding: 20px 0;
    border-top: 1px solid var(--nf-border);
}
html:lang(es) .page-footer:has(#footer-widgets) .wrp-developer .container {
    width: var(--nf-width);
    max-width: none;
    margin-inline: auto;
    padding-inline: 12px;
}
html:lang(es) .page-footer:has(#footer-widgets) .pagopar-methods > .list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}
html:lang(es) .page-footer:has(#footer-widgets) .pagopar-methods > .list > li {
    margin: 0;
    padding: 0;
}
html:lang(es) .page-footer:has(#footer-widgets) .pagopar-methods > .list img {
    display: block;
    width: 60px;
    height: 60px;
    margin: 0;
    object-fit: contain;
}
@media (min-width: 640px) {
    html:lang(es) .page-footer:has(#footer-widgets) { --nf-limit: 640px; }
}
@media (min-width: 768px) {
    html:lang(es) .page-footer:has(#footer-widgets) { --nf-limit: 768px; }
}
@media (min-width: 1024px) {
    html:lang(es) .page-footer:has(#footer-widgets) { --nf-limit: 1024px; }
}
@media (min-width: 1280px) {
    html:lang(es) .page-footer:has(#footer-widgets) { --nf-limit: 1280px; }
}
@media (min-width: 1536px) {
    html:lang(es) .page-footer:has(#footer-widgets) { --nf-limit: 1440px; }
}
@media (max-width: 1023px) {
    html:lang(es) .page-footer #footer-widgets > .container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: 40px auto auto auto auto auto auto;
    }
    html:lang(es) .page-footer #footer-widgets .footer-contact > .title,
    html:lang(es) .page-footer #footer-widgets .textwidget > p:nth-of-type(1),
    html:lang(es) .page-footer #footer-widgets .textwidget > p:nth-of-type(2) {
        grid-column: 2;
    }
    html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(2) {
        grid-column: 1;
        grid-row: 4;
        margin-top: 14px;
    }
    html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(3) {
        grid-column: 2;
        grid-row: 4;
        margin-top: 14px;
    }
    html:lang(es) .page-footer #footer-widgets .footer-quicklinks { grid-row: 5; }
    html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(4) { grid-row: 6; }
    html:lang(es) .page-footer #footer-widgets .footer-copyright-vertical { grid-row: 7; }
}
@media (max-width: 767px) {
    html:lang(es) .page-footer #footer-widgets > .container {
        grid-template-rows: 32px auto auto auto auto auto auto auto auto auto;
        gap: 14px 20px;
        width: 100%;
        padding: 28px 20px 0;
    }
    html:lang(es) .page-footer #footer-widgets .footer-main > .row::before {
        width: 94px;
        height: 32px;
    }
    html:lang(es) .page-footer #footer-widgets .textwidget > p:nth-of-type(3),
    html:lang(es) .page-footer #footer-widgets .footer-main > .row > div > .social-links {
        grid-column: 1 / -1;
    }
    html:lang(es) .page-footer #footer-widgets .footer-main .title { font-size: 16px; }
    html:lang(es) .page-footer #footer-widgets .footer-links { gap: 10px; font-size: 14px; }
    html:lang(es) .page-footer #footer-widgets .footer-contact > .title {
        grid-column: 1 / -1;
        grid-row: 5;
        margin: 14px 0 0;
    }
    html:lang(es) .page-footer #footer-widgets .textwidget > p:nth-of-type(1) {
        grid-column: 1 / -1;
        grid-row: 6;
    }
    html:lang(es) .page-footer #footer-widgets .textwidget > p:nth-of-type(2) {
        grid-column: 1 / -1;
        grid-row: 7;
    }
    html:lang(es) .page-footer #footer-widgets .footer-quicklinks { grid-row: 8; }
    html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(4) { grid-row: 9; }
    html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(4) .title { font-size: 13px; }
    html:lang(es) .page-footer #footer-widgets .footer-main > .row > :nth-child(4) .footer-links { font-size: 13px; }
    html:lang(es) .page-footer #footer-widgets .footer-copyright-vertical { grid-row: 10; font-size: 11px; }
    html:lang(es) .page-footer #footer-widgets .footer-copyright-vertical > .row { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    html:lang(es) .page-footer #footer-widgets .mr-payment { align-items: flex-start; }
    html:lang(es) .page-footer:has(#footer-widgets) .wrp-developer .container { width: 100%; padding-inline: 20px; }
}
