footer {
    background: #ffffff;
    color: var(--black);
    padding: 40px 20px 24px;
    margin-top: 60px;
    border-top: 1px solid var(--border-soft);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    align-items: flex-start;
}

.footer-col {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col-wrapper {
    display: flex;
    gap: 40px;
    flex: 2;
    min-width: 0;
}

.footer-col-wrapper>.footer-col {
    flex: 1;
    min-width: 0;
}

.footer-brand {
    gap: 10px;
}

.footer-logo {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--black);
}

.footer-tagline {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: #475569;
}

.footer-links-title,
.footer-contact-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.footer-links a,
.footer-contact a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--green);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.footer-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
    font-size: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover {
    background: var(--green);
    transform: translateY(-2px);
    color: #fff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #64748b;
}

.footer-bottom a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--green);
}

@media (max-width: 768px) {
    .footer-inner {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .footer-brand {
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .footer-tagline {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
        margin-top: 12px;
    }

    /* สร้าง 2 คอลัมน์สำหรับหมวดหมู่และติดต่อเรา */
    .footer-col-wrapper {
        display: flex;
        flex-direction: row;
        gap: 16px;
        width: 100%;
    }

    .footer-col-wrapper>.footer-col {
        flex: 1;
        min-width: 0;
        text-align: left;
    }

    .footer-links-title,
    .footer-contact-title {
        font-size: 12px;
    }

    .footer-links,
    .footer-contact {
        font-size: 11px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }
}

/* Line Floating Button for Mobile */
.line-floating-btn {
    display: none;
}

@media (max-width: 768px) {
    .line-floating-btn {
        display: flex !important;
        position: fixed;
        bottom: 20px;
        right: 16px;
        z-index: 9996;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: all 0.3s ease;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
        width: 55px;
        height: 55px;
        box-sizing: border-box;
        padding: 5px;
        border-radius: 50%;
        background: #ffffff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .line-floating-btn:active {
        transform: scale(0.95);
    }

    .line-floating-btn:hover {
        transform: scale(1.05);
    }

    /* Adjust position if cart notification is visible */
    .cart-notification.show~.line-floating-btn,
    body:has(.cart-notification.show) .line-floating-btn {
        bottom: 80px;
    }
}