/* CareEarth storefront footer — icons, polish */

footer.careearth-shop-footer {
    position: relative;
    margin-top: 3rem;
    padding: 3.25rem 0 2.75rem;
    color: rgba(255, 255, 255, 0.96) !important;
    /*
     * Layered art + gradients (careearth-footer-art.png): watercolor eco art shines softly
     * through a stronger brand tint so light text stays clearly legible.
     */
    background:
        linear-gradient(
            168deg,
            rgba(5, 95, 75, 0.78) 0%,
            rgba(15, 85, 125, 0.74) 46%,
            rgba(125, 95, 18, 0.74) 100%
        ),
        linear-gradient(to top, rgba(15, 23, 42, 0.45) 0%, transparent 55%),
        url('../images/careearth-footer-art.png') center center / cover no-repeat,
        linear-gradient(165deg, #bbf7d0 0%, #a5f3fc 42%, #fef08a 100%) !important;
    background-color: transparent !important;
    border-top: 1px solid rgba(52, 211, 153, 0.40);
    overflow: hidden;
}

footer.careearth-shop-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        125deg,
        rgba(167, 243, 208, 0.30) 0%,
        rgba(125, 211, 252, 0.26) 42%,
        rgba(253, 224, 71, 0.28) 100%
    );
    background-size: 100% 100%;
    opacity: 0.72;
}

footer.careearth-shop-footer .container-fluid {
    position: relative;
    z-index: 1;
}

/*
 * Footer content width: use most of the viewport with comfortable side padding.
 * Grid gaps are symmetric only (no per-column padding) so all column spacing matches.
 */
footer.careearth-shop-footer .careearth-footer-container {
    width: 100%;
    max-width: min(100%, 96rem);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4.5vw, 2.75rem);
    box-sizing: border-box;
}

/* Four equal columns on xl; 2×2 on md–lg; single column on narrow screens */
.careearth-footer-row.row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    --careearth-footer-col-gap: clamp(1.75rem, 3vw, 2.5rem);
    margin-inline: 0;
    row-gap: 2.25rem;
    width: 100%;
}

.careearth-footer-row > [class*='col-'] {
    min-width: 0;
    padding-inline: 0;
}

@media (min-width: 768px) {
    .careearth-footer-row.row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: var(--careearth-footer-col-gap);
        row-gap: 2.25rem;
        align-items: start;
    }

    .careearth-footer-row > [class*='col-'] {
        width: 100%;
        max-width: none;
    }

    /*
     * Payment card fills its track; add inner padding so it doesn’t sit flush
     * against the social column (md 2×2 and xl 4-col).
     */
    .careearth-footer-row > .careearth-payment-section {
        padding-inline-end: clamp(0.75rem, 2vw, 1.75rem);
    }

    .careearth-footer-row > .footer-right {
        padding-inline-start: clamp(0.75rem, 2vw, 1.75rem);
    }
}

@media (min-width: 1200px) {
    /*
     * Column 2 (会社について) slightly narrow → less empty track before お支払い方法,
     * so those two blocks read closer together. Payment gets a touch more width.
     */
    .careearth-footer-row.row {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 0.82fr)
            minmax(0, 1.1fr)
            minmax(0, 1fr);
        column-gap: var(--careearth-footer-col-gap);
        row-gap: 0;
    }

    .careearth-footer-row > .careearth-payment-section {
        padding-inline-end: clamp(1.25rem, 2.5vw, 2.25rem);
    }

    .careearth-footer-row > .footer-right {
        padding-inline-start: clamp(1.25rem, 2.5vw, 2.25rem);
    }
}

.careearth-footer-col {
    opacity: 1;
}

.careearth-shop-footer .footer-block h2 {
    position: relative;
    font-size: 1.0625rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.30);
    margin-bottom: 1.15rem;
    padding-bottom: 0.65rem;
}

.careearth-shop-footer .footer-block h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.5rem;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #34d399, #38bdf8, #fbbf24);
}

/* About column: clearer spacing around heading + Company (CareEarth Martについて) + support badges */
.careearth-footer-col--about {
    padding-block: 0.55rem;
}

.careearth-footer-col--about .footer-block h2 {
    margin-bottom: 1.9rem;
    padding-bottom: 1rem;
}

.careearth-footer-col--about .footer-block > p:first-of-type {
    margin-bottom: 0.55rem;
}

.careearth-footer-col--about .careearth-footer-about-company {
    margin-top: 0.95rem;
    margin-bottom: 0.35rem;
}

/* Shopping + customer support thumbnails side by side, close together */
.careearth-footer-col--about .careearth-footer-support-badges--about {
    margin-top: 1.85rem;
    flex-direction: row;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0.5rem;
    max-width: 100%;
}

.careearth-footer-col--about .careearth-footer-support-badges--about .careearth-footer-support-badges__item {
    flex: 1 1 0;
    min-width: 0;
}

.careearth-shop-footer .footer-block p {
    margin: 0 0 0.35rem;
}

.careearth-shop-footer p a.careearth-footer-link {
    padding: 0;
    letter-spacing: normal;
}

.careearth-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.6rem 0.45rem 0.35rem;
    margin: 0.1rem 0;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.96) !important;
    text-decoration: none !important;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.careearth-footer-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.10);
    transform: translateX(4px);
}

.careearth-footer-link:focus-visible {
    outline: 2px solid #34d399;
    outline-offset: 2px;
}

.careearth-footer-link__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 0.5rem;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    color: #d1fae5;
    transition:
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease,
        filter 0.2s ease;
}

.careearth-footer-link:hover .careearth-footer-link__icon {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.12));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.20),
        0 6px 16px rgba(0, 0, 0, 0.22);
    filter: brightness(1.08);
}

.careearth-footer-link__icon svg {
    width: 1.28rem;
    height: 1.28rem;
    display: block;
}

.careearth-footer-link__text {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Social: one link per line (same rhythm as legal / about links) */
.careearth-shop-footer .social {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    max-width: 100%;
}

.careearth-shop-footer .social p {
    margin: 0;
    width: 100%;
}

.careearth-shop-footer .social .careearth-social-link {
    width: 100%;
    max-width: max-content;
}

.careearth-shop-footer .social p a.careearth-social-link {
    letter-spacing: normal;
}

.careearth-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.55rem;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.96) !important;
    text-decoration: none !important;
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        color 0.2s ease;
}

.careearth-social-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.10);
    transform: translateX(4px);
}

.careearth-social-link__icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.45rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

.careearth-social-link--facebook .careearth-social-link__icon {
    background: #1877f2;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(24, 119, 242, 0.28);
}

.careearth-social-link--tiktok .careearth-social-link__icon {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.careearth-social-link__icon--tiktok {
    overflow: visible;
}

.careearth-social-link__icon--tiktok svg {
    display: block;
    width: 1.1em;
    height: 1.1em;
}

/* Footer: shopping / customer support badges (e.g. under About / Company) */
.careearth-footer-support-badges {
    margin-top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
    max-width: min(100%, 13.5rem);
}

.careearth-footer-support-badges__item {
    margin: 0;
}

.careearth-footer-support-badges__link {
    display: block;
    border-radius: 0.5rem;
    overflow: hidden;
    line-height: 0;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.careearth-footer-support-badges__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.careearth-footer-support-badges__link:focus-visible {
    outline: 2px solid #34d399;
    outline-offset: 3px;
}

.careearth-footer-support-badges__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    vertical-align: middle;
}

/* Back to top — subtle pulse */
#toTop.careearth-btt {
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.35);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

#toTop.careearth-btt:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(217, 119, 6, 0.45);
}

/* Payment methods — glass panel on dark footer (reads as one surface) */
.careearth-payment-section {
    margin-top: 0;
    max-width: none;
}

.careearth-payment-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.1rem 1rem 1.2rem;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 12px 40px -16px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.22);
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.careearth-payment-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(148, 163, 184, 0.32);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.10) inset,
        0 20px 48px -20px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
    .careearth-payment-card:hover {
        transform: none;
    }
}

.careearth-payment-title {
    margin: 0 0 0.75rem;
    font-size: 1.0625rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.30);
}

.careearth-payment-card--graphic {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.75rem 1.05rem;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
}

.careearth-payment-card--graphic .careearth-payment-title {
    margin-bottom: 0.65rem;
    font-size: 1.0625rem;
    text-align: center;
    letter-spacing: 0.18em;
    width: 100%;
    align-self: stretch;
}

.careearth-payment-tiles-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: min(100%, 16rem);
    margin-inline: auto;
    justify-items: center;
}

@media (min-width: 480px) {
    .careearth-payment-tiles-grid {
        gap: 0.32rem;
    }
}

.careearth-payment-thumb {
    border-radius: 0.5rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.10);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
    max-width: 7.25rem;
    max-height: clamp(4.25rem, 17vw, 7.25rem);
    margin-inline: auto;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.careearth-payment-thumb:hover {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(52, 211, 153, 0.35);
}

.careearth-payment-thumb__img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.careearth-payment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 480px) {
    .careearth-payment-grid {
        gap: 1rem;
    }
}

.careearth-payment-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.65rem 0.6rem;
    border-radius: 0.65rem;
    border: 1px solid transparent;
    min-height: 4.75rem;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.careearth-payment-tile:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

@media (prefers-reduced-motion: reduce) {
    .careearth-payment-tile:hover {
        transform: none;
    }
}

.careearth-payment-tile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    margin-bottom: 0.15rem;
}

.careearth-payment-tile__icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.careearth-payment-tile__icon--brand {
    font-weight: 900;
    font-size: 1rem;
    line-height: 1;
    color: #fff;
    background: linear-gradient(135deg, #ff0019, #ff4b2b);
}

.careearth-payment-tile__icon--visa {
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #1a1f71;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
}

.careearth-payment-tile--cod {
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: rgba(16, 185, 129, 0.45);
    color: #047857;
}

.careearth-payment-tile--cod .careearth-payment-tile__icon {
    background: rgba(16, 185, 129, 0.2);
    color: #059669;
}

.careearth-payment-tile--paypay {
    background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%);
    border-color: rgba(249, 115, 22, 0.45);
    color: #c2410c;
}

.careearth-payment-tile--card {
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    border-color: rgba(59, 130, 246, 0.45);
    color: #1d4ed8;
}

.careearth-payment-tile--card .careearth-payment-tile__icon {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.careearth-payment-tile--visa {
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    border-color: rgba(100, 116, 139, 0.45);
    color: #334155;
}

.careearth-payment-tile__primary {
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.25;
}

.careearth-payment-tile__secondary {
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.35;
    opacity: 0.92;
}

/* All breakpoints: last column left-aligned like legal / about */
footer.careearth-shop-footer .footer-right {
    text-align: start !important;
}

footer.careearth-shop-footer .footer-right .footer-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 0;
    margin-right: 0;
}

/* Left-align link columns (theme centers footer text on md+) */
@media (min-width: 768px) {
    footer.careearth-shop-footer .footer-left,
    footer.careearth-shop-footer .footer-center,
    footer.careearth-shop-footer .footer-right {
        text-align: start !important;
    }

    footer.careearth-shop-footer .footer-block {
        display: block;
        margin-left: 0;
        margin-right: 0;
    }

    footer.careearth-shop-footer .footer-right .footer-block {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Bottom bar — copyright */
.careearth-footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.30);
}

.careearth-footer-copyright {
    margin: 0;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.78);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.30);
    line-height: 1.5;
}
